/* ========================================
   FEUILLE DE STYLE HARMONIE DE L'ALERTE
   ======================================== */

/* ========================================
   RESET ET STYLES DE BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   COULEURS DU SITE
   ======================================== */
:root {
    --color-primary: #4CAF50;
    /* principal (vert) */
    --color-primary-200: #8BC138;
    /* nuance claire */
    --color-accent: #E8DCC4;
    /* accent/beige */
    --color-bg: #ffffff;
    /* fond clair */
    --color-muted: #F9F4E7;
    /* beige clair */
    --color-text: #333333;
    /* texte principal */
    --color-muted-border: #EAEAEA;
    /* bordure légère */
    --color-gray: #999999;
    /* gris */
    --color-surface: #F5F5F5;
    /* surfaces légères */
    --color-muted-text: #666666;
    /* texte secondaire */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    overflow-x: hidden;
}

p {
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 1rem;
}

/* ========================================
   NAVIGATION PRINCIPALE
   ======================================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    /* background: rgba(255, 255, 255, 0.98); */
    background: color-mix(in srgb, var(--color-bg) 98%, transparent);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
}

/* Logo et texte */
.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: transform 0.3s;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--color-text);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--color-primary);
    font-style: italic;
}

/* Menu de navigation */
.nav-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
}

.nav-menu>li {
    position: relative;
}

.nav-menu>li>a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    padding: 0.8rem 1rem;
    display: block;
    transition: all 0.3s;
    border-radius: 8px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-menu>li>a:hover,
.nav-menu>li>a.active {
    color: var(--color-primary);
    background: var(--color-muted);
}

/* ========================================
   MENU DÉROULANT (DROPDOWN)
   ======================================== */
/* ========================================
   MENU DÉROULANT (DROPDOWN)
   ======================================== */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    /* background: white; */
    background: var(--color-bg);
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-top: 0;
    padding: 0.5rem 0;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--color-text);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    display: block;
    transition: all 0.3s;
}

.dropdown-content a:hover {
    background: var(--color-muted);
    color: var(--color-primary);
}

.dropdown>a::after {
    content: ' ▾';
    font-size: 0.75em;
    margin-left: 0.3rem;
}

/* NESTED DROPDOWN */
.nested-dropdown {
    position: relative;
}

.nested-trigger {
    display: flex !important;
    justify-content: spave-between;
    align-items: center;
}

.nested-content {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--color-bg);
    min-width: 200px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.nested-dropdown:hover .nested-content {
    display: block;
}

@media (max-width: 768px) {
    .nested-content {
        position: static;
        box-shadow: none;
        margin-left: 1rem;
        background: transparent;
        display: block;
        /* Always show in mobile for now, or use JS to toggle */
        padding-left: 1rem;
        border-left: 2px solid var(--color-muted-border);
    }
}

/* Navigation Responsive Fix for Tablet (728px - 1024px) */
@media screen and (min-width: 728px) and (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        /* Adjust based on navbar height */
        left: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 1rem 0;
        gap: 1rem;
        z-index: 1000;
        height: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background: #f9f9f9;
        display: none;
        border-radius: 0;
        padding-left: 0;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .burger {
        display: flex;
    }
}

/* ========================================
   BOUTON DE RECHERCHE
   ======================================== */
.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.search-toggle:hover {
    background: var(--color-muted);
    transform: scale(1.1);
}

.search-toggle svg {
    width: 20px;
    height: 20px;
}

.search-form {
    position: static;
    display: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    min-width: auto;
    margin-right: 10px;
}

.search-form.active {
    display: block;
}

.search-input {
    width: 200px;
    padding: 0.8rem 1rem;
    margin-right: 10px;
    border: 2px solid var(--color-primary);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--color-primary-200);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 10%, transparent);
}

/* Masquer les autres éléments du menu quand la recherche est active */
.nav-menu.search-active>li,
.nav-menu.search-active .search-toggle {
    display: none;
}

