/* =========================================
   SOMMAIRE
   1. VARIABLES & THÈMES
   2. BASE & TYPOGRAPHIE
   3. NAVIGATION PRINCIPALE & LANGUES
   4. HERO SECTIONS (Bannières)
   5. COMPOSANTS UI (Listes, Galeries)
   6. CARTES ÉQUIPES & ARTISTES (team.php)
   7. PROFILS ARTISTES (people.php)
   8. SURCHARGES PLUGINS (GLightbox, Intl)
   9. PIED DE PAGE & WIDGETS
   10. MAESTRO DASHBOARD (ADMIN)
   11. BILLETS VISUELS (TICKETING UI V2.1)
   12. GRILLE MASONRY & FILTRES
   13. MEDIA QUERIES
========================================= */

/* =========================================
   1. VARIABLES & THÈMES
========================================= */
:root {
    --primary-green: #2a4332;
    --light-bg: #ecf1ed;
    --gold-accent: #b89759;
    --text-dark: #1a1a1a;
    --nav-blur-bg: rgba(255, 255, 255, 0.85);
    
    /* Protection de la navbar sur les Hero clairs */
    --hero-top-overlay: rgba(236, 241, 237, 0.95);
    
    /* Variables Maestro */
    --dashed-border-color: rgba(0, 0, 0, 0.15);
    --card-hover-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

[data-bs-theme="dark"] {
    --primary-green: #6c9e7e;
    --light-bg: #111111;
    --text-dark: #f8f9fa;
    --nav-blur-bg: rgba(17, 17, 17, 0.85);
    
    /* Protection de la navbar sur les Hero sombres */
    --hero-top-overlay: rgba(17, 17, 17, 0.95);
    
    /* Variables Maestro Dark */
    --dashed-border-color: rgba(255, 255, 255, 0.15);
    --card-hover-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* =========================================
   2. BASE & TYPOGRAPHIE
========================================= */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--text-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex-grow: 1; }
.content-area { position: relative; z-index: 1; background: var(--light-bg); }

h1, h2, h3, .serif-text { 
    font-family: 'Playfair Display', serif; 
}

.serif-description { 
    font-family: 'Playfair Display', serif; 
    font-size: 1.25rem; 
    line-height: 1.6; 
    color: var(--text-dark); 
}

button:focus, a:focus, .btn:focus, .nav-icon-btn:focus, .progress-wrap:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* =========================================
   3. NAVIGATION PRINCIPALE & LANGUES
========================================= */
.navbar-custom {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1050;
    transition: transform 0.3s ease-in-out, background-color 0.3s ease, backdrop-filter 0.3s ease;
    padding: 1.5rem 2rem;
}

.navbar-custom.hidden { transform: translateY(-100%); }

.navbar-custom.bg-blur {
    background-color: var(--nav-blur-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1rem 2rem;
}

[data-bs-theme="dark"] body:not(.menu-open) .navbar-custom:not(.bg-blur) {
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 100%);
}

.nav-icon-btn {
    background: none;
    border: 1px solid var(--text-dark);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s;
    padding: 0;
}

.nav-icon-btn:hover { background: var(--text-dark); color: var(--light-bg); }
.navbar-logo { height: 40px; transition: opacity 0.3s ease; }

body.is-homepage .navbar-logo { opacity: 0; }
body.is-homepage .navbar-custom.bg-blur .navbar-logo { opacity: 1; }

/* Animation fluide de l'icône hamburger / croix et correction d'alignement */
#menuToggleBtn i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    display: flex; /* Mieux que inline-block pour le centrage vertical */
    align-items: center;
    justify-content: center;
    line-height: 1; /* Annule la hauteur de ligne parasite des icônes */
}

/* Rotation lors de l'ouverture du menu */
#menuToggleBtn i.icon-rotated {
    transform: rotate(90deg);
}

/* Forcer l'affichage du logo quand le menu est ouvert (écrase le réglage de la page d'accueil) */
body.is-homepage.menu-open .navbar-logo,
body.menu-open .navbar-logo {
    opacity: 1 !important;
}

/* Sélecteur de langue */
.lang-dropdown-container { position: relative; width: 44px; height: 44px; }
.lang-dropdown {
    position: absolute; top: 0; right: 0;
    display: flex; flex-direction: column;
    border: 1px solid var(--text-dark); border-radius: 22px;
    background-color: var(--nav-blur-bg); overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100; width: 44px; height: 44px;
}
.lang-dropdown .lang-current, .lang-dropdown .lang-options a {
    display: flex; align-items: center; justify-content: center;
    height: 44px; width: 44px; min-height: 44px;
    text-decoration: none; color: var(--text-dark);
    font-weight: 700; font-size: 0.85rem; line-height: 1; margin: 0; padding: 0;
}
.lang-dropdown .lang-current.active { background-color: var(--primary-green); color: #ffffff !important; }
.lang-options { display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity 0.2s ease; }

.lang-dropdown:hover {
    height: 176px; backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); background-color: var(--nav-blur-bg);
}
.lang-dropdown:hover .lang-options { opacity: 1; visibility: visible; }
.lang-dropdown .lang-options a:hover { background-color: rgba(0, 0, 0, 0.05); }

