/* ============================================
   CERVEAU SINGULIER — CSS
   ============================================ */

@font-face {
  font-family: 'Lexend';
  src: url('fonts/Lexend-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend';
  src: url('fonts/Lexend-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lexend Deca';
  src: url('fonts/LexendDeca-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend Deca';
  src: url('fonts/LexendDeca-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('fonts/OpenDyslexic-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'OpenDyslexic';
  src: url('fonts/OpenDyslexic-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'OpenDyslexic';
  src: url('fonts/OpenDyslexic-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --primary: #1E4B4A;
  /* Teal de marque quand il sert de couleur de TEXTE. Repris tel quel sur les
     fonds clairs ; le thème sombre le remplace par une version éclaircie
     (voir BACKGROUND_THEMES dans _lib/preferences.php), car #1E4B4A est
     presque noir et tombait à 1,3:1 sur fond sombre. --primary, lui, reste la
     couleur des aplats et ne bouge jamais. */
  --primary-text: #1E4B4A;
  /* Palette des couleurs de fonctionnalité : une teinte par rubrique, tenue
     identique partout (pastille du dashboard, étape du parcours, leçon).
     Le thème sombre les remplace par des versions éclaircies (voir app.css) :
     telles quelles, elles tombaient entre 1,3:1 et 2,7:1 sur fond sombre. */
  --feat-teal: #1E4B4A;
  --feat-orange: #A15F2D;
  --feat-blue: #2563EB;
  --feat-violet: #7C3AED;
  --feat-green: #0B786E;
  --feat-pink: #D02370;
  --feat-red: #D52222;
  /* Bouton de suppression : --danger colore le texte et le trait, --danger-on
     le texte posé sur l'aplat au survol. Deux variables et non une, sinon le
     thème sombre (où --danger s'éclaircit) garderait du blanc sur rose pâle. */
  --danger: #C03355;
  --danger-on: #FFFFFF;
  --primary-dark: #123332;
  --secondary: #E2637A;
  --accent: #C97A3D;
  --accent2: #D9A441;
  --dark: #14282A;
  --dark2: #0D1B1C;
  --text: #26302F;
  --text-light: #5A6570;
  --white: #FFFFFF;
  --card-bg: #FFFFFF;
  --border: #E5E7EB;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(30,75,74,0.10);
  --shadow-lg: 0 8px 48px rgba(30,75,74,0.15);
  --font: 'OpenDyslexic', 'Arial', sans-serif;
  --font-deca: 'Lexend Deca', 'Arial', sans-serif;
  --bg: #FFF9F0;
  --bg-alt: #FFF3E0;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);

  /* Échelle d'espacement : remplace les margins posées au cas par cas
     (style="margin: 48px 0 20px;" dispersé un peu partout) par une poignée
     de crans partagés, pour un rythme visuel cohérent d'une page à l'autre. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
}

/* ---- Utilitaires d'espacement (voir --space-* ci-dessus) ---- */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-5 { margin-top: var(--space-5) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-7 { margin-top: var(--space-7) !important; }
.mt-8 { margin-top: var(--space-8) !important; }
.mt-9 { margin-top: var(--space-9) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-5 { margin-bottom: var(--space-5) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-7 { margin-bottom: var(--space-7) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }
.mb-9 { margin-bottom: var(--space-9) !important; }
.mr-2 { margin-right: var(--space-2) !important; }

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
/* Sans cette règle, n'importe quel élément portant à la fois l'attribut
   hidden et une classe qui pose son propre display (.btn, .ex-rhythm...)
   reste visible : une règle d'auteur à spécificité égale l'emporte toujours
   sur le display:none par défaut du navigateur pour [hidden]. Trouvé lors
   d'une revue visuelle : le panneau du jeu de rythme et le bouton "Suivant"
   restaient affichés sur tous les exercices avant même d'avoir répondu. */
[hidden] { display: none !important; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.9;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- TYPOGRAPHY ---- */
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { line-height: 1.75; }

/* ---- CONTAINER ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- ACCESSIBILITÉ CLAVIER ---- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 2000;
  background: var(--primary);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}

/* ---- NAV ---- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
#navbar.scrolled { box-shadow: var(--shadow); }
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-text);
  flex-shrink: 0;
}
.nav-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow: visible;
}
.nav-links li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px; /* cible tactile WCAG 2.5.5 (28px avant) */
  padding: 6px 12px;
  border-radius: 20px;
  /* suit le réglage de taille de texte de l'utilisateur (--u-font-size posé
     sur <body>) au lieu d'un rem figé qui restait petit en gros texte */
  font-size: calc(var(--u-font-size, 16px) * 0.875);
  font-weight: 500;
  color: var(--text-light);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-link-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: currentColor;
}
/* Libellés de groupe du menu : visibles en permanence (rail desktop en
   colonne comme en menu mobile déplié), ils structurent la liste dans les
   deux cas plutôt que de n'apparaître qu'une fois le menu mobile ouvert. */
.nav-links li.nav-group {
  display: block;
  padding: 14px 16px 4px;
}
.nav-links li.nav-group .nav-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}
.nav-links li a:hover {
  background: var(--bg-alt);
  color: var(--primary-text);
}
.font-select {
  flex-shrink: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  font-family: Arial, sans-serif;
  transition: border-color var(--transition);
}
.font-select:hover { border-color: var(--primary); }
.font-select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
/* Le bouton se transforme en croix quand le menu plein ecran est ouvert :
   confirme visuellement que le meme bouton sert maintenant a fermer. */
#navbar.menu-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#navbar.menu-open .hamburger span:nth-child(2) { opacity: 0; }
#navbar.menu-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- RAIL DE NAVIGATION DESKTOP ----
   Au-dela de 900px, #navbar quitte la barre du haut pour devenir un rail
   fixe a gauche : icone + texte toujours visibles (pas d'icone seule a
   deviner), regroupements par libelle, bandeau de contexte (prenom) en
   tete. Le contenu (#main-content, #footer) est decale d'autant. */
@media (min-width: 901px) {
  #navbar {
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: var(--sidebar-width, 240px);
    border-bottom: none;
    border-right: 1px solid var(--border);
    overflow-y: auto;
  }
  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 100%;
    padding: 20px 14px 24px;
    gap: 4px;
  }
  .nav-logo { padding: 0 10px; margin-bottom: 4px; }
  .nav-context {
    margin: 0 0 12px;
    padding: 8px 14px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    font-weight: 700;
    color: var(--primary-text);
    font-size: 0.95rem;
  }
  .nav-survey-btn {
    margin: -8px 0 12px;
    padding: 8px 14px;
    width: 100%;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--primary-text);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 40px;
  }
  .nav-survey-btn:hover {
    border-color: var(--primary);
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    flex: none;
    gap: 2px;
  }
  .nav-links li a {
    width: 100%;
    border-radius: var(--radius);
  }
  .font-select { margin: 12px 10px 0; width: calc(100% - 20px); }
  #main-content, #footer {
    margin-left: var(--sidebar-width, 240px);
  }
}

/* ---- NAV DROPDOWN ---- */
.nav-group { position: relative; }

.nav-group-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
  transition: all var(--transition);
}
.nav-group-btn:hover {
  background: var(--bg-alt);
  color: var(--primary-text);
}
.nav-group.open .nav-group-btn {
  background: rgba(30,75,74,0.10);
  color: var(--primary-text);
}

.nav-chevron {
  display: inline-block;
  font-size: 0.7rem;
  transition: transform var(--transition);
  line-height: 1;
}
.nav-group.open .nav-chevron { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 200;
}
.nav-group.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  white-space: normal;
}
.nav-dropdown li a:hover {
  background: var(--bg-alt);
  color: var(--primary-text);
}

.dd-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1; }
.dd-text { display: flex; flex-direction: column; gap: 1px; }
.dd-label { font-weight: 600; font-size: 0.85rem; line-height: 1.3; }
.dd-desc { font-size: 0.73rem; color: var(--text-light); line-height: 1.3; font-family: Arial, sans-serif; }

/* Théa link */
.nav-links > li > a.nav-thea {
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--secondary);
  background: rgba(226,99,122,0.08);
  transition: all var(--transition);
}
.nav-links > li > a.nav-thea:hover {
  background: rgba(226,99,122,0.18);
  color: var(--secondary);
}

/* ---- HERO ---- */
#hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 50%, #0B2E2C 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 100px 24px 60px;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('cerveau-singulier.webp') center center / cover no-repeat;
  opacity: 0.12;
  mix-blend-mode: luminosity;
  pointer-events: none;
  z-index: 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.neuron {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  animation: float 8s ease-in-out infinite;
}
.n1 { width: 400px; height: 400px; background: var(--primary); top: -100px; left: -100px; animation-delay: 0s; }
.n2 { width: 300px; height: 300px; background: var(--secondary); bottom: -80px; right: -80px; animation-delay: 2s; }
.n3 { width: 200px; height: 200px; background: var(--accent); top: 40%; right: 10%; animation-delay: 4s; }
.n4 { width: 150px; height: 150px; background: var(--accent2); bottom: 20%; left: 15%; animation-delay: 1s; }
.n5 { width: 250px; height: 250px; background: var(--primary); top: 20%; left: 35%; animation-delay: 3s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}
.hero-label {
  display: inline-block;
  background: rgba(30,75,74,0.25);
  border: 1px solid rgba(30,75,74,0.4);
  color: rgba(255,255,255,0.9);
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}
.hero-content h1 { color: white; margin-bottom: 24px; }
.gradient-text {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: rgba(255,255,255,0.75);
  font-size: 1.15rem;
  margin-bottom: 40px;
  font-family: var(--font-deca);
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
  text-decoration: none;
}
/* Boutons "pressables" : une bordure basse plus foncée simule l'épaisseur
   du bouton. Au clic, il descend et la bordure disparaît, comme s'il
   s'enfonçait réellement (signature Duolingo, plus tactile qu'un hover-lift). */
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 0 var(--primary-dark);
}
.btn-primary:hover { background: #235B59; }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 0 0 var(--primary-dark); }
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 0 rgba(255,255,255,0.15);
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); }
.btn-ghost:active { transform: translateY(4px); box-shadow: 0 0 0 rgba(255,255,255,0.15); }
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50% { transform: scaleY(0.6); opacity: 0.2; }
}

