/* ==========================================================================
   1. Variables & Polices d'écriture (Fonts)
   ========================================================================== */

:root {
    --color-bg: #0d0d0d;
    --color-text: #f5f5f5;
    --color-primary: #116d81;
    --color-accent: #f58431;
}

/* Polices locales */
@font-face {
  font-family: 'Gotham';
  src: url('../fonts/gotham-book-1-.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gotham';
  src: url('../fonts/gotham-ultra-1-.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AvantGarde';
  src: url('../fonts/avgardd_2.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AvantGarde';
  src: url('../fonts/avgarddo_2.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* ==========================================================================
   2. Styles Généraux & Typographie
   ========================================================================== */

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background: var(--color-bg) url('../img/hero_bg.png') center/cover fixed no-repeat;
    color: var(--color-text);
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

h1 {
    font-weight: 900;
    text-align: center;
    text-shadow: 1px 1px 2px var(--color-accent);
}

h2 {
    font-weight: 900;
    color: var(--color-accent);
}

h3 {
    font-size: 1.5em;
    color: var(--color-primary);
}

.bg-couleur {
    background: linear-gradient(var(--color-accent), var(--color-primary));
    color: white;
    border: none;
}


/* ==========================================================================
   3. Structure & Blocs principaux (Layout)
   ========================================================================== */

header {
    position: sticky;
    top: 0;
    background: black;
    padding: 1em;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

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

section {
    padding: 2em;
}

footer {
    text-align: center;
    padding: 1em;
    background: #111;
}

#hero {
  position: relative;
  width: 100%;
  height: 100vh; /* La vidéo prendra toute la hauteur de l'écran */
  overflow: hidden;
  color: white; /* Pour que le texte soit lisible sur la vidéo */
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Place la vidéo en arrière-plan */
  pointer-events: none; /* Permet de cliquer à travers la vidéo */
}

.video-background iframe {
  /* Assure que la vidéo couvre tout l'espace disponible */
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* Ratio 16:9 (100 * 9 / 16) */
  min-height: 100vh;
  min-width: 177.77vh; /* Ratio 16:9 (100 * 16 / 9) */
  transform: translateX(-50%) translateY(-50%);
}

.hero-content {
  /* Style pour centrer votre contenu par-dessus la vidéo */
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
  /* Optionnel : pour un centrage vertical parfait */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Par défaut, on cache la vidéo mobile */
.mobile-video {
  display: none;
}

/* Quand l'écran est plus petit que 768px (taille typique d'une tablette/smartphone) */
@media (max-width: 768px) {
  .desktop-video {
    display: none; /* On cache la vidéo ordinateur */
  }

  .mobile-video {
    display: block; /* On affiche la vidéo smartphone */
  }
}


.hero-background {
    background-image: url('../img/fond-site.jpg');
}

.overlay-hero {
    background: rgba(0, 0, 0, 0.5);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

#festival h1 {
    color: var(--color-accent);
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 1rem;
}

#festival h2 {
    color: #fff;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    margin-bottom: 2rem;
}

#festival p {
    text-align: justify;
}
#festival li {
    text-align: justify;
    margin-left: 2em;
}


.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

#hero .btn {
    margin-top: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
}

#hero .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    text-decoration: none;
}

.btn-video {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
}

.btn-video:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    color: white !important;
}

.btn-video:focus {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    color: white !important;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Ajustements pour mobile */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2rem;
    }
    
    #hero h2 {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@keyframes beat {
  0% {
    font-size: 0.8rem;
  }
  50% {
    font-size: 1rem;
  }
  100% {
    font-size: 0.8rem;
  }
}

.heart-beat {
  animation: beat 1s infinite;
  color: red;
}

/* ==========================================================================
   Modal vidéo
   ========================================================================== */

.video-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    background: #000;
    border-radius: 8px;
    padding: 0;
    position: relative;
}

