

/* ==========================================================================
   1. VARIABLES DU THÈME (BLEU NUIT & DORÉ)
   ========================================================================== */
:root {
  /* Fonds bleu nuit */
  --bg-dark: #0a111e;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;

  /* Textes */
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;

  /* Accents dorés */
  --gold-primary: #d4af37;
  --gold-light: #f2ca50;
  --gold-dark: #9a7410;
  --gold-glow: rgba(212, 175, 55, 0.25);

  /* Bordures */
  --border-subtle: rgba(148, 163, 184, 0.22);
  --border-gold: rgba(212, 175, 55, 0.35);
}

/* ==========================================================================
   2. RÉINITIALISATION ET STYLES DE BASE
   ========================================================================== */
html, body {
  background-color: var(--bg-dark) !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6,
.font-display-lg,
.font-headline-lg,
.font-headline-md {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-primary);
}

/* ==========================================================================
   ICÔNES (Material Symbols)
   ==========================================================================
   La police d'icônes vient de Google Fonts. Sa feuille déclare elle-même la
   classe `.material-symbols-outlined` (font-family + ligatures) : on ne la
   redéfinit donc PAS ici. Forcer localement `font-family` a un effet pervers
   dès que le fichier de police n'est pas encore arrivé : le nom du symbole
   (« dashboard », « save »…) s'affiche en toutes lettres et casse la mise en
   page, alors que, sans cette déclaration, le navigateur ignore simplement les
   ligatures tant que la police est absente.

   On ne conserve donc que les axes variables, en plus d'un affichage en ligne
   et non sélectionnable (ces icônes n'ont pas à être copiées au milieu d'un
   texte).
   ========================================================================== */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  flex: 0 0 auto;
  user-select: none;
}

/* ==========================================================================
   3. ADAPTATION DÉDIÉE À LA PAGE D'ACCUEIL (INDEX)
   ========================================================================== */
body.home-page {
  background-image: linear-gradient(to bottom, rgba(10, 17, 30, 0.75), rgba(10, 17, 30, 0.95)), 
                    url('assets/images/site/bg.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  min-height: 100vh;
}

/* Hero Pattern Overlay */
.hero-pattern {
  background-image: radial-gradient(circle at center, var(--gold-glow) 0, transparent 60%),
                    linear-gradient(to bottom, var(--bg-dark), var(--bg-surface)) !important;
}

.home-hero h1 {
  color: #ffffff !important;
}

body.home-page p {
  color: var(--text-muted) !important;
}

.text-gold, 
.text-primary {
  color: var(--gold-light) !important;
}

.home-hero-primary {
  background: var(--gold-primary);
  color: var(--text-dark) !important;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.24);
}

.home-hero-primary:hover,
.home-hero-primary:focus-visible {
  background: var(--gold-light);
  color: var(--text-dark) !important;
  box-shadow: 0 10px 28px rgba(212, 175, 55, 0.34);
}

.home-hero-secondary {
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #ffffff !important;
}

.home-hero-secondary:hover,
.home-hero-secondary:focus-visible {
  border-color: var(--gold-primary);
  background: var(--gold-glow);
  color: var(--gold-light) !important;
}

html[data-theme="light"] body.home-page {
  background-image: linear-gradient(to bottom, rgba(248, 250, 252, 0.9), rgba(226, 232, 240, 0.94)), url('assets/images/site/bg.jpg') !important;
}

html[data-theme="light"] .home-hero h1 {
  color: var(--text-primary) !important;
}

html[data-theme="light"] .home-hero-secondary {
  border-color: rgba(15, 23, 42, 0.3);
  color: var(--text-primary) !important;
}

html[data-theme="light"] .home-hero-secondary:hover,
html[data-theme="light"] .home-hero-secondary:focus-visible {
  border-color: var(--gold-dark);
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold-dark) !important;
}

/* ==========================================================================
   4. SECTION "POURQUOI CHOISIR ZINOVA INVEST ACADEMY" (FEATURE CARDS)
   ========================================================================== */
.why-section {
  position: relative;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-surface) 55%, var(--bg-dark) 100%) !important;
  overflow: hidden;
}

/* Halo doré discret en fond de section */
.why-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.12), transparent 55%);
  pointer-events: none;
}

/* --- En-tête de section --- */
.why-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

.why-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--gold-glow);
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.why-eyebrow .material-symbols-outlined {
  font-size: 1.1rem;
}

.why-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin: 0;
}

.why-title-brand {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-primary);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .why-title-brand {
    white-space: normal;
  }
}

.why-subtitle {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* --- Grille des cartes --- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .why-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --- Cartes --- */
.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.25rem 1.75rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(10, 17, 30, 0.78)) !important;
  border: 1px solid var(--border-subtle) !important;
  backdrop-filter: blur(10px);
  overflow: hidden;
  /* Cartes visibles par défaut : l'animation JS ne fait que les renforcer.
     Ainsi, la section reste lisible même si le JavaScript ne s'exécute pas. */
  opacity: 1;
  transform: none;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

/* Liseré doré animé en haut de carte */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.45s ease;
}

/* Halo doré interne au survol */
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Apparition en cascade */
.feature-card.is-visible {
  animation: feature-card-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--card-index, 0) * 120ms);
}

@media (prefers-reduced-motion: reduce) {
  .feature-card,
  .feature-card.is-visible {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Numéro en filigrane */
.feature-card-badge {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-primary);
  opacity: 0.14;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* --- Survol --- */
.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--gold-primary) !important;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9)) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-gold),
    0 0 30px rgba(212, 175, 55, 0.18);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card:hover .feature-card-badge {
  opacity: 0.3;
  transform: translateY(-2px);
}

/* Pastille d'icône */
.feature-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  font-size: 2rem;
  color: var(--gold-light) !important;
  background: radial-gradient(circle at 30% 30%, rgba(242, 202, 80, 0.18), rgba(212, 175, 55, 0.05));
  border: 1px solid var(--border-gold);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), color 0.4s ease,
    background 0.4s ease, box-shadow 0.4s ease;
}

.feature-card:hover .feature-card-icon {
  transform: translateY(-4px) scale(1.08);
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.35);
}

.feature-card-title {
  color: var(--text-primary) !important;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
  transition: color 0.3s ease;
}

.feature-card:hover .feature-card-title {
  color: var(--gold-light) !important;
}

.feature-card-description {
  color: var(--text-muted) !important;
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0;
}

@keyframes feature-card-enter {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   5. CARTES D'ACTUALITÉ ET DE RECOMMANDATION
   ========================================================================== */
.home-news-card,
.recommended-card,
.article-recommendation-card {
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-news-card:hover,
.recommended-card:hover,
.article-recommendation-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-primary) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.home-news-image, 
.recommended-image {
  overflow: hidden;
  position: relative;
}

.home-news-image img, 
.recommended-image img {
  transition: transform 0.5s ease;
}

.home-news-card:hover .home-news-image img,
.recommended-card:hover .recommended-image img {
  transform: scale(1.06);
}

.home-news-more {
  background-color: var(--gold-primary) !important;
  color: var(--text-dark) !important;
  box-shadow: 0 8px 18px var(--gold-glow);
  transition: all 0.3s ease;
}

.home-news-more:hover {
  background-color: var(--gold-light) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.3);
}

/* --------------------------------------------------------------------------
   Bouton « Voir plus de vidéos » (accueil) et pied de la page videos.php
   --------------------------------------------------------------------------
   Centré sous la grille, avec une note discrète sur le nombre de vidéos :
   le visiteur sait ce qu'il va trouver avant de cliquer. */
.home-videos-more,
.videos-page-retour {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2.5rem;
  text-align: center;
}

.home-videos-more-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Filtres par année (page videos.php) : mêmes liens que la page Actualités,
   les classes .news-filter n'y étant pas utilisées. */
.news-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.news-filter:hover {
  border-color: var(--border-gold);
  color: var(--gold-light);
}

.news-filter.is-active {
  border-color: var(--gold-primary);
  background: var(--gold-primary);
  color: var(--text-dark);
}

/* État vide de la page vidéos (aucune vidéo publiée / aucune pour l'année
   choisie) : centré, avec le bouton de retour à toutes les vidéos. */
.videos-page-retour .home-news-more,
.news-list .empty-state .home-news-more {
  margin-top: 0.5rem;
}

/* ==========================================================================
   5b. CARTES D'ACTUALITÉS (PAGE ACTUALITÉS) — ANIMATIONS AU SURVOL
   ========================================================================== */
.news-article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(10, 17, 30, 0.8)) !important;
  border: 1px solid var(--border-subtle) !important;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.45s ease, box-shadow 0.45s ease, background 0.45s ease;
  will-change: transform;
}

/* Liseré doré qui se déploie au survol */
.news-article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.5s ease;
}

.news-article-card:hover,
.news-article-card:focus-within {
  transform: translateY(-10px);
  border-color: var(--gold-primary) !important;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9)) !important;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--border-gold),
    0 0 30px rgba(212, 175, 55, 0.18);
}

.news-article-card:hover::before,
.news-article-card:focus-within::before {
  transform: scaleX(1);
}

/* --- Média + zoom d'image --- */
.news-article-media {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

/* Image manquante : fond de remplacement discret */
.news-article-media.is-image-missing {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(15, 23, 42, 0.5));
}

.news-article-media.is-image-missing::before {
  content: 'image';
  font-family: 'Material Symbols Outlined';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--gold-primary);
  opacity: 0.5;
}

.news-article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
}

.news-article-card:hover .news-article-image,
.news-article-card:focus-within .news-article-image {
  transform: scale(1.08);
  filter: saturate(1.1) brightness(1.05);
}

/* Dégradé sombre en bas de l'image au survol */
.news-article-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 17, 30, 0.75), transparent 55%);
  opacity: 0.35;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.news-article-card:hover .news-article-media::after {
  opacity: 0.6;
}