/* ---- FIL D'ARIANE ---- */
.breadcrumb { margin-bottom: 20px; text-align: left; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-light);
}
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li:not(:last-child)::after {
  content: "›";
  color: var(--text-light);
  opacity: 0.6;
}
.breadcrumb a { color: var(--text-light); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb a:hover { color: var(--primary-text); }
.breadcrumb li:last-child span { color: var(--primary-text); font-weight: 600; }

/* ---- SECTIONS ---- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(30,75,74,0.12), rgba(201,122,61,0.12));
  color: var(--primary-text);
  border: 1px solid rgba(30,75,74,0.2);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-header h2 em { color: var(--primary-text); font-style: normal; }
.streak-pill {
  display: inline-block;
  background: var(--card-bg);
  color: var(--text);
  border: 2px solid #D9A441;
  box-shadow: 0 3px 0 #D9A441;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 16px;
}
.weekly-goal {
  max-width: 360px;
  margin: 20px auto 0;
}
.weekly-goal-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 4px;
}
.weekly-goal-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 6px;
}
.daily-quest {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text);
}
.daily-quest--done { border-color: var(--feat-green); color: var(--feat-green); }
.daily-quest-icon { font-weight: 700; }
.quest-card {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--bg-alt);
  border: 2px solid var(--feat-violet);
  max-width: 420px;
}
.quest-card--done { border-color: var(--feat-green); }
.quest-card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  background: var(--feat-violet);
  border-radius: 999px;
  padding: 3px 12px;
}
.quest-card--done .quest-card-badge { background: var(--feat-green); }
.quest-card-label {
  margin: 10px 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.quest-card-reward {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-light);
}
.section-intro {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-top: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.source-inline {
  font-size: 0.68rem;
  color: var(--text-light);
  margin-top: auto;
  padding-top: 8px;
  font-style: italic;
  opacity: 0.6;
  display: block;
  line-height: 1.4;
}

/* ---- VIDEO ---- */
.section-video { background: var(--bg-alt); }
.video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 840px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}

/* ---- PREAMBULE ---- */
.section-preambule {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  padding: 80px 0;
}
.preambule-wrapper {
  max-width: 680px;
  margin: 0 auto;
}
.preambule-tag {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  padding: 5px 18px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 28px;
}
.preambule-body p {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 18px;
}
.preambule-body p:last-of-type { margin-bottom: 0; }
.preambule-signature {
  display: block;
  text-align: right;
  color: rgba(255,255,255,0.45) !important;
  font-style: italic;
  font-size: 0.95rem !important;
  margin-top: 32px !important;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ---- DEFINITION ---- */
.def-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.def-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
  border: 2px solid var(--border);
  box-shadow: 0 3px 0 var(--border);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  display: flex;
  flex-direction: column;
}
.def-card:hover { border-color: var(--primary); }
.def-card:active { transform: translateY(3px); box-shadow: 0 0 0 var(--border); }
a.def-card:active { border-color: var(--primary); }
.def-icon { font-size: 2rem; margin-bottom: 16px; }
.def-card h3 { margin-bottom: 12px; }
.def-card p { margin-bottom: 12px; font-size: 0.95rem; }
.myth-list { margin-top: 12px; }
.myth-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.myth-list li:last-child { border-bottom: none; }
.myth-list li strong { white-space: nowrap; flex-shrink: 0; }
.myth-x { color: var(--secondary); font-weight: 700; }

