2025-03-23 14:06:44 +01:00

123 lines
2.2 KiB
CSS

/* Styles de base */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
display: flex;
flex-direction: column;
min-height: 100vh;
overflow-x: hidden; /* Empêche le débordement horizontal */
}
header {
background-color: #333;
color: #fff;
display: flex;
justify-content: space-between; /* Aligne le logo et le menu burger */
align-items: center;
padding: 1rem;
position: relative;
width: 100%;
}
#logo h1 {
margin-left: 1rem;
text-align: left;
font-size: 1.5rem;
}
/* Bouton menu burger */
#menu-toggle {
display: none;
font-size: 1.8rem;
background: none;
border: none;
color: #fff;
cursor: pointer;
}
/* Navbar */
#navbar {
display: flex;
justify-content: center;
align-items: center;
width: auto;
margin-right: 1rem;
}
#navbar ul {
list-style: none;
display: flex;
gap: 2rem;
padding: 0;
margin: 0;
}
#navbar a {
color: #fff;
text-decoration: none;
font-weight: bold;
}
#navbar a:hover {
text-decoration: underline;
}
#navbar ul li a.active {
border-bottom: 2px solid #fff; /* Indique la page active */
}
/* Section principale */
section {
padding: 2rem;
text-align: center;
flex-grow: 1;
}
footer {
text-align: center;
padding: 1rem;
background-color: #333;
color: #fff;
width: 100%;
margin-top: auto;
}
/* Navbar en mode mobile */
@media (max-width: 980px) {
#menu-toggle {
display: block; /* Affiche le menu burger */
}
#navbar {
display: none; /* Cache la navbar par défaut */
position: absolute;
top: 60px; /* Position sous le header */
right: 0;
background-color: #333;
padding: 1rem;
flex-direction: column; /* Empile les liens */
width: 200px; /* Largeur du menu */
max-width: 100%; /* Empêche les débordements */
}
#navbar.active {
display: flex; /* Affiche la navbar lorsqu'elle est activée */
}
#navbar ul {
flex-direction: column; /* Les liens sont empilés */
gap: 1rem;
text-align: right;
}
#navbar a {
text-align: right;
}
}