.video-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.video-container-modal {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-responsive-wrapper {
    position: relative;
    width: 100%;
    height: 70vh;
    background: #000;
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-desktop {
    display: block;
}

.video-mobile {
    display: none;
}

@media (max-width: 768px) {
    .video-desktop {
        display: none;
    }
    
    .video-mobile {
        display: block;
    }
    
    .video-responsive-wrapper {
        height: 60vh;
    }
}

.video-controls {
    padding: 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
}

.video-sound-btn {
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.video-sound-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.video-sound-btn.unmuted {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.video-sound-btn.unmuted .sound-text {
    content: "Désactiver le son";
}

.lead a {
    color: white;
}

/* ==========================================================================
   4. Composants (Components)
   ========================================================================== */

/* --- Logo --- */
.logo {
    font-family: 'Gotham', 'Montserrat', sans-serif;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.logo img {
    height: 40px;
    width: auto;
    display: inline-block;
}

.logo-text {
    display: inline-block;
    font-size: 1rem;
    vertical-align: middle;
}

/* --- Boutons --- */
.btn {
    background: var(--color-accent);
    color: white;
    padding: 0.5em 1em;
    border-radius: 5px;
}

.btn-couleur {
    background: linear-gradient(var(--color-accent), var(--color-primary));
    color: white;
    border: none;
}

.btn-couleur:hover {
    background: var(--color-accent);
}
.filter-btn-couleur {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(var(--color-accent), var(--color-primary));
    color: white;
    cursor: pointer;
    border-radius: 20px;
    font-weight: 500;
    border: none;
}
.filter-btn-couleur:hover {
    background: var(--color-accent);
}
/* --- Grille et Cartes (Grid & Cards) --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
    padding: 1em;
}

.card img {
    width: 100%;
    display: block;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
}

/* --- Miniatures admin dans la liste d'administration --- */
.admin-thumb-wrapper {
    float: left;
    margin-right: 12px;
    margin-bottom: 8px;
}
.admin-thumb {
    height: 60px;
    width: auto;
    display: block;
    border-radius: 6px;
    object-fit: cover;
}
.admin-thumb-btn {
    display: inline-block;
    background: transparent;
    border: 0;
    padding: 0;
}
@media (max-width: 575.98px) {
    .admin-thumb-wrapper {
        float: none;
        margin-right: 0;
        margin-bottom: 8px;
    }
}

/* Alignement spécifique pour les grilles artistes et partenaires */
.grid.artistes .card,
.grid.partenaires .card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grid.artistes .card h3 {
    margin-top: 0.6rem;
    text-align: center;
}

.grid.partenaires .card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    background: transparent;
}

/* --- Carte Artiste (Style Néon) --- */
.artist-item {
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.15));
    padding: .5rem;
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative;
    overflow: hidden;
}

.artist-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(245, 132, 45, 0.25);
}

/* Faux liseré néon via pseudo-élément - SUPPRIMÉ pour corriger l'affichage indésirable */
/* .artist-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 75, 75, 0.18), rgba(255, 0, 255, 0.14));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    filter: blur(6px);
    opacity: .95;
} */

/* --- Média Artiste & Superposition "Play" --- */
.artist-media {
    position: relative;
    display: block;
}

.artist-media img {
    border-radius: 10px;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fix overlap on small screens: ensure artist cards keep image inside container */
.artist-card-public .artist-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.artist-card-public .artist-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}
.artist-item h3 {
    font-weight: bold;
    margin-top: 0.5rem;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.play-overlay .icon {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px;
    border-radius: 50%;
    pointer-events: auto;
    cursor: pointer;
}

/* --- Filtres Publics --- */
#public-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

#public-filter-bar .filter-btn-public {
    white-space: nowrap;
    margin-bottom: 0.25rem;
}


/* ==========================================================================
   5. Modales (Modals)
   ========================================================================== */

/* --- Styles Générals pour les modales --- */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
}