.myths-section { margin-top: 48px; }
.myths-section > h3 { text-align: center; margin-bottom: 32px; font-size: 1.5rem; }
.myths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.myth-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.myth-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.myth-false {
  display: inline-block;
  background: rgba(226,99,122,0.12);
  color: var(--secondary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.myth-claim {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
  font-style: italic;
}
.myth-true {
  display: inline-block;
  background: rgba(201,122,61,0.15);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.myth-reality { font-size: 0.9rem; color: var(--text-light); }

/* ---- CHIFFRES ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px 24px;
  border: 1px solid var(--border);
  text-align: center;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-big { grid-column: span 2; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; }
.stat-wide { grid-column: span 2; }
.stat-number { font-size: 2.8rem; font-weight: 700; color: var(--primary-text); line-height: 1; margin-bottom: 8px; }
.stat-big .stat-number { color: white; font-size: 3.5rem; }
.stat-label { font-size: 0.95rem; font-weight: 600; margin-bottom: 12px; }
.stat-big .stat-label { color: rgba(255,255,255,0.85); }
.stat-detail { font-size: 0.88rem; color: var(--text-light); }
.stat-big .stat-detail { color: rgba(255,255,255,0.8); }
.stat-big .source-inline { color: rgba(255,255,255,0.6); }

/* ---- SIGNES ---- */
.signs-tabs, .tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.tab-btn {
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-light);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary-text); }
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.signs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.sign-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.sign-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sign-note { background: rgba(217,164,65,0.08); border-color: rgba(217,164,65,0.3); }
.sign-icon { font-size: 2rem; margin-bottom: 16px; }
.sign-card h4 { margin-bottom: 8px; color: var(--text); }
.sign-card p { font-size: 0.9rem; color: var(--text-light); }

/* ---- CERVEAU ---- */
.brain-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}
.brain-text h3 { font-size: 1.5rem; margin-bottom: 16px; }
.brain-text p { margin-bottom: 16px; font-size: 0.95rem; }
.brain-text strong { color: var(--primary-text); }
.brain-diagram {
  background: linear-gradient(135deg, var(--dark), var(--dark2));
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}
.brain-visual {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 5rem;
  opacity: 0.15;
}
.brain-zone { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.bz-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bz-temporal .bz-dot { background: var(--primary); box-shadow: 0 0 12px var(--primary); }
.bz-occipital .bz-dot { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.bz-frontal .bz-dot { background: var(--secondary); box-shadow: 0 0 12px var(--secondary); }
.bz-label { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 500; }
.bz-label small { color: rgba(255,255,255,0.5); font-size: 0.78rem; font-weight: 400; display: block; }

.research-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}
.research-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.research-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.research-num {
  font-size: 3rem;
  font-weight: 700;
  color: rgba(30,75,74,0.1);
  position: absolute;
  top: 16px;
  right: 20px;
  line-height: 1;
  font-family: var(--font-deca);
}
.research-card h4 { margin-bottom: 12px; color: var(--primary-text); font-size: 1rem; }
.research-card p { font-size: 0.9rem; color: var(--text); margin-bottom: 10px; }
.research-card strong { color: var(--text); }

.dehaene-quote {
  background: linear-gradient(135deg, var(--dark), var(--dark2));
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}
.dehaene-quote blockquote {
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  line-height: 1.8;
  font-style: italic;
  margin-bottom: 20px;
  font-weight: 300;
}
.dehaene-quote cite {
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  font-style: normal;
}

/* ---- FORCES ---- */
.forces-intro {
  background: linear-gradient(135deg, rgba(30,75,74,0.07), rgba(201,122,61,0.07));
  border: 1px solid rgba(30,75,74,0.15);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 48px;
  font-size: 1rem;
  color: var(--text);
}
.forces-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}
.force-big { grid-column: span 2; background: linear-gradient(135deg, rgba(30,75,74,0.08), rgba(201,122,61,0.08)); border-color: rgba(30,75,74,0.2); }
.force-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.force-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.force-icon { font-size: 2rem; margin-bottom: 14px; }
.force-card h3 { margin-bottom: 12px; font-size: 1.1rem; }
.force-card p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 10px; }
.force-card strong { color: var(--text); }

.famous-dys { margin-top: 32px; }
.famous-dys > h3 { text-align: center; margin-bottom: 12px; font-size: 1.5rem; }
.famous-note { text-align: center; color: var(--text-light); font-size: 0.875rem; margin-bottom: 32px; font-style: italic; }
.famous-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.famous-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.famous-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.famous-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  flex-shrink: 0;
}
.famous-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.65) brightness(1.05);
  transition: filter 0.35s ease, transform 0.35s ease;
  display: block;
}
.famous-item:hover .famous-img-wrap img {
  filter: saturate(0.9) brightness(1.08);
  transform: scale(1.04);
}
.famous-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(255,249,240,0)    55%,
    rgba(255,249,240,0.75) 82%,
    rgba(255,249,240,1)   100%
  );
  pointer-events: none;
}
.famous-body {
  padding: 10px 12px 14px;
  text-align: center;
}
.famous-item strong { font-size: 0.88rem; display: block; line-height: 1.3; }
.famous-item span { font-size: 0.75rem; color: var(--text-light); }