/* S'assurer que l'item contenant la recherche reste visible (mais sans la loupe) */
.nav-menu.search-active .search-item {
    display: flex;
    width: 100%;
    justify-content: flex-end;
    /* ou center selon préférence */
}

.nav-menu.search-active .search-form {
    display: block;
    width: 100%;
    /* Optionnel pour prendre toute la place */
}

/* ========================================
   BOUTON RETOUR EN HAUT
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--color-primary-200);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    z-index: 999;
}

.scroll-top:hover {
    background: var(--color-primary);
    transform: translateY(-5px);
}

.scroll-top.visible {
    display: flex;
}

@media (max-width: 768px) {
    .search-form {
        position: static;
        min-width: auto;
        margin-top: 1rem;
    }
}

/* ========================================
   MENU BURGER (MOBILE)
   ======================================== */
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
}

.burger div {
    width: 28px;
    height: 3px;
    background: var(--color-text);
    transition: all 0.3s;
    border-radius: 3px;
}

/* Animation du menu burger en X */
.burger.toggle div:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.burger.toggle div:nth-child(2) {
    opacity: 0;
}

.burger.toggle div:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ========================================
   EN-TÊTE DE PAGE (PAGE HEADER)
   ======================================== */
.page-header {
    /* background: white; */
    background: var(--color-bg);
    color: var(--color-text);
    padding: 8rem 2rem 4rem;
    text-align: center;
    margin-top: 80px;
    border-bottom: 1px solid var(--color-muted-border);
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.page-header p {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 1;
    /* color: #4CAF50; */
    color: var(--color-primary);
    font-weight: bold;
}

/* ========================================
   CONTENEUR PRINCIPAL
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
}

/* ========================================
   SECTIONS DE CONTENU
   ======================================== */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

/* Ligne décorative sous les titres de section */
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #8BC138, #4CAF50);
}


/* ========================================
   FOOTER
   ======================================== */
footer {
    /* background: white; */
    background: var(--color-bg);
    /* color: #333333; */
    color: var(--color-text);
    padding: 3rem 2rem 1.5rem;
    border-top: 1px solid var(--color-muted-border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-section p,
.footer-section a {
    color: var(--color-text);
    line-height: 1.8;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--color-primary-200);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a[style*="border-radius: 50%"]:hover {
    color: var(--color-primary-200);
    transform: translateY(-2px);
}

.footer-section a[style*="border-radius: 50%"]:hover svg {
    /* fill: white !important; */
    fill: var(--color-bg) !important;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-muted-border);
    /* color: #666; */
    color: var(--color-muted-text);
    font-size: 0.9rem;
}

/* ========================================
   BOUTON RETOUR EN HAUT
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--color-primary-200);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    z-index: 999;
}

.scroll-top:hover {
    /* background: #4CAF50; */
    background: var(--color-primary);
    transform: translateY(-5px);
}

.scroll-top.visible {
    display: flex;
}

