/* =========================================
   1. PANNEAU DE CONTRÔLE (VARIABLES)
   Change ici les couleurs et polices
   ========================================= */
:root {
    /* --- COULEURS DU TEXTE --- */
    --text-main: #E0E0E0;        /* Blanc cassé */
    --text-accent: #FFFFFF;      /* Blanc pur */
    --color-gold: #FFD700;       /* Doré/Jaune (interactif) */
    --color-grey: #666666;       /* Gris */

    /* --- COULEURS DE FOND (THÈMES DYNAMIQUES) --- */
    --bg-accueil:    #b52c2c;    /* rouge vif */
    --bg-compagnie:  #4034af;    /* bleu */
    --bg-membres:    #4d4a0e;    /* vert olive */
    --bg-diffusion:  #1a5b5e;    /* bleu vert */
    --bg-spectacles: #3c1a3f;    /* Nuance rouge */
    --bg-archives:   #15302b;    /* Gris soutenu */
    --bg-agenda:     #18242f;    /* Presque noir */
    --bg-autres:     #4d1212;    /* rouge bordeaux */

    /* --- TYPOGRAPHIE --- */
    --font-title: 'Caveat', Arial, sans-serif;
    --font-body:  'Lexend Giga', sans-serif;
}

/* =========================================
   2. BASES & RESET
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-accueil);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.8s ease; /* Transition fluide des fonds */
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   3. NAVIGATION (DESKTOP)
   ========================================= */
nav {
    position: fixed;
    top: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(0,0,0,0.9); /* Fond semi-transparent */
    backdrop-filter: blur(5px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.menu { display: flex; gap: 20px; }
.menu a { 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    font-weight: bold; 
    color: #ccc; 
}
.menu a:hover { color: var(--color-gold); }

/* =========================================
   4. MENU BURGER (STYLE & ANIMATION)
   ========================================= */
.burger {
    display: none; /* Caché par défaut sur PC */
    cursor: pointer;
    z-index: 1001; /* Au-dessus du menu mobile */
}

.burger span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-main);
    margin: 6px 0;
    transition: 0.4s; /* Vitesse animation */
    border-radius: 2px;
}

/* Hover : tout devient jaune */
.burger:hover span {
    background-color: var(--color-gold);
}

/* État ACTIVÉ (La croix X) */
.burger.toggle span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 7px);
    background-color: var(--color-gold);
}

.burger.toggle span:nth-child(2) {
    opacity: 0; /* La ligne du milieu disparait */
}

.burger.toggle span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -7px);
    background-color: var(--color-gold);
}

/* =========================================
   5. HEADER & ACCUEIL
   ========================================= */
header {
    padding-top: 80px; /* Espace pour le menu fixe */
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* --- TITRE SVG DYNAMIQUE --- */
.svg-title-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto -20px auto;
    
}

.svg-title-container text {
    fill: var(--text-accent);
    font-family: var(--font-title);
    font-weight: 700;
}

/* Style commun */
.svg-line-common {
    font-size: 30px;
    letter-spacing: 6px;
    fill: var(--text-accent);
}

.hero-image {
    max-width: 300px;
    width: 80%;
    margin: 1rem auto;
    border-radius: 4px;
    box-shadow: 0px 0px 30px 30px rgba(0,0,0,0.51);

}

.compagnie-name {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--text-accent);
   
    letter-spacing: 2px;
}

/* =========================================
   6. SECTIONS GÉNÉRALES
   ========================================= */
section {
    padding: 100px 20px;
    min-height: 80vh;
}

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

/* Styles Typo Sections */
h2 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    color: var(--text-accent);
    margin-bottom: 2rem;
    border-left: 5px solid var(--color-gold);
    padding-left: 20px;
}

h3 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    color: var(--text-accent);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

p { margin-bottom: 1rem; }

/* Styles Boutons */
.btn-link, .btn-download {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--text-main);
    border-radius: 4px;
    font-size: 0.9rem;
    margin-top: 10px;
}
.btn-link:hover, .btn-download:hover {
    background: var(--text-main);
    color: #000;
}

/* =========================================
   7. SECTIONS SPÉCIFIQUES
   ========================================= */

/* Membres (Grille) */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}
.member-card {
    background: rgba(255,255,255,0.03);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}
.member-card img {
    width: 100%; height: 300px; object-fit: cover;
    border-radius: 4px; margin-bottom: 15px;
}