/* Badge catégorie */
.news-article-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.news-article-card:hover .news-article-category {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

/* --- Contenu --- */
.news-article-body {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  flex: 1;
}

.news-article-date {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.news-article-title {
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  transition: color 0.3s ease;
}

.news-article-card:hover .news-article-title,
.news-article-card:focus-within .news-article-title {
  color: var(--gold-light);
}

.news-article-description {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
  flex: 1;
}

/* --- Lien "Lire la suite" --- */
.news-article-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  color: var(--gold-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s ease, gap 0.3s ease;
}

.news-article-link .material-symbols-outlined {
  font-size: 1rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-article-link:hover {
  color: var(--gold-light);
  gap: 0.65rem;
}

.news-article-card:hover .news-article-link .material-symbols-outlined,
.news-article-card:focus-within .news-article-link .material-symbols-outlined {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .news-article-card,
  .news-article-card:hover,
  .news-article-card:focus-within {
    transform: none;
  }

  .news-article-image,
  .news-article-card:hover .news-article-image {
    transform: none;
  }
}

/* Cartes d'actualités en thème clair */
html[data-theme="light"] .news-article-card {
  background: linear-gradient(160deg, #ffffff, #f1f5f9) !important;
  border-color: rgba(154, 116, 16, 0.28) !important;
}

html[data-theme="light"] .news-article-card:hover,
html[data-theme="light"] .news-article-card:focus-within {
  background: linear-gradient(160deg, #ffffff, #eef2f7) !important;
}

html[data-theme="light"] .news-article-title {
  color: #0f172a;
}

html[data-theme="light"] .news-article-card:hover .news-article-title,
html[data-theme="light"] .news-article-card:focus-within .news-article-title {
  color: var(--gold-dark);
}

html[data-theme="light"] .news-article-date,
html[data-theme="light"] .news-article-description {
  color: #475569;
}

/* ==========================================================================
   5c. PAGE ACTUALITÉS (actualités.php) — HERO, FILTRES & GRILLE
   ========================================================================== */
.news-page {
  padding-top: 7rem;
  padding-bottom: 5rem;
  padding-inline: 16px;
}

@media (min-width: 768px) {
  .news-page {
    padding-inline: 48px;
  }
}

/* --- Hero --- */
.news-hero {
  max-width: 1280px;
  margin: 0 auto 3rem;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.news-hero-inner {
  max-width: 720px;
}

.news-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--gold-glow);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.news-hero-eyebrow .material-symbols-outlined {
  font-size: 1.05rem;
}

.news-hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

.news-hero-brand {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-primary);
}

/* --------------------------------------------------------------------------
   Titres de section principaux — harmonisation dorée
   --------------------------------------------------------------------------
   Appliqué aux titres « Dernières actualités BRVM », « Vidéos »,
   « Nos partenaires », « Témoignages », « Nos formations » et
   « Prêt à commencer votre formation ? ».

   Le dégradé reprend exactement celui de .why-title-brand et
   .news-hero-brand, pour une identité dorée cohérente sur tout le site.
   La couleur unie sert de repli si background-clip: text n'est pas géré. */
.section-title-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-primary);
}

/* Thème clair : doré plus soutenu, pour conserver un bon contraste
   sur fond blanc/clair (le doré clair serait trop pâle). */
html[data-theme="light"] .section-title-gold {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-dark) !important;
}

@media (prefers-reduced-motion: reduce) {
  .section-title-gold {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--gold-primary);
  }
}

/* Petits écrans : les titres passent souvent sur deux lignes. Un dégradé
   appliqué à un bloc multiligne donne alors un rendu inégal (la deuxième
   ligne est plus foncée). On repasse sur une couleur dorée unie, homogène,
   tout en conservant l'identité dorée. Même logique que .why-title-brand. */
@media (max-width: 600px) {
  .section-title-gold {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--gold-primary);
  }

  html[data-theme="light"] .section-title-gold {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--gold-dark) !important;
  }
}

.news-hero-subtitle {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1.75rem;
}

.news-hero-stats {
  display: flex;
  gap: 2.5rem;
}

.news-stat {
  display: flex;
  flex-direction: column;
}

.news-stat-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-primary);
}

.news-stat-label {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --- Barre d'outils + filtres --- */
.news-list {
  max-width: 1280px;
  margin: 0 auto;
}

.news-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.news-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.news-filter-button:hover {
  color: var(--gold-light);
  border-color: var(--border-gold);
  transform: translateY(-1px);
}

.news-filter-button.news-filter-active {
  color: var(--text-dark);
  border-color: var(--gold-primary);
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  box-shadow: 0 8px 18px rgba(212, 175, 55, 0.25);
}

.news-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.68rem;
  font-weight: 700;
}

.news-filter-button.news-filter-active .news-filter-count {
  background: rgba(24, 36, 52, 0.22);
}

/* --- Grille --- */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --- Carte : zone cliquable + badge a-la-une + date icone --- */
.news-article-hitarea {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}

.news-article-featured {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(10, 17, 30, 0.75);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.news-article-featured .material-symbols-outlined {
  font-size: 0.95rem;
}

.news-article-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.news-article-date .material-symbols-outlined {
  font-size: 0.95rem;
  color: var(--gold-primary);
}

/* Révélation en cascade */
.news-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.45s ease, box-shadow 0.45s ease, background 0.45s ease;
}

.news-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .news-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Carte mise en avant (premier article, version large sur desktop) */
@media (min-width: 1024px) {
  .news-article-card--featured {
    grid-column: span 2;
  }

  .news-article-card--featured .news-article-media {
    height: 17rem;
  }

  .news-article-card--featured .news-article-title {
    font-size: 1.55rem;
  }
}

.news-empty-state {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

/* ==========================================================================
   5d. PAGE ARTICLE (article.php) — LECTURE, SOMMAIRE & PARTAGE
   ========================================================================== */
/* Barre de progression de lecture */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: rgba(148, 163, 184, 0.12);
}

.reading-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
}

/* Grille de contenu : article + sommaire */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 992px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

.article-main {
  min-width: 0;
}

/* --- Sommaire --- */
.article-aside {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 992px) {
  .article-aside {
    position: sticky;
    top: 6rem;
  }
}

.article-toc {
  padding: 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.article-toc-title {
  display: block;
  margin-bottom: 0.85rem;
  color: var(--gold-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.article-toc-link {
  display: block;
  padding: 0.4rem 0.6rem;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.article-toc-link--h3 {
  padding-left: 1.15rem;
  font-size: 0.8rem;
}

.article-toc-link:hover {
  color: var(--gold-light);
  background: var(--gold-glow);
}

.article-toc-link.is-active {
  color: var(--gold-light);
  border-left-color: var(--gold-primary);
  background: var(--gold-glow);
  font-weight: 600;
}

.article-aside-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--border-gold);
  background: linear-gradient(160deg, var(--gold-glow), transparent);
}

.article-aside-card .material-symbols-outlined {
  color: var(--gold-primary);
  font-size: 1.6rem;
}

.article-aside-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-aside-card strong {
  color: var(--gold-light);
}

.article-aside-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.25s ease;
}

.article-aside-link:hover {
  gap: 0.6rem;
}

.article-aside-link .material-symbols-outlined {
  font-size: 1rem;
}

/* --- Boutons de partage --- */
.article-share-buttons {
  display: inline-flex;
  gap: 0.5rem;
}

.article-share-feedback {
  margin-left: 0.5rem;
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.article-share-feedback.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- Retour en haut --- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 96px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--bg-surface);
  color: var(--gold-light);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.22s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: var(--text-dark);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 84px;
    right: 14px;
  }
}

/* ==========================================================================
   6. PARTENAIRES & TÉMOIGNAGES
   ========================================================================== */
.partners-section,
.testimonials-section {
  background-color: var(--bg-dark) !important;
}

.partners-eyebrow {
  color: var(--gold-primary);
}

/* Motif de points dorés (section « Zinova en chiffres » de la page À propos).
   Remplace un ancien style inline qui référençait une variable Tailwind
   inexistante (--tw-colors-primary), si bien que le motif ne s'affichait pas. */
.stats-dot-pattern {
  background-image: radial-gradient(circle at 2px 2px, var(--gold-primary) 1px, transparent 0);
  background-size: 24px 24px;
}

/* --------------------------------------------------------------------------
   Visuels de carte de formation (page Formations)
   --------------------------------------------------------------------------
   Fond décoratif bleu nuit + doré, purement en CSS : évite toute dépendance
   à une image externe (les anciennes images Google expiraient) et garde une
   identité visuelle premium et cohérente. Léger motif de lignes diagonales. */
.course-visual {
  /* Attention : NE PAS fixer `position` ici, sinon la regle ecraserait la
     classe Tailwind `absolute` du HTML et l'element aurait une hauteur nulle
     (son contenu est lui-meme en position absolue). */
  overflow: hidden;
  background-color: #0a111e;
  background-image:
    radial-gradient(circle at 20% 25%, rgba(242, 202, 80, 0.55), transparent 42%),
    radial-gradient(circle at 85% 15%, rgba(212, 175, 55, 0.35), transparent 40%),
    radial-gradient(circle at 70% 90%, rgba(154, 116, 16, 0.45), transparent 50%),
    repeating-linear-gradient(
      135deg,
      rgba(242, 202, 80, 0.22) 0px,
      rgba(242, 202, 80, 0.22) 1.5px,
      transparent 1.5px,
      transparent 14px
    ),
    linear-gradient(150deg, #13253c 0%, #0a111e 60%, #060b14 100%);
}

/* Halo doré lumineux derrière l'icône, pour un rendu premium. */
.course-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, rgba(212, 175, 55, 0.28), transparent 55%);
  pointer-events: none;
}

/* Icône centrale du visuel de cours. */
.course-visual-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gold-light);
  z-index: 1;
}

.course-visual-icon .material-symbols-outlined {
  font-size: 4rem;
  font-weight: 500;
  opacity: 1;
  filter: drop-shadow(0 4px 14px rgba(212, 175, 55, 0.55));
}

html[data-theme="light"] .course-visual {
  background-color: #1e293b;
  background-image:
    radial-gradient(circle at 20% 25%, rgba(212, 175, 55, 0.60), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(242, 202, 80, 0.45), transparent 42%),
    radial-gradient(circle at 70% 90%, rgba(154, 116, 16, 0.55), transparent 52%),
    repeating-linear-gradient(
      135deg,
      rgba(242, 202, 80, 0.20) 0px,
      rgba(242, 202, 80, 0.20) 1.5px,
      transparent 1.5px,
      transparent 14px
    ),
    linear-gradient(150deg, #1e293b 0%, #0f172a 65%, #0a111e 100%);
}

html[data-theme="light"] .course-visual-icon {
  color: var(--gold-light);
}

/* Avatar d'équipe (page À propos) : pastille dorée avec les initiales.
   Évite toute dépendance à une photo externe, tout en gardant un rendu
   soigné et cohérent avec le thème bleu nuit & doré. */
.team-avatar {
  display: grid;
  place-items: center;
  width: 8rem;
  height: 8rem;
  flex: 0 0 8rem;
  margin-bottom: 1.5rem;
  border-radius: 999px;
  border: 4px solid var(--bg-surface);
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: var(--text-dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px var(--border-gold), 0 0 15px rgba(212, 175, 55, 0.25);
}

html[data-theme="light"] .team-avatar {
  border-color: #ffffff;
}

/* Page À propos — corrections de mise en page.
   Ces règles rétablissent des classes utilitaires Tailwind qui reposent sur
   des attributs class volontairement sans flex/border, afin de garantir un
   rendu stable (pied de page en bas, cartes centrées, bordures visibles). */
body.min-h-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Cartes « Nos valeurs » et « L'équipe » : bordure dorée subtile visible. */
body.min-h-screen main .bg-surface.rounded-lg,
body.min-h-screen main .bg-surface-container.rounded-xl {
  border-width: 1px;
  border-style: solid;
  border-color: rgba(148, 163, 184, 0.3);
}

/* Cartes de l'équipe : centrage horizontal du contenu. */
body.min-h-screen main .team-avatar {
  margin-inline: auto;
}

.partner-tile {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.partner-tile:hover {
  transform: translateY(-5px);
  border-color: var(--gold-primary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.partner-logo-mark {
  color: #ffffff;
}

.partner-detail {
  color: var(--text-muted);
}

/* --- Titre de section --- */
.testimonials-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* --- Cartes vidéo (section « Vidéos » de l'accueil) ---
   Chaque carte s'étire sur toute la hauteur de sa ligne et le titre occupe
   une hauteur minimale de deux lignes : les vignettes et les descriptions
   restent alignées quelle que soit la longueur des titres. */
.video-card {
  display: flex;
}

.video-card-link {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.video-card-title {
  min-height: 2.6em;
}

/* --- Grille des témoignages ---
   Deux colonnes à partir des écrans moyens, y compris sur grand écran :
   les témoignages sont larges et lisibles, et un nombre pair (4, par exemple)
   se répartit en 2 × 2 sans laisser une carte seule dans un grand vide. */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
  justify-content: center;
}


@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 480px));
  }
}

/* --- Carte témoignage --- */
.testimonial-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  overflow: hidden;
  padding: 30px 28px 26px;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: linear-gradient(150deg, var(--bg-surface) 0%, var(--bg-surface-elevated) 100%);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  transition: transform 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease;
}

/* Liseré doré qui se déploie au survol */
.testimonial-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-gold);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.38);
}