.modal[style*="display:none"] {
    display: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    z-index: 2001;
    max-width: 900px;
    width: 90%;
    max-height: calc(100vh - 40px);
    background: #000;
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
}

/* Bouton de fermeture par défaut */
#modal-close {
    position: absolute;
    right: 8px;
    top: 8px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

/* --- Modale de Détails --- */
.details-modal-content {
    max-width: 1000px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}

.modal-content.details-modal-content {
    overflow-y: auto;
}

.details-layout {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

.details-image {
    width: 260px;
    flex-shrink: 0;
    position: relative;
}

.details-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.details-info {
    color: #e9e9e9;
    flex: 1;
    overflow-y: auto;
}

/* Bouton de fermeture pour la modale de détails */
#details-close {
    position: sticky;
    top: 0;
    right: 0;
    margin-left: auto;
    margin-bottom: 10px;
    background: rgba(245, 132, 49, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 5000;
    padding: 8px;
    border-radius: 50%;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#details-close:hover {
    background: rgba(245, 132, 49, 1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8);
}

#details-close:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* --- Modale de Navigation (Mobile) --- */
.nav-toggle {
    font-size: 1.25rem;
    border-radius: 6px;
    padding: .35rem .6rem;
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
}

#nav-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
}

#nav-modal.show,
#nav-modal[aria-hidden="false"] {
    display: block;
}

.nav-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.nav-modal-content {
    position: relative;
    z-index: 3001;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
}

.nav-modal-inner {
    max-width: 1100px;
    width: 100%;
    display: flex;
    gap: 1rem;
    align-items: stretch;
    pointer-events: auto;
}

.nav-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.nav-list .nav-link {
    display: block;
    background: rgba(0, 0, 0, 0.6);
    padding: .9rem 1rem;
    border-radius: 12px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.35rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transition: transform .15s ease, background .15s ease;
}

.nav-list .nav-link:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.03);
}

.nav-list .nav-link.btn {
    background: linear-gradient(90deg, var(--color-accent), #ff7a7a);
    color: #fff;
    box-shadow: 0 8px 30px rgba(255, 62, 62, 0.12);
}

.nav-list .nav-link + .nav-link {
    margin-top: 0.9rem;
}

.nav-visual {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.nav-visual img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    opacity: 0.95;
}


/* ==========================================================================
   6. Styles Responsives (Media Queries)
   ========================================================================== */

/* --- Ecrans larges (Desktop) --- */
@media (min-width: 768px) {
    /* Cache l'interface de la modale de navigation mobile sur bureau */
    #nav-modal {
        display: none !important;
    }
}

/* --- Tablettes & petits écrans --- */
@media (max-width: 767.98px) {
    /* Modals généraux */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        max-height: calc(100vh - 20px);
        padding: 0.8rem;
    }

    /* Modale de détails */
    .details-modal-content {
        padding: 0.8rem;
        max-height: calc(100vh - 20px);
    }
    
    .details-image {
        width: 100%;
    }
    
    .details-layout {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    #details-close {
        position: sticky;
        top: 0;
        right: 0;
        margin-left: auto;
        margin-bottom: 8px;
        min-width: 36px;
        min-height: 36px;
        font-size: 20px;
        padding: 6px;
    }

    /* Modale de navigation */
    .nav-modal-inner {
        flex-direction: column;
        max-width: 100%;
        padding: 1rem;
    }
    .nav-visual {
        width: 100%;
        padding-top: 0.5rem;
    }
    .nav-panel {
        width: 100%;
        padding: 0.5rem;
    }
}


/* --- Petits téléphones --- */
@media (max-width: 600px) {
    .card img {
        height: 180px;
    }
    .grid.partenaires .card img {
        height: 80px;
    }
    .partenaire-logo {
        max-height: 60px;
    }
}