[data-bs-theme="dark"] .lang-dropdown { border-color: var(--text-dark); }
[data-bs-theme="dark"] .lang-dropdown:hover a:not(.active) { color: #ffffff !important; }

body.menu-open .lang-dropdown { border-color: #1a1a1a !important; }
body.menu-open .lang-dropdown .lang-current:not(.active),
body.menu-open .lang-options a { color: #1a1a1a !important; }

/* Menu Plein Écran */
.offcanvas-top.offcanvas-fullscreen { height: 100vh !important; max-height: 100vh !important; background-color: var(--light-bg); transition: transform 0.5s ease-in-out; }
.menu-grid { padding-top: 120px; }
.menu-col ul { list-style: none; padding: 0; }
.menu-col ul li { margin-bottom: 0.8rem; }
.menu-col ul li a { color: var(--text-dark); text-decoration: none; font-weight: 500; font-size: 1.1rem; }
.menu-col ul li a:hover { color: var(--primary-green); }

/* --- NOUVELLE STRUCTURE DE NAVIGATION --- */
.navbar-custom.d-grid-nav {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr; /* Le centre s'adapte au logo, les côtés partagent l'espace */
    align-items: center;
    gap: 10px; /* Sécurité minimale */
}

/* Force les blocs latéraux à être symétriques sur mobile */
.nav-block {
    display: flex;
    align-items: center;
    gap: 1rem; /* Espace entre les deux icônes d'un même bloc */
}

/* Sur smartphone, on assure que le logo ne dépasse pas et garde de l'air */
@media (max-width: 768px) {
    .navbar-custom {
        padding: 1rem 1rem; /* Réduction des marges externes */
    }
    
    .navbar-custom.d-grid-nav {
        grid-template-columns: 1fr 120px 1fr; /* On fixe la zone du logo pour laisser respirer les icônes */
    }

    .navbar-logo {
        height: 32px; /* Logo légèrement plus petit pour gagner de la place */
        max-width: 100%;
    }

    .nav-icon-btn {
        width: 38px; /* Icônes un poil plus petites sur mobile */
        height: 38px;
    }
    
    .nav-block {
        gap: 0.5rem; /* On réduit l'espace interne des blocs d'icônes */
    }
}

/* Correction spécifique pour le centrage parfait du logo */
.nav-block.justify-content-center {
    min-width: 140px; 
    text-align: center;
}

    .global-alert-banner {
        position: fixed; top: 0; left: 0; width: 100%; height: 40px;
        background-color: var(--primary-green); color: #ffffff;
        z-index: 1060; display: flex; align-items: center; overflow: hidden;
    }
    .marquee-container { width: 100%; white-space: nowrap; overflow: hidden; }
    .marquee-text {
        display: inline-block; padding-left: 100%;
        animation: marquee 25s linear infinite;
        font-family: 'Roboto', sans-serif; font-size: 0.9rem; font-weight: 500;
    }
    .marquee-text a { color: #ffffff; text-decoration: none; }
    @keyframes marquee { 0% { transform: translate(0, 0); } 100% { transform: translate(-100%, 0); } }

    /* Layout Navigation en Grille */
    .navbar-custom {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        position: fixed; top: 0; width: 100%; z-index: 1050;
        padding: 1.5rem 2rem;
        transition: all 0.3s ease;
    }
    
    .nav-block-left { display: flex; gap: 1rem; justify-content: flex-start; }
    .nav-block-center { display: flex; justify-content: center; }
    .nav-block-right { display: flex; gap: 1rem; justify-content: flex-end; align-items: center; }

    @media (max-width: 768px) {
        .navbar-custom { padding: 1rem 1rem; grid-template-columns: 1fr 140px 1fr; }
        .nav-block-left, .nav-block-right { gap: 0.5rem; }
        .navbar-logo { height: 32px; max-width: 100%; }
        .nav-icon-btn { width: 38px; height: 38px; }
    }

/* =========================================
   4. HERO SECTIONS (Bannières)
========================================= */
.hero {
    height: 100vh;
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative;
}
.hero.home { background-image: url('../img/hero/home2026.webp'); }

.hero-content { z-index: 2; }
.hero-subtitle { font-weight: 700; letter-spacing: 2px; color: var(--text-dark); text-transform: uppercase; font-size: 0.9rem;}
.hero-title { 
    /* clamp(taille_min, taille_flexible, taille_max) */
    font-size: clamp(2.5rem, 8vw, 5rem); 
    color: var(--gold-accent); 
    margin: 0; 
    line-height: 1.1;
    word-wrap: break-word; /* Sécurité anti-débordement */
}
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem !important; /* Taille forcée pour le titre principal sur mobile */
    }
    
    h2.serif-text {
        font-size: 1.8rem !important;
}
}

/* =========================================
   10. HOMEPAGE & UTILITIES
========================================= */
.text-gold { color: var(--gold-accent) !important; }
.bg-gold { background-color: var(--gold-accent) !important; }

/* Transitions fluides & Zoom hover pour les cartes */
.transition-transform { transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); }
.transition-colors { transition: color 0.3s ease, background-color 0.3s ease; }

.group-hover:hover .transition-transform { transform: scale(1.05); }
.group-hover:hover .group-hover-gold { color: var(--gold-accent) !important; }

/* Amélioration de la typographie */
.tracking-widest { letter-spacing: 1px; }

/* Ajout d'un ratio 4x3 natif manquant dans certaines versions Bootstrap 5 */
.ratio-4x3 {
    --bs-aspect-ratio: calc(3 / 4 * 100%);
}

/* --- HERO CONCERT --- */
.hero-concert {
    height: 60vh;
    background: linear-gradient(to bottom, var(--hero-top-overlay) 0%, transparent 120px), var(--bg-image, url('/assets/img/default-hero.jpg'));
    background-size: cover; 
    background-position: center 15%; /* 15% du haut : centre sur le visage plutôt que le cou */
    display: flex; align-items: flex-end; padding-bottom: 3rem;
}

/* Ajustement spécifique pour les smartphones */
@media (max-width: 768px) {
    .hero-concert {
        height: 40vh; /* Réduit la hauteur pour moins "zoomer" dans l'image */
        background-position: center 15%; 
    }
}

.hero-person {
    height: 60vh;
    background: linear-gradient(to bottom, var(--hero-top-overlay) 0%, transparent 120px), var(--bg-image, url('/assets/img/default-hero.jpg'));
    background-size: cover; 
    background-position: center 15%;
    display: flex; align-items: flex-end; padding-bottom: 3rem;
}

@media (max-width: 768px) {
    .hero-person {
        height: 40vh;
        background-position: center 15%; 
    }
}

/* =========================================
   5. COMPOSANTS UI (Listes, Cards, Galeries)
========================================= */

/* Listes de distribution (Cast & Concerts précédents) */
.cast-link { text-decoration: none; color: inherit; display: block; margin-bottom: 0.8rem; }
.cast-row { display: flex; align-items: baseline; }
.cast-role { font-weight: 700; text-transform: uppercase; font-size: 0.75rem; color: var(--primary-green); letter-spacing: 1px; }
.past-event-role { font-family: 'Roboto', sans-serif; font-weight: 500; color: var(--text-dark); opacity: 0.8; font-size: 0.95rem; }
.cast-dots { flex-grow: 1; border-bottom: 1px dotted var(--dashed-border-color); margin: 0 12px; }
.cast-name { 
    font-family: 'Playfair Display', serif; font-size: 1.25rem; line-height: 1.6; color: var(--text-dark);
    position: relative; display: inline-block; transition: color 0.3s ease; 
}
.cast-name::after { content: ''; position: absolute; width: 0; height: 1px; bottom: 1px; left: 0; background-color: var(--gold-accent); transition: width 0.3s ease; }
.cast-link:hover .cast-name::after { width: 100%; }
.cast-link:hover .cast-name { color: var(--gold-accent); }

/* Card Billetterie / Info */
.booking-card { background: var(--primary-green); color: white; border-radius: 20px; padding: 2.5rem; }
.venue-link { color: var(--gold-accent); text-decoration: none; font-weight: 600; font-size: 1.3rem; transition: 0.3s; }
.venue-link:hover { color: #fff; }
.booking-card-desktop { position: sticky; top: 120px; }

/* --- GALERIE HORIZONTALE FLUIDE --- */
.gallery-native-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0 20px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-accent) transparent;
    -webkit-overflow-scrolling: touch;
}
.gallery-native-scroll::-webkit-scrollbar { height: 6px; }
.gallery-native-scroll::-webkit-scrollbar-track { background: transparent; }
.gallery-native-scroll::-webkit-scrollbar-thumb { background-color: var(--gold-accent); border-radius: 10px; }