.testimonial-card:hover::before {
  opacity: 1;
}

/* Guillemet décoratif */
.testimonial-quote-mark {
  position: absolute;
  top: -6px;
  right: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.5rem;
  line-height: 1;
  color: var(--gold-primary);
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
}

/* --- Note --- */
.testimonial-rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 6px 12px;
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold-primary) 12%, transparent);
}

.testimonial-stars {
  color: var(--gold-light);
  font-size: 0.9rem;
  letter-spacing: 2px;
  line-height: 1;
}

.testimonial-score {
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

/* --- Contenu du témoignage --- */
.testimonial-card blockquote {
  margin: 0;
  flex: 1 1 auto;
  color: var(--text-primary);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.75;
  quotes: none;
}

/* --- Auteur --- */
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.testimonial-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: #1a1206;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.testimonial-author-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.testimonial-author-name {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.testimonial-author-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.testimonial-dot {
  color: var(--gold-primary);
  font-size: 0.9em;
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-card,
  .testimonial-card::before {
    transition: none;
  }

  .testimonial-card:hover {
    transform: none;
  }
}

/* ==========================================================================
   7. NAVIGATION & HEADER FIXE
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 17, 30, 0.82);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border-gold);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header-inner {
  width: min(100%, 1280px);
  height: 4.5rem !important;
  padding-inline: 16px;
}

@media (min-width: 1024px) {
  .site-header-inner {
    padding-inline: 48px;
  }
}

/* La marque du header ne doit pas dépendre de la configuration Tailwind
   spécifique à chaque page. */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  min-width: 0;
  text-decoration: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.site-brand:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.site-logo {
  width: 2.125rem;
  height: 2.125rem;
  flex: 0 0 2.125rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  object-fit: cover;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.site-brand:hover .site-logo {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.site-header .brand-name {
  /* Police, poids et graisse imposés explicitement pour garantir un rendu
     STRICTEMENT identique sur toutes les pages : sans font-weight fixe,
     la marque héritait du poids du body (variable selon la page) et
     pouvait s'afficher en police de secours avant le chargement de
     Montserrat. On fixe ici police + poids + taille. */
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-header .brand-highlight-o,
.site-header .brand-academy {
  color: var(--gold-primary);
}

/* --- Menu de navigation desktop --- */
.site-nav-menu {
  display: none;
  align-items: center;
  gap: 0.25rem;
  margin-inline: auto;
}

/* Le menu desktop n'apparaît qu'à partir de 1024px. `!important` est requis
   car les pages chargent Tailwind (classes `hidden md:flex`) qui, sinon,
   l'afficherait dès 768px — trop tôt pour les tablettes et l'iPad portrait. */
.site-nav-menu {
  display: none !important;
}

@media (min-width: 1024px) {
  .site-header .site-nav-menu,
  .site-nav-menu {
    display: flex !important;
  }
}

/* iPad portrait & tablettes (768–1023px) : la navigation reste dans le
   tiroir hamburger, les liens ne tiennent pas dans la barre. */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-header .site-nav-menu,
  .site-nav-menu {
    display: none !important;
  }
}

.site-nav-link {
  position: relative;
  display: inline-flex;
  min-height: 2.125rem;
  align-items: center;
  color: var(--text-primary) !important;
  border: 1px solid transparent;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease,
    box-shadow 0.22s ease, transform 0.22s ease;
}

/* Soulignement doré animé au survol */
.site-nav-link::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
  border-color: var(--border-gold);
  background: linear-gradient(135deg, var(--gold-glow), rgba(212, 175, 55, 0.06));
  color: var(--gold-light) !important;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 16px rgba(0, 0, 0, 0.12);
}

.site-nav-link:hover::after {
  transform: scaleX(1);
}

.site-nav-link.active {
  border-color: var(--border-gold);
  background: linear-gradient(135deg, var(--gold-glow), rgba(212, 175, 55, 0.06));
  color: var(--gold-light) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 16px rgba(0, 0, 0, 0.12);
}

.site-nav-link.active::after {
  transform: scaleX(1);
}

/* --- Zone d'actions (thème + connexion) --- */
.site-header-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 1024px) {
  .site-header-actions {
    display: inline-flex;
  }
}

/* Entre 640px et 1023px (tablettes, iPad portrait, grands téléphones),
   la barre ne peut pas contenir à la fois la marque, les actions et le
   hamburger : on conserve uniquement le hamburger (le thème et la
   connexion restent accessibles dans le tiroir latéral). */
@media (min-width: 640px) and (max-width: 1023px) {
  .site-header-actions {
    display: none;
  }
}

html[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #e2e8f0;
  --text-primary: #0f172a;
  --text-muted: #475569;
  --text-dark: #0f172a;
  --border-subtle: rgba(51, 65, 85, 0.25);
  --border-gold: rgba(154, 116, 16, 0.45);
  --gold-glow: rgba(212, 175, 55, 0.18);
}

/* --- Bouton thème --- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease,
    box-shadow 0.22s ease, transform 0.22s ease;
}

.theme-toggle .material-symbols-outlined {
  font-size: 1.15rem;
}

/* Label masqué dans le header desktop compact, visible dans le drawer */
.site-header .theme-toggle-label {
  display: none;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--gold-primary);
  background: linear-gradient(135deg, var(--gold-glow), rgba(212, 175, 55, 0.06));
  color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1), 0 8px 18px rgba(0, 0, 0, 0.14);
}

/* --- Bouton CTA "Se connecter" --- */
.site-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  border: 1px solid var(--gold-primary);
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: var(--text-dark) !important;
  border-radius: 999px;
  padding-inline: 1.1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease,
    transform 0.22s ease;
}

.site-header-cta .material-symbols-outlined {
  font-size: 1.05rem;
}

.site-header-cta:hover,
.site-header-cta:focus-visible {
  background: linear-gradient(135deg, #ffe08a, var(--gold-light));
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.35);
}

.site-header-cta:active,
.site-menu-btn:active,
.theme-toggle:active {
  transform: translateY(0);
  box-shadow: none;
}

/* --- Badge VIP « Espace VIP — Accès Gold » (attire l'œil) --- */
.site-header-vip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  border: 1px solid var(--border-gold);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.04));
  color: var(--gold-light) !important;
  border-radius: 999px;
  padding-inline: 1.1rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease,
    transform 0.22s ease;
}

.site-header-vip .material-symbols-outlined {
  font-size: 1.05rem;
  color: var(--gold-light);
}

/* Balayage lumineux périodique pour attirer l'attention */
.site-header-vip-glow {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(242, 202, 80, 0.55) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: vipSweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes vipSweep {
  0%,
  55% {
    transform: translateX(-120%);
  }
  75%,
  100% {
    transform: translateX(120%);
  }
}

/* Étiquette « Gold » à l'intérieur du badge */
.site-header-vip-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: var(--text-dark);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-header-vip:hover,
.site-header-vip:focus-visible {
  background: linear-gradient(135deg, rgba(242, 202, 80, 0.28), rgba(212, 175, 55, 0.12));
  border-color: var(--gold-primary);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.3);
}

.site-header-vip:active {
  transform: translateY(0);
  box-shadow: none;
}

html[data-theme="light"] .site-header-vip {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.08));
  color: var(--gold-dark) !important;
}

html[data-theme="light"] .site-header-vip .material-symbols-outlined {
  color: var(--gold-dark);
}

@media (prefers-reduced-motion: reduce) {
  .site-header-vip-glow {
    animation: none;
  }
}

/* Version mobile du lien VIP dans le tiroir latéral */
.site-menu-vip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.05));
  color: var(--gold-light) !important;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.site-menu-vip .material-symbols-outlined {
  font-size: 1.15rem;
  color: var(--gold-light);
}

html[data-theme="light"] .site-menu-vip {
  color: var(--gold-dark) !important;
}

html[data-theme="light"] .site-menu-vip .material-symbols-outlined {
  color: var(--gold-dark);
}

/* --- Bouton « Espace standard » de la page « Se connecter » (se_connecter.php) --- */
.connect-standard-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin-bottom: 1.1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border-gold);
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #fff9e6, #fdf1cc);
  color: #001f3f !important;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease,
    transform 0.22s ease;
}

.connect-standard-button .connect-standard-icon {
  flex: 0 0 auto;
  font-size: 1.6rem;
  color: #001f3f;
}

.connect-standard-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.connect-standard-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  color: #001f3f;
}

.connect-standard-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: #7a5c10;
}

.connect-standard-arrow {
  flex: 0 0 auto;
  font-size: 1.35rem;
  color: #001f3f;
  transition: transform 0.22s ease;
}

.connect-standard-button:hover,
.connect-standard-button:focus-visible {
  border-color: var(--gold-primary);
  background: linear-gradient(135deg, #fffdf5, #fbe9b8);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(212, 175, 55, 0.35);
}

.connect-standard-button:hover .connect-standard-arrow,
.connect-standard-button:focus-visible .connect-standard-arrow {
  transform: translateX(4px);
}

.connect-standard-button:active {
  transform: translateY(0);
  box-shadow: none;
}

/* --- Bouton VIP de la page « Se connecter » (se_connecter.php) --- */
.connect-vip-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin-bottom: 1.1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--gold-primary);
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.05));
  color: var(--gold-light) !important;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease,
    transform 0.22s ease;
}

.connect-vip-button .connect-vip-icon {
  flex: 0 0 auto;
  font-size: 1.6rem;
  color: var(--gold-light);
}

.connect-vip-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.connect-vip-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.connect-vip-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.connect-vip-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: var(--text-dark);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Balayage lumineux pour attirer l'œil */
.connect-vip-glow {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(242, 202, 80, 0.45) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: vipSweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

.connect-vip-button:hover,
.connect-vip-button:focus-visible {
  background: linear-gradient(135deg, rgba(242, 202, 80, 0.3), rgba(212, 175, 55, 0.12));
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(212, 175, 55, 0.32);
}

.connect-vip-button:active {
  transform: translateY(0);
  box-shadow: none;
}

html[data-theme="light"] .connect-vip-button {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.24), rgba(212, 175, 55, 0.08));
  color: var(--gold-dark) !important;
}

html[data-theme="light"] .connect-vip-button .connect-vip-icon {
  color: var(--gold-dark);
}

@media (prefers-reduced-motion: reduce) {
  .connect-vip-glow {
    animation: none;
  }
}

/* --- Bouton hamburger (mobile) --- */
.site-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease,
    box-shadow 0.22s ease, transform 0.22s ease;
}

.site-menu-btn .material-symbols-outlined {
  font-size: 1.75rem;
}

.site-menu-btn:hover,
.site-menu-btn:focus-visible {
  border-color: var(--gold-primary);
  background: linear-gradient(135deg, var(--gold-glow), rgba(212, 175, 55, 0.06));
  color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1), 0 8px 18px rgba(0, 0, 0, 0.14);
}

@media (min-width: 1024px) {
  .site-menu-btn {
    display: none;
  }
}

/* --- Overlay mobile --- */
.site-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background-color: rgba(10, 17, 30, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.site-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 1024px) {
  .site-menu-overlay {
    display: none;
  }
}