/* ---- DROITS ---- */
.rights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.right-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.right-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.right-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.right-pap .right-badge { background: rgba(30,75,74,0.15); color: var(--primary-text); }
.right-pps .right-badge { background: rgba(201,122,61,0.15); color: var(--accent); }
.right-rased .right-badge { background: rgba(217,164,65,0.15); color: #D97706; }
.right-exams .right-badge { background: rgba(226,99,122,0.15); color: var(--secondary); }
.right-ppre .right-badge { background: rgba(30,75,74,0.1); color: var(--primary-dark); }
.right-tips .right-badge { background: rgba(217,164,65,0.15); color: #B45309; }
.right-card h3 { margin-bottom: 16px; }
.right-who {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 16px 0 8px;
}
.right-card p { font-size: 0.9rem; margin-bottom: 12px; }
.right-card ul { list-style: none; }
.right-card ul li {
  padding: 5px 0;
  font-size: 0.88rem;
  color: var(--text);
  padding-left: 16px;
  position: relative;
}
.right-card ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-text);
}
.right-ref {
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
  border-top: 1px solid var(--border);
}
.right-link {
  color: var(--primary-text);
  font-style: normal;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.right-link:hover { text-decoration: underline; }
.tips-list li {
  padding: 8px 0 8px 20px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}
.tips-list li:last-child { border-bottom: none; }

/* ---- OUTILS ---- */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.tool-category {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.tool-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 28px;
  background: linear-gradient(135deg, rgba(30,75,74,0.06), rgba(201,122,61,0.06));
  border-bottom: 1px solid var(--border);
}
.tool-cat-icon { font-size: 1.5rem; }
.tool-cat-header h3 { font-size: 1.1rem; margin: 0; }
.tool-list { padding: 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.tool-item {
  padding: 14px 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.tool-item:hover { background: rgba(30,75,74,0.06); }
.tool-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; color: var(--primary-text); }
.tool-desc { font-size: 0.85rem; color: var(--text-light); line-height: 1.5; }
.tool-age { font-size: 0.75rem; font-weight: 600; color: var(--accent); margin-top: 6px; }

.font-showcase { padding: 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.font-item { padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.fi-opendys { background: rgba(30,75,74,0.04); }
.fi-lexend { background: rgba(201,122,61,0.04); }
.fi-arial { background: rgba(217,164,65,0.04); }
.font-name { font-weight: 700; font-size: 0.9rem; color: var(--primary-text); margin-bottom: 6px; }
.font-sample { font-size: 0.88rem; color: var(--text); line-height: 1.6; margin-bottom: 6px; }
.font-link { font-size: 0.75rem; color: var(--text-light); font-style: italic; }

.font-tips { padding: 20px 28px; border-top: 1px solid var(--border); }
.font-tips h4 { margin-bottom: 12px; font-size: 0.95rem; }
.font-tips ul { list-style: disc; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.font-tips ul li { font-size: 0.85rem; color: var(--text); }
.font-tips strong { color: var(--secondary); }

.books-grid { padding: 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.book-item { display: flex; gap: 16px; align-items: flex-start; }
.book-cover { font-size: 2rem; flex-shrink: 0; }
.book-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.book-author { font-size: 0.78rem; color: var(--primary-text); margin-bottom: 4px; }
.book-desc { font-size: 0.82rem; color: var(--text-light); line-height: 1.5; }

/* ---- THÉA ---- */
.section-thea {
  background: linear-gradient(135deg, #14282A 0%, #0D1B1C 50%, #0B2E2C 100%);
  padding: 100px 0;
}
.thea-img-block {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  pointer-events: none;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  z-index: 0;
}
.thea-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.18;
  display: block;
  mask-image: linear-gradient(to top, black 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 55%, transparent 100%);
}
.thea-header,
.thea-body {
  position: relative;
  z-index: 1;
}
.thea-wrapper {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.thea-deco { text-align: center; margin-bottom: 16px; }
.thea-stars { display: flex; justify-content: center; gap: 20px; }
.thea-stars span {
  color: rgba(255,255,255,0.2);
  font-size: 1rem;
  animation: twinkle 3s ease-in-out infinite;
}
.thea-stars span:nth-child(2) { animation-delay: 0.6s; }
.thea-stars span:nth-child(3) { animation-delay: 1.2s; }
.thea-stars span:nth-child(4) { animation-delay: 1.8s; }
.thea-stars span:nth-child(5) { animation-delay: 2.4s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.2); }
}
.thea-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 56px;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.thea-header {
  text-align: center;
  margin-bottom: 40px;
}
.thea-icon { font-size: 3rem; display: block; margin-bottom: 16px; }
.thea-header h2 { color: white; font-size: 2.5rem; }
.thea-body p {
  color: rgba(255,255,255,0.82);
  font-size: 1.05rem;
  margin-bottom: 20px;
  line-height: 1.9;
}
.thea-body strong { color: white; }
.thea-body em { color: rgba(255,255,255,0.7); font-style: italic; }
.thea-quote {
  border: none;
  background: linear-gradient(135deg, rgba(30,75,74,0.25), rgba(201,122,61,0.25));
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 32px 0;
  color: white;
  font-size: 1.1rem;
  font-style: italic;
  text-align: center;
  line-height: 1.9;
  font-weight: 300;
}
.thea-end {
  text-align: center;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  margin-top: 8px;
}
.thea-signature {
  text-align: right;
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  font-style: italic;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ---- SOURCES ---- */
.sources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
.sources-category {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.sources-category h3 {
  margin-bottom: 20px;
  color: var(--primary-text);
  font-size: 1rem;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(30,75,74,0.15);
}
.sources-list { display: flex; flex-direction: column; gap: 10px; }
.sources-list li {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.6;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.sources-list li:last-child { border-bottom: none; }
.sources-list em { font-style: italic; color: var(--text); }
.associations {
  background: linear-gradient(135deg, rgba(30,75,74,0.07), rgba(201,122,61,0.07));
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid rgba(30,75,74,0.15);
}
.associations h3 { margin-bottom: 24px; }
.asso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.asso-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.asso-item strong { font-size: 0.9rem; color: var(--text); }
.asso-item span { font-size: 0.82rem; color: var(--text-light); }

/* ---- FOOTER ---- */
#footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 32px;
}
.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.footer-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.footer-name { font-size: 1.2rem; font-weight: 700; color: white; }
.footer-center p { font-size: 0.85rem; line-height: 1.6; }
.footer-made { color: rgba(255,255,255,0.7); }
.footer-note { color: rgba(255,255,255,0.55); font-size: 0.78rem !important; }

/* ---- BACK TO TOP ---- */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(16px);
  transition: all var(--transition);
  z-index: 999;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ---- CHOIX DE POLICE ---- */
body.font-lexend {
  font-family: 'Lexend', 'Arial', sans-serif;
  --font: 'Lexend', 'Arial', sans-serif;
  --font-deca: 'Lexend Deca', 'Arial', sans-serif;
  --bg: #FAFAFA;
  --bg-alt: #F3F4F8;
  line-height: 1.7;
  letter-spacing: 0;
}
body.font-systeme {
  font-family: Arial, Helvetica, sans-serif;
  --font: Arial, Helvetica, sans-serif;
  --font-deca: Arial, Helvetica, sans-serif;
  --bg: #FAFAFA;
  --bg-alt: #F3F4F8;
  line-height: 1.7;
  letter-spacing: 0;
}

/* ---- MOBILE NAV ---- */

/* Nav font-li : caché sur desktop, affiché dans le menu mobile */
.nav-font-li { display: none; }

/* Empeche le fond de defiler derriere la modale plein ecran ouverte. */
body.nav-modal-open { overflow: hidden; }

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .hamburger { display: flex; }
  /* Réduire le gap nav-inner et masquer le font-select du header */
  .nav-inner { gap: 16px; }
  .font-select { display: none; }

  #navbar.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 64px; left: 0; right: 0;
    height: calc(100vh - 64px);
    background: white;
    padding: 12px 16px 20px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    z-index: 999;
  }

  /* Dropdowns → accordéon sur mobile */
  .nav-group { width: 100%; }
  .nav-group-btn {
    width: 100%;
    justify-content: space-between;
    border-radius: 10px;
  }

  /* Neutralise TOUTES les règles desktop du dropdown */
  .nav-dropdown {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: none !important;
    box-shadow: none !important;
    min-width: 0 !important;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-top: 4px;
    padding: 4px;
    display: none;
    background: var(--bg-alt);
    color: var(--text);
    z-index: auto !important;
  }
  .nav-group.open .nav-dropdown {
    display: flex !important;
    flex-direction: column;
  }

  .nav-links > li > a { display: block; width: 100%; border-radius: 10px; }

  /* Sélecteur police dans le menu mobile */
  .nav-font-li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 4px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
  }
  .nav-font-li-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
  }
  .nav-font-select-mobile {
    flex: 1;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    font-family: Arial, sans-serif;
  }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .def-grid { grid-template-columns: 1fr 1fr; }
  .def-main { grid-column: auto; }
  .forces-grid { grid-template-columns: 1fr 1fr; }
  .force-big { grid-column: span 2; }
  .famous-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-big { grid-column: span 2; }
  .stat-wide { grid-column: span 2; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .section-header { margin-bottom: 40px; }
  #hero { padding: 88px 24px 52px; }
  .def-grid { grid-template-columns: 1fr; }
  .def-main { grid-column: 1; }
  .brain-intro { grid-template-columns: 1fr; }
  .research-cards { grid-template-columns: 1fr; }
  .forces-grid { grid-template-columns: 1fr; }
  .force-big { grid-column: 1; }
  .famous-grid { grid-template-columns: repeat(2, 1fr); }
  .rights-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .sources-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-big, .stat-wide { grid-column: 1; }
  .thea-card { padding: 32px 24px; }
  .dehaene-quote { padding: 32px 24px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  #hero { padding: 80px 16px 48px; }
  .hero-sub { font-size: 1rem; }
  .section { padding: 56px 0; }
  .section-header { margin-bottom: 28px; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .famous-grid { grid-template-columns: repeat(2, 1fr); }
  .signs-tabs { gap: 6px; }
  .tab-btn { padding: 8px 16px; font-size: 0.82rem; }
  .brain-diagram { padding: 24px 20px; min-height: auto; }
  .brain-visual { font-size: 3rem; right: 16px; }
  .dehaene-quote { padding: 24px 16px; }
  .dys-intro-block { padding: 18px 20px; }
  .forces-intro { padding: 18px 20px; }
  .mind-intro { padding: 18px 20px; }
  .thea-card { padding: 24px 16px; }
  .associations { padding: 24px 20px; }
}

/* ---- APPRENDRE ---- */
.mind-intro {
  background: linear-gradient(135deg, rgba(30,75,74,0.07), rgba(201,122,61,0.07));
  border: 1px solid rgba(30,75,74,0.15);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 48px;
  font-size: 1rem;
}
.mind-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.mind-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.mind-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.mind-letter {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 12px;
  font-family: var(--font-deca);
}
.mind-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.mind-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.mind-card p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 12px; }
.mind-metiers {
  margin-top: auto;
  padding: 8px 12px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.learn-vs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
.learn-col {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.learn-col-header {
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--border);
}
.learn-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.learn-badge-yes { background: rgba(201,122,61,0.15); color: var(--accent); }
.learn-badge-no  { background: rgba(226,99,122,0.12); color: var(--secondary); }
.learn-col-header h3 { font-size: 1rem; }
.learn-list {
  list-style: none;
  padding: 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.learn-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.learn-list li:last-child { border-bottom: none; }
.learn-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.learn-list strong { font-size: 0.9rem; display: block; margin-bottom: 3px; color: var(--text); }
.learn-list p { font-size: 0.83rem; color: var(--text-light); margin: 0; line-height: 1.5; }

.learn-stat {
  display: flex;
  gap: 40px;
  align-items: center;
  background: linear-gradient(135deg, var(--dark), var(--dark2));
  border-radius: var(--radius);
  padding: 48px;
}
.learn-stat-left { flex-shrink: 0; text-align: center; }
.learn-stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-family: var(--font-deca);
}
.learn-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  max-width: 120px;
}
.learn-stat-right h3 { color: white; font-size: 1.3rem; margin-bottom: 12px; }
.learn-stat-right p { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin-bottom: 10px; }
.learn-stat-right .source-inline { color: rgba(255,255,255,0.45); }
.learn-stat-right .doi-link { color: rgba(255,255,255,0.6); }

@media (max-width: 768px) {
  .mind-grid { grid-template-columns: 1fr; }
  .learn-vs { grid-template-columns: 1fr; }
  .learn-stat { flex-direction: column; gap: 24px; padding: 32px 24px; text-align: center; }
  .learn-stat-label { max-width: none; }
}

/* ---- LIKE SECTION ---- */
#like-section {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.like-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  border-radius: var(--radius);
  padding: 56px 40px;
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.like-heart {
  font-size: 3rem;
  line-height: 1;
  color: var(--secondary);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  display: block;
  user-select: none;
}

.like-heart.beat {
  transform: scale(1.35);
}

.like-label {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  margin: 0;
}

.like-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 40px;
  font-size: 1rem;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
  position: relative;
  overflow: hidden;
}

.like-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.like-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.like-btn:disabled,
.like-btn.liked {
  background: rgba(30,75,74,0.35);
  cursor: default;
  opacity: 0.8;
}

.like-btn.liked .like-btn-text::before {
  content: '✓ ';
}

.like-counter {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.like-count {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-deca);
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.like-count.pop {
  transform: scale(1.25);
}

.like-count-label {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .like-block { padding: 40px 24px; }
}

/* ---- CARD ANIMATIONS (fade-in via IntersectionObserver) ---- */
.def-card.visible, .myth-card.visible, .stat-card.visible,
.sign-card.visible, .research-card.visible, .force-card.visible,
.mind-card.visible, .right-card.visible, .tool-category.visible,
.sources-category.visible, .famous-item.visible,
.diag-step.visible, .faq-item.visible,
.dys-card.visible, .audience-card.visible,
.testi-card.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ---- ACTIVE NAV LINK ---- */
.nav-links a.active-nav {
  background: rgba(30,75,74,0.12);
  color: var(--primary-text);
}

/* ---- ACTIVE NAV GROUP (page courante) ---- */
.nav-group--active .nav-group-btn {
  background: rgba(30,75,74,0.12);
  color: var(--primary-text);
}

/* ---- PAGE NAV (précédent / suivant) ---- */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 8px;
  margin-top: 32px;
  border-top: 1px solid var(--border);
  gap: 16px;
}
.page-nav-prev, .page-nav-next {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 24px;
  border: 2px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.page-nav-prev:hover, .page-nav-next:hover {
  border-color: var(--primary);
  color: var(--primary-text);
  background: rgba(30,75,74,0.06);
}
.page-nav-label {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ---- GATEWAY CARDS (index.php) ---- */
.gateway-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.gateway-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  border: 2px solid transparent;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gateway-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.gateway-img-wrap {
  position: relative;
  height: 175px;
  overflow: hidden;
  flex-shrink: 0;
}
.gateway-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.65) brightness(1.05);
  transition: transform 0.4s ease, filter 0.4s ease;
  display: block;
}
.gateway-card:hover .gateway-img-wrap img {
  transform: scale(1.04);
  filter: saturate(0.85) brightness(1.08);
}
.gateway-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(255,249,240,0)    0%,
    rgba(255,249,240,0.15) 50%,
    rgba(255,249,240,0.85) 85%,
    rgba(255,249,240,1)   100%
  );
  pointer-events: none;
}
.gateway-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.gateway-title { font-size: 1.2rem; font-weight: 700; color: var(--primary-text); }
.gateway-desc { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; flex: 1; }
.gateway-link { font-size: 0.875rem; font-weight: 600; color: var(--primary-text); margin-top: 4px; }

@media (max-width: 768px) {
  .gateway-grid { grid-template-columns: 1fr; }
  .page-nav-label { display: none; }
}

/* ---- DOI LINKS ---- */
.doi-link {
  color: var(--primary-text);
  opacity: 0.7;
  font-size: 0.78rem;
  text-decoration: none;
  transition: opacity 0.2s;
}
.doi-link:hover { opacity: 1; text-decoration: underline; }

/* ---- BASE FONT SIZE — piloté par JS via style.fontSize inline ---- */

/* ---- INTERLIGNE LARGE ---- */
body.leading-wide p,
body.leading-wide li,
body.leading-wide td { line-height: 2.2 !important; letter-spacing: 0.04em; }

/* ---- BARRE DE PROGRESSION ---- */
#read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ---- RÈGLE DE LECTURE ---- */
#reading-ruler {
  position: fixed;
  left: 0; right: 0;
  height: 44px;
  background: rgba(30,75,74,0.10);
  border-top: 2px solid rgba(30,75,74,0.25);
  border-bottom: 2px solid rgba(30,75,74,0.25);
  pointer-events: none;
  z-index: 8888;
  transition: top 0.05s linear;
}

/* ---- BARRE A11Y DANS LA NAV ---- */
.a11y-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
}