.gallery-item {
    flex: 0 0 280px; 
    height: 190px; 
    border-radius: 12px; 
    overflow: hidden; 
    cursor: zoom-in; 
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.05); }


/* =========================================
   6. CARTES ÉQUIPES & ARTISTES (team.php)
========================================= */
.person-card-link {
    text-decoration: none;
    display: block;
    height: 100%; /* S'assure que le lien remplit la grille */
}

.person-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* S'étire à 100% de la colonne Bootstrap */
    background-color: var(--primary-green); /* Règle le problème de l'espace blanc ! */
    border-radius: 25px; 
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-bs-theme="dark"] .person-card {
    background-color: #1e3024;
}

.person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.person-img-container {
    width: 100%;
    aspect-ratio: 4 / 3; /* Format portrait homogène */
    overflow: hidden;
}

.person-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.person-card:hover .person-img-container img {
    transform: scale(1.05);
}

.person-info-block {
    flex-grow: 1; /* Absorbe tout l'espace vide, empêchant le décalage blanc */
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: transparent; /* Hérite du vert du parent */
    color: #fff;
    text-align: center;
    padding: 15px 10px;
}

.person-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.person-role {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.9;
    letter-spacing: 1px;
}


/* =========================================
   7. PROFILS & ARTISTES (PEOPLE.PHP)
========================================= */