/* --- Drawer mobile --- */
.site-menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  display: flex;
  height: 100%;
  width: 280px;
  max-width: 80vw;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-left: 1px solid var(--border-gold);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}

.site-menu-drawer.is-open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .site-menu-drawer {
    display: none;
  }
}

.site-menu-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.site-menu-drawer-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.site-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.22s ease, color 0.22s ease, background-color 0.22s ease;
}

.site-menu-close:hover,
.site-menu-close:focus-visible {
  border-color: var(--gold-primary);
  color: var(--gold-light);
  background: var(--gold-glow);
}

.site-menu-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-menu-drawer-foot {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.site-menu-drawer-foot .theme-toggle {
  justify-content: center;
  min-height: 3rem;
  border-radius: 0.75rem;
}

.site-menu-drawer-foot .theme-toggle-label {
  display: inline;
}

.site-menu-cta {
  display: block;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: var(--text-dark) !important;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.site-menu-cta:hover,
.site-menu-cta:focus-visible {
  background: linear-gradient(135deg, #ffe08a, var(--gold-light));
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.32);
}

.mobile-nav-link {
  display: flex;
  min-height: 3rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease,
    box-shadow 0.22s ease, transform 0.22s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible,
.mobile-nav-link.active {
  border-color: var(--border-gold);
  background: linear-gradient(135deg, var(--gold-glow), rgba(212, 175, 55, 0.06));
  color: var(--gold-light) !important;
  transform: translateX(2px);
  box-shadow: inset 3px 0 0 var(--gold-primary);
}

/* ==========================================================================
   8. FORMULAIRE DE CONTACT & COOKIES
   ========================================================================== */

/* Mise en page des pages « contact » et « inscription gratuite ».
   Ces règles rendent la disposition indépendante des utilitaires Tailwind :
   même si une classe telle que « grid » ou « flex » est retirée du HTML,
   la structure à deux colonnes reste correcte. */
.contact-main {
  display: block;
  width: 100%;
}

/* Conteneur principal : deux colonnes côte à côte sur grand écran,
   une seule en dessous. */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
  }
}

/* Colonne de présentation (gauche). */
.contact-intro {
  display: flex;
  flex-direction: column;
}

/* Liste des étapes numérotées. */
.contact-steps {
  display: flex;
  flex-direction: column;
}

/* Carte de formulaire « signature ».
   Le thème sombre affiche la carte en bleu marine avec texte clair ; le thème
   clair l'affiche sur fond clair avec texte sombre (règles plus bas). Les deux
   cas restent cohérents : la carte, ses libellés et ses champs partagent la
   même ambiance, ce qui évite tout texte illisible. */
.contact-form-card {
  background: #001f3f !important;
  border: 1px solid var(--border-gold) !important;
  border-radius: 12px !important;
  padding: 40px !important;
  color: #f8fafc;
}

/* Titres et libellés de la carte : texte clair sur le bleu marine. */
.contact-form-card h1,
.contact-form-card h2,
.contact-form-card h3,
.contact-form-card label,
.contact-form-card legend {
  color: #f8fafc !important;
}

.contact-form-card input,
.contact-form-card select,
.contact-form-card textarea {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

/* Choix d'une formation : la liste déroulante native est peinte par le
   navigateur et n'hérite pas du fond translucide du champ. Sans couleur
   explicite, les options s'affichent en texte clair sur un fond clair
   (Windows/Chrome) et deviennent illisibles. On fixe donc des couleurs
   opaques, et surtout on adapte ces couleurs AU THÈME : la carte est
   bleu marine en mode sombre mais blanche en mode clair (voir les
   surcharges html[data-theme="light"] plus bas). Une seule palette ne
   peut pas convenir aux deux : d'où le scoping par thème. */
.contact-form-card select {
  /* Mode sombre (défaut) : le widget natif est peint en sombre. */
  color-scheme: dark;
}

.contact-form-card select option {
  background-color: #0b1f38;
  color: #f8fafc;
}

.contact-form-card select option:disabled,
.contact-form-card select option[value=""] {
  color: #cbd5e1;
}

/* Mode clair : le champ devient blanc (texte sombre), la liste déroulante
   doit donc être claire elle aussi, sinon les options restent affichées en
   blanc cassé sur fond clair et sont illisibles. */
html[data-theme="light"] .contact-form-card select {
  color-scheme: light;
}

html[data-theme="light"] .contact-form-card select option {
  background-color: #ffffff;
  color: #0f172a;
}

html[data-theme="light"] .contact-form-card select option:disabled,
html[data-theme="light"] .contact-form-card select option[value=""] {
  color: #64748b;
}

.contact-form-card input::placeholder,
.contact-form-card textarea::placeholder {
  color: rgba(241, 245, 249, 0.55) !important;
}

.contact-form-card input:focus,
.contact-form-card select:focus,
.contact-form-card textarea:focus {
  border-color: var(--gold-primary) !important;
}

.contact-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.cookie-banner {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 620px;
  background-color: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 10px 16px;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 175, 55, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: cookie-banner-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  /* Masquée tant que le script n'a pas statué sur le consentement :
     évite le clignotement de la bannière pour les visiteurs qui ont
     déjà fait un choix. assets/js/cookies.js pose data-cookie-ready. */
  display: none;
  color: var(--text-primary);
  text-align: left;
}

@media (max-width: 639px) {
  .cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    transform: none;
    border-radius: 12px 12px 0 0;
  }
}

/* Disposition compacte : texte à gauche, boutons à droite, afin que le
   bandeau gêne le moins possible le contenu de la page. En dessous, tout
   s'empile verticalement (texte court, puis boutons sur deux colonnes). */
@media (min-width: 640px) {
  .cookie-banner .cookie-content {
    display: flex;
    align-items: center;
    gap: 18px;
  }

  .cookie-banner .cookie-content > p {
    flex: 1 1 auto;
    margin: 0;
  }

  .cookie-banner .cookie-buttons {
    flex: 0 0 auto;
    justify-content: flex-end;
  }
}

/* Le script pose data-cookie-ready une fois le consentement évalué. */
.cookie-banner[data-cookie-ready="show"] {
  display: block;
}

.cookie-banner[data-cookie-ready="hide"],
.cookie-banner[hidden] {
  display: none !important;
}

@keyframes cookie-banner-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Le texte du bandeau était illisible : l'icône « cookie » héritait de sa
   taille par défaut (fonts.googleapis.com) et venait se coller au titre. */
.cookie-content p {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.cookie-content p strong {
  color: var(--text-primary);
}

.cookie-content a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-content .cookie-icon {
  font-size: 1rem;
  line-height: 1;
  margin-right: 4px;
  color: var(--gold-primary);
  vertical-align: -2px;
}

/* Boutons sur deux colonnes dès qu'ils ne tiennent plus sur une ligne. */
@media (max-width: 639px) {
  .cookie-banner .cookie-content {
    padding: 2px 0 4px;
  }

  .cookie-banner .cookie-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .cookie-banner .cookie-buttons .btn-cookie:last-child {
    grid-column: 1 / -1;
  }
}

/* Thème clair : le bandeau et ses boutons doivent rester lisibles. */
html[data-theme="light"] .cookie-content p {
  color: var(--text-muted);
}

html[data-theme="light"] .cookie-content a {
  color: var(--gold-dark);
}

html[data-theme="light"] .btn-cookie.accept {
  color: #ffffff;
}

html[data-theme="light"] .btn-cookie.refuse,
html[data-theme="light"] .btn-cookie.customize {
  color: var(--text-primary);
}

html[data-theme="light"] .cookie-banner {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(154, 116, 16, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    animation: none;
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 639px) {
  .cookie-banner {
    transform: none;
  }
}

.cookie-banner[hidden] {
  display: none !important;
}

.btn-cookie.accept {
  background-color: var(--gold-primary);
  color: var(--text-dark);
}

.btn-cookie.refuse {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.cookie-buttons,
.cookie-preferences-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

/* « Personnaliser » est un lien : sans centrage il s'aligne sur une autre
   ligne de base que les boutons voisins. */
.cookie-buttons .btn-cookie {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.btn-cookie {
  min-height: 2rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-cookie.customize {
  border: 1px solid var(--border-gold);
  background: transparent;
  color: var(--gold-light);
}

.btn-cookie:hover,
.btn-cookie:focus-visible {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.cookie-preferences.hidden {
  display: none;
}

.cookie-preferences {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.cookie-preferences-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
}

.cookie-preferences-panel {
  position: relative;
  width: min(100%, 38rem);
  max-height: min(42rem, calc(100vh - 2rem));
  overflow: auto;
  border: 1px solid var(--border-gold);
  border-radius: 1rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.cookie-preferences-panel h2 {
  margin: 0 2rem 0.5rem 0;
  font-size: 1.25rem;
}

.cookie-preferences-panel > p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.cookie-preferences-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
}

.cookie-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 0;
  cursor: pointer;
}

.cookie-choice span {
  display: grid;
  gap: 0.25rem;
}

.cookie-choice small {
  color: var(--text-muted);
}

.cookie-choice input {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--gold-primary);
}

.cookie-preferences-actions {
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.brvm-widget-shell {
  position: fixed;
  top: 80px;
  right: 0;
  left: 0;
  z-index: 40;
  height: 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-gold);
  background: var(--bg-surface);
}

.brvm-widget-frame {
  display: block;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

/* ==========================================================================
   8b. PAGE ARTICLE (article.php) — MISE EN PAGE & LECTURES RECOMMANDÉES
   ========================================================================== */
.article-page {
  padding-top: 6rem;
  padding-bottom: 2rem;
}

.article-container,
.article-content-container {
  width: min(100% - 40px, 1100px);
  margin-inline: auto;
}

/* --- En-tête de l'article : titre en haut, image en dessous --- */
.article-header {
  padding-bottom: 3rem;
}

/* Fil d'Ariane */
.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.75rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.article-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-breadcrumb a:hover {
  color: var(--gold-light);
}

.article-breadcrumb .material-symbols-outlined {
  font-size: 1rem;
  opacity: 0.7;
}

.article-breadcrumb-current {
  max-width: 42ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-weight: 600;
}

/* Bloc titre + meta : pleine largeur centré */
.article-hero-copy {
  max-width: 820px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

/* Image de couverture : bandeau 16/9 pleine largeur */
.article-cover {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  background: var(--bg-surface-elevated);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.article-covers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

@media (min-width: 900px) {
  .article-covers-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.article-covers-grid .article-cover {
  max-height: 420px;
}

.article-pdf {
  margin: 2rem 0 0;
}

.article-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  background: var(--gold-glow);
  color: var(--gold-light);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
}

.article-pdf-link:hover {
  background: var(--gold-light);
  color: #001f3f;
  transform: translateY(-2px);
}

/* Tableaux insérés dans le contenu des articles. */
.article-body table {
  width: 100%;
  margin: 1.75rem 0;
  border-collapse: collapse;
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.95rem;
}

.article-body thead th {
  background: var(--gold-glow);
  color: var(--gold-light);
  font-weight: 700;
  text-align: left;
}

.article-body th,
.article-body td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-gold);
  vertical-align: top;
}

.article-body tbody tr:last-child td {
  border-bottom: none;
}

.article-body tbody tr:nth-child(even) {
  background: var(--bg-surface-elevated);
}

/* Rendu des tableaux dans l'éditeur admin (Quill). */
.ql-editor table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.ql-editor th,
.ql-editor td {
  border: 1px solid var(--admin-border, #31415a);
  padding: 0.5rem 0.75rem;
}

.ql-editor thead th {
  background: rgba(212, 175, 55, 0.15);
  font-weight: 700;
}

/* Bouton « Tableau » de la barre d'outils Quill. */
.ql-snow .ql-toolbar .ql-table {
  width: auto;
  padding: 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.article-category {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--gold-glow);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
  overflow-wrap: anywhere;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.article-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.article-meta .material-symbols-outlined {
  font-size: 1.05rem;
  color: var(--gold-primary);
}

/* --- Corps de l'article --- */
.article-content-section {
  padding: 3.5rem 0 4rem;
  border-top: 1px solid var(--border-subtle);
}

.article-body {
  max-width: 760px;
  color: var(--text-primary);
  font-size: 1.0625rem;
  line-height: 1.9;
}

.article-body p {
  margin: 0 0 1.25rem;
}

.article-body h2 {
  margin: 2.25rem 0 1rem;
  font-size: 1.75rem;
  line-height: 1.25;
  color: var(--text-primary);
}

.article-body h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.35rem;
  color: var(--gold-light);
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem 1.5rem;
  padding-left: 1rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body a {
  color: var(--gold-light);
  text-decoration: underline;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1.5rem 0;
}

.article-body blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--gold-primary);
  border-radius: 0 8px 8px 0;
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-style: italic;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.95rem;
}

.article-body th,
.article-body td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.article-body th {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.article-body strong {
  color: var(--gold-light);
}

/* --- Hashtags & partage --- */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  max-width: 760px;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.article-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 760px;
  margin-top: 1.5rem;
}

.article-share-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.875rem;
}

.article-share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.article-share-button:hover,
.article-share-button:focus-visible {
  color: var(--gold-light);
  border-color: var(--gold-primary);
  background: var(--gold-glow);
  transform: translateY(-1px);
}

/* Icônes officielles des réseaux sociaux (SVG, couleur de la marque),
   lisibles en thème clair comme en thème sombre. */
.article-share-icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
  display: block;
}

.article-share-button--x {
  color: #0f1419;
}

.article-page-body .article-share-button--x {
  color: var(--text-primary);
}

/* Thème sombre : le noir du logo X est invisible, on passe au blanc. */
body[data-theme="dark"] .article-share-button--x,
html[data-theme="dark"] .article-share-button--x,
body[data-theme="dark"] .article-share-button--x:hover,
html[data-theme="dark"] .article-share-button--x:hover {
  color: #f8fafc;
}

.article-share-button--linkedin {
  color: #0a66c2;
}

.article-share-button--facebook {
  color: #1877f2;
}

.article-share-button--whatsapp {
  color: #25d366;
}

.article-share-button:hover .article-share-icon,
.article-share-button:focus-visible .article-share-icon {
  color: inherit;
}

/* --- Lectures recommandées --- */
.recommended-articles {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-surface) 60%, transparent);
}

.recommended-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.recommended-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--gold-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.recommended-header h2 {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
}

.recommended-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: gap 0.25s ease, color 0.25s ease;
}

.recommended-all:hover {
  color: var(--gold-primary);
  gap: 0.6rem;
}

.recommended-all .material-symbols-outlined {
  font-size: 1.1rem;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.recommended-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  overflow: hidden;
}

.recommended-image {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: var(--bg-surface-elevated);
}

.recommended-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

/* Fallback image manquante */
.recommended-image.is-image-missing {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(15, 23, 42, 0.5));
}

