/* =================================== */
/* 1. Configuration Globale & Police   */
/* =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'MaPolice';
    src: url('../font/ma-police.woff2') format('woff2'),
         url('../font/ma-police.woff') format('woff'),
         url('../font/ma police.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* =================================== */
/* 2. Styles par Défaut (Thème Clair)  */
/* =================================== */

body {
    font-family: Arial, sans-serif;
    background-color: #5DADE2; 
}

/* Conteneur principal qui gère le changement de thème */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #5DADE2; /* Fond bleu par défaut */
    color: black; /* Texte noir par défaut */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: #ffffff;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Cache la case à cocher pour le changement de thème */
.theme-toggle-checkbox {
    display: none;
}

/* =================================== */
/* 3. Header (En-tête)                 */
/* =================================== */

header {
    background-color: #00A86B; /* Header vert */
    padding: 20px 0; 
    transition: background-color 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: none;
    margin: 0;
    padding: 0 40px; 
}

.logo {
    height: 90px; 
    z-index: 110;
    vertical-align: middle; 
    line-height: 0; 
    cursor: pointer; /* Indique le clic pour le thème */
}

/* Titre "Mode Histoire" (page Mission) */
.header-title {
    font-family: 'MaPolice', sans-serif; 
    font-size: 2.5rem; 
    color: #ffffff; 
    text-transform: uppercase;
    text-shadow:
        -2px -2px 0 black,
         2px -2px 0 black,
        -2px  2px 0 black,
         2px  2px 0 black;
}

/* Navigation principale (PC) */
header nav {
    display: flex;
    position: static;
    flex-direction: row;
    width: auto;
    background-color: transparent;
    padding-bottom: 0;
}
header nav ul {
    display: flex;
    flex-direction: row; 
}
header nav li {
    margin: 0 0 0 30px; 
    text-align: left;
}
header nav a {
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1.25rem;
    transition: color 0.3s ease;
    color: white; /* Liens de nav blancs */
}
header nav a:hover {
    color: #F9E79F;
}

/* Menu Hamburger (Mobile) */
.menu-toggle-checkbox {
    display: none;
}

.menu-hamburger {
    display: none; 
    border: none;
    background: none;
    cursor: pointer;
    padding: 10px;
}
.menu-hamburger span {
    display: block;
    width: 30px;
    height: 4px;
    background-color: white; /* Hamburger blanc */
    margin-bottom: 5px;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}
.menu-hamburger span:last-child {
    margin-bottom: 0;
}

/* =================================== */
/* 4. Contenu Principal (Main)         */
/* =================================== */

main {
    transition: color 0.3s ease;
    padding-bottom: 1px; /* Correction anti-marge */
    flex-grow: 1; /* Pousse le footer en bas */
}