/* Spectacles (Vidéos) */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
iframe {
    width: 100%; aspect-ratio: 16/9;
    border: none; border-radius: 8px; background: #000;
}
.synopsis-box {
    background: rgba(0,0,0,0.3); padding: 30px;
    border-radius: 8px; border-left: 2px solid var(--color-grey);
}

/* Archives (Image flottante) */
.archive-content::after { content: ""; display: table; clear: both; }
.img-float {
    float: left; width: 100%; margin-right: 30px; margin-bottom: 20px; border-radius: 4px;
}

/* Agenda (Liste Verticale) */
.contact-header {
    background: rgba(255,255,255,0.05); padding: 20px;
    margin-bottom: 40px; border-left: 4px solid var(--color-gold);
}

.highlight-link { color: var(--color-gold); text-decoration: underline; }

.dates-list li {
    padding: 20px 0;
    border-bottom: 1px solid #333;
    display: flex; flex-direction: column; /* Force vertical */
    align-items: flex-start; gap: 8px;
}
.dates-list .date { 
    font-weight: bold; color: var(--color-gold); font-size: 1.1rem; width: 100%;
}
.dates-list .titre { 
    font-style: italic; color: #fff; font-size: 1.1rem; margin: 0;
}
.dates-list .lieu { color: #aaa; font-size: 0.95rem; }

/* Autres (Grid) */
.other-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
}
.other-item {
    background: rgba(255,255,255,0.02); padding: 25px; border: 1px solid #333;
}
.simple-list li {
    border-bottom: 1px dashed #444; padding: 8px 0; font-size: 0.9rem;
}
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

/* Footer */
footer {
    text-align: center; padding: 50px 20px;
    border-top: 1px solid #333; color: var(--color-grey); font-size: 0.8rem;
}

/* =========================================
   8. CLASSES THEMES (POUR JS)
   Gestion des couleurs dynamiques
   ========================================= */
body.theme-accueil    { background-color: var(--bg-accueil); }
body.theme-compagnie  { background-color: var(--bg-compagnie); }
body.theme-membres    { background-color: var(--bg-membres); }
body.theme-diffusion  { background-color: var(--bg-diffusion); }
body.theme-spectacles { background-color: var(--bg-spectacles); }
body.theme-archives   { background-color: var(--bg-archives); }
body.theme-agenda     { background-color: var(--bg-agenda); }
body.theme-autres     { background-color: var(--bg-autres); }

/* =========================================
   9. MOBILE (RESPONSIVE)
   ========================================= */
@media (max-width: 900px) {
    /* Afficher le bouton burger */
    .burger { display: block; }
    
    /* Menu Mobile Plein Écran */
    .menu {
        position: fixed;
        top: 0; right: 0;
        width: 100%; /* Largeur totale pour confort mobile */
        height: 100vh;
        background: rgba(0,0,0,0.98); /* Quasi opaque */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%); /* Caché à droite */
        transition: 0.4s ease-in-out;
        z-index: 1000;
    }
    
    /* Classe ajoutée par JS pour ouvrir */
    .menu.nav-active { transform: translateX(0%); }
    
    .menu li { margin: 20px 0; font-size: 1.2rem; }

    /* Ajustements Layout Mobile */
    .img-float { float: none; width: 100%; margin-right: 0; }
    header h1 { font-size: 2rem; }
    .line-1 { font-size: 1rem; letter-spacing: 2px; }
}
/* Responsive */
@media (max-width: 900px) {
    .svg-line-common { font-size: 30px; letter-spacing: 3px; }
}

/* --- STOPPER LES ANIMATIONS AU REDIMENSIONNEMENT --- */
.resize-animation-stopper * {
    animation: none !important;
    transition: none !important;
}
/* --- EFFET ÉTOILES MAGIQUES --- */

/* On s'assure que le logo est au premier plan */
.hero-image {
    position: relative;
    z-index: 20; 
}

/* L'étoile elle-même */
.magic-star {
    position: absolute;
    color: #0011ff; /* Couleur Or #FFD700;*/
    pointer-events: none; /* La souris passe à travers */
    z-index: 10; /* Derrière le logo (car 10 < 20) */
    font-weight: bold;
    /* L'animation qui lance l'étoile */
    animation: burst 1.5s ease-out forwards;
}

@keyframes burst {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        /* --tx et --ty seront calculés par le JS pour chaque étoile */
       transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.5) rotate(180deg);
    }
}