.a11y-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-deca);
  font-weight: 600;
  padding: 4px 7px;
  line-height: 1;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.a11y-btn:hover { background: rgba(30,75,74,0.08); color: var(--primary-text); border-color: var(--primary); }
.a11y-btn--active { background: rgba(30,75,74,0.12); color: var(--primary-text); border-color: var(--primary); }
.a11y-btn:disabled { opacity: 0.3; cursor: default; }

@media (max-width: 900px) { .a11y-bar { display: none; } }

/* ---- EN BREF ---- */
.en-bref {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(30,75,74,0.06);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin-bottom: 36px;
  margin-top: -8px;
}
.en-bref-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-text);
  white-space: nowrap;
  margin-top: 2px;
  font-family: var(--font-deca);
}
.en-bref p {
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}


/* ---- SECTION DIAGNOSTIC — TIMELINE ---- */
.diag-timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto 48px;
}

.diag-timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: 44px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 2px;
}

.diag-step {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.diag-step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-deca);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 5px var(--bg);
}

.diag-step:last-child .diag-step-num {
  background: var(--accent);
}

.diag-step-content {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.diag-step-content h3 { font-size: 1rem; margin-bottom: 6px; color: var(--text); }
.diag-step-content p  { font-size: 0.86rem; color: var(--text-light); line-height: 1.65; margin: 0; }
.diag-step-content p + p { margin-top: 8px; }

.diag-step-tip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 9px 13px;
  background: rgba(30,75,74,0.06);
  border-radius: var(--radius-sm);
  font-size: 0.81rem;
  color: var(--text-light);
  line-height: 1.5;
}