.recommended-image.is-image-missing::before {
  content: 'image';
  font-family: 'Material Symbols Outlined';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gold-primary);
  opacity: 0.5;
}

.recommended-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.25rem 1.25rem;
  flex: 1;
}

.recommended-category {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: var(--text-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.recommended-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.recommended-footer small {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.recommended-footer small .material-symbols-outlined {
  font-size: 0.95rem;
  color: var(--gold-primary);
}

.recommended-read {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--gold-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: gap 0.25s ease, color 0.25s ease;
}

.recommended-read .material-symbols-outlined {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.recommended-card:hover .recommended-read {
  gap: 0.5rem;
  color: var(--gold-light);
}

.recommended-card:hover .recommended-read .material-symbols-outlined {
  transform: translateX(3px);
}

.recommended-content h3 {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommended-content p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommended-card:hover .recommended-image img {
  transform: scale(1.06);
}

@media (max-width: 900px) {
  .recommended-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .article-hero-copy {
    margin-bottom: 1.75rem;
    text-align: left;
  }

  .article-cover {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
  }

  .article-container,
  .article-content-container {
    width: min(100% - 28px, 900px);
  }
}

@media (max-width: 560px) {
  .recommended-grid {
    grid-template-columns: 1fr;
  }
}

/* Page article en thème clair */
html[data-theme="light"] .article-title,
html[data-theme="light"] .article-body,
html[data-theme="light"] .article-body h2,
html[data-theme="light"] .recommended-header h2,
html[data-theme="light"] .recommended-content h3 {
  color: #0f172a;
}

html[data-theme="light"] .article-body blockquote,
html[data-theme="light"] .article-body th {
  background: #e2e8f0;
  color: #0f172a;
}

html[data-theme="light"] .article-title {
  color: #0f172a;
}

/* ==========================================================================
   9. MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
  .partner-tile {
    flex-basis: calc(100% - 24px);
  }
}/* ==========================================================================
   10. GARANTIES DU THÈME BLEU NUIT & DORÉ (TOUT LE SITE)
   Texte clair sur fond bleu nuit — appliqué en dernier pour être prioritaire.
   ========================================================================== */
body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
}

/* Texte courant lisible sur fond sombre */
p,
span,
li,
td,
label,
figcaption,
blockquote {
  color: inherit;
}

/* Titres clairs */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
}

/* Liens dorés */
a {
  color: var(--gold-light);
}

/* La marque utilise une couleur adaptative : bleu nuit en thème clair,
   claire en thème sombre. Seuls le O et INVEST ACADEMY restent dorés. */
.brand-name {
  color: var(--text-primary);
  /* Garantit la police de marque même si le body d'une page impose une autre
     typographie : la navbar reste cohérente sur tout le site public. */
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
}

.brand-highlight-o,
.brand-academy {
  color: var(--gold-primary);
}

/* Champs de formulaire sur fond sombre */
input,
select,
textarea {
  background-color: rgba(10, 17, 30, 0.65);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

/* Liste déroulante native : on fixe des couleurs opaques cohérentes avec le
   fond sombre du champ. Sans cela, selon le navigateur, les options peuvent
   hériter d'un fond clair et devenir illisibles (texte clair sur clair). */
select option {
  background-color: #0b1f38;
  color: #f8fafc;
}

html[data-theme="light"] select {
  color-scheme: light;
}

html[data-theme="light"] select option {
  background-color: #ffffff;
  color: #0f172a;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* Cartes sombres translucides */
.admin-card,
.contact-form-card,
.home-news-card,
.recommended-card,
.feature-card {
  color: var(--text-primary);
}

html[data-theme="light"] body,
html[data-theme="light"] .bg-background,
html[data-theme="light"] .bg-surface-dim,
html[data-theme="light"] .bg-surface-container-lowest,
html[data-theme="light"] .partners-section,
html[data-theme="light"] .testimonials-section {
  background-color: var(--bg-dark) !important;
  color: var(--text-primary) !important;
}

/* Variantes d'opacité Tailwind (bg-background/90, /80…) : en mode clair,
   le voile de fond des pages de connexion doit s'éclaircir pour rester
   cohérent avec le header blanc et ne pas assombrir la page. */
html[data-theme="light"] [class*="bg-background/"] {
  background-color: rgba(248, 250, 252, 0.92) !important;
}

html[data-theme="light"] [class*="bg-surface/"] {
  background-color: rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="light"] .bg-surface,
html[data-theme="light"] .bg-surface-container-low,
html[data-theme="light"] .bg-surface-container,
html[data-theme="light"] .contact-form-card,
html[data-theme="light"] .home-news-card,
html[data-theme="light"] .recommended-card,
html[data-theme="light"] .article-recommendation-card,
html[data-theme="light"] .cookie-banner,
html[data-theme="light"] .brvm-widget-shell {
  background-color: var(--bg-surface) !important;
  color: var(--text-primary) !important;
}

/* --- Hero « À propos » en mode clair : le voile sombre (.bg-surface/80 en
   dur, non couvert par la surcharge .bg-surface) assombrit l'image et nuit
   à la lisibilité du texte. On l'éclaircit et on adapte l'estompe. */
html[data-theme="light"] .apropos-hero-veil {
  background-color: rgba(255, 255, 255, 0.68) !important;
  mix-blend-mode: normal;
}

html[data-theme="light"] .apropos-hero-fade {
  background-image: linear-gradient(
    to top,
    var(--bg-dark) 0%,
    rgba(248, 250, 252, 0.3) 40%,
    transparent 72%
  ) !important;
}

/* Le titre du hero passe en or foncé en mode clair pour rester lisible
   sur l'image éclaircie. */
html[data-theme="light"] .apropos-hero .section-title-gold {
  color: var(--gold-dark);
}

html[data-theme="light"] .apropos-hero p {
  color: var(--text-muted) !important;
}

html[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--border-gold);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .site-nav-link,
html[data-theme="light"] .theme-toggle {
  color: var(--text-primary) !important;
}

html[data-theme="light"] .site-nav-link:hover,
html[data-theme="light"] .site-nav-link.active,
html[data-theme="light"] .theme-toggle:hover {
  color: var(--gold-dark) !important;
}

html[data-theme="light"] #mobile-menu-drawer {
  background-color: var(--bg-surface) !important;
  color: var(--text-primary);
}

/* Partenaires : grille stable, lisible et adaptée au mobile. */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1060px;
  margin: 0 auto;
}

.partners-grid .partner-tile {
  display: flex;
  min-height: 152px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  border-radius: 12px;
}

.partner-logo {
  display: grid;
  min-height: 46px;
  place-items: center;
}

.partner-logo-mark {
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.partner-detail {
  font-size: 0.8125rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .partners-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .partners-grid .partner-tile {
    min-height: 132px;
    padding: 18px 12px;
  }
}

/* Écosystème : liste de métiers/acteurs affichés en pastilles. */
.ecosystem-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  /* Conteneur resserré : les pastilles se répartissent de façon équilibrée
     (environ trois par ligne) au lieu de laisser une pastille isolée. */
  max-width: 640px;
  margin: 0 auto;
}

.ecosystem-pill {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.ecosystem-pill:hover {
  border-color: var(--gold-primary);
  transform: translateY(-3px);
  box-shadow: 0 0 20px var(--gold-glow, rgba(212, 175, 55, 0.25));
}

@media (max-width: 600px) {
  .ecosystem-pill {
    padding: 10px 18px;
    font-size: 0.875rem;
  }
}

html[data-theme="light"] .bg-surface-container-high,
html[data-theme="light"] .bg-surface-container-highest,
html[data-theme="light"] .feature-card,
html[data-theme="light"] .testimonial-card {
  background-color: var(--bg-surface) !important;
  color: var(--text-primary) !important;
}

/* Cartes témoignages en thème clair : fond blanc + ombre douce */
html[data-theme="light"] .testimonial-card {
  background: linear-gradient(150deg, #ffffff 0%, #f1f5f9 100%) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .testimonial-card:hover {
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .testimonial-quote-mark {
  opacity: 0.22;
}

html[data-theme="light"] .testimonial-avatar {
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

/* Section "Pourquoi choisir" en thème clair */
html[data-theme="light"] .why-section {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 55%, #f8fafc 100%) !important;
}

html[data-theme="light"] .why-section::before {
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.16), transparent 55%);
}

html[data-theme="light"] .feature-card {
  background: linear-gradient(160deg, #ffffff, #f1f5f9) !important;
  border-color: rgba(154, 116, 16, 0.3) !important;
}

html[data-theme="light"] .feature-card:hover {
  background: linear-gradient(160deg, #ffffff, #eef2f7) !important;
}

html[data-theme="light"] .feature-card-title {
  color: #0f172a !important;
}

html[data-theme="light"] .why-title {
  color: #0f172a;
}

html[data-theme="light"] .why-subtitle {
  color: #475569;
}

html[data-theme="light"] [class~="bg-[#001F3F]"] {
  background-color: var(--bg-surface) !important;
}

/* Carte de contact / inscription en thème clair : fond clair, texte sombre
   et champs clairs, pour rester lisible (le bleu marine est réservé au thème
   sombre). */
html[data-theme="light"] .contact-form-card {
  background: var(--bg-surface) !important;
  color: var(--text-primary);
}

html[data-theme="light"] .contact-form-card h1,
html[data-theme="light"] .contact-form-card h2,
html[data-theme="light"] .contact-form-card h3,
html[data-theme="light"] .contact-form-card label,
html[data-theme="light"] .contact-form-card legend {
  color: var(--text-primary) !important;
}

html[data-theme="light"] .contact-form-card input,
html[data-theme="light"] .contact-form-card select,
html[data-theme="light"] .contact-form-card textarea {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .contact-form-card input::placeholder,
html[data-theme="light"] .contact-form-card textarea::placeholder {
  color: #64748b !important;
}

html[data-theme="light"] .text-on-background,
html[data-theme="light"] .text-on-surface,
html[data-theme="light"] .text-on-surface-variant,
html[data-theme="light"] .article-page-body .article-body,
html[data-theme="light"] .article-page-body .article-meta,
html[data-theme="light"] .article-page-body .article-tags,
html[data-theme="light"] .article-page-body .article-share-label {
  color: var(--text-primary) !important;
}

html[data-theme="light"] .article-page-body .article-content-section,
html[data-theme="light"] .article-page-body .article-footer,
html[data-theme="light"] .article-page-body .article-body blockquote,
html[data-theme="light"] .article-page-body .article-body th,
html[data-theme="light"] .article-page-body .article-body td {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
}

@media (max-width: 768px) {
  body.home-page {
    background-attachment: scroll !important;
  }

  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
    transform: none;
    padding: 16px;
  }
}

/* ==========================================================================
   11. SECTION PAIEMENT (contact.php) — BIENTÔT DISPONIBLE
   ========================================================================== */
.payment-section {
  padding: 1rem 16px 5rem;
}

@media (min-width: 768px) {
  .payment-section {
    padding-inline: 48px;
  }
}

.payment-card {
  position: relative;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 2.25rem;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.92), rgba(10, 17, 30, 0.92));
  border: 1px solid var(--border-gold);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Filet lumineux en haut de la carte */
.payment-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

/* En-tête */
.payment-header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.payment-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--gold-glow);
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.payment-eyebrow .material-symbols-outlined {
  font-size: 1rem;
}

.payment-header h2 {
  margin: 0 0 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 800;
  color: var(--text-primary);
}

.payment-header p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* --- Choix de la méthode --- */
.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.method-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.1rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.6);
  text-align: center;
  transition: border-color 0.22s ease, background 0.22s ease;
}

.method-card.is-active {
  border-color: var(--gold-primary);
  background: linear-gradient(160deg, var(--gold-glow), rgba(15, 23, 42, 0.6));
}

.method-icon {
  font-size: 1.8rem;
  color: var(--gold-light);
}

.method-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.method-check {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  font-size: 1.1rem;
  color: var(--gold-primary);
  opacity: 0;
}

.method-card.is-active .method-check {
  opacity: 1;
}

/* --- Aperçu carte bancaire --- */
.card-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 170px;
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e293b 0%, #0a111e 60%, #16233b 100%);
  border: 1px solid var(--border-gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.card-preview::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.22), transparent 70%);
}

.card-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-chip {
  width: 44px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.card-brand {
  font-size: 1.75rem;
  color: var(--gold-light);
}

.card-preview-number {
  font-family: 'Montserrat', monospace;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.card-preview-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Champs du formulaire --- */
.payment-form .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.payment-form .form-group label {
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.payment-form .form-group input {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(10, 17, 30, 0.6);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.payment-form .form-group input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.payment-form .form-row {
  display: flex;
  gap: 1rem;
}

.payment-form .form-row .form-group {
  flex: 1;
}

.btn-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.9rem;
  border: 1px solid var(--gold-primary);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.btn-pay .material-symbols-outlined {
  font-size: 1.1rem;
}

.btn-pay:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(212, 175, 55, 0.32);
}

/* --- État désactivé : overlay + badge --- */
.payment-card.disabled {
  user-select: none;
}

.payment-card.disabled .payment-header,
.payment-card.disabled .payment-methods {
  opacity: 0.6;
  pointer-events: none;
}

/* En état désactivé, l'aperçu carte et le formulaire n'apportent
   rien : on les masque pour une carte compacte et lisible. */
.payment-card.disabled .card-preview,
.payment-card.disabled .payment-form {
  display: none;
}

.payment-card.disabled {
  padding-bottom: 3rem;
}

.disabled-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem;
  text-align: center;
  background: rgba(10, 17, 30, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 20px;
}

.badge-disabled {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--gold-primary);
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: var(--text-dark);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(212, 175, 55, 0.3);
}

.badge-disabled .material-symbols-outlined {
  font-size: 1.15rem;
}

.disabled-note {
  max-width: 360px;
  margin: 0;
  padding: 0.9rem 1.25rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--gold-primary);
  color: #f8fafc !important;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Le badge et la note restent sur fond sombre dans les deux thèmes */
html[data-theme="light"] .disabled-note {
  background: rgba(15, 23, 42, 0.96) !important;
  color: #f8fafc !important;
}

@media (max-width: 520px) {
  .payment-card {
    padding: 1.5rem;
  }

  .card-preview {
    height: 150px;
  }

  .card-preview-number {
    font-size: 1.05rem;
  }
}


/* ==========================================================================
   11. RESPONSIVE MOBILE & TABLETTE (iPad) — CORRECTIONS CIBLÉES
   Bloc ajouté en fin de feuille pour surcharger proprement les règles
   précédentes. Trois familles de correctifs :
     a) garde-fous globaux anti-débordement,
     b) composants du site (header, hero, badge BRVM, cartes),
     c) confort tactile et lisibilité sur petits écrans.
   ========================================================================== */

/* --- a) Garde-fous globaux ------------------------------------------------ */

/* Aucun élément ne doit provoquer de défilement horizontal de la page. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Les médias ne doivent jamais déborder de leur conteneur. */
img,
svg,
video,
iframe,
canvas,
picture {
  max-width: 100%;
}

/* Les mots très longs (URL, e-mails, identifiants) se coupent proprement. */
.article-content,
.article-content *,
.message-box,
p,
li,
h1,
h2,
h3 {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Les tableaux défilent au lieu de casser la mise en page. */
table {
  max-width: 100%;
}

@media (max-width: 1023px) {
  /* Zones à défilement tactile fluide sur tablette/mobile. */
  .table-responsive,
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }
}

/* --- b) Composants du site ------------------------------------------------ */

/* Compensation du header fixe (hauteur réelle 4.5rem = 72px).
   On neutralise la classe utilitaire Tailwind `pt-20` (80px) sur le body
   des pages afin d'éviter un décalage vertical, quelle que soit la page. */
body.home-page,
body.pt-20 {
  padding-top: 4.5rem !important;
}

/* Le bandeau BRVM, s'il est présent, gère lui-même son padding via JS
   (data-brvm-compact). On ne double donc pas la compensation. */
body[data-brvm-compact],
body[data-brvm-only] {
  padding-top: 0 !important;
}

/* Header : la marque ne doit jamais pousser le bouton hamburger hors écran.
   On force le padding (Tailwind px-4 / md:px-12 est prioritaire sinon) et on
   garantit que le hamburger reste toujours dans la vue. */
@media (max-width: 1023px) {
  .site-header .site-header-inner,
  .site-header-inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
    gap: 0.75rem;
    width: 100% !important;
    max-width: 100% !important;
  }

  .site-header .site-brand {
    flex: 0 1 auto;
    min-width: 0;
  }

  /* Le hamburger ne se comprime ni ne sort jamais de l'écran. */
  .site-header .site-menu-btn {
    margin-left: auto;
    flex-shrink: 0;
  }
}

@media (max-width: 767px) {
  .site-header .site-header-inner,
  .site-header-inner {
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 0.5rem;
  }

  /* Le libellé complet de marque est trop large sur téléphone :
     on réduit sa taille tout en gardant le logo. */
  .site-header .brand-name {
    font-size: 0.95rem;
    letter-spacing: -0.01em;
  }
}

@media (max-width: 420px) {
  /* Sur très petits écrans, seul le logo reste dans la barre :
     la marque texte devient secondaire pour libérer de la place. */
  .site-header .brand-academy {
    display: none;
  }

  .site-header .brand-name {
    font-size: 0.9rem;
  }
}

@media (min-width: 421px) and (max-width: 1023px) {
  /* Tablette / grand téléphone : la marque complète tiendrait, mais reste
     volontairement compacte pour laisser respirer le hamburger. */
  .site-header .brand-name {
    font-size: 1rem;
  }
}

/* Hero de l'accueil : taille de titre plafonnée et hauteur réduite sur mobile. */
@media (max-width: 767px) {
  .home-hero {
    min-height: 68vh;
    padding-top: 5.5rem;
    padding-bottom: 3rem;
  }

  .home-hero h1,
  #hero-title {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }

  .home-hero p {
    font-size: 0.95rem;
  }

  /* Boutons du hero : pleine largeur pour un meilleur ciblage tactile. */
  .home-hero-primary,
  .home-hero-secondary {
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* iPad portrait : titre plus mesuré qu'en desktop pleine largeur. */
  .home-hero h1,
  #hero-title {
    font-size: 3rem !important;
  }
}

/* Badge / bandeau des cotations BRVM (iframe externe) :
   sur petits écrans on lui laisse un défilement horizontal propre
   plutôt que de laisser le contenu dépasser. */
@media (max-width: 1023px) {
  .brvm-widget-shell {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .brvm-widget-shell::-webkit-scrollbar {
    height: 4px;
  }

  .brvm-widget-shell::-webkit-scrollbar-thumb {
    background: var(--border-gold);
    border-radius: 999px;
  }

  .brvm-widget-frame {
    min-width: 640px;
    height: 52px;
  }
}

@media (max-width: 480px) {
  /* Sur téléphone, le bandeau de cotations reste utile mais compact. */
  .brvm-widget-shell {
    height: 48px;
  }

  .brvm-widget-frame {
    height: 46px;
  }
}

/* Grilles génériques : évite l'écrasement des colonnes sur tablette. */
@media (max-width: 1023px) {
  .partners-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .partners-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .partners-grid .partner-tile {
    min-height: auto;
    padding: 20px;
  }
}

/* --- c) Confort tactile et lisibilité ------------------------------------- */

@media (max-width: 1023px) {
  /* Liens de pied de page et libellés : cible tactile d'au moins 40px de haut
     sans casser la mise en page (padding vertical + line-height). */
  .site-footer a.font-label-sm,
  a.font-label-sm.text-label-sm,
  .article-aside-link,
  .recommended-all {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding-block: 0.35rem;
  }

  /* Taille de police minimale lisible sur mobile. */
  .article-content p,
  .article-content li {
    font-size: 1rem;
    line-height: 1.75;
  }

  /* Les blocs de code / pré ne débordent pas. */
  pre,
  code {
    max-width: 100%;
    overflow-x: auto;
  }
}

/* Les boutons et liens d'action conservent une hauteur confortable au doigt. */
@media (hover: none) and (pointer: coarse) {
  button,
  .btn-cookie,
  .site-header-cta,
  .home-hero-primary,
  .home-hero-secondary,
  a.action-button {
    min-height: 44px;
  }
}

/* Respecte la préférence « animations réduites ». */
@media (prefers-reduced-motion: reduce) {
  .brvm-widget-shell {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   PAGE « VIDÉOS GRATUITES » (cours-gratuit.php)
   Formation « À la découverte de la BRVM » — vidéos en cours gérées depuis
   l'administration. Styles dédiés : la section « Vidéos » de l'accueil
   conserve ses propres classes (.video-card) définies plus haut.
   ========================================================================== */

/* --- Bandeau du nombre de vidéos --- */
.course-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background-color: var(--bg-surface);
  color: var(--gold-primary);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.course-count-badge .material-symbols-outlined {
  font-size: 20px;
}

/* --- Première vidéo : lecteur + informations --- */
.video-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  padding: 24px;
  margin-bottom: 56px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
}

.video-feature-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background-color: #000;
  border: 1px solid var(--border-subtle);
}

.video-feature-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-feature-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
}

.video-feature-fallback .material-symbols-outlined {
  font-size: 44px;
  color: var(--gold-primary);
}

.video-feature-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.video-feature-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

@media (min-width: 1024px) {
  .video-feature {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 32px;
    padding: 32px;
  }
}

/* --- Section « Toutes les vidéos » --- */
.videos-section {
  margin-bottom: 56px;
}

.videos-section-head {
  text-align: center;
  margin-bottom: 32px;
}

.videos-section-head p {
  margin-top: 12px;
}

.videos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .videos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .videos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Les cartes s'étirent sur toute la hauteur de leur ligne. */
.videos-grid > article,
.videos-grid > details {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.videos-grid > article:hover,
.videos-grid > details:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
}

.video-card-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-surface-elevated);
  overflow: hidden;
}

