partirdezero/static/css/design.css
2025-09-12 11:07:53 +02:00

455 lines
No EOL
6.9 KiB
CSS

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
html {
display: flex;
flex-direction: column;
font-size: 16px;
font-family: "Montserrat";
scroll-behavior: smooth;
}
body {
display: flex;
flex-direction: column;
margin: 0;
}
nav {
display: flex;
/*position: fixed;*/
/*width: 100vw;*/
align-items: center;
justify-content: space-between;
top: 0;
padding: 0 10px;
height: 80px;
border-bottom: 2px solid #000;
}
.navbar {
display: flex;
width: 70%;
justify-content: flex-start;
margin-right: 30px;
}
.navbar ul, .navbar li {
list-style: none;
padding: 0;
margin: 0;
}
.navbar ul {
display: flex;
flex-direction: row;
width: 100%;
}
.navbar li {
position: relative;
margin: auto 10px;
}
.navend {
margin-right: 20px;
display: flex;
width: 100%;
align-items: end;
flex-direction: row-reverse;
}
.navend a {
cursor: pointer;
}
.navbar ul ul {
display: none;
position: absolute;
width: auto;
left: 0;
top: 100%;
flex-direction: column;
transform: translateX(-25%);
}
.navbar li:hover ul,
.navbar li ul:hover {
display: flex; /* Changed to flex to support horizontal layout */
}
.navbar ul ul li {
width: auto; /* Adjust width for inline layout */
margin: auto 10px;
padding: 10px;
border-left: 1px solid;
}
.navbar ul ul li:first-child {
margin-top: 20px;
}
.navbar ul ul a {
display: block;
padding: 0 0 10px 0;
text-decoration: none;
white-space: nowrap; /* Prevents text from wrapping */
}
.brand {
font-size: 1.5rem;
font-weight: 600;
letter-spacing: 0.2cm;
font-variant: small-caps;
}
.subtitle {
font-size: 1rem;
letter-spacing: 0.05cm;
}
a {
text-decoration: none;
font-weight: 600;
transition: all 1s;
scroll-margin-top: 80px;
}
.button {
padding: 5px;
max-width: 300px;
cursor: pointer;
font-size: 1.5rem;
border: 1px solid;
border-radius: 2px;
margin: 20px;
}
.button-grp {
display: flex;
flex-direction: row;
justify-content: center;
width: 100%;
}
main {
flex: 1;
}
section {
display: flex;
flex-direction: column;
padding: 20px;
width: 60%;
margin: 20px auto;
}
.courseNav {
display: block;
float: left;
position: fixed;
left: 0;
top: 150px;
max-width: 15%;
border: 1px solid;
}
.edito {
border: 1px solid;
border-radius: 5px;
}
.comment {
font-weight: 500;
}
.test {
border: 1px solid;
padding: 10px;
}
.ul-arrow li {
list-style: none;
}
.ul-arrow li:before {
content: "→ ";
font-size: 1.5rem;
}
h1 {
font-size: 2rem;
border-left: 5px solid;
border-bottom: 1px solid;
}
h2 {
font-size: 1.5rem;
}
img {
max-width: 100%;
}
.card-header img.thumbnails {
transition: transform 1s ease
}
.card:hover img.thumbnails {
transform: scale(1.2);
}
.container-inline {
display: flex;
flex-direction: row;
}
.card {
display: flex;
flex-direction: column;
max-width: 250px;
border-left: 1px solid;
border-top: 1px solid;
border-radius: 2px;
overflow: hidden;
margin: 20px;
}
.card-header h2 {
display: flex;
overflow: hidden;
}
.card-header {
display: flex;
width: 100%;
font-size: 1rem;
font-weight: 500;
}
.card-body a {
font-size: 1rem;
font-weight: 600;
}
.card-body a:hover {
text-decoration: underline
}
.card-body {
border-top: 1px solid;
padding: 5px;
line-height: 90%;
overflow: hidden;
z-index: 3;
}
.def-author {
display: flex;
padding: 10px;
flex-direction: row;
align-items: center;
font-size: 0.8rem;
font-style: italic;
}
/* CODE */
.inline {
display: inline-block;
}
pre {
border-radius: 5px;
}
code {
font-family: "Courier New", Courier, monospace;
border-radius: 5px;
}
.alert {
border: 1px solid;
border-radius: 2px;
padding: 20px;
margin: 20px 0;
}
.question {
background-image: url('../img/question.png') right no-repeat;
}
#hide {
display: none;
}
footer {
flex-direction: column;
background-color: #252525;
color: #8d8d8d;
padding: 10px;
flex-shrink: 0;
}
.footer {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.about {
width: 30%;
}
.footer-link {
width: 30%;
}
@media (max-width: 1000px) {
.courseNav {
display: block;
position: relative;
top: 0;
border: 0;
max-width: 100%;
box-shadow: 0 0 transparent;
background-color: transparent;
}
}
@media (max-width: 678px) {
nav {
position: absolute;
height: auto;
align-items
: flex-start;
justify-content: flex-start;
flex-direction: column;
width: 100%;
}
.navbar {
width: 100%;
}
.navbar ul {
flex-direction: column;
width: 100%;
}
.navbar ul li {
width: 100%;
}
.navbar ul ul {
position: static;
flex-direction: column;
}
.navbar ul ul li {
width: 100%;
margin: 0;
}
.navbar ul ul a {
padding: 10px 20px;
}
/* Initialement, les sous-menus sont cachés */
.navbar ul ul {
display: none;
}
/* Afficher les sous-menus lorsque l'élément parent est focalisé */
.navbar li:focus-within > ul {
display: flex;
}
/* Styles pour les liens parents pour permettre le focus */
.navbar a {
display: block;
padding: 10px;
text-decoration: none;
}
.navbar li > a:focus + ul {
display: flex;
}
section {
margin: 300px auto;
width: 85%;
}
.submenu {
display: none;
}
}
/* design.css */
.snowflake {
position: fixed;
top: -10px;
color: white;
font-size: 1em;
opacity: 0.8;
filter: blur(1px);
z-index: 1000; /* Assurez-vous que les flocons sont au premier plan */
pointer-events: none; /* Empêche les flocons d'interférer avec les clics */
animation: fall linear infinite;
}
@keyframes fall {
to {
transform: translateY(100vh);
}
}
/* design.css */
.light {
animation: blink 1s infinite;
}
.light:nth-child(2) {
animation-delay: 0.2s;
}
.light:nth-child(3) {
animation-delay: 0.4s;
}
.light:nth-child(4) {
animation-delay: 0.6s;
}
.light:nth-child(5) {
animation-delay: 0.8s;
}
.light:nth-child(6) {
animation-delay: 1s;
}
.light:nth-child(7) {
animation-delay: 1.2s;
}
.light:nth-child(8) {
animation-delay: 1.4s;
}
.light:nth-child(9) {
animation-delay: 1.6s;
}
.light:nth-child(10) {
animation-delay: 1.8s;
}
@keyframes blink {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}