.diag-step-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-deca);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary-text);
  margin-bottom: 6px;
}
.diag-step:last-child .diag-step-tag { color: var(--accent); }

.diag-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.diag-info-card {
  background: linear-gradient(135deg, var(--dark), var(--dark2));
  border-radius: var(--radius);
  padding: 28px 24px;
  color: #fff;
}
.diag-info-card h4 { font-size: 0.9rem; color: var(--accent); margin-bottom: 12px; font-family: var(--font-deca); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; }
.diag-info-card p  { font-size: 0.88rem; color: rgba(255,255,255,0.75); line-height: 1.6; margin: 0; }
.diag-info-card p + p { margin-top: 8px; }
.diag-info-card strong { color: #fff; }
.diag-info-card a { color: var(--accent); }

/* ---- FAQ ---- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }

.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: 22px 0;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  line-height: 1.5;
}
.faq-question:hover { color: var(--primary-text); }
.faq-q-inner { display: flex; align-items: flex-start; gap: 12px; }
.faq-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.75;
}
.faq-icon .def-icon-svg { width: 20px; height: 20px; }
.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary-text);
  flex-shrink: 0;
  line-height: 1;
  transition: transform var(--transition);
  margin-left: auto;
}
.faq-item.open .faq-question { color: var(--primary-text); }
.faq-item.open .faq-question::after { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.faq-item.open .faq-answer { max-height: 600px; }

.faq-answer-inner {
  padding: 0 0 24px 36px;
  border-left: 2px solid rgba(30,75,74,0.15);
  margin-left: 12px;
  margin-bottom: 4px;
}
.faq-answer p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.75;
  margin: 0;
}
.faq-answer p + p { margin-top: 10px; }
.faq-answer a { color: var(--primary-text); }
.faq-source {
  display: block;
  margin-top: 10px;
  font-size: 0.75rem;
  color: rgba(30,75,74,0.5);
  font-style: italic;
}

/* ================================================
   LES TROUBLES DYS — styles spécifiques
   ================================================ */

/* ---- GRILLE OVERVIEW LES-DYS ---- */
.dys-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}
@media (max-width: 900px) { .dys-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .dys-grid { grid-template-columns: 1fr; } }