.video-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.videos-grid > article:hover .video-card-visual img,
.videos-grid > details:hover .video-card-visual img {
  transform: scale(1.05);
}

.video-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px !important;
  color: var(--gold-primary);
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.45);
  transition: opacity 0.3s ease;
}

.videos-grid > article:hover .video-card-play,
.videos-grid > details:hover .video-card-play,
.video-accordion[open] .video-card-play {
  opacity: 1;
}

.video-card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 0.75rem;
}

.video-card-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex-grow: 1;
  text-decoration: none;
  cursor: pointer;
}

/* Retire le marqueur natif du <summary> (lecteur dépliable YouTube). */
.video-accordion > summary {
  list-style: none;
}

.video-accordion > summary::-webkit-details-marker {
  display: none;
}

.video-accordion .video-card-title,
.video-accordion .video-card-description {
  padding-inline: 20px;
}

.video-accordion .video-card-title {
  margin-top: 20px;
}

.videos-grid > article .video-card-title,
.videos-grid > article .video-card-description {
  padding-inline: 20px;
}

.videos-grid > article .video-card-title {
  margin-top: 20px;
}

.video-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0 0 10px;
}

.video-card-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  padding-bottom: 20px;
  margin: 0;
}

/* --- Lecteur dépliable d'une vidéo YouTube --- */
.video-accordion-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-top: 1px solid var(--border-subtle);
}