.main-title {
    font-family: 'MaPolice', sans-serif;
    font-size: 80px; 
    font-weight: 900; 
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: white; 
    margin-top: 40px; 
    margin-bottom: 40px;
    text-shadow:
        -5px -5px 0 black,
         5px -5px 0 black,
        -5px  5px 0 black,
         5px  5px 0 black;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* --- Sous-Navigation (Pages Histoire/Mission) --- */
.sub-nav {
    background-color: white; /* Fond blanc */
    padding: 15px 0;
    margin-bottom: 40px;
    transition: background-color 0.3s ease;
}
.sub-nav ul {
    display: flex;
    justify-content: center;
    gap: 40px;
}
.sub-nav a {
    color: #121212; /* Texte noir */
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
}
.sub-nav-toggle-checkbox {
    display: none;
}
.sub-nav-trigger {
    display: none;
    color: #121212; /* Texte noir (pour mobile) */
}


/* --- Blocs de Contenu (Page Histoire) --- */
.main-image-container {
    text-align: center;
    margin-bottom: 40px;
}
.main-image-container img {
    max-width: 100%;
    height: auto;
    border: 3px solid black; 
    border-radius: 8px; 
    transition: border-color 0.3s ease;
}

.content-block {
    max-width: 800px; 
    margin: 0 auto 60px auto; 
    text-align: center;
}
.content-block h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: white; 
    text-shadow: 2px 2px 0 black; 
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.content-block p {
    font-size: 1rem;
    line-height: 1.6;
}

/* --- Blocs de Contenu (Page Accueil & Mission) --- */
.video-section {
    text-align: center;
    margin-bottom: 60px;
}
.video-section h2 {
    font-size: 1.8rem; 
    margin-bottom: 25px;
    color: black; 
    transition: color 0.3s ease;
}
.video-container {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    max-width: 900px; 
    margin: 0 auto;
    border: 3px solid black; 
    border-radius: 10px;
    transition: border-color 0.3s ease, max-width 0.3s ease, border-radius 0.3s ease;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.content-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px; 
    margin-bottom: 60px;
}
.text-content {
    flex: 1; 
    transition: color 0.3s ease;
}
.image-content {
    flex-basis: 300px; 
    text-align: center;
}
.image-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.content-section h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: white; 
    text-shadow: 2px 2px 0 black; 
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.content-section p {
    font-size: 1rem;
    line-height: 1.6;
}
.content-section.reverse {
    flex-direction: row-reverse;
}

/* =================================== */
/* 5. Footer (Pied de page)            */
/* =================================== */

footer {
    background-color: #00A86B; /* Footer vert */
    padding: 40px 0; 
    position: relative; 
    transition: background-color 0.3s ease;
}
.footer-container {
    display: flex;
    justify-content: center; 
    align-items: center;
    max-width: none;  
    margin: 0;        
    padding: 0 30px;
    position: relative; 
}
footer a {
    font-weight: bold;
    font-size: 1.2rem; 
    color: white; /* Mentions légales blanches */
    transition: color 0.3s ease;
}
.footer-icons {
    display: flex;
    gap: 15px; 
    position: absolute;
    right: 40px; 
    top: 50%;
    transform: translateY(-50%);
}
.icon-box {
    display: flex;
    justify-content: center;
    align-items: center;
    /* On a supprimé : width, height, background-color, color, font-size, et border-radius */
    transition: transform 0.3s ease; /* On garde juste la transition pour le zoom */
}
.icon-box:hover {
    transform: scale(1.1);
}
/* Cible les images A L'INTERIEUR des boîtes d'icônes */
.icon-box img {
    height: 40px; /* Tu peux ajuster cette valeur (ex: 35px, 45px...) */
    width: auto;  /* Garde les bonnes proportions */
}
/* Par défaut, on cache l'image sombre */
.icon-box .img-sombre {
    display: none;
}
/* Par défaut, on s'assure que l'image claire est visible */
.icon-box .img-claire {
    display: block; /* ou 'inline', 'block' est plus sûr */
}
/* =================================== */
/* 6. Responsive (Tablette)            */
/* =================================== */

@media (max-width: 1024px) {
    header nav {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 130px; 
        left: 0;
        width: 100%;
        background-color: #00A86B; 
        z-index: 100;
        padding-bottom: 15px;
        transition: background-color 0.3s ease;
    }
    
    .menu-toggle-checkbox:checked ~ nav {
        display: flex; 
    }

    header nav ul {
        flex-direction: column;
    }
    header nav li {
        margin: 15px 0; 
        text-align: center;
    }
    header nav a {
        color: white; 
    }

    .menu-hamburger {
        display: block; 
    }
    
    .main-title {
        font-size: 60px; 
    }

    .header-title {
        font-size: 2rem; 
    }
}

/* =================================== */
/* 7. Responsive (Téléphone)           */
/* =================================== */

@media (max-width: 767px) {
    .nav-container {
        padding: 0 20px; 
    }
    .logo {
        height: 70px; 
    }
    header nav {
        top: 110px; 
        background-color: #00A86B; 
    }

    header nav a {
        color: white; 
    }

    .header-title {
        font-size: 1.5rem; 
        /* Rétablissement du text-shadow pour mobile */
        text-shadow:
            -1px -1px 0 black,
             1px -1px 0 black,
            -1px  1px 0 black,
             1px  1px 0 black;
    }

    .main-title {
        font-size: 45px; 
        margin-top: 20px; 
        margin-bottom: 20px;
    }
    .video-section h2 {
        font-size: 1.3rem; 
    }

    .content-section,
    .content-section.reverse {
        flex-direction: column;
    }
    .content-section .text-content {
        margin-bottom: 20px; 
    }
    .content-section .image-content {
        flex-basis: auto;
        width: 100%;
        max-width: 250px; 
    }

    /* --- Sous-Nav Mobile --- */
    .sub-nav {
        padding: 0;
        margin-bottom: 20px; 
        margin-top: 0; 
    }
    
    .sub-nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        background-color: white; 
        transition: background-color 0.3s ease;
    }
    .sub-nav li {
        border-top: 1px solid #eeeeee; 
        text-align: center;
        transition: border-color 0.3s ease;
    }
    .sub-nav a {
        font-size: 1rem; 
        padding: 15px;
        display: block; 
        color: #121212; 
    }

    .sub-nav-trigger {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        color: #121212; 
        font-size: 1.1rem;
        cursor: pointer;
        font-weight: bold;
        transition: color 0.3s ease;
    }
    .sub-nav-trigger i {
        transition: transform 0.3s ease;
    }
    
    .sub-nav-toggle-checkbox:checked ~ ul {
        display: flex;
    }
    .sub-nav-toggle-checkbox:checked ~ .sub-nav-trigger i {
        transform: rotate(180deg);
    }

    .content-block {
        text-align: left; 
    }
    .content-block h3 {
        text-align: center; 
    }

    /* --- Footer Mobile --- */
    .footer-container {
        justify-content: flex-start; 
        padding: 0 20px; 
    }
    footer a {
        font-size: 1rem;
    }
    .footer-icons {
        gap: 10px;
        right: 20px;
    }
    .icon-box {
    width: 40px; /* <-- Supprime cette ligne */
    height: 40px; /* <-- Supprime cette ligne */
    font-size: 1.5rem; /* <-- Tu peux aussi supprimer ça */
    }
}