/* ---- CARTE DYS ---- */
.dys-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  border: 2px solid transparent;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dys-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dys-card--orth:hover { border-color: #1E4B4A; }
.dys-card--calc:hover { border-color: #C97A3D; }
.dys-card--prax:hover { border-color: #D9A441; }
.dys-card--phas:hover { border-color: #E2637A; }
.dys-card--graph:hover { border-color: #E07248; }

.dys-card-header {
  padding: 28px 24px 22px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}
.dys-card-concept {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.72);
  margin-bottom: 4px;
}
.dys-card-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  line-height: 1.15;
}
/* gradients par trouble */
.dys-header--orth  { background: linear-gradient(135deg, #123332 0%, #3D6D6B 100%); }
.dys-header--calc  { background: linear-gradient(135deg, #2AA897 0%, #60D4C4 100%); }
.dys-header--prax  { background: linear-gradient(135deg, #C49000 0%, #F0BC2E 100%); }
.dys-header--phas  { background: linear-gradient(135deg, #D93B60 0%, #FF7A96 100%); }
.dys-header--graph { background: linear-gradient(135deg, #C05520 0%, #F08050 100%); }

.dys-card-body {
  padding: 18px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.dys-card-desc { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; flex: 1; }
.dys-card-stat {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  width: fit-content;
}
.stat--orth  { background: rgba(30,75,74,0.1);  color: #123332; }
.stat--calc  { background: rgba(42,168,151,0.12); color: #2AA897; }
.stat--prax  { background: rgba(196,144,0,0.12);  color: #9A7000; }
.stat--phas  { background: rgba(217,59,96,0.1);   color: #C03355; }
.stat--graph { background: rgba(192,85,32,0.1);   color: #A0441A; }
.dys-card-link { font-size: 0.875rem; font-weight: 700; }
.link--orth  { color: #123332; }
.link--calc  { color: #2AA897; }
.link--prax  { color: #9A7000; }
.link--phas  { color: #C03355; }
.link--graph { color: #A0441A; }

/* ---- BLOC INTRO PAGE DYS ---- */
.dys-intro-block {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px 32px;
  border-left: 4px solid var(--primary);
  margin-bottom: 28px;
}
.dys-intro-block p { font-size: 1rem; line-height: 1.78; color: var(--text); margin: 0; }
.dys-intro-block p + p { margin-top: 12px; }
.dys-intro-block strong { color: var(--primary-text); }

/* variantes couleur par trouble */
.dys-intro-block--orth  { border-color: #1E4B4A; }
.dys-intro-block--orth  strong { color: #123332; }
.dys-intro-block--calc  { border-color: #C97A3D; }
.dys-intro-block--calc  strong { color: #2AA897; }
.dys-intro-block--prax  { border-color: #D9A441; }
.dys-intro-block--prax  strong { color: #9A7000; }
.dys-intro-block--phas  { border-color: #E2637A; }
.dys-intro-block--phas  strong { color: #C03355; }
.dys-intro-block--graph { border-color: #E07248; }
.dys-intro-block--graph strong { color: #A0441A; }

/* ---- BOITES AMÉNAGEMENTS ---- */
.accom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}
.accom-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
}
.accom-box h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary-text);
  margin-bottom: 14px;
  font-family: var(--font-deca);
}
.accom-box ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.accom-box li {
  font-size: 0.875rem;
  color: var(--text-light);
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}
.accom-box li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-text);
  font-weight: 700;
  font-size: 0.78rem;
}
@media (max-width: 600px) { .accom-grid { grid-template-columns: 1fr; } }

/* ---- NAVIGATION ENTRE PAGES DYS ---- */
.dys-nav-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.dys-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 24px;
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid;
  transition: all var(--transition);
  white-space: nowrap;
}
.dys-chip:hover { transform: translateY(-2px); }
.dys-chip--orth  { border-color: #1E4B4A; color: #123332; background: rgba(30,75,74,0.06); }
.dys-chip--calc  { border-color: #C97A3D; color: #2AA897; background: rgba(201,122,61,0.07); }
.dys-chip--prax  { border-color: #F0BC2E; color: #9A7000; background: rgba(240,188,46,0.08); }
.dys-chip--phas  { border-color: #E2637A; color: #C03355; background: rgba(226,99,122,0.07); }
.dys-chip--graph { border-color: #E07248; color: #A0441A; background: rgba(224,114,72,0.07); }
.dys-chip--all   { border-color: var(--border); color: var(--text-light); background: var(--bg-alt); }

/* ---- SECTION AUDIENCES (pour qui) ---- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.audience-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.audience-icon { font-size: 2rem; line-height: 1; }
.audience-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.audience-desc { font-size: 0.875rem; color: var(--text-light); line-height: 1.65; flex: 1; }
@media (max-width: 900px) { .audience-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .audience-grid { grid-template-columns: 1fr; } }

/* ---- SECTION TAG colorée par trouble ---- */
.section-tag--orth  { background: rgba(30,75,74,0.12); color: #123332; }
.section-tag--calc  { background: rgba(201,122,61,0.12);  color: #2AA897; }
.section-tag--prax  { background: rgba(240,188,46,0.12);  color: #9A7000; }
.section-tag--phas  { background: rgba(226,99,122,0.12); color: #C03355; }
.section-tag--graph { background: rgba(224,114,72,0.12);  color: #A0441A; }

/* ---- LISTE LABEL : DESCRIPTION (feat-list) — layout vertical ---- */
.feat-list {
  list-style: none;
  margin-top: 14px;
}
.feat-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.6;
}
.feat-list li:last-child { border-bottom: none; padding-bottom: 0; }
.feat-key {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  white-space: nowrap;
}
.feat-val {
  display: block;
  color: var(--text-light);
}

/* ---- ANIMATION fade-in (extend anim targets) ---- */
.dys-card, .audience-card { opacity: 0; transform: translateY(20px); }

/* ---- DYSAIDE ---- */
.dysaide-badge {
  display: inline-block;
  margin-top: 20px;
  background: rgba(30,75,74,0.12);
  color: var(--primary-dark);
  font-family: var(--font-deca);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(30,75,74,0.25);
}

.dysaide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Phases */
.dysaide-phases {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}
.dysaide-phase {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: all var(--transition);
}
.dysaide-phase--active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,75,74,0.08);
}
.dysaide-phase-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.dysaide-phase-num {
  font-family: var(--font-deca);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
}
.dysaide-phase-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--border);
  color: var(--text-light);
}
.dysaide-phase-status--active {
  background: rgba(30,75,74,0.12);
  color: var(--primary-dark);
}
.dysaide-phase-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.dysaide-phase-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

/* Notification block */
.dysaide-notify-block {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 0;
}
.dysaide-notify-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
.dysaide-notify-block h2 {
  margin-bottom: 14px;
}
.dysaide-notify-block p {
  color: var(--text-light);
  margin-bottom: 28px;
}

/* Responsive */
@media (max-width: 640px) {
  .dysaide-grid { grid-template-columns: 1fr; }
}

/* ================================================
   ARTICLES — page liste & page article
   ================================================ */

/* ---- GRILLE ARTICLES ---- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 8px;
}
@media (max-width: 720px) { .articles-grid { grid-template-columns: 1fr; } }

.articles-grid--home { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .articles-grid--home { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .articles-grid--home { grid-template-columns: 1fr; } }

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* ---- CARTE ARTICLE ---- */
.article-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: var(--text);
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.article-card-band {
  height: 6px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}
.article-card-body {
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.article-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.article-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(30,75,74,0.10);
  color: var(--primary-dark);
}
.article-card-date {
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
}
.article-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin: 0;
}
.article-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
  flex: 1;
  margin: 0;
}
.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.article-card-read {
  font-size: 0.8rem;
  color: var(--text-light);
}
.article-card-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-text);
  transition: gap var(--transition);
}
.article-card:hover .article-card-link { letter-spacing: 0.03em; }

/* ---- ZONE HERO ARTICLE ---- */
.section-article-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 80px 0 44px;
}
/* Contenu article : padding réduit (la hero zone fait déjà la séparation) */
.section-article-content {
  padding: 48px 0 80px;
}

/* ---- PAGE ARTICLE (article-page) ---- */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: rgba(30,75,74,0.08);
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  margin-bottom: 24px;
  transition: background var(--transition), color var(--transition);
}
.article-back:hover {
  background: rgba(30,75,74,0.15);
  color: var(--primary-text);
}

.article-header {
  max-width: 740px;
  text-align: left;
}
.article-header-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(30,75,74,0.10);
  color: var(--primary-dark);
  margin-bottom: 16px;
}
.article-header h1 {
  font-size: clamp(1.3rem, 1.8vw, 1.65rem);
  line-height: 1.3;
  margin-bottom: 14px;
}
.article-header-sub {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 620px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-light);
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.article-meta-sep { color: var(--border); }
@media (max-width: 480px) {
  .article-meta { gap: 8px; }
  .article-meta-sep { display: none; }
}

/* ---- CORPS ARTICLE ---- */
.article-body {
  max-width: 740px;
  margin: 0 auto;
}
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 52px;
  margin-bottom: 18px;
  color: var(--text);
  padding-top: 16px;
  border-top: 2px solid rgba(30,75,74,0.12);
}
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 12px;
  color: var(--text);
}
.article-body p {
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 18px;
  color: var(--text);
}
.article-body ul {
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-body ul li {
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: 24px;
  position: relative;
  color: var(--text);
}
.article-body ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-text);
  font-weight: 700;
}
.article-body .source-inline {
  font-size: 0.75rem;
  color: rgba(30,75,74,0.5);
  font-style: italic;
  margin-top: -10px;
  margin-bottom: 22px;
}

/* Pull quote */
.article-quote {
  margin: 36px 0;
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(30,75,74,0.06) 0%, rgba(226,99,122,0.05) 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-quote p {
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

/* Encadré "En bref" réutilisé */
.article-body .en-bref { margin: 28px 0; }

/* Section-fin article : lien retour + navigation */
.article-nav {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.article-nav-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-light);
}
.article-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.article-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}
.article-nav-link:hover {
  border-color: var(--primary);
  color: var(--primary-text);
  background: rgba(30,75,74,0.05);
}

/* Signature auteur */
.article-signature {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}
.article-signature p {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin: 0;
}
.article-signature-name {
  display: block;
  margin-top: 12px;
  font-weight: 700;
  font-style: normal;
  color: var(--primary-text);
  font-size: 0.95rem;
}

/* ---- TESTIMONIALS ---- */
#testimonials {
  background: var(--bg-alt);
}

/* Scroll horizontal */
.testi-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 24px;
  margin-bottom: 48px;
  scrollbar-width: none;
}

.testi-scroll::-webkit-scrollbar { display: none; }

.testi-scroll--centered {
  justify-content: center;
  flex-wrap: wrap;
  overflow-x: visible;
}

.testi-card {
  flex: 0 0 260px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.testi-card-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.testi-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-text);
  line-height: 1.3;
  text-transform: capitalize;
}

.testi-role-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-text);
  background: rgba(30,75,74,0.1);
  border-radius: 20px;
  padding: 2px 9px;
  line-height: 1.6;
}

.testi-excerpt {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.65;
  margin: 0;
}

.testi-voir-plus {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-text);
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}

.testi-voir-plus:hover { opacity: 0.75; }

/* Modal */
.testi-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,46,0.65);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(3px);
}

.testi-modal-overlay[hidden] { display: none; }

.testi-modal-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalIn 0.22s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.testi-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 6px;
}

.testi-modal-close:hover { color: var(--text); }

.testi-modal-quote {
  font-size: 3rem;
  line-height: 0.8;
  color: var(--primary-text);
  opacity: 0.15;
  font-family: Georgia, serif;
  display: block;
  margin-bottom: 16px;
  user-select: none;
}

.testi-modal-msg {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 20px;
}

.testi-modal-author {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.testi-modal-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-text);
}

.testi-modal-role {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Form */
.testi-form-wrap {
  background: var(--card-bg);
  border-radius: var(--radius);
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.testi-form-header {
  padding: 32px 48px 28px;
  border-bottom: 1px solid var(--border);
}

.testi-form-body {
  padding: 32px 48px 48px;
}

.testi-form-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(30,75,74,0.12), rgba(201,122,61,0.12));
  color: var(--primary-text);
  border: 1px solid rgba(30,75,74,0.2);
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
  width: fit-content;
}

.testi-form-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.35;
}

.testi-form-sub {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.testi-honey {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.testi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.testi-field {
  margin-bottom: 20px;
}

.testi-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.testi-label .required-star {
  color: var(--secondary);
  margin-left: 2px;
}

.testi-input,
.testi-select,
.testi-textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.6;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.testi-input:focus,
.testi-select:focus,
.testi-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 75, 74, 0.12);
}

.testi-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%236B7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.testi-textarea {
  resize: vertical;
  min-height: 130px;
}

.testi-char-count {
  display: block;
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 5px;
}

.testi-required-note {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.5;
}

.testi-required-note .required-star {
  color: var(--secondary);
}

.testi-feedback {
  display: none;
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.testi-error {
  background: rgba(226, 99, 122, 0.1);
  color: #b5183a;
  border: 1px solid rgba(226, 99, 122, 0.3);
}

.testi-feedback.show {
  display: block;
}

.testi-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.testi-submit--off {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.testi-success {
  display: none;
  text-align: center;
  padding: 40px 24px;
}

.testi-success.show {
  display: block;
}

.testi-success-icon {
  display: block;
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 12px;
}

.testi-success strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 8px;
}

.testi-success p {
  color: var(--text-light);
  font-size: 0.9rem;
}

@media (max-width: 560px) {
  .testi-row { grid-template-columns: 1fr; }
  .testi-modal-box { padding: 32px 20px; }

  /* ---- FORM TÉMOIGNAGES — version mobile dark ---- */
  .testi-form-wrap {
    border-radius: var(--radius);
    box-shadow: 0 12px 48px rgba(26,26,46,0.22);
    background: linear-gradient(160deg, var(--dark) 0%, var(--dark2) 100%);
    border: 1px solid rgba(255,255,255,0.06);
  }

  .testi-form-header {
    padding: 28px 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
  }

  .testi-form-tag {
    background: rgba(30,75,74,0.25);
    border-color: rgba(30,75,74,0.4);
    color: rgba(255,255,255,0.85);
  }

  .testi-form-title {
    font-size: 1.4rem;
    color: white;
  }

  .testi-form-sub {
    color: rgba(255,255,255,0.60);
    font-size: 0.875rem;
  }

  .testi-form-body {
    padding: 24px 20px 28px;
  }

  .testi-label {
    color: rgba(255,255,255,0.80);
  }

  .testi-required-note {
    color: rgba(255,255,255,0.38);
  }

  .testi-char-count {
    color: rgba(255,255,255,0.38);
  }

  .testi-input,
  .testi-select,
  .testi-textarea {
    font-size: 16px; /* évite le zoom iOS */
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.16);
    color: white;
  }

  .testi-input::placeholder,
  .testi-textarea::placeholder {
    color: rgba(255,255,255,0.28);
  }

  .testi-input:focus,
  .testi-select:focus,
  .testi-textarea:focus {
    background: rgba(255,255,255,0.11);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,75,74,0.28);
  }

  .testi-select option {
    background: var(--dark);
    color: white;
  }

  .testi-error {
    background: rgba(226,99,122,0.15);
    border-color: rgba(226,99,122,0.35);
    color: #ff9ab5;
  }

  .testi-success strong {
    color: white;
  }

  .testi-success p {
    color: rgba(255,255,255,0.60);
  }
}

/* ============================================================
   ACCESSIBILITÉ : mouvement réduit
   app.css neutralise déjà ses animations ; ce bloc couvre les
   transitions/animations définies ici (nav, cartes, boutons)
   pour les personnes sensibles au mouvement.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Lien vers le site cerveau-singulier.fr (voir nav.php) ---- */
.nav-external-link {
  background: linear-gradient(135deg, rgba(30,75,74,0.10), rgba(201,122,61,0.10));
  border: 1px solid var(--border);
  font-weight: 700 !important;
}
.nav-external-link:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(30,75,74,0.16), rgba(201,122,61,0.16));
}
.nav-external-link .nav-link-icon { color: var(--accent); }