.video-accordion-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Aucune vidéo en cours --- */
.empty-state-videos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 64px 24px;
  margin-bottom: 56px;
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-gold);
  border-radius: 16px;
}

.empty-state-videos .material-symbols-outlined {
  font-size: 56px;
  color: var(--gold-primary);
}

.empty-state-videos h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 0;
}

.empty-state-videos p {
  max-width: 620px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* --- Appel à l'inscription gratuite --- */
.free-cta {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  padding: 32px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.10), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-gold);
  border-radius: 16px;
}

.free-cta h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.free-cta p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
  max-width: 720px;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 8px;
  background-color: var(--gold-primary);
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.primary-cta:hover {
  background-color: var(--gold-light);
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .free-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
  }
}

/* Sur téléphone, le bloc d'appel à l'inscription ne doit jamais élargir la page.
   Le bouton .primary-cta est en « white-space: nowrap » : son contenu (icône +
   libellé long) impose alors une largeur minimale supérieure à l'écran, ce qui
   débordait horizontalement — et décalait au passage le lecteur vidéo, qui
   paraissait « non responsive ». On autorise donc le retour à la ligne et on
   plafonne la largeur des deux blocs. */
@media (max-width: 767px) {
  .free-cta {
    padding: 24px;
    max-width: 100%;
  }

  .primary-cta {
    white-space: normal;
    max-width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ==========================================================================
   SECTION « FORMATION GRATUITE » DE L'ACCUEIL — VIDÉOS D'ACTUALITÉ
   Les vidéos d'actualité sont gérées depuis l'administration
   (admin/videos-actualite.php) et se lisent directement sur l'accueil.
   ========================================================================== */

/*
   ANCRAGE DE DÉFILEMENT

   Deux barres occupent le haut de la page en permanence :
     - .site-header        (position: fixed, 73 px)
     - .brvm-widget-shell  (position: fixed, top: 73px, 56 px — cours BRVM)

   Soit 129 px de recouvrement. Tout titre visé par un lien interne (#videos,
   #actualites…) s'affichait donc DERRIÈRE ces barres : on n'en voyait que la
   moitié basse. `scroll-margin-top` réserve la hauteur exacte au moment de
   l'ancrage.

   La valeur est portée sur `section[id]` : chaque section ancrable du site est
   ainsi protégée, pas seulement celle des vidéos. Elle ne déplace rien tant
   qu'aucun ancrage n'est utilisé.
*/
:root {
  --ancrage-haut: 140px;
}

section[id] {
  scroll-margin-top: var(--ancrage-haut);
}

/*
   DÉGAGEMENT DES BARRES FIXES

   Les deux barres recouvrant le haut de la fenêtre, le CONTENU de la page doit
   commencer sous elles. Sans ce retrait, le premier écran de l'accueil (et le
   haut de chaque section amenée par un ancrage) passe dessous.

   On réserve la hauteur ici plutôt que dans le HTML : la section vidéo n'a
   aucune raison de connaître l'existence de la barre BRVM.
*/
.home-videos-layout {
  scroll-margin-top: var(--ancrage-haut);
}

/* --- Disposition : GRILLE de cartes vidéo --- */

/*
   GRILLE DES VIDÉOS DE L'ACCUEIL

   Présentation en galerie : chaque vidéo est une carte autonome (miniature,
   durée, titre), et le clic affiche le lecteur dans la carte elle-même.

   L'ancienne disposition « une grande vidéo + une liste latérale » réservait
   les deux tiers de la largeur à la première vidéo et tassait les suivantes
   dans une colonne de ~400 px : cela ne se lit pas comme une galerie.

   Colonnes : 1 sur mobile, 2 sur tablette, 3 sur grand écran — le nombre de
   colonnes suit la place disponible, sans jamais fixer une largeur de carte.
*/
.home-videos-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: stretch;
}

@media (min-width: 640px) {
  .home-videos-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .home-videos-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

/* --- Carte vidéo --- */
.home-video-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.home-video-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

/* Carte en cours de lecture : elle ne doit plus « flotter », mais rester
   stable pendant que la vidéo joue, et se distinguer des autres. */
.home-video-card.is-lecture {
  transform: none;
  border-color: var(--gold-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.home-video-card.is-lecture:hover {
  transform: none;
}

/* Conteneur du média : la vignette et le lecteur occupent EXACTEMENT la même
   place, pour que la carte ne change pas de hauteur quand on lance la vidéo. */
.home-video-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
}

/* Lecteur inséré au clic : il recouvre la vignette, qui reste dessous. */
.home-video-card-media .home-video-player {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* Vignette cliquable (bouton) occupant toute la surface du média. */
.home-video-poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background-color: var(--bg-surface-elevated);
  cursor: pointer;
  overflow: hidden;
}

.home-video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.home-video-card:hover .home-video-poster img {
  transform: scale(1.05);
}

.home-video-poster:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: -2px;
}

/* Aucun visuel fourni : fond neutre avec une icône, pour que la carte garde
   la même taille que les autres. */
.home-video-poster-vide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  color: var(--text-muted);
  opacity: 0.5;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.10), rgba(148, 163, 184, 0.03));
}

/* Bouton de lecture : toujours visible (c'est le signal « ceci est une
   vidéo »), et accentué au survol. */
.home-video-poster-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 58px !important;
  color: #ffffff;
  opacity: 0.9;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.15) 60%, transparent 75%);
  transition: opacity 0.25s ease, color 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.home-video-card:hover .home-video-poster-play {
  color: var(--gold-primary);
  opacity: 1;
  transform: scale(1.08);
}

/* Corps de la carte : titre et description. */
.home-video-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 20px;
  /* Le corps absorbe la hauteur restante : avec `align-items: stretch` sur la
     grille, toutes les cartes d'une même ligne s'alignent, même si l'une n'a
     pas de description ou une description plus courte. */
  flex: 1;
}

.home-video-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-video-card-description {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}

/* --- Lecteur intégré (fichier hébergé ou YouTube) --- */
.home-video-player iframe,
.home-video-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background-color: #000;
}

/* --- Bouton de fermeture du lecteur --- */
/*
   Sans lui, une vidéo lancée masquait la vignette sans aucun moyen de
   revenir à la grille autrement qu'en cliquant une autre carte. Le bouton
   recouvre le lecteur, en haut à droite, et reprend le geste de « Échap ».
*/
.home-video-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.home-video-close .material-symbols-outlined {
  font-size: 22px;
  line-height: 1;
}

.home-video-close:hover {
  background-color: var(--gold-primary);
  color: #001F3F;
  transform: scale(1.06);
}

.home-video-close:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
}

/* --- Carte pointant vers un contenu non intégrable --- */
/*
   Ces cartes n'affichent pas de lecteur : le clic ouvre un onglet. Le curseur
   et le badge signalent ce comportement AVANT le clic, pour que le visiteur
   ne croie pas avoir affaire à une lecture intégrée.
*/
.home-video-card.is-link .home-video-poster {
  cursor: pointer;
}

.home-video-card.is-link .home-video-poster-play {
  font-size: 40px !important;
}

/* La vignette laisse deviner la destination : un fond plus sombre et une
   icône d'ouverture externe, plutôt qu'un gros bouton « play » trompeur. */
.home-video-card.is-link .home-video-poster-play::after {
  content: 'open_in_new';
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: 'Material Symbols Outlined';
  font-size: 20px;
  color: #ffffff;
  opacity: 0.85;
}

/* Contenu non intégrable : lien d'ouverture sur un fond sombre. */
.home-video-feature-link {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gold-primary);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.12), transparent 70%);
}

.home-video-feature-link .material-symbols-outlined {
  font-size: 52px;
}