/* =================================== */
/* 8. Thème Sombre (Override)          */
/* =================================== */

#theme-toggle:checked ~ .site-wrapper {
  background-color: #121212;
  color: white; 
}

#theme-toggle:checked ~ .site-wrapper header {
  background-color: #6a206d;
}

#theme-toggle:checked ~ .site-wrapper .menu-hamburger span {
    background-color: #f0c500;
}

#theme-toggle:checked ~ .site-wrapper header nav a {
  color: #FFAB00;
}
#theme-toggle:checked ~ .site-wrapper header nav a:hover {
  color: #f0c500;
}
#theme-toggle:checked ~ .site-wrapper header nav a:hover {
  color: #E91E63;
}

/* --- Thème Sombre : Nav Mobile --- */
@media (max-width: 1024px) {
    #theme-toggle:checked ~ .site-wrapper header nav {
        background-color: #6a206d; 
    }
    #theme-toggle:checked ~ .site-wrapper header nav a {
        color: #FFAB00; 
    }
}
@media (max-width: 767px) {
    #theme-toggle:checked ~ .site-wrapper header nav {
        background-color: #6a206d; 
    }
    #theme-toggle:checked ~ .site-wrapper header nav a {
        color: #FFAB00; 
    }
}

/* --- Thème Sombre : Contenu --- */
#theme-toggle:checked ~ .site-wrapper .main-title {
  color: white;
  text-shadow:
    -5px -5px 0 black,
     5px -5px 0 black,
    -5px  5px 0 black,
     5px  5px 0 black;
}

#theme-toggle:checked ~ .site-wrapper .sub-nav {
  background-color: #f39c12; 
}
#theme-toggle:checked ~ .site-wrapper .sub-nav a {
  color: #6a206d; 
}
#theme-toggle:checked ~ .site-wrapper .sub-nav-trigger {
  color: #6a206d;
}
#theme-toggle:checked ~ .site-wrapper .sub-nav ul {
  background-color: #f39c12;
}
#theme-toggle:checked ~ .site-wrapper .sub-nav li {
  border-top: 1px solid #c98410; 
}

#theme-toggle:checked ~ .site-wrapper .video-section h2 {
  color: white;
}
#theme-toggle:checked ~ .site-wrapper .video-container {
  border-color: #333;
  border-radius: 0;
  max-width: 1000px; 
}

#theme-toggle:checked ~ .site-wrapper .text-content {
  color: white; 
}
#theme-toggle:checked ~ .site-wrapper .content-section h3,
#theme-toggle:checked ~ .site-wrapper .content-block h3 {
  color: #f0c500;
  text-shadow: none;
}
#theme-toggle:checked ~ .site-wrapper .main-image-container img {
    border-color: #333;
}
/* --- Thème Sombre : Icônes Footer --- */
#theme-toggle:checked ~ .site-wrapper footer .icon-box .img-sombre {
    display: block; /* On AFFICHE l'image sombre */
}
#theme-toggle:checked ~ .site-wrapper footer .icon-box .img-claire {
    display: none; /* On CACHE l'image claire */
}
/* --- Thème Sombre : Footer --- */
#theme-toggle:checked ~ .site-wrapper footer {
  background-color: #6a206d;
}
#theme-toggle:checked ~ .site-wrapper footer a {
  color: #FFAB00; 
}

#theme-toggle:checked ~ .site-wrapper footer .icon-box:hover {
    transform: none;
    /* On a enlevé le background */
}
#theme-toggle:checked ~ .site-wrapper footer a:hover {
  color: #E91E63; 
} 