body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #333;
    color: #ffffff;
}

/* Regroupement des titres pour la couleur */
h1,
h2,
h3 {
    color: #c0392b;
    /* Rouge foncé */
}

h2 {
    margin-top: 2em;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 0.5em;
}

a {
    color: #c0392b;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #292929;
    padding: 2px 4px;
    border-radius: 3px;
}

pre {
    background-color: #292929;
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto;
    /* Permet le scrolling horizontal */
    border: 1px solid #ddd;
}

/* Disposition principale avec flexbox */
body>div {
    display: flex;
    min-height: 100vh;
}

/* Menu latéral (navigation) */
header {
    width: 15%;
    background-color: #292929;
    color: #fff;
    padding: 1em;
    position: fixed;
    flex-shrink: 0;
    /* Empêche le menu de rétrécir */
}

.menu-principal {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    /* Permet au menu de se mettre sur plusieurs lignes */
    align-items: stretch;
}

.menu-principal li {
    width: 100%;
}

.menu-principal a {
    display: block;
    padding: 0.5em 1em;
    color: #fff;
    transition: background-color 0.3s;
    text-align: center;
}

.menu-principal a:hover {
    background-color: #555;
    text-decoration: none;
    /* Pas de soulignement au survol */
}

/* Contenu principal */
main {
    flex: 1;
    padding: 2em;
    overflow-y: auto;
    max-width: 70%;
    /* Largeur maximale du contenu */
    margin-left: auto;
    /* Centrage horizontal (Solution 1) */
    margin-right: auto;
    /* Centrage horizontal (Solution 1) */
    width: auto;
    /* Important pour le centrage avec max-width */
    padding-left: 18%;
    /* CRUCIAL: Marge intérieure pour le menu fixe */
}

/* Styles pour les sections */
section {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 1px solid #ddd;
}

/* Pied de page */
footer {
    text-align: center;
    padding: 1em;
    background-color: #333;
    color: #ffffff;
}

/* Regroupement des styles pour les boutons de navigation */
.nav-button {
    display: inline-block;
    padding: 0.5em 1em;
    background-color: #c0392b;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    margin-bottom: 1rem;
}

.nav-button:hover {
    background-color: #992d22;
    text-decoration: none;
}

.note {
    font-style: italic;
    color: #777;
}

/* Styles specifique pour les tableaux */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #c0392b;
    color: white;
}

/* Style pour le formulaire (exemple tres basique) */
form div {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: .2rem;
    font-weight: bold;
}

/* Regroupement des styles pour les inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: .5rem;
    border: 1px solid #ffffff;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #757575;
    color: #000000;
    transition: border-color 0.3s ease;
}

::placeholder {
    color: #000000;
    opacity: 1;
}

/* Regroupement des styles pour les checkbox et radio */
input[type="radio"],
input[type="checkbox"] {
    margin-right: .3rem;
}

/* Regroupement des styles pour les boutons de formulaire */
button[type="submit"],
button[type="reset"] {
    background-color: #c0392b;
    color: white;
    padding: 0.5em 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
}

button[type="submit"]:hover,
button[type="reset"]:hover {
    background-color: #992d22;
}

/* Styles pour les images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0.5em;
}

/* Regroupement des styles pour les figures */
figure {
    margin: 0 0 1rem 0;
    text-align: center;
}

figcaption {
    font-style: italic;
    font-size: 0.9em;
    color: #666;
}

/* Media query pour les petits écrans (responsive) */
@media (max-width: 768px) {
    body>div {
        flex-direction: column;
    }

    header {
        position: static;
        width: 100%;
        height: auto;
    }

    .menu-principal a {
        font-size: 0.9em;
        /* Réduit légèrement la taille du texte */
    }

    main {
        /* Pas besoin de margin-left: 0; ici, car le menu n'est plus fixe */
        max-width: 100%;
        width: 100%;
        padding-left: 1em;
        /* Réduit le padding pour les petits écrans */
        padding-right: 1em;
        /* Ajoute un padding à droite aussi */
    }
}