/* --- Durée affichée sur la vignette --- */
.home-video-thumb-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   CHAMP TÉLÉPHONE INTERNATIONAL — PAYS & INDICATIF
   Utilisé par contact.php et inscription-gratuite.php : le sélecteur de pays
   fournit l'indicatif, ajouté au numéro avant enregistrement.
   ========================================================================== */

.phone-field {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phone-field:focus-within {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 1px var(--gold-primary);
}

/* Case drapeau : rappel visuel du pays choisi, à côté du sélecteur.
   Contient une image de drapeau (l'emoji ne s'affiche pas sur tous les
   systèmes) ; le globe est affiché si aucun drapeau n'est fourni. */
.phone-drapeau {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px 0 12px;
  line-height: 1;
  background-color: transparent;
  white-space: nowrap;
}

.phone-drapeau-img {
  display: block;
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* Aucun drapeau (pays « Autre ») : on affiche un globe à la place. */
.phone-drapeau.sans-drapeau::before {
  content: '🌍';
  font-size: 1.15rem;
  line-height: 1;
}

/* Sélecteur de pays : compact et compressible. Il ne doit JAMAIS écraser
   la zone de saisie du numéro (flex: 0 0 auto + max-width laissaient
   l'input à ~30 px de large, rendant la frappe impossible). */
.phone-country-select {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  max-width: 170px;
  padding: 12px 10px 12px 6px;
  border: 0;
  border-right: 1px solid var(--border-subtle);
  background-color: transparent;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  cursor: pointer;
  outline: none;
}

.phone-country-select option,
.phone-country-select optgroup {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

/* Numéro local : occupe tout l'espace restant. Le champ téléphone étant
   désormais sur toute la largeur (sm:col-span-2), la saisie est confortable
   et lisible après saisie. */
.phone-number-input {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 12px 14px;
  border: 0;
  background-color: transparent;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
  outline: none;
}

.phone-number-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Le visiteur a saisi un numéro international complet (+33…). */
.phone-hint {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* Sur mobile, le sélecteur reste lisible sans écraser le numéro. */
@media (max-width: 480px) {
  .phone-drapeau {
    padding: 0 2px 0 10px;
  }

  .phone-drapeau-img {
    width: 20px;
    height: 15px;
  }

  .phone-country-select {
    max-width: 130px;
    font-size: 0.82rem;
  }

  /* Le numéro (et ses groupes de chiffres) passe avant le reste. */
  .phone-number-input {
    min-width: 120px;
    padding: 12px 10px;
    font-size: 0.95rem;
  }
}
/* =========================================================
   IMPRESSION DES DOCUMENTS DE L'ESPACE RH
   =========================================================
   Les fiches facture.php, bulletin.php et factures.php marquent
   leur contenu avec .gestion-print et tout ce qui doit rester a
   l'ecran avec .gestion-no-print. Sans ces regles, « Imprimer »
   sortait la page entiere : menu lateral, barre superieure,
   boutons d'action et pied de page se retrouvaient sur la
   facture remise au client.

   On ne peut pas se contenter de masquer .gestion-no-print : la
   navigation (sidebar, topbar) n'a pas cette classe. Elle est
   donc visee explicitement, et l'on masque en creux tout ce qui
   n'appartient pas a la zone imprimable.
   --------------------------------------------------------- */
@media print {

  /* 1. Ne garder que le document -------------------------------------
     La coquille d'administration (sidebar + topbar + footer) et les
     actions disparaissent ; la fiche reste seule sur la page. */
  .admin-sidebar,
  .admin-overlay,
  .admin-topbar,
  .admin-footer,
  .gestion-no-print,
  [data-theme-toggle],
  .admin-nav,
  .admin-burger {
    display: none !important;
  }

  /* 2. Neutraliser la coquille ---------------------------------------
     Les conteneurs de mise en page conservent sinon leur grille, leur
     hauteur minimale et leurs marges : le document serait decale et
     entoure de blanc. */
  html,
  body,
  .admin-shell,
  .admin-main,
  .admin-content,
  .admin-body {
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }

  /* 3. La zone imprimable occupe toute la largeur -------------------- */
  .gestion-print {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  /* 4. Lisibilite sur papier -----------------------------------------
     Une couleur d'ecran claire (texte gris, fonds teintes) devient
     illisible ou couteuse a l'impression : on force le noir sur blanc. */
  body,
  .gestion-print,
  .gestion-print * {
    color: #000 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Le bandeau de titre et les en-tetes de tableau doivent rester
     distincts sans dependre d'une couleur de fond. */
  .admin-table thead th,
  .gestion-print thead th {
    border-bottom: 1px solid #000 !important;
  }

  .admin-card,
  .admin-table,
  .gestion-print table {
    border-collapse: collapse !important;
    page-break-inside: auto;
  }

  /* 5. Eviter les coupures malheureuses ------------------------------ */
  .gestion-print tr,
  .gestion-print img,
  .gestion-print .admin-brand-mark {
    page-break-inside: avoid;
  }

  .gestion-print thead {
    display: table-header-group;
  }

  /* 6. Marges de page et suppression des habillages du navigateur ----
     Sans @page, le navigateur ajoute son propre en-tete (URL, date) et
     ses propres marges, qui varient d'un poste a l'autre. */
  @page {
    size: A4 portrait;
    margin: 14mm;
  }

  a[href]::after {
    content: none !important;
  }

  /* Les icones Material Symbols sont une police : elles s'impriment en
     noir plein et alourdissent la page. */
  .material-symbols-outlined {
    display: none !important;
  }
}
/* =============================================================================
   POLITIQUE DE CONFIDENTIALITÉ — section « cookies »
   =============================================================================
   Tableau des cookies réellement déposés, étiquettes de statut et cases de
   préférences. Ces éléments n'existaient pas : la page se contentait d'un
   paragraphe informatif, sans aucune possibilité d'agir sur le choix.
   ============================================================================= */

.cookie-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-light);
  vertical-align: middle;
  white-space: nowrap;
}

.cookie-table {
  width: 100%;
  margin: 14px 0 22px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.cookie-table th,
.cookie-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.cookie-table th {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cookie-table td {
  color: var(--text-muted);
}

.cookie-table code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--gold-light);
  font-size: 0.8rem;
  white-space: nowrap;
}

.cookie-choices {
  margin-top: 26px;
  padding: 20px;
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
}

html[data-theme="light"] .cookie-choices {
  background: #ffffff;
}

.cookie-etat {
  margin: 0 0 14px;
  font-size: 0.875rem;
  color: var(--gold-light);
}

.cookie-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
}

.cookie-option:last-of-type {
  border-bottom: 0;
}

.cookie-option input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--gold-primary);
  flex: 0 0 auto;
  cursor: pointer;
}

.cookie-option input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.cookie-option strong {
  color: var(--text-primary);
}

.cookie-note {
  margin: 14px 0 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .cookie-table thead {
    display: none;
  }

  .cookie-table tr {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .cookie-table td {
    display: block;
    padding: 3px 0;
    border: 0;
  }
}

/* =============================================================================
   PAGES LÉGALES — MENTIONS, CGU, POLITIQUE DE CONFIDENTIALITÉ
   =============================================================================
   Les trois pages portaient les classes .mentions-legales, .terms-of-use et
   .privacy-policy, mais AUCUNE règle ne les visait : le contenu héritait de la
   seule mise en page du navigateur (titre de 16 px, marges par défaut, texte
   collé en haut de page sous le header fixe). On définit ici le conteneur
   commun aux trois pages ainsi que la typographie de leurs articles.
   ============================================================================= */

.mentions-legales,
.terms-of-use,
.privacy-policy {
  width: min(100% - 40px, 820px);
  margin-inline: auto;
  /* Le header est fixe (4.5rem) : on garde un écart sous la barre de menu. */
  padding-block: 2rem 4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- En-tête de page ------------------------------------------------------ */
.mentions-legales > h1,
.terms-of-use > h1,
.privacy-policy > h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* Ligne dorée sous le titre : rappelle les titres de section du site. */
.mentions-legales > h1::after,
.terms-of-use > h1::after,
.privacy-policy > h1::after {
  content: '';
  display: block;
  width: 72px;
  height: 3px;
  margin-top: 0.9rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-primary), transparent);
}

.last-update {
  margin: 0 0 2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.9;
}

/* --- Articles ------------------------------------------------------------- */
.mentions-legales article,
.terms-of-use article,
.privacy-policy article {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
}

.mentions-legales h2,
.terms-of-use h2,
.privacy-policy h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.mentions-legales h3,
.terms-of-use h3,
.privacy-policy h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.mentions-legales h3:first-child,
.terms-of-use h3:first-child,
.privacy-policy h3:first-child {
  margin-top: 0.25rem;
}

.mentions-legales p,
.terms-of-use p,
.privacy-policy p {
  margin: 0 0 0.9rem;
}

.mentions-legales p:last-child,
.terms-of-use p:last-child,
.privacy-policy p:last-child,
.mentions-legales ul:last-child,
.terms-of-use ul:last-child,
.privacy-policy ul:last-child {
  margin-bottom: 0;
}

.mentions-legales ul,
.terms-of-use ul,
.privacy-policy ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.mentions-legales li,
.terms-of-use li,
.privacy-policy li {
  margin-bottom: 0.45rem;
  color: var(--text-muted);
}

.mentions-legales li::marker,
.terms-of-use li::marker,
.privacy-policy li::marker {
  color: var(--gold-primary);
}

/* Les libellés en gras (« Éditeur du site », « Hébergeur »…) doivent se
   détacher du texte courant. */
.mentions-legales strong,
.terms-of-use strong,
.privacy-policy strong {
  color: var(--text-primary);
  font-weight: 700;
}

.mentions-legales code,
.terms-of-use code,
.privacy-policy code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--gold-light);
  font-size: 0.85em;
}

/* Valeur de mention légale encore manquante : signalée en evidence, plutôt
   que masquée. Voir le tableau $legal en tête de mention_legale.php. */
.legal-a-completer {
  display: inline-block;
  padding: 1px 7px;
  border: 1px dashed var(--gold-primary);
  border-radius: 5px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  font-size: 0.85em;
  font-weight: 600;
}

html[data-theme="light"] .legal-a-completer {
  color: var(--gold-dark);
  background: rgba(212, 175, 55, 0.16);
}

/* --- Thème clair ---------------------------------------------------------- */
html[data-theme="light"] .mentions-legales article,
html[data-theme="light"] .terms-of-use article,
html[data-theme="light"] .privacy-policy article {
  background: #ffffff;
  border-color: var(--border-subtle);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .mentions-legales code,
html[data-theme="light"] .terms-of-use code,
html[data-theme="light"] .privacy-policy code {
  color: var(--gold-dark);
}

/* --- Mobile : moins de marges perdues ------------------------------------- */
@media (max-width: 639px) {
  .mentions-legales,
  .terms-of-use,
  .privacy-policy {
    width: min(100% - 24px, 820px);
    padding-block: 1.25rem 3rem;
    font-size: 0.9rem;
  }

  .mentions-legales article,
  .terms-of-use article,
  .privacy-policy article {
    padding: 1rem 1.1rem;
  }
}

/* --- Impression : pas de cartes ni de couleurs --------------------------- */
@media print {
  .mentions-legales,
  .terms-of-use,
  .privacy-policy {
    width: 100%;
    padding: 0;
    color: #000;
  }

  .mentions-legales article,
  .terms-of-use article,
  .privacy-policy article {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .mentions-legales h1::after,
  .terms-of-use h1::after,
  .privacy-policy h1::after {
    display: none;
  }
}