/* --- Très petits téléphones --- */
@media (max-width: 575.98px) {



    /* Hauteur de l'image pour les grandes cartes d'artistes */
    .artist-item--large .artist-media {
        height: 200px !important;
    }
}

/* ==========================================================================
   7. Styles pour la galerie d'artistes filtrable
   ========================================================================== */

/* --- Conteneur des contrôles de filtre --- */
#filter-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

/* --- Style des boutons de filtre --- */
.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--color-primary);
    background-color: transparent;
    color: var(--color-text);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 20px;
    font-weight: 500;
}

.filter-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-text);
}

.filter-btn.active {
    background-color: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
    font-weight: 700;
}

/* --- Grille des artistes --- */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* --- État de départ pour l'animation d'entrée --- */
@starting-style {
    .artist-card {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* --- Style des fiches d'artiste --- */
.artist-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-align: center;
    padding: 1rem;
    /* Animation pour l'apparition/disparition */
    transition: opacity 0.4s ease, transform 0.4s ease, display 0.4s;
    transition-behavior: allow-discrete;
}

.artist-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(245, 132, 45, 0.25);
}

/* Faux liseré néon via pseudo-élément - SUPPRIMÉ pour corriger l'affichage indésirable */
/* .artist-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 75, 75, 0.18), rgba(255, 0, 255, 0.14));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    filter: blur(6px);
    opacity: .95;
} */

.artist-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.artist-card h3 {
    color: var(--color-text);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

.artist-card h4 {
    color: var(--color-accent);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.artist-card p {
    color: var(--color-primary);
    font-size: 0.9rem;
}

#link-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

/* --- Classes utilitaires --- */
.hide {
    /* L'animation de sortie se fait via la transition */
    opacity: 0;
    transform: scale(0.9);
    display: none;
}

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#no-results-message {
    text-align: center;
    padding: 2rem;
    color: var(--color-accent);
}

/* Style du conteneur principal de la banderole */
.logo-slider {
    overflow: hidden; /* Cache tout ce qui dépasse */
    position: relative;
    width: 100%;
    /* Ajoute un léger dégradé sur les côtés pour un effet de fondu */
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0));
    mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0));
}

/* La piste qui contient tous les logos et qui va bouger */
.logo-slide-track {
    display: flex;
    /* La largeur est le double du nombre de logos (car on les a dupliqués) */
    width: calc(150px * 26);  /* 150px par logo, 7 logos * 2 = 14 */
    animation: scroll 20s linear infinite; /* L'animation ! */
    animation-direction: reverse; 
}

/* Style de chaque logo individuel */
.slide {
/*    height: 100px;  Hauteur du logo */
    width: 150px;  /* Largeur du logo */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.slide img {
    max-width: 120px; /* Assure que l'image ne dépasse pas */
    filter: grayscale(1); /* Effet noir et blanc */
    transition: filter 0.3s ease-in-out;
}

.slide img:hover {
    filter: grayscale(0); /* Couleur au survol */
    transform: scale(1.1);
}

/* Définition de l'animation de défilement */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* On déplace vers la gauche de la moitié de la largeur totale */
        transform: translateX(calc(-150px * 7));
    }
}

/* ==========================================================================
   Chat helper: petit bouton discret + modale chat
   ========================================================================== */

/* Chat helper (discret)
   z-index lowered so the header (z=1000) remains above the docked helper.
   When the chat modal opens we toggle body.chat-open to prevent the helper
   from intercepting pointer events (see JS patch). */
.chat-helper {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900; /* kept < header (1000) to avoid stacking/pointer conflicts */
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg,var(--color-accent),var(--color-primary));
  color: var(--color-bg);
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.06);
}
.chat-helper .chat-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  color: var(--color-bg);
  font-size: 18px;
}
@media (max-width: 576px) {
  .chat-helper { right: 12px; bottom: 12px; padding: 7px 10px; font-size: 0.9rem; }
}