/* ========================================
   RESPONSIVE - TABLETTES (max-width: 1024px)
   ======================================== */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ========================================
   RESPONSIVE - MOBILE (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {

    /* Menu burger visible sur mobile */
    .burger {
        display: flex;
    }

    /* Menu de navigation mobile */
    .nav-menu {
        position: fixed;
        right: -100%;
        top: 80px;
        flex-direction: column;
        background: white;
        width: 100%;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transition: right 0.3s;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    /* Dropdown mobile */
    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        margin-left: 1rem;
        padding: 0.5rem 0;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    /* Formulaire de recherche mobile */
    .search-input {
        width: 200px;
    }

    .search-form {
        position: absolute;
        right: 2rem;
        top: 50%;
        transform: translateY(-50%);
        background: white;
        padding: 0.5rem;
        border-radius: 25px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    /* Masquer le texte du logo sur mobile */
    .logo-text {
        display: none;
    }

    /* En-tête de page responsive */
    .page-header {
        padding: 6rem 1.5rem 3rem;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    /* Carte directeur responsive */
    .director-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }

    .director-photo {
        width: 100%;
        height: 200px;
    }

    /* Grille d'instruments responsive */
    .instruments-grid {
        grid-template-columns: 1fr;
    }
}


/* STYLES SPÉCIFIQUES À LA PAGE HARMONIE */

/* ========================================
   GRILLE D'INFORMATIONS ORCHESTRE
   ======================================== */
.orchestra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Cartes d'information */
.info-card {
    /* background: white; */
    background: var(--color-bg);
    /* border: 1px solid #EAEAEA; */
    border: 1px solid var(--color-muted-border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
}

.info-card:hover {
    border-color: var(--color-primary-200);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.info-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.info-card h3 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #333333;
    margin-bottom: 1rem;
}

.info-card p {
    font-size: 1rem;
    line-height: 1.7;
    /* color: #666; */
    color: var(--color-muted-text);
}

/* ========================================
   SECTION DIRECTEUR
   ======================================== */
.director-section {
    /* background: #F5F5F5; */
    background: var(--color-surface);
    padding: 4rem 0;
}

.director-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    /* background: white; */
    background: var(--color-bg);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    align-items: center;
}

/* Photo du directeur */
.director-photo {
    width: 250px;
    height: 250px;
    /* background: linear-gradient(135deg, #8BC138 0%, #4CAF50 100%); */
    background: linear-gradient(135deg, var(--color-primary-200) 0%, var(--color-primary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: var(--color-bg);
}

/* Informations du directeur */
.director-info h3 {
    font-size: 2rem;
    font-weight: 400;
    /* color: #333333; */
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.director-info .title {
    font-size: 1.1rem;
    /* color: #8BC138; */
    color: var(--color-primary-200);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.director-info p {
    font-size: 1.05rem;
    line-height: 1.8;
    /* color: #666; */
    color: var(--color-muted-text);
}

/* ========================================
   FLIP CARDS MUSICIENS - STYLES
   ======================================== */

/* Grille des cartes flip */
.flip-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* Conteneur de la carte flip */
.flip-card {
    perspective: 1000px;
    height: 350px;
    cursor: pointer;
}

/* Contenu interne de la carte */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Animation de rotation au survol */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* Faces communes (avant et arrière) */
.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Face avant (Instrument) - Couleur beige */
.flip-card-front {
    background: var(--color-muted);
    border: 2px solid var(--color-accent);
}

/* Icône de la face avant */
.flip-card-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Titre de l'instrument */
.flip-card-title {
    font-size: 1.8rem;
    font-weight: 600;
    /* color: #333; */
    color: var(--color-text);
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Compteur de musiciens */
.flip-card-count {
    font-size: 1rem;
    /* color: #8BC138; */
    color: var(--color-primary-200);
    font-weight: 500;
}

/* Face arrière (Liste des musiciens) - Couleur blanche */
.flip-card-back {
    background: var(--color-bg);
    border: 2px solid var(--color-primary-200);
    transform: rotateY(180deg);
    overflow-y: auto;
    padding: 2rem 1.5rem;
}

/* Liste des musiciens */
.musicians-list {
    list-style: none;
    padding: 0;
    width: 100%;
}

.musicians-list li {
    padding: 0.6rem 0;
    /* color: #333; */
    color: var(--color-text);
    font-size: 0.95rem;
    /* border-bottom: 1px solid #F0F0F0; */
    border-bottom: 1px solid var(--color-muted-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.musicians-list li:last-child {
    border-bottom: none;
}

/* Puce avant chaque nom */
.musicians-list li::before {
    content: '♪';
    color: var(--color-primary-200);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Indication de spécialité (pour cuivres graves) */
.musician-specialty {
    font-size: 0.8rem;
    color: #8BC138;
    font-style: italic;
    margin-left: 0.3rem;
}

/* Message d'aide au survol */
.flip-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: #999;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    pointer-events: none;
}

.flip-card:not(:hover) .flip-hint {
    opacity: 1;
}

/* Responsive - Tablettes */
@media (max-width: 1024px) {
    .flip-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .flip-card {
        height: 320px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .flip-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .flip-card {
        height: 300px;
    }

    .flip-card-icon {
        font-size: 4rem;
        margin-bottom: 1rem;
    }

    .flip-card-title {
        font-size: 1.5rem;
    }
}

/* Animation pour mobile : tap au lieu de hover */
@media (hover: none) and (pointer: coarse) {
    .flip-card.flipped .flip-card-inner {
        transform: rotateY(180deg);
    }
}

/* ========================================
   SECTION STATISTIQUES
   ======================================== */
.stats-section {
    background: white;
    color: #333;
    padding: 1.5rem 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-size: 4rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
    /* color: #333333; */
    color: var(--color-text);

}

.stat-label {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 1;
    color: var(--color-primary);
    font-weight: bold;
}

/* ========================================
   STYLES ESPACE MEMBRES & AUTH
   ======================================== */

.auth-page {
    background-color: var(--color-surface);
    min-height: 100vh;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    /* Hauteur moins nav */
    padding-top: 80px;
}

.auth-card {
    background: var(--color-bg);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
    border: 1px solid var(--color-muted-border);
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: var(--color-primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text);
}

.auth-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-muted-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.auth-input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.auth-button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-button:hover {
    background: var(--color-primary-200);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.error-message {
    color: #dc3545;
    background: #ffe6e6;
    padding: 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    animation: slideIn 0.3s;
}

.auth-help {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--color-muted-text);
    border-top: 1px solid var(--color-muted-border);
    padding-top: 1rem;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

/* DASHBOARD MEMBRES */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: var(--color-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--color-muted-border);
    display: flex;
    flex-direction: column;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary-200);
}

.card-icon-header {
    background: var(--color-muted);
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
}

.card-body {
    padding: 1.5rem;
}

.card-body h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.card-body p {
    color: var(--color-muted-text);
}

.session-info {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body .card-button {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   RESPONSIVE - MOBILE (max-width: 768px) - ESPACE MEMBRES
   ======================================== */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }

    .card-icon-header {
        font-size: 3rem;
        padding: 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .dashboard-card {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }
}

/* ========================================
   GALERIE D'AFFICHES (Responsive Grid)
   ======================================== */
.gallery-section {
    padding: 2rem 0;
}

.gallery-year-title {
    font-size: 2rem;
    color: var(--color-primary);
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent);
    text-align: center;
    position: relative;
    clear: both;
    /* Ensure title starts on new line */
}

.gallery-year-title::after {
    content: '♪';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg);
    padding: 0 10px;
    color: var(--color-primary-200);
    font-size: 1.2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    background: var(--color-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--color-muted-border);
    position: relative;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--color-primary-200);
}

.gallery-img-container {
    position: relative;
    padding-top: 140%;
    /* Ratio pour affiches verticales */
    overflow: hidden;
    background: var(--color-muted);
}

.gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-caption {
    padding: 1rem;
    text-align: center;
    color: var(--color-text);
    border-top: 1px solid var(--color-muted-border);
    background: white;
    font-size: 0.9rem;
    font-weight: 500;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

/* Modal / Lightbox improvements if needed */
/* ... */

/* ========================================
   EVEIL MUSICAL PAGE SPECIFIC STYLES
   ======================================== */
.eveil-text-center {
    text-align: center;
}

.eveil-text-center p {
    text-align: center;
    font-size: 1.15rem;
    /* Matches index.html base p size */
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
}

.eveil-image-small {
    max-width: 600px;
    /* Reduced size */
    width: 100%;
    border-radius: 0 !important;
    /* Square borders */
    display: block;
    margin: 2rem auto;
    /* Centered */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.eveil-image-container {
    text-align: center;
    width: 100%;
}

/* Correting Override */
.eveil-content-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eveil-content-container p {
    text-align: justify;
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

.eveil-image-full {
    width: 100%;
    max-width: 100%;
    border-radius: 0 !important;
    display: block;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.eveil-cta-container {
    margin-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ========================================
   STYLES PROFESSEURS (CLEAN)
   ======================================== */
.teachers-list-container {
    max-width: 1000px;
    margin: 0 auto;
}

.teacher-group {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-muted-border);
    align-items: baseline;
    transition: background 0.3s;
}

.teacher-group:hover {
    background: linear-gradient(to right, rgba(76, 175, 80, 0.05), transparent);
    padding-left: 1rem;
    border-radius: 8px;
}

.teacher-instrument {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.teacher-names {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.teacher-names li {
    font-size: 1.15rem;
    color: var(--color-text);
    position: relative;
    font-weight: 500;
}

@media (max-width: 768px) {
    .teacher-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .teacher-names {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ========================================
   TIMELINE ÉVÉNEMENTS PASSÉS
   ======================================== */
.timeline-section {
    padding: 2rem 0;
}

.intro-text p {
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 2rem;
    text-align: justify;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   TIMELINE ÉVÉNEMENTS PASSÉS
   ======================================== */
.timeline-section {
    padding: 2rem 0;
}

.intro-text p {
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 2rem;
    text-align: justify;
    max-width: 1000px;
    /* Widened */
    margin-left: auto;
    margin-right: auto;
}

.timeline {
    position: relative;
    max-width: 1200px;
    /* Widened from 1000px */
    margin: 4rem auto;
    padding: 0 1rem;
}

/* La ligne verticale centrale */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--color-primary-200);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-event {
    padding: 20px 50px;
    /* Increased padding */
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

/* Événements à gauche */
.timeline-event.left {
    left: 0;
}

/* Événements à droite */
.timeline-event.right {
    left: 50%;
}

/* Cercle sur la timeline */
.timeline-event::after {
    content: '';
    position: absolute;
    width: 24px;
    /* Slightly bigger */
    height: 24px;
    right: -12px;
    /* Adjusted */
    background-color: white;
    border: 5px solid var(--color-primary);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
}

/* Fix pour les cercles à droite */
.timeline-event.right::after {
    left: -12px;
}

/* Contenu de l'événement */
.timeline-content {
    padding: 2rem;
    /* Increased padding */
    background-color: white;
    position: relative;
    border-radius: 12px;
    /* Softer corners */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    border-top: 5px solid var(--color-primary);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.event-date {
    display: inline-block;
    background: var(--color-primary-200);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

.timeline-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.6rem;
    /* Bigger title */
    margin-bottom: 0.8rem;
}

.event-description {
    font-size: 1.1rem;
    /* Bigger text */
    line-height: 1.7;
    color: #555;
    margin-bottom: 1.5rem;
}

/* Grille d'images */
.timeline-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    /* Bigger columns */
    gap: 1rem;
    margin-top: 1.5rem;
}

.timeline-img {
    width: 100%;
    height: 250px;
    /* Much bigger height as requested */
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timeline-img:hover {
    transform: scale(1.03);
}

/* RESPONSIVE TIMELINE */
@media screen and (max-width: 900px) {

    /* Trigger mobile layout slightly earlier for wider timeline */
    /* La ligne se place à gauche */
    .timeline::after {
        left: 31px;
    }

    /* Pleine largeur pour les événements */
    .timeline-event {
        width: 100%;
        padding-left: 80px;
        padding-right: 25px;
    }

    /* S'assurer que gauche et droite sont alignés pareil */
    .timeline-event.left,
    .timeline-event.right {
        left: 0;
    }

    /* Ajustement des cercles */
    .timeline-event.left::after,
    .timeline-event.right::after {
        left: 19px;
    }
}

/* ========================================
   PAGE PROFESSEURS
   ======================================== */

.teachers-section {
    margin-bottom: 3rem;
}

.teachers-section h2 {
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.teacher-card {
    background: var(--color-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-muted-border);
    transition: transform 0.2s;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary-200);
}

.teacher-instrument {
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.teacher-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.teacher-list li {
    padding: 0.2rem 0;
    font-size: 1rem;
}

/* Groupes de profs (liste simple) */
.teachers-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.teacher-group {
    background: var(--color-muted);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--color-primary);
}

.teacher-names {
    list-style: none;
    margin-top: 0.5rem;
}

.teacher-names li {
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.teacher-names li:last-child {
    border-bottom: none;
}

.pedagogical-team {
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 3rem;
    border: 1px solid var(--color-primary-200);
}

.pedagogical-team h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}


/* ========================================
   PAGE CONTACT
   ======================================== */

.contact-form-container {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.contact-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--color-muted-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}

.btn-submit {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-submit:hover {
    background-color: var(--color-primary-200);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
}

.contact-info {
    text-align: center;
    margin-bottom: 4rem;
}

.map-container {
    width: 100%;
    height: 400px;
    background: #eee;
    margin-top: 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- Instruments Page Styles --- */
.instrument-intro {
    max-width: 900px;
    margin: 0 auto 4rem;
}

.instrument-category {
    max-width: 900px;
    margin: 0 auto 4rem;
}

.instrument-category h2 {
    font-size: 2rem;
    color: var(--color-text);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--color-primary);
}

.instrument-item {
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.instrument-item:last-child {
    margin-bottom: 2rem;
}

.instrument-item:nth-child(even) {
    flex-direction: row-reverse;
}

.instrument-content {
    flex: 1;
}

.instrument-img-container {
    flex: 0 0 300px;
    display: flex;
    justify-content: center;
}

.instrument-img {
    width: 100%;
    max-width: 300px;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.instrument-img:hover {
    transform: scale(1.05);
}

.instrument-title {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    margin-top: 0;
}

.instrument-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text);
    text-align: justify;
}

@media (max-width: 768px) {

    .instrument-item,
    .instrument-item:nth-child(even) {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .instrument-img-container {
        flex: 0 0 auto;
        width: 100%;
        max-width: 200px;
    }

    .instrument-title {
        text-align: center;
    }
}

/* ========================================
   STYLES PAGE LIENS UTILES
   ======================================== */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.link-card {
    background: var(--color-bg);
    border: 1px solid var(--color-muted-border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.link-card:hover {
    border-color: var(--color-primary-200);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.link-card h3 {
    color: var(--color-text);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.link-card p {
    font-size: 1rem;
    color: var(--color-muted-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.link-card a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    transition: color 0.3s;
}

.link-card a:hover {
    color: var(--color-primary-200);
}

.link-card a::after {
    content: '→';
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.link-card a:hover::after {
    transform: translateX(5px);
}

.links-section h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--color-primary);
    display: inline-block;
}

/* Fix mobile padding/overflow generally */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
        /* Increased slightly for better spacing */
    }

    .page-header {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Ensure no card overflow */
    .link-card,
    .info-card,
    .director-card {
        width: 100%;
        box-sizing: border-box;
    }
}

/* =========================================
   SEARCH AUTOCOMPLETE
   ========================================= */
.search-item {
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    padding: 0;
    list-style: none;
    z-index: 1000;
    overflow: hidden;
    display: none;
    /* Hidden by default */
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-suggestions.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.suggestion-item {
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-link {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
}

.suggestion-link:hover,
.suggestion-item.selected .suggestion-link {
    background-color: #f8f9fa;
    color: var(--color-primary);
}

.suggestion-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.suggestion-category {
    font-size: 0.75rem;
    color: #999;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .search-suggestions {
        position: fixed;
        top: 60px;
        /* Below navbar */
        left: 10px;
        right: 10px;
        width: auto;
    }
}