.event-mini-row {
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    padding-bottom: 1rem; 
    margin-bottom: 1rem;
}
.event-mini-row:last-child { 
    border-bottom: none; 
    padding-bottom: 0; 
    margin-bottom: 0; 
}

/* Réseaux sociaux (Fond foncé) */
.social-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s; text-decoration: none;
}
.social-btn:hover { background: var(--gold-accent); border-color: var(--gold-accent); color: #fff; }

/* Réseaux sociaux (Fond clair) */
.social-btn-dark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: transparent; color: var(--text-dark); 
    border: 1px solid var(--text-dark);
    transition: all 0.3s; text-decoration: none; font-size: 1.2rem;
}
.social-btn-dark:hover { background: var(--primary-green); border-color: var(--primary-green); color: #fff; }


/* =========================================
   8. SURCHARGES PLUGINS
========================================= */

.goverlay { 
    background: #0e1a12 !important; 
}

.glightbox-clean .gslide-description {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%) !important;

    padding: 40px 20px 20px 20px !important;
    z-index: 999;
    pointer-events: none;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.glightbox-clean .gdesc-inner { 
    padding: 0 !important; 
    margin: 0 auto !important;
    width: 100% !important;
}

.glightbox-clean .gslide-title {
    color: var(--gold-accent) !important;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    margin: 0 auto 5px auto !important;
    width: 100% !important;
}

.glightbox-clean .gslide-desc {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    margin: 0 auto !important;
    width: 100% !important;
}

/* Intl-Tel-Input */
.iti { width: 100%; display: block; }
.iti__tel-input { padding-top: 1rem !important; padding-bottom: 1rem !important; }


/* =========================================
   9. PIED DE PAGE & WIDGETS
========================================= */
.site-footer { position: relative; width: 100%; z-index: 2; margin-top: -100px; }
.footer-mountains {
    width: 100%; height: 200px;
    background-image: url('../img/hero/footer.svg'); background-size: cover; background-position: bottom; background-repeat: no-repeat; pointer-events: none;
}
.footer-content { background-color: var(--primary-green); color: #fff; padding: 3rem 0; margin-top: -2px; position: relative; }

#darkModeToggle { position: absolute; right: 90px; bottom: 30px; z-index: 10; border-color: #fff; color: #fff; transition: all 0.3s ease; }
#darkModeToggle:hover { background-color: #fff; color: var(--primary-green); }

/* Flèche Retour Haut */
.progress-wrap {
    position: fixed; right: 30px; bottom: 30px; width: 44px; height: 44px; cursor: pointer; border-radius: 50%;
    z-index: 10000; opacity: 0; pointer-events: none; transform: translateY(15px); transition: all 0.3s linear;
}
.progress-wrap.active-progress { opacity: 1; pointer-events: auto; transform: translateY(0); }
.progress-wrap i { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 1.2rem; color: var(--text-dark); transition: color 0.3s ease; z-index: 2; }
.progress-circle { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-circle circle { fill: none; stroke-width: 4; box-sizing: border-box; transition: stroke 0.3s ease; }
.progress-circle .track { stroke: var(--text-dark); opacity: 0.15; }
.progress-circle .progress { stroke: var(--primary-green); stroke-linecap: round; }

.progress-wrap::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: transparent; border-radius: 50%; transition: all 0.3s ease; z-index: 1; }
.progress-wrap:hover::after { background-color: var(--text-dark); }
.progress-wrap:hover i { color: var(--light-bg); }
.progress-wrap:hover .progress-circle circle { opacity: 0; }

.progress-wrap.footer-overlap .track { stroke: #fff; opacity: 0.3; }
.progress-wrap.footer-overlap .progress { stroke: #fff; }
.progress-wrap.footer-overlap i { color: #fff; }
.progress-wrap.footer-overlap:hover::after { background-color: #fff; }
.progress-wrap.footer-overlap:hover i { color: var(--primary-green); }

/* --- FOOTER ENHANCEMENTS --- */

/* logos partenaires XL */
.partner-logo-xl {
    height: 75px; /* Augmentation de la taille */
    width: auto;
    max-width: 220px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: all 0.3s ease;
    object-fit: contain;
}

.partner-link:hover .partner-logo-xl {
    opacity: 1;
    transform: scale(1.05);
}

/* On s'assure que le progress-wrap est au-dessus du footer */
.progress-wrap {
    z-index: 10001 !important;
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .partner-logo-xl {
        height: 50px;
        max-width: 150px;
    }
    .gap-5 {
        gap: 2rem !important; /* On réduit un peu l'espace sur mobile */
    }
}


.hover-opacity-100:hover {
    opacity: 1 !important;
}

/* Accessibilité : focus visible sur les icônes sociales */
.socialinks .icon-circle:focus {
    outline: 2px solid var(--gold-accent);
    outline-offset: 3px;
}

/* Cercles des réseaux sociaux */
.socialinks .icon-circle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.socialinks .icon-circle:hover {
    background-color: white;
    color: var(--primary-green);
    transform: translateY(-3px);
}

/* Ajustement du bouton Dark Mode dans le flux du footer */
#darkModeToggle {
    position: relative; /* On enlève l'absolute pour qu'il s'intègre au grid */
    right: auto;
    bottom: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Correction pour le mode sombre sur les logos si nécessaire */
[data-bs-theme="dark"] .partner-logo {
    filter: brightness(0) invert(0.8); /* Un blanc un peu plus cassé en mode sombre */
}

/* =========================================
   10. MAESTRO DASHBOARD (ADMIN)
========================================= */
.border-dashed { border: 2px dashed var(--dashed-border-color) !important; border-radius: 8px; transition: all 0.3s ease; }
.maestro-module-card { transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; border-radius: 8px; }
.maestro-module-card:hover { transform: translateY(-5px); box-shadow: var(--card-hover-shadow) !important; border-color: var(--primary-green) !important; }
.maestro-module-card:hover i { color: var(--primary-green) !important; transform: scale(1.1); transition: all 0.3s ease; }

.maestro-data-list li { padding-bottom: 0.75rem; margin-bottom: 0.75rem; border-bottom: 1px solid var(--dashed-border-color); }
.maestro-data-list li:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }

.maestro-badge { font-weight: 600; letter-spacing: 0.5px; background-color: var(--primary-green); color: #fff; }
[data-bs-theme="dark"] .maestro-badge { background-color: var(--gold-accent); color: var(--text-dark); }

.maestro-subnav { z-index: 1040; padding-top: 120px; }

.w-min-120 { min-width: 120px; }
.w-min-180 { min-width: 180px; }
.cursor-pointer { cursor: pointer; }
.shadow-none-focus:focus { box-shadow: none !important; }

.team-member-badge { background-color: var(--light-bg); border: 1px solid var(--dashed-border-color); color: var(--text-dark); padding: 0.5rem 0.75rem; display: flex; align-items: center; gap: 0.5rem; border-radius: 8px; transition: all 0.2s ease; }
[data-bs-theme="dark"] .team-member-badge { background-color: rgba(255,255,255,0.05); }

.ratio-4x3-box { aspect-ratio: 4 / 3; width: 100%; }
.bio-textarea { height: 200px !important; }

.spin { animation: spin-animation 1s linear infinite; }
@keyframes spin-animation { 100% { transform: rotate(360deg); } }

/* Ticketing UI (Maestro) */
.ticket-card { border: 1px solid var(--dashed-border-color); background: var(--nav-blur-bg); border-radius: 12px; overflow: hidden; transition: all 0.3s ease; }
.ticket-status-cancelled { filter: grayscale(1); opacity: 0.6; text-decoration: line-through; }
.pmr-badge { background-color: #0d6efd; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; }
.qr-wrapper { background: #fff; padding: 10px; border-radius: 8px; display: inline-block; }


/* =========================================
   11. BILLETS VISUELS (TICKETING UI V2.1)
========================================= */
.ticket-visual-wrapper {
    position: relative;
    margin-bottom: 2.5rem; /* Espace nécessaire pour les boutons qui débordent */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ticket-visual-wrapper:hover {
    transform: translateY(-5px);
}

.ticket-visual-card {
    background-color: #d5ddd7; 
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--dashed-border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    min-height: 220px;
}

[data-bs-theme="dark"] .ticket-visual-card {
    background-color: #2c3530;
}

/* Image de fond : Montagnes limitées au bas */
.ticket-bg-mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-image: url('../img/hero/footer.svg');
    background-size: cover;
    background-position: bottom center;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* Typographie du billet */
.ticket-title {
    color: var(--primary-green);
    font-family: 'Roboto', sans-serif;
    font-weight: 900;
    letter-spacing: -0.5px;
    font-size: 1.8rem;
}

.ticket-date-venue {
    color: var(--text-dark);
    font-weight: 900;
    letter-spacing: -0.5px;
}

/* Code QR */
.qr-visual-wrapper {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    background: #fff;
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.qr-visual-wrapper svg {
    width: 100%;
    height: 100%;
}

/* Boutons d'action débordants (Pastilles) */
.ticket-actions-overlap {
    position: absolute;
    bottom: -24px; /* Déborde de moitié (48/2) */
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none; 
}

.ticket-actions-overlap .ticket-action-btn {
    pointer-events: auto; 
}

.ticket-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s ease;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.ticket-action-btn:hover {
    background: var(--primary-green);
    color: #fff;
    transform: scale(1.1);
}

.ticket-action-btn.btn-danger-outline {
    border-color: #dc3545;
    color: #dc3545;
}

.ticket-action-btn.btn-danger-outline:hover {
    background: #dc3545;
    color: #fff;
}

.ticket-status-cancelled .ticket-visual-card {
    filter: grayscale(1);
    opacity: 0.7;
}

.ticket-uuid-text {
    font-size: 0.75rem;
    letter-spacing: 1px;
    opacity: 0.7;
}


/* =========================================
   12. GRILLE MASONRY & FILTRES
========================================= */
.select-minimal {
    border: none !important;
    background-color: #f8f9fa !important;
    border-radius: 8px !important;
    padding: 10px 15px !important;
    font-size: 0.9rem;
    box-shadow: none !important;
}

/* Grille Masonry en CSS pur (100% fiable, 0 javascript) */
.css-masonry {
    column-count: 4; /* 4 colonnes = images plus petites */
    column-gap: 1.5rem;
}

.masonry-item {
    break-inside: avoid; /* Empêche l'image d'être coupée entre deux colonnes */
    margin-bottom: 1.5rem;
    display: block;
}

.masonry-item img {
    width: 100%;
    border-radius: 4px; /* Un léger arrondi élégant */
    transition: filter 0.3s ease;
    cursor: zoom-in;
}

.masonry-item img:hover {
    filter: brightness(0.8);
}


/* =========================================
   13. MEDIA QUERIES GLOBALES
========================================= */
@media (max-width: 992px) {
    .serif-description { font-size: 1.15rem; }
    .cast-name { font-size: 1.15rem; }
    .gallery-item { flex: 0 0 240px; height: 160px; }
    .css-masonry { column-count: 3; }
}

@media (max-width: 768px) {
    .css-masonry { column-count: 2; }
}

@media (max-width: 576px) {
    .css-masonry { column-count: 1; }
}

/* =========================================
   14. ANIMATIONS DE SURVOL (CSP STRICT)
========================================= */
.hover-translate-x { transition: transform 0.2s ease; }
.hover-translate-x:hover { transform: translateX(5px); }

.hover-translate-y { transition: transform 0.3s ease; }
.hover-translate-y:hover { transform: translateY(-10px); }

.hover-scale { transition: transform 0.5s ease; }
.hover-scale:hover { transform: scale(1.05); }

.hover-text-dark { transition: color 0.2s ease; }
.hover-text-dark:hover { color: var(--text-dark) !important; }



/* Supprime le fond bleu et la couleur de texte bleue de l'élément ouvert */
.accordion-button:not(.collapsed) {
    color: var(--text-dark); /* Remplace le bleu par votre couleur de texte sombre */
    background-color: var(--light-bg); /* Ou une couleur neutre très claire */
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}

/* Supprime le halo bleu (focus) lors du clic sur le bouton */
.accordion-button:focus {
    border-color: var(--primary-green); /* Utilisez votre vert à la place du bleu */
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-green-rgb), 0.25);
}

/* Harmonisation de l'icône de flèche (chevron) */
.accordion-button:not(.collapsed)::after {
    filter: brightness(0); /* Force l'icône en noir si elle apparaît bleue */
}






/* Hero History */
.hero-history {
    height: 80vh;
    background: var(--bg-image) center/cover no-repeat fixed;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, var(--primary-green) 120%);
    opacity: 0.8;
}

.tracking-widest { letter-spacing: 0.25rem; }

/* Timeline Visuals */
.timeline-item {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.6s ease;
}

.year-card-img {
    height: 380px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.year-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--gold-accent);
    color: white;
    padding: 0.5rem 1.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    border-radius: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-primary-pb {
    background-color: var(--primary-green);
    color: white;
    border: none;
}

.btn-primary-pb:hover {
    background-color: var(--gold-accent);
    color: white;
}

/* Modals */
.modal-content {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}


/* --- History Posters UX --- */
.year-card-img {
    height: 420px;
    background-size: cover;
    background-position: center;
    transition: all 0.5s ease;
}

.poster-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 130px;
    z-index: 5;
    perspective: 1000px;
}

.poster-miniature {
    background: white;
    padding: 6px;
    border-radius: 4px;
    transform: rotate(3deg);
    cursor: zoom-in;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.poster-miniature img {
    border-radius: 2px;
    display: block;
}

.poster-zoom-icon {
    position: absolute;
    inset: 0;
    background: rgba(42, 67, 50, 0.7); /* primary-green */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 2px;
}

.poster-miniature:hover {
    transform: rotate(0deg) scale(1.1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.poster-miniature:hover .poster-zoom-icon {
    opacity: 1;
}

/* Ajustement pour le mode sombre de ton site */
[data-bs-theme="dark"] .poster-miniature {
    background: var(--light-bg);
    padding: 5px;
}

/* Scroll Animation classes */
.timeline-item:not(.visible) {
    opacity: 0;
    transform: translateY(40px);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* History Hero & Accents */
.text-gold { color: var(--gold-accent) !important; }

/* Timeline Visuals */
.year-card-img {
    height: 380px;
    background-size: cover;
    background-position: center;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.year-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--nav-blur-bg);
    backdrop-filter: blur(10px);
    color: var(--primary-green);
    padding: 0.5rem 1.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    border-radius: 2rem;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Boutons Accordéon (Classe) */
.btn-elegant-collapse {
    border: 1px solid var(--primary-green);
    background-color: transparent;
    color: var(--primary-green);
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-elegant-collapse:hover {
    background-color: rgba(42, 67, 50, 0.05); /* light green */
}

/* État actif géré automatiquement par Bootstrap */
.btn-elegant-collapse[aria-expanded="true"] {
    background-color: var(--primary-green) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(42, 67, 50, 0.2);
}

/* Effets Accordéons et cartes */
.accordion-elegant-wrapper .collapse {
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.accordion-elegant-wrapper .card {
    border-top: 3px solid var(--primary-green) !important;
}

.transition-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.transition-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}
/* History People & Event Links */
.person-history-link:hover .bg-white {
    background-color: var(--primary-green) !important;
}
.person-history-link:hover .text-dark {
    color: #ffffff !important;
}
.person-history-link:hover .text-gold {
    color: #ffffff !important;
}

.event-history-link:hover .bg-white {
    background-color: rgba(42, 67, 50, 0.03) !important;
}

/* Animations et utilitaires */
.object-fit-cover {
    object-fit: cover;
}

.person-img-wrapper img {
    transition: transform 0.4s ease;
}

.person-history-link:hover .person-img-wrapper img {
    transform: scale(1.1);
}

/* =========================================
   ADAPTATION MOBILE : LISTE DE DISTRIBUTION
========================================= */
@media (max-width: 767px) {
    .cast-link {
        border-bottom: 1px solid rgba(0,0,0,0.05); /* Ajoute un léger séparateur entre les personnes */
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .cast-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cast-role {
        order: 1; /* Place le rôle en premier */
        margin-bottom: 0.25rem;
        font-size: 0.7rem;
        opacity: 0.9;
    }
    
    .cast-name {
        order: 2; /* Place le nom en dessous */
        font-size: 1.25rem;
        line-height: 1.2;
    }
    
    .cast-dots {
        display: none; /* Cache les pointillés sur mobile */
    }
}


/* --- Animations de chargement --- */
.fade-in-up { 
    animation: fadeInUp 1s ease-out forwards; 
}
.fade-in-up-delayed { 
    animation: fadeInUp 1s ease-out 0.3s forwards; 
    opacity: 0; 
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
}
.mouse {
    width: 24px; height: 40px; border: 2px solid var(--text-dark); border-radius: 20px; position: relative;
}
.mouse::before {
    content: ''; width: 3px; height: 6px; background: var(--gold-accent);
    position: absolute; left: 50%; transform: translateX(-50%); top: 7px;
    border-radius: 2px; animation: mouseScroll 2s infinite;
}
@keyframes mouseScroll {
    0% { opacity: 1; top: 7px; }
    100% { opacity: 0; top: 25px; }
}

/* --- Concert Cards --- */
.concert-card-link:hover img { transform: scale(1.05); filter: brightness(0.9); }
.card-date-badge {
    position: absolute; top: 15px; left: 15px;
    background: white; color: var(--text-dark);
    padding: 8px 12px; border-radius: 12px; text-align: center;
    line-height: 1; min-width: 55px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Portrait Circles (Team) --- */
.portrait-circle {
    width: 100%; aspect-ratio: 1/1; overflow: hidden; border-radius: 50%;
    border: 1px solid var(--dashed-border-color); background: var(--light-bg);
    transition: all 0.4s ease;
}
.portrait-circle img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: all 0.4s ease; }
.person-card:hover .portrait-circle { transform: translateY(-5px); border-color: var(--gold-accent); box-shadow: var(--card-hover-shadow); }
.person-card:hover img { filter: grayscale(0%); }

/* --- Galerie Horizontale --- */
.gallery-native-scroll {
    display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 20px; -webkit-overflow-scrolling: touch;
}
.gallery-native-scroll::-webkit-scrollbar { display: none; } /* On cache la scrollbar pour l'esthétique */
.gallery-item { flex: 0 0 300px; height: 200px; scroll-snap-align: start; border-radius: 15px; overflow: hidden; }



/* Espacement spécifique pour éviter le chevauchement des montagnes du footer */
.mb-footer {
    margin-bottom: 120px;
}

/* Classes de sections adaptatives au thème */
.bg-section-main {
    background-color: var(--light-bg);
    transition: background-color 0.3s ease;
}

.bg-section-light {
    /* En mode clair, gris très léger. En mode sombre, gris anthracite */
    background-color: rgba(128, 128, 128, 0.05);
}

/* Boutons adaptatifs */
.btn-outline-custom {
    color: var(--text-dark);
    border-color: var(--text-dark);
}

.btn-outline-custom:hover {
    background-color: var(--text-dark);
    color: var(--light-bg);
}

/* Correction spécifique pour le Dark Mode */
[data-bs-theme="dark"] .concert-card h3 {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .bg-white {
    /* Force les éléments comme la capsule de date à rester lisibles si la classe bg-white est utilisée */
    background-color: #ffffff !important; 
    color: #1a1a1a !important;
}

/* Empêcher les titres des concerts de passer au bleu */
.concert-card {
    text-decoration: none !important;
    color: inherit !important; /* Utilise la couleur du parent par défaut */
}

.concert-card h3 {
    color: var(--text-dark); /* Force la couleur définie dans tes variables */
    transition: color 0.3s ease;
}

/* Effet au survol pour garder une interactivité élégante */
.concert-card:hover h3 {
    color: var(--gold-accent) !important;
}

/* Spécificité pour le mode sombre si nécessaire */
[data-bs-theme="dark"] .concert-card h3 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .concert-card:hover h3 {
    color: var(--gold-accent) !important;
}


/* =========================================
   ANIMATION SVG HOMEPAGE - ULTIME
========================================= */

/* 1. Conteneur du logo */
body.is-homepage .logo-animation-container {
    width: 90vw; 
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    display: block;
}

.main-logo-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* 2. Optimisation Mobile : Recadrage et Zoom */
@media (max-width: 768px) {
    body.is-homepage .logo-animation-container {
        width: 95vw; 
        overflow: hidden; /* Indispensable : coupe l'espace vide qui va déborder */
    }
    
    .main-logo-svg {
        /* On force le SVG à être 40% plus grand que l'écran. 
           La partie gauche (le texte) prendra toute la place, 
           et la partie droite (vide) sera poussée hors de l'écran et cachée */
        width: 140% !important; 
        max-width: none !important; 
        margin-left: -2%; /* Petit ajustement de centrage visuel si besoin */
    }
}

/* 3. Couleurs pour les éléments NON animés (comme les dates) */
.st0:not(.draw-path) { fill: #2f4b3a; }
.st1:not(.draw-path) { fill: #b0873f; }

/* 4. Les tracés animés (transparent par défaut) */
.draw-path {
    fill: transparent;
    stroke-width: 1.2px;
    stroke: var(--primary-green);
    animation: drawLine 3s ease-in-out forwards, 
               fillLogo 0.5s ease-in forwards 4.5s;
}

.draw-path-gold { 
    fill: transparent;
    stroke: var(--gold-accent); 
    animation: drawLine 3s ease-in-out forwards, 
               fillGold 0.5s ease-in forwards 4.5s;
}

/* 5. Apparition des dates (à 5s, sur Desktop uniquement) */
.logo-dates { 
    opacity: 0; 
    animation: fadeIn 1s ease-out 5s forwards; 
}

/* 6. Les Keyframes purs */
@keyframes drawLine { 
    to { stroke-dashoffset: 0; } 
}

@keyframes fadeIn { 
    to { opacity: 1; } 
}

@keyframes fillLogo { 
    to { fill: #2f4b3a; stroke: transparent; } 
}

@keyframes fillGold { 
    to { fill: #b0873f; stroke: transparent; } 
}

/* 7. Dark Mode (Mode Sombre) */
[data-bs-theme="dark"] .st0:not(.draw-path) { 
    fill: #ecf1ed; 
}

[data-bs-theme="dark"] .draw-path:not(.draw-path-gold) { 
    stroke: #ecf1ed; 
    animation: drawLine 3s ease-in-out forwards, 
               fillLogoDark 0.5s ease-in forwards 4.5s;
}

@keyframes fillLogoDark { 
    to { fill: #ecf1ed; stroke: transparent; } 
}
/* --- NETTOYAGE ANCIENS STYLES --- */

/* Masquage du portrait Purcell */
.purcell-portrait {
    display: none !important;
}

/* L'animation est conservée ici mais ne sera plus jouée 
   si l'élément au-dessus est en display: none */
@keyframes risePurcell {
    from { opacity: 0; transform: translate(-50%, 50px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* --- COMING.PHP STYLES --- */
.transport-card {
    background-color: var(--nav-blur-bg);
    border: 1px solid var(--dashed-border-color);
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.transport-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.transport-icon {
    font-size: 1.5rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
    display: inline-block;
}

#map-coming {
    width: 100%;
    height: 450px;
    border-radius: 20px;
    border: 1px solid var(--dashed-border-color);
    z-index: 1;
}

.icon-bus { color: #800020; }
.icon-venue { color: #198754; }
.icon-parking { color: #0d6efd; }
.icon-wc { color: #6c757d; }

.map-icon-container { 
    font-size: 2.2rem; 
    filter: drop-shadow(0px 3px 4px rgba(0,0,0,0.4)); 
}

.coming-hero {
    padding: 8rem 0 4rem 0;
    background: linear-gradient(to bottom, var(--hero-top-overlay), transparent);
}

/* --- BOUTONS CUSTOM --- */
.btn-gold-custom {
    background-color: var(--gold-accent);
    color: var(--primary-green) !important;
    border: 2px solid var(--gold-accent);
}

.btn-gold-custom:hover {
    background-color: transparent;
    color: var(--gold-accent) !important;
    border-color: var(--gold-accent);
    transform: scale(1.03);
}

[data-bs-theme="dark"] .btn-gold-custom {
    background-color: var(--gold-accent);
    color: var(--text-dark) !important;
}

[data-bs-theme="dark"] .btn-gold-custom:hover {
    background-color: transparent;
    color: var(--gold-accent) !important;
}

/* --- SÉCURITÉ : HONEYPOT FURTIF --- */
.visually-hidden-hp {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}