/* Chat modal overrides (keeps your existing modal look) */
#chat-modal .modal-content {
  max-width: 760px;
  width: 92%;
  background: linear-gradient(180deg, rgba(10,10,10,0.92), rgba(8,8,8,0.98));
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--color-text);
  padding: 0.5rem;
}
#chat-modal .modal-body { padding: 0.6rem; }

/* Mini chat inside modal */
.chat-window { display:flex; flex-direction:column; gap:8px; min-height: 320px; max-height: 60vh; }
.chat-window .messages { overflow:auto; padding:12px; background: rgba(255,255,255,0.02); border-radius:8px; flex:1; color:var(--color-text); }
.chat-window .composer { display:flex; gap:8px; align-items:center; }
.chat-window textarea { resize:none; height:48px; width:100%; padding:8px 10px; border-radius:10px; border:1px solid rgba(255,255,255,0.06); background:transparent; color:var(--color-text); }
.chat-window button.send { padding:8px 12px; border-radius:10px; border:0; background:linear-gradient(135deg,var(--color-accent),var(--color-primary)); color:var(--color-bg); cursor:pointer; font-weight:700; }
.chat-window .muted { color: rgba(255,255,255,0.55); font-size:0.9rem; }

/* Animation des 3 points pour le loader du chat */
.chat-loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
}

.chat-loading-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-accent);
  animation: chat-dot-bounce 1.4s infinite ease-in-out;
}

.chat-loading-dots .dot:nth-child(1) {
  animation-delay: -0.32s;
}

.chat-loading-dots .dot:nth-child(2) {
  animation-delay: -0.16s;
}

.chat-loading-dots .dot:nth-child(3) {
  animation-delay: 0s;
}

@keyframes chat-dot-bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* ==========================================================================
   Bouton retour en haut (Back to top button)
   ========================================================================== */

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 800; /* Below chat helper (900) and header (1000) */
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  color: var(--color-bg);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: linear-gradient(135deg, #ff6b47, #1a7a8a);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.back-to-top:active {
  transform: translateY(-1px);
}

.back-to-top:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 576px) {
  .back-to-top {
    right: 15px;
    bottom: 70px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
}

/* ==========================================================================
   Z-stack, focus-visible and hover-buffer patch (by Cline)
   - Minimal, safe changes appended as a hotfix.
   - header z-index is kept at 1000 per request.
   - chat helper docked z-index is lower than header (900).
   - When chat is open we add .chat-open on <body> to prevent the helper
     from intercepting pointer events.
   ========================================================================== */

:root {
  --z-chat-docked: 900; /* chat helper when closed - beneath header */
  --z-header: 1000;     /* header/menu */
  --z-modal: 2000;      /* modals (chat modal uses .modal with z=2000) */
}

/* Ensure header stacking is explicit and reduce stacking-context surprises */
header {
  z-index: var(--z-header); /* keep header at 1000 as requested */
}

/* Ensure docked chat helper is below header to avoid pointer capture when helper overlaps header */
.chat-helper {
  z-index: var(--z-chat-docked);
}

/* When chat modal is open, disable pointer events on helper so header/menu interactions are stable */
body.chat-open .chat-helper {
  pointer-events: none;
  /* leave visual intact but ensure it won't steal hover/clicks from header */
}

/* Hover buffer: small transparent area under nav links to reduce accidental mouseleave */
nav ul li a {
  position: relative;
}
nav ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
  pointer-events: none;
}

/* Standardized focus-visible ring (accessible, replace flashy/pink rings) */
a:focus-visible, button:focus-visible, .nav-link:focus-visible {
  outline: 2px solid #2563eb; /* blue-600 (accessible contrast) */
  outline-offset: 2px;
}

/* Temporary global hotfix: neutralize unexpected outlines/borders/shadows that cause the "pink frame".
   This is intended as a short-term safety net and should be removed after the root cause is identified. */
html, body, #__next, #root, .app-root {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}


/* End of file */
