/*
Theme Name: Herpsa EduTech
Theme URI: https://herpsa.com
Author: Herpsa
Description: Thème pédagogique pour cours d'éco-gestion — STMG, BTS NDRC/CI/MCO, Terminale Générale, Seconde.
Version: 1.7.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: herpsa
*/

:root {
  /* FIX #11 — Déclare explicitement que le thème est light-only.
     Sans cette déclaration, le navigateur peut appliquer des styles dark natifs
     (scrollbars, inputs, select) même si prefers-color-scheme: dark n'est pas géré. */
  color-scheme: light;

  /* ── Palette principale ── */
  --primary:       #1e3a5f;
  --primary-light: #2c5282;
  --accent:        #d4a843;
  --accent-light:  #e8c86e;

  /* ── Nuances slate ── */
  --slate-50:  #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0;
  --slate-300: #cbd5e1; --slate-400: #94a3b8; --slate-500: #64748b;
  --slate-600: #475569; --slate-700: #334155; --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;

  /* ── Tokens ── */
  --radius: 0.5rem; --radius-xl: 1rem; --radius-2xl: 1.25rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0/.05);
  --shadow:    0 1px 3px 0 rgb(0 0 0/.1),0 1px 2px -1px rgb(0 0 0/.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0/.1),0 8px 10px -6px rgb(0 0 0/.1);

  /* ── Layout ── */
  --page-pad: 1.5rem;
  --bg-alt:   #f8fafc;
  --border:   #e2e8f0;

  /* ── Badges de niveau ── */
  --badge-blue-bg:     #eff6ff;
  --badge-blue-text:   #1d4ed8;
  --badge-blue-border: #bfdbfe;
  --badge-blue2-bg:    #dbeafe;
  --badge-blue2-text:  #1d4ed8;
  --badge-blue2-border:#bfdbfe;
  --badge-blue3-text:  #1e40af;
  --badge-blue4-bg:    #eff6ff;

  --badge-green-bg:      #dcfce7;
  --badge-green-text:    #166534;
  --badge-green-border:  #a7f3d0;
  --badge-green-light:   #ecfdf5;
  --badge-green2-text:   #047857;
  --badge-green3-text:   #15803d;
  --badge-green3-border: #a7f3d0;

  --badge-purple-bg:      #f5f3ff;
  --badge-purple-text:    #6d28d9;
  --badge-purple-border:  #ddd6fe;
  --badge-purple2-bg:     #faf5ff;
  --badge-purple2-text:   #7e22ce;
  --badge-purple2-border: #e9d5ff;
  --badge-purple2-light:  #f5f3ff;
  --badge-purple3-text:   #6d28d9;

  --badge-amber-bg:      #fffbeb;
  --badge-amber-text:    #b45309;
  --badge-amber-border:  #fde68a;
  --badge-amber2-text:   #b45309;

  --badge-cyan-bg:     #ecfeff;
  --badge-cyan-text:   #0e7490;
  --badge-cyan-border: #a5f3fc;
  --badge-cyan2-text:  #0e7490;

  --badge-red-bg:      #fff1f2;
  --badge-red-text:    #be123c;
  --badge-red-border:  #fecdd3;
  --badge-red2-bg:     #fff1f2;
  --badge-red2-text:   #e11d48;
  --badge-red2-border: #fecaca;
  --badge-red3-text:   #be123c;

  --badge-pink-bg:    #fff5f5;
  --badge-cream-bg:   #fffdf5;

  --badge-orange-bg:     #fff7ed;
  --badge-orange-text:   #c2410c;
  --badge-orange-border: #fed7aa;
  --badge-orange2-text:  #c2410c;
  --badge-orange3-text:  #9a3412;

  --badge-fuchsia-bg:   #fdf4ff;
  --badge-fuchsia-text: #a21caf;

  --badge-lime-bg:    #f7fee7;

  --badge-rose-text:  #be123c;
  --badge-rose2-text: #e11d48;

  --badge-sky-text:  #0369a1;
  --badge-sky2-text: #0ea5e9;

  --badge-violet-text:  #5b21b6;
  --badge-violet2-text: #7c3aed;

  --badge-yellow-bg:     #fefce8;
  --badge-yellow-border: #fef08a;
  --badge-yellow2-text:  #854d0e;

  --badge-emerald-text: #047857;

  /* ── Couleurs de badges sémantiques (compatibilité) ── */
  --badge-blue-bg:    #eff6ff;
  --badge-blue-text:  #1d4ed8;
  --badge-blue-border:#bfdbfe;
  --badge-amber-bg:   #fffbeb;
  --badge-amber-text: #b45309;
  --badge-amber-border:#fde68a;
  --badge-purple-bg:  #f5f3ff;
  --badge-purple-text:#6d28d9;
  --badge-purple-border:#ddd6fe;
  --badge-cyan-bg:    #ecfeff;
  --badge-cyan-text:  #0e7490;
  --badge-cyan-border:#a5f3fc;
  --badge-red-bg:     #fff1f2;
  --badge-red-text:   #be123c;
  --badge-red-border: #fecdd3;
  --badge-green-bg:   #dcfce7;
  --badge-green-text: #166534;
  --badge-green-border:#a7f3d0;

  /* FIX #9 — Offset unique pour scroll-margin-top : header(64px) + topbar(≈62px) + gap(16px).
     Valeur centralisée ici — toutes les ancres de la page cours la référencent. */
  --scroll-offset: 148px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  font-size: 1rem; line-height: 1.6;
  color: var(--slate-800); background: var(--slate-50);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:hover { color: var(--primary-light); }
button { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5rem; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; color: var(--slate-800); letter-spacing: -0.025em; margin-top: 0; }
h1 { font-size: clamp(1.875rem, 4vw, 3.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; } h4 { font-size: 1.125rem; }
p  { color: var(--slate-500); margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  /* FIX #7 — Fallback opaque si backdrop-filter non supporté (anciens Android).
     @supports isole le fond semi-transparent au contexte où blur est disponible. */
  background: #ffffff;
  border-bottom: 1px solid rgba(226,232,240,.60);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.site-branding a { display: flex; align-items: center; gap: .75rem; color: inherit; }
.logo-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg,var(--primary),var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); transition: box-shadow .2s;
}
.site-branding a:hover .logo-icon { box-shadow: var(--shadow-lg); }
.logo-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.logo-text { display: none; }
@media (min-width:640px){ .logo-text { display: block; } }
.logo-name { font-size: 1.125rem; font-weight: 800; color: var(--slate-800); line-height: 1; letter-spacing: -0.03em; }
.logo-sub  { font-size: 12px; /* FIX #8 — 11px → 12px min lisible sur mobile */ color: var(--slate-500); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.main-navigation { display: none; }
@media (min-width:768px){ .main-navigation { display: flex; align-items: center; gap: .25rem; } }
.main-navigation ul li { margin: 0; }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.menu-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius);
  border: none; background: transparent; cursor: pointer; color: var(--slate-700); transition: background .2s;
  /* zone de clic min. 44×44 px — WCAG 2.5.5 */
  touch-action: manipulation;
}
.menu-toggle:hover { background: var(--slate-100); }
.menu-toggle svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
@media (min-width:768px){ .menu-toggle { display: none; } }
/* FIX #7 — mobile-nav : rgba(.95) est quasi-opaque et lisible sans blur comme fallback. */
.mobile-nav { display: none; border-top: 1px solid var(--slate-100); background: rgba(255,255,255,.95); }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .mobile-nav { backdrop-filter: blur(20px); }
}
.mobile-nav.is-open { display: block; }
@media (min-width:768px){ .mobile-nav { display: none !important; } }
.mobile-nav ul { list-style: none; margin: 0; padding: .75rem 1rem; display: flex; flex-direction: column; gap: .25rem; }
.mobile-nav ul li { margin: 0; }
.mobile-nav ul li a {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; border-radius: 12px;
  font-size: .875rem; font-weight: 500; color: var(--slate-600); transition: all .2s;
}
.mobile-nav ul li a:hover { background: var(--slate-100); }
.mobile-nav ul li.current-menu-item > a { background: var(--primary); color: var(--white); }

/* FIX #3 — Sous-menus niveau 2 dans le panneau mobile (depth: 2).
   Indentation visuelle + taille réduite pour distinguer du niveau 1. */
.mobile-nav ul ul {
  padding: .25rem .5rem .25rem 1.25rem;
  gap: 0;
  border-left: 2px solid var(--slate-100);
  margin: .125rem 0 .25rem 1.25rem;
}
.mobile-nav ul ul li a {
  font-size: .8125rem;
  font-weight: 400;
  color: var(--slate-500);
  padding: .5rem .875rem;
  border-radius: 8px;
  min-height: 40px;
}
.mobile-nav ul ul li a:hover { background: var(--slate-100); color: var(--slate-700); }
.mobile-nav ul ul li.current-menu-item > a { background: var(--badge-blue-bg); color: var(--primary); font-weight: 600; }

/* ── HERO ── */
.hero-section {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg,var(--primary) 0%,var(--primary-light) 50%,var(--primary) 100%);
  /* FIX #4 — Padding mobile réduit : 6rem/8rem → 2.5rem/3.5rem pour garder les CTA dans le fold. */
  padding: 2.5rem 1.25rem 3.5rem;
}
@media (min-width: 640px) { .hero-section { padding: 4rem 1.5rem 5rem; } }
@media (min-width: 1024px) { .hero-section { padding: 6rem 1.5rem 8rem; } }
.hero-decorations { position: absolute; inset: 0; pointer-events: none; }

/*
 * FIX #13 — Blobs (filter: blur 60px sur 288–384px) et rings (600×400px) sont
 * coûteux en GPU sur appareils mobiles bas de gamme. Stratégie progressive :
 *  - < 640px   : éléments masqués (content: '' + display: none via contains:layout)
 *  - 640–1023px : blobs réduits + blur diminué
 *  - ≥ 1024px  : rendu complet d'origine
 */
.hero-blob-1,
.hero-blob-2,
.hero-ring-1,
.hero-ring-2 { display: none; } /* masqués par défaut (mobile) */

@media (min-width: 640px) {
  .hero-blob-1 {
    display: block;
    position: absolute; top: 80px; left: 40px;
    width: 180px; height: 180px;
    background: rgba(212,168,67,.10); border-radius: 50%;
    filter: blur(32px); /* 60px → 32px : charge GPU réduite */
  }
  .hero-blob-2 {
    display: block;
    position: absolute; bottom: 40px; right: 80px;
    width: 240px; height: 240px;
    background: rgba(255,255,255,.05); border-radius: 50%;
    filter: blur(32px);
  }
  /* Rings : visibles uniquement sur tablette+ */
  .hero-ring-1,
  .hero-ring-2 { display: block; }
  .hero-ring-1 {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 480px; height: 480px;
    border: 1px solid rgba(255,255,255,.05); border-radius: 50%;
  }
  .hero-ring-2 {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 320px; height: 320px;
    border: 1px solid rgba(255,255,255,.05); border-radius: 50%;
    will-change: auto; contain: strict;
  }
}

@media (min-width: 1024px) {
  /* Restitution des dimensions et blur d'origine sur desktop */
  .hero-blob-1 { width: 288px; height: 288px; filter: blur(60px); }
  .hero-blob-2 { width: 384px; height: 384px; filter: blur(60px); }
  .hero-ring-1 { width: 600px; height: 600px; }
  .hero-ring-2 { width: 400px; height: 400px; }
}

/* Respect de prefers-reduced-motion : supprimer les animations de blobs si existantes */
@media (prefers-reduced-motion: reduce) {
  .hero-blob-1, .hero-blob-2, .hero-ring-1, .hero-ring-2 { display: none; }
}
.hero-content { position: relative; max-width: 1280px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem; border-radius: 9999px;
  background: rgba(255,255,255,.10); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.10); margin-bottom: 2rem;
}
.hero-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(.9)} }
.hero-badge span { font-size: .875rem; color: rgba(255,255,255,.80); font-weight: 500; }
/* FIX #4 — Plancher clamp réduit : 2.8rem (44.8px) → 1.75rem (28px) pour éviter que le titre repousse les CTA hors du fold sur petits écrans. */
.hero-title { font-size: clamp(1.75rem,7vw,4.5rem); color: var(--accent); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin: 0; }
.hero-title-accent { display: block; color: var(--accent); }
.hero-description { margin-top: 1.5rem; font-size: 1.125rem; color: var(--slate-300); line-height: 1.7; max-width: 560px; }
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .875rem 2rem; background: var(--accent); color: var(--primary);
  font-size: 1rem; font-weight: 600; border-radius: 12px; border: none; cursor: pointer;
  box-shadow: 0 4px 24px rgba(212,168,67,.30); transition: all .2s; text-decoration: none;
}
.btn-primary:hover { background: var(--accent-light); color: var(--primary); box-shadow: 0 8px 32px rgba(212,168,67,.40); transform: translateY(-1px); }
.btn-primary svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
.btn-outline {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .875rem 2rem; background: rgba(255,255,255,.15); color: var(--white);
  font-size: 1rem; font-weight: 500; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.20); cursor: pointer;
  transition: background .2s; text-decoration: none;
  /* FIX #7 — Fond légèrement plus opaque (.15) comme fallback si blur indisponible. */
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .btn-outline { background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
}
.btn-outline:hover { background: rgba(255,255,255,.15); color: var(--white); }
.btn-outline svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
.hero-wave { position: absolute; bottom: 0; left: 0; right: 0; line-height: 0; }
.hero-wave svg { width: 100%; display: block; }

/* ── QUICK ACCESS CARDS ── */
.quick-access { max-width: 1280px; margin: -2rem auto 0; padding: 0 1.5rem; position: relative; z-index: 10; }
.quick-access-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width:640px)  { .quick-access-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width:1024px) { .quick-access-grid { grid-template-columns: repeat(4,1fr); } }
.quick-card {
  display: block; background: var(--white); border-radius: var(--radius-2xl);
  padding: 1.5rem; border: 1px solid var(--slate-100); box-shadow: var(--shadow-sm);
  transition: all .3s; color: inherit; text-decoration: none;
  min-height: 120px;
}
.quick-card:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); border-color: var(--slate-200); color: inherit; }
.quick-card-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; box-shadow: var(--shadow); }
.quick-card-icon svg { width: 24px; height: 24px; stroke: var(--white); stroke-width: 2; fill: none; }
.qc-blue    { background: linear-gradient(135deg,var(--badge-blue3-text),var(--badge-blue2-text)); }
.qc-emerald { background: linear-gradient(135deg,var(--badge-emerald-text),var(--badge-green3-text)); }
.qc-violet  { background: linear-gradient(135deg,var(--badge-violet2-text),var(--badge-violet-text)); }
.qc-amber   { background: linear-gradient(135deg,var(--badge-amber2-text),var(--badge-orange2-text)); }
.qc-cyan    { background: linear-gradient(135deg,var(--badge-cyan2-text),var(--badge-sky-text)); }
.qc-rose    { background: linear-gradient(135deg,var(--badge-rose-text),var(--badge-rose2-text)); }
.quick-card-title { font-size: 1.125rem; font-weight: 700; color: var(--slate-800); display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; }
.quick-card-arrow { width: 16px; height: 16px; stroke: var(--slate-300); stroke-width: 2; fill: none; transition: stroke .2s; }
.quick-card:hover .quick-card-arrow { stroke: var(--accent); }
.quick-card-desc { font-size: .875rem; color: var(--slate-500); line-height: 1.5; margin: 0; }

/* ── SECTION WRAPPER ── */
.section-wrapper { max-width: 1280px; margin: 0 auto; padding: 4rem 1.5rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--slate-800); margin: 0; }
.section-link { font-size: .875rem; font-weight: 500; color: var(--primary); display: flex; align-items: center; gap: .25rem; transition: color .2s; }
.section-link:hover { color: var(--primary-light); }
.section-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── RECENT 2/3 + 1/3 ── */
.recent-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width:1024px) { .recent-grid { grid-template-columns: 2fr 1fr; } }

.course-row-list { display: flex; flex-direction: column; gap: .75rem; }
.course-row {
  display: block; background: var(--white); border-radius: 12px;
  padding: 1.25rem; border: 1px solid var(--slate-100); transition: all .3s; color: inherit;
}
.course-row:hover { box-shadow: var(--shadow-lg); border-color: var(--slate-200); color: inherit; }
.course-row-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.course-row-body { flex: 1; min-width: 0; }
.course-row-title { font-weight: 600; color: var(--slate-800); transition: color .2s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: .5rem 0 .25rem; }
.course-row:hover .course-row-title { color: var(--primary); }
.course-row-desc { font-size: .875rem; color: var(--slate-500); margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.course-row-date { font-size: .75rem; color: var(--slate-500); white-space: nowrap; padding-top: .25rem; display: flex; align-items: center; gap: .25rem; }
.course-row-date svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── BADGES ── */
.badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .125rem .625rem; border-radius: 9999px; font-size: .75rem; font-weight: 500; border: 1px solid; }
.badge svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.badge-1stmg  { background:var(--badge-blue-bg); color:var(--badge-blue-text); border-color:var(--badge-blue-border); }
.badge-tstmg  { background:var(--badge-green-light); color:var(--badge-green2-text); border-color:var(--badge-green3-border); }
.badge-bts1   { background:var(--badge-purple-bg); color:var(--badge-purple-text); border-color:var(--badge-purple-border); }
.badge-bts2   { background:var(--badge-amber-bg); color:var(--badge-amber-text); border-color:var(--badge-amber-border); }
.badge-tg     { background:var(--badge-cyan-bg); color:var(--badge-cyan-text); border-color:var(--badge-cyan-border); }
.badge-seconde{ background:var(--badge-red-bg); color:var(--badge-red-text); border-color:var(--badge-red-border); }
.badge-outline { background:transparent; color:var(--slate-600); border-color:var(--slate-200); }

/* ── ANNOUNCEMENTS ── */
.announcements-list { display: flex; flex-direction: column; gap: .75rem; }
.ann-card.priority-urgent   { border-color: var(--badge-red2-border); background: var(--badge-pink-bg); }
.ann-card.priority-important{ border-color: var(--badge-amber-border); background: var(--badge-cream-bg); }
.ann-inner { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem 1.125rem; }
.ann-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.ann-dot.urgent    { background: var(--badge-red3-text); }
.ann-dot.important { background: var(--badge-amber2-text); }
.ann-meta    { display: flex; align-items: center; gap: .5rem; }
.ann-time    { font-size: 12px; color: var(--slate-500); }

/* ── COURSES PAGE ── */
.courses-page { max-width: 1280px; margin: 0 auto; padding: 3rem 1.5rem; }
.courses-page-header { margin-bottom: 0; padding: 2rem var(--page-pad) 0; background: var(--bg-alt); border-bottom: none; }
.courses-page-header-inner { display: flex; align-items: center; gap: .75rem; margin-bottom: .35rem; }
.courses-page-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.courses-page-icon svg { width: 22px; height: 22px; stroke: var(--white); stroke-width: 2; fill: none; }
.courses-page-header h1 { margin: 0; font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.courses-page-sub { color: var(--slate-500); margin: .25rem 0 0 56px; font-size: .875rem; }
.filters-bar { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
@media (min-width:640px){ .filters-bar { flex-direction: row; align-items: center; justify-content: space-between; } }
.filter-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-tab { padding: .4rem .875rem; border-radius: var(--radius); font-size: .8125rem; font-weight: 500; border: 1px solid var(--slate-200); background: var(--white); color: var(--slate-600); cursor: pointer; transition: all .2s; min-height: 44px; display: inline-flex; align-items: center; }
.filter-tab:hover  { border-color: var(--primary); color: var(--primary); }
.filter-tab.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--slate-400); stroke-width: 2; fill: none; pointer-events: none; }
/* FIX #1 — iOS auto-zoom : font-size ≥ 1rem requis sur les inputs (iOS Safari zoome si < 16px).
   FIX #15 — max-width restreint au contexte desktop uniquement. */
.search-input { padding: .5rem .75rem .5rem 2.25rem; border: 1px solid var(--slate-200); border-radius: var(--radius); background: var(--white); font-size: 1rem; color: var(--slate-800); width: 100%; outline: none; transition: border-color .2s; }
@media (min-width: 640px) { .search-input { max-width: 280px; } }
.search-input:focus { border-color: var(--primary); }
.subject-section { margin-bottom: 3rem; }
.subject-heading { font-size: 1.25rem; font-weight: 700; color: var(--slate-700); display: flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem; }
.subject-bar { width: 4px; height: 24px; background: var(--accent); border-radius: 2px; }
.subject-count { font-size: .875rem; font-weight: 400; color: var(--slate-500); margin-left: .25rem; }
.courses-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width:640px)  { .courses-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width:1024px) { .courses-grid { grid-template-columns: repeat(3,1fr); } }
.course-card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius-2xl); border: 1px solid var(--slate-100); overflow: hidden; transition: all .3s; color: inherit; text-decoration: none; }
.course-card:hover { box-shadow: var(--shadow-xl); border-color: var(--slate-200); transform: translateY(-2px); color: inherit; }
.card-thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg,var(--slate-100),var(--slate-50)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.course-card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb-placeholder { font-size: 2.25rem; font-weight: 700; color: var(--slate-200); }
.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-badges { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.card-title { font-weight: 700; color: var(--slate-800); font-size: .9375rem; line-height: 1.4; transition: color .2s; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: .5rem; }
.course-card:hover .card-title { color: var(--primary); }
.card-desc { font-size: .8125rem; color: var(--slate-500); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; flex: 1; margin-bottom: 1rem; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-date { font-size: .75rem; color: var(--slate-500); display: flex; align-items: center; gap: .25rem; }
.card-date svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
/* FIX #5 — card-cta visible par défaut (touch devices n'ont pas d'état hover durable).
   L'effet reveal au hover est conservé uniquement pour les dispositifs avec souris (pointer: fine). */
.card-cta { font-size: .75rem; font-weight: 500; color: var(--primary); display: flex; align-items: center; gap: .25rem; opacity: 1; transition: opacity .2s; }
.card-cta svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
@media (hover: hover) and (pointer: fine) {
  .card-cta { opacity: 0; }
  .course-card:hover .card-cta { opacity: 1; }
}

/* ── COURSE DETAIL ── */
.course-detail { max-width: 896px; margin: 0 auto; padding: 3rem 1.5rem; }
.back-link { display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--slate-500); transition: color .2s; margin-bottom: 2rem; }
.back-link:hover { color: var(--slate-700); }
.back-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.course-detail-header { margin-bottom: 2rem; }
.course-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.meta-date { font-size: .875rem; color: var(--slate-500); display: flex; align-items: center; gap: .25rem; }
.meta-date svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.course-detail-title { font-size: clamp(1.5rem,3vw,2.25rem); margin: 0 0 1rem; }
.course-detail-desc { font-size: 1.125rem; color: var(--slate-500); line-height: 1.7; margin: 0; }
.course-detail-image { border-radius: var(--radius-2xl); overflow: hidden; border: 1px solid var(--slate-100); margin-bottom: 2.5rem; }
.course-content-block { background: var(--white); border-radius: var(--radius-2xl); border: 1px solid var(--slate-100); padding: 2.5rem; margin-bottom: 2.5rem; }
.course-content-block h2,.course-content-block h3,.course-content-block h4 { color: var(--slate-800); margin-top: 1.5rem; margin-bottom: .75rem; }
.course-content-block p { color: var(--slate-600); }
.course-content-block a { color: var(--primary); text-decoration: underline; }
.course-content-block ul li,.course-content-block ol li { color: var(--slate-600); margin-bottom: .4rem; }
.course-content-block table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.course-content-block th { background: var(--primary); color: var(--white); padding: .625rem 1rem; text-align: left; }
.course-content-block td { padding: .6rem 1rem; border-bottom: 1px solid var(--slate-100); }
.course-content-block blockquote { border-left: 4px solid var(--accent); padding: .75rem 1.25rem; background: rgba(212,168,67,.08); border-radius: 0 8px 8px 0; margin: 1.5rem 0; }
.files-block { background: var(--slate-50); border-radius: var(--radius-2xl); border: 1px solid var(--slate-100); padding: 1.5rem; }
.files-block-title { font-weight: 700; color: var(--slate-800); display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.files-block-title svg { width: 20px; height: 20px; stroke: var(--primary); fill: none; stroke-width: 2; }
.file-item { display: flex; align-items: center; gap: .75rem; background: var(--white); border-radius: 12px; padding: 1rem; border: 1px solid var(--slate-100); transition: all .2s; margin-bottom: .5rem; color: inherit; }
.file-item:hover { box-shadow: var(--shadow); border-color: var(--slate-200); }
.file-icon { width: 40px; height: 40px; border-radius: 8px; background: rgba(30,58,95,.10); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.file-icon svg { width: 16px; height: 16px; stroke: var(--primary); fill: none; stroke-width: 2; }
.file-name { font-size: .875rem; font-weight: 500; color: var(--slate-700); transition: color .2s; }
.file-item:hover .file-name { color: var(--primary); }
.file-sub { font-size: .75rem; color: var(--slate-500); }

/* ── EMPTY STATE / SKELETON ── */
.empty-state { background: var(--white); border-radius: var(--radius-2xl); border: 1px solid var(--slate-100); padding: 3rem; text-align: center; }
.empty-state svg { width: 48px; height: 48px; stroke: var(--slate-300); fill: none; stroke-width: 1.5; margin: 0 auto 1rem; }
.empty-state h3 { font-size: 1.125rem; color: var(--slate-500); margin-bottom: .25rem; }
.empty-state p { font-size: .875rem; color: var(--slate-500); }
.skeleton { background: var(--slate-100); border-radius: var(--radius); animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ── RESOURCES — grille définie dans la section Cards ressources ci-dessous ── */
/* ── Breadcrumb (fil d'Ariane) ── */
.herpsa-breadcrumb {
  padding: .625rem var(--page-pad);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--slate-200);
}
.bc-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .8125rem;
  color: var(--slate-500);
}
.bc-item { display: flex; align-items: center; gap: .25rem; }
.bc-sep  { color: var(--slate-300); font-size: .75rem; }
.bc-link {
  color: var(--slate-500);
  text-decoration: none;
  transition: color .15s;
}
.bc-link:hover { color: var(--primary); text-decoration: underline; }
.bc-current { color: var(--slate-700); font-weight: 500; }

.site-footer { background: var(--primary); color: var(--white); margin-top: 4rem; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 3rem 1.5rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width:768px){ .footer-grid { grid-template-columns: repeat(3,1fr); } }
.footer-logo { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.footer-logo-icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.10); display: flex; align-items: center; justify-content: center; }
.footer-logo-icon svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 2; }
.footer-brand-name { font-size: 1.125rem; font-weight: 700; }
.footer-brand-sub  { font-size: .75rem; color: var(--slate-300); }
.footer-desc { font-size: .875rem; color: var(--slate-300); line-height: 1.6; margin: 0; }
.footer-nav-title,.footer-info-title { font-weight: 600; color: var(--accent); margin-bottom: 1rem; font-size: .9375rem; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav ul li { margin-bottom: .15rem; }
.footer-nav ul li a { font-size: .875rem; color: var(--slate-300); transition: color .2s; min-height: 44px; display: inline-flex; align-items: center; }
.footer-nav ul li a:hover { color: var(--white); }
.footer-info p { font-size: .875rem; color: var(--slate-300); line-height: 1.6; margin: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.10); margin-top: 1.25rem; padding-top: 1.25rem; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: .75rem; }
@media (min-width:640px){ .footer-bottom { flex-direction: row; } }
.footer-copy { font-size: .75rem; color: var(--slate-400); }
.footer-links { display: flex; gap: 1rem; }
.footer-links a { font-size: .75rem; color: var(--slate-400); transition: color .2s; }
.footer-links a:hover { color: var(--white); }

/* ── CONTACT ── */
/* FIX #1 — iOS auto-zoom : font-size ≥ 1rem (16px) sur tous les champs de saisie. */
.form-input,.form-textarea,.form-select { width: 100%; padding: .625rem .875rem; border: 1px solid var(--slate-200); border-radius: var(--radius); font-size: 1rem; font-family: inherit; color: var(--slate-800); background: var(--white); outline: none; transition: border-color .2s,box-shadow .2s; }
.form-input:focus,.form-textarea:focus,.form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,58,95,.10); }

/* ── PAGINATION ── */
.herpsa-pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 3rem; flex-wrap: wrap; }
/* FIX #2 — Cibles tactiles pagination : 36px → 44px (WCAG 2.5.5 recommande ≥ 44×44px). */
.herpsa-pagination a,.herpsa-pagination span { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius); font-size: .875rem; border: 1px solid var(--slate-200); background: var(--white); color: var(--slate-600); transition: all .2s; }
.herpsa-pagination a:hover { border-color: var(--primary); color: var(--primary); }
.herpsa-pagination .current { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ── UTILS ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ============================================================
   SINGLE COURS — UX MOBILE (single-cours.php)
   ============================================================ */

/* Wrapper global */
.sc-wrap {
  background: var(--slate-50);
  min-height: 100vh;
}

/* ── Topbar sticky progression ── */
.sc-topbar {
  position: sticky;
  top: 64px; /* colle sous le header sticky */
  left: 0;
  right: 0;
  z-index: 39;
  /* FIX #7 — Fallback opaque : rgba(255,255,255,0.97) reste quasi-opaque sans blur. */
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--slate-100);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .sc-topbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

/* Mobile-first — base = petits écrans */
.sc-topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 1rem 6px;
}
@media (min-width: 641px) {
  .sc-topbar-inner { padding: 10px 16px 8px; }
}
.sc-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px; /* FIX #8 — 11px → 12px minimum sur mobile */
  color: var(--slate-600);
  margin-bottom: 6px;
  transition: color .2s;
}
@media (min-width: 641px) {
  .sc-back { font-size: 13px; margin-bottom: 8px; }
}
.sc-back:hover { color: var(--primary); }
.sc-back svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sc-progress-bar {
  height: 4px;
  background: var(--slate-200);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 5px;
}
.sc-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  width: 0%;
  transition: width .4s ease;
}
.sc-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--slate-500);
}

/* ── Hero ── */
.sc-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
  padding: 24px 16px 32px;
}
.sc-hero-inner { max-width: 720px; margin: 0 auto; }
.sc-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sc-badge-ghost {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.2);
}
.sc-chapter-num {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 4px;
}
.sc-title {
  font-size: clamp(1.375rem, 5vw, 1.75rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -.025em;
  margin-bottom: 8px;
}
.sc-desc {
  font-size: 0.8125rem;
  color: var(--slate-300);
  line-height: 1.6;
  margin-bottom: 16px;
}
.sc-meta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sc-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.sc-meta-item svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc-meta-item strong { color: rgba(255,255,255,0.9); font-weight: 700; }

/* ── PDF CTA ── */
.sc-pdf-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  padding: 14px 16px;
  cursor: pointer;
  transition: background .2s;
  max-width: 720px;
  margin: 0 auto;
  min-height: 56px;
}
.sc-pdf-cta:hover { background: var(--accent-light); }
.sc-pdf-left { display: flex; align-items: center; gap: 12px; }
.sc-pdf-icon {
  width: 40px;
  height: 40px;
  background: rgba(30,58,95,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sc-pdf-icon svg { width: 20px; height: 20px; stroke: var(--primary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc-pdf-label { font-size: 0.875rem; font-weight: 700; color: var(--primary); line-height: 1; margin-bottom: 2px; }
.sc-pdf-sub { font-size: 12px; /* FIX #8 — 11px → 12px */ color: rgba(30,58,95,0.6); }
.sc-pdf-arrow { width: 18px; height: 18px; stroke: var(--primary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── Body wrapper ── */
/* ── Layout 2 colonnes : sidebar + contenu ── */
.sc-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
  display: grid;
  grid-template-columns: 1fr; /* mobile : 1 col */
  gap: 0;
}
.sc-body.has-toc {
  gap: 2rem;
}
@media (min-width: 1024px) {
  .sc-body.has-toc {
    display: grid;
    grid-template-columns: 240px 1fr;
    align-items: start;
  }
  .sc-toc-mobile-toggle { display: none; }
}

/* ── Ancres de section — compensation header sticky ── */
/* FIX #9 — Valeur unifiée via --scroll-offset (voir :root). Supprime l'incohérence
   entre les 156px ici et le calc(64+62+1rem) ≈ 142px sur .sc-content h3[id]. */
[id^="section-"],
[id^="herpsa-quiz-"] { scroll-margin-top: var(--scroll-offset); }

/* ── Colonne contenu principal (second item de grille) ── */
.sc-main-col { min-width: 0; display: flex; flex-direction: column; }

/* ── Sidebar sommaire ── */
.sc-sidebar {
  display: none; /* masqué sur mobile — bouton flottant à la place */
}
@media (min-width: 1024px) {
  .sc-sidebar {
    display: block;
    position: sticky;
    top: 140px; /* header 64px + topbar ~68px + gap 8px */
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

/* ── Sommaire ── */
.sc-toc {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  overflow: hidden;
}
.sc-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--slate-100);
}
.sc-toc-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-800);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sc-toc-title svg { width: 13px; height: 13px; stroke: var(--primary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc-toc-pct { display: none; }
.sc-toc-body { padding: 4px 0 6px; }

/* Items h2 */
.sc-toc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  transition: background .12s;
  text-decoration: none;
  min-height: 44px;
}
.sc-toc-item:hover { background: var(--slate-50); }
.sc-toc-active { background: var(--badge-blue-bg) !important; }

/* Items h3 — indentés */
.sc-toc-h3 {
  padding-left: 28px;
}
.sc-toc-h3 .sc-toc-num {
  width: 20px; height: 20px; font-size: 12px; /* FIX #8 — 11px → 12px */
  background: var(--slate-100);
}
.sc-toc-h3 .sc-toc-text { font-size: 13px; color: var(--slate-500); }
.sc-toc-h3.sc-toc-active .sc-toc-text { color: var(--primary); font-weight: 600; }

.sc-toc-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--slate-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; /* FIX #8 — 11px → 12px */ font-weight: 700; color: var(--slate-500);
  flex-shrink: 0; transition: all .2s;
}
.sc-toc-active .sc-toc-num { background: var(--primary); color: var(--white); }
.sc-toc-done .sc-toc-num   { background: var(--badge-green-light); color: var(--badge-green2-text); }
.sc-toc-text { font-size: 13px; color: var(--slate-500); line-height: 1.35; }
.sc-toc-active .sc-toc-text { color: var(--primary); font-weight: 600; }

/* ── Bouton mobile flottant — base = visible (mobile) ── */
.sc-toc-mobile-toggle {
  display: flex;
  align-items: center;
  gap: .5rem;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 38;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 9999px;
  padding: .625rem 1rem;
  font-size: .8125rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(30,58,95,.35);
  transition: transform .15s, box-shadow .15s;
}
.sc-toc-mobile-toggle:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(30,58,95,.4); }
.sc-toc-mobile-toggle svg { stroke: var(--white); }
/* Masqué sur desktop — déclaré dans @media (min-width: 1024px) ci-après */

/* Overlay sombre derrière le drawer */
.sc-toc-mobile-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 199;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Panneau TOC mobile (drawer du bas) */
.sc-toc-mobile-open .sc-sidebar {
  display: block;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  max-height: 60vh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0,0,0,.15);
  will-change: transform;
  transition: transform .25s ease;
}
.sc-toc-mobile-open .sc-toc { border-radius: 16px 16px 0 0; }

/* Poignée de glissement */
.sc-toc-mobile-open .sc-toc::before {
  content: '';
  display: block;
  width: 36px; height: 4px;
  background: var(--slate-200);
  border-radius: 2px;
  margin: 10px auto 2px;
}

/* ── Contenu éditorial ── */
.sc-content { padding: 8px 0; min-width: 0; width: 100%; }
.sc-content h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-800);
  margin: 2rem 0 .75rem;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.02em;
}
.sc-content h2::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.sc-content h3 { font-size: 1rem; font-weight: 700; color: var(--slate-700); margin: 1.25rem 0 .5rem; }
.sc-content p { font-size: 0.875rem; color: var(--slate-600); line-height: 1.75; margin-bottom: .875rem; }
.sc-content strong { color: var(--slate-800); font-weight: 700; }
.sc-content ul, .sc-content ol { padding-left: 1.25rem; margin-bottom: .875rem; }
.sc-content li { font-size: 0.875rem; color: var(--slate-600); line-height: 1.65; margin-bottom: .3rem; }
.sc-content a { color: var(--primary); text-decoration: underline; }
.sc-content blockquote {
  border-left: 4px solid var(--accent);
  padding: .75rem 1rem;
  background: rgba(212,168,67,.08);
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
  font-style: italic;
  font-size: 0.875rem;
  color: var(--slate-700);
}
.sc-content table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; margin: 1rem 0; overflow-x: auto; display: block; }
.sc-content th { background: var(--primary); color: var(--white); padding: 8px 10px; text-align: left; font-weight: 700; white-space: nowrap; }
.sc-content td { padding: 7px 10px; border-bottom: 1px solid var(--slate-100); }
.sc-content tr:nth-child(even) td { background: var(--slate-50); }

/* Blocs pédagogiques Gutenberg */
.wp-block-notion-cle,
.sc-content .notion-cle {
  background: var(--badge-blue-bg);
  border: 1px solid var(--badge-blue-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 1rem 0;
}
.wp-block-notion-cle strong,
.sc-content .notion-cle strong { color: var(--primary); }

.wp-block-a-retenir,
.sc-content .a-retenir {
  background: var(--badge-yellow-bg);
  border: 1px solid var(--badge-amber-border);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  margin: 1rem 0;
}

/* ── Labels de section ── */
.sc-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin: 2rem 0 .875rem;
  padding-left: .75rem;
  border-left: 3px solid var(--accent);
}
.sc-section-label svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── Bloc vidéo ── */
.sc-video-block { margin: 0 0 8px; }
.sc-video-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--slate-900);
  aspect-ratio: 16 / 9;
}
.sc-video-frame iframe { width: 100%; height: 100%; display: block; }
.sc-video-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--white);
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background .2s;
}
.sc-video-link:hover { background: var(--primary-light); color: var(--white); }
.sc-video-link svg { width: 16px; height: 16px; fill: var(--white); }

/* ── FAQ ── */
.sc-faq { margin-bottom: 8px; width: 100%; }
.sc-faq-item {
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  margin-bottom: 6px;
  overflow: hidden;
  background: var(--white);
  transition: border-color .15s;
  width: 100%;
}
.sc-faq-item:has(.sc-faq-open) {
  border-color: var(--primary);
}
.sc-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--slate-800);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
  min-height: 48px;
  line-height: 1.4;
}
.sc-faq-q:hover { background: var(--slate-50); color: var(--primary); }
.sc-faq-open { background: var(--badge-blue-bg); color: var(--primary); }
.sc-faq-q svg {
  width: 16px; height: 16px;
  stroke: var(--slate-400); fill: none; stroke-width: 2;
  flex-shrink: 0; transition: transform .2s, stroke .15s;
  stroke-linecap: round; stroke-linejoin: round;
}
.sc-faq-open svg { transform: rotate(180deg); stroke: var(--primary); }
.sc-faq-a {
  padding: 12px 15px 15px;
  font-size: .875rem;
  color: var(--slate-700);
  line-height: 1.7;
  background: var(--badge-blue4-bg);
  border-top: 1px solid var(--badge-blue2-border);
}

/* ── Liens utiles ── */
.sc-links { margin-bottom: 8px; }
.sc-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 6px;
  transition: border-color .2s, box-shadow .2s;
  color: inherit;
  min-height: 44px;
}
.sc-link-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.sc-link-favicon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sc-link-favicon svg { width: 14px; height: 14px; stroke: var(--slate-400); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc-link-body { flex: 1; min-width: 0; }
.sc-link-name { font-size: 0.8125rem; font-weight: 600; color: var(--slate-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s; }
.sc-link-card:hover .sc-link-name { color: var(--primary); }
.sc-link-domain { font-size: 13px; color: var(--slate-500); }
.sc-link-arrow { width: 14px; height: 14px; stroke: var(--slate-300); fill: none; stroke-width: 2; flex-shrink: 0; stroke-linecap: round; stroke-linejoin: round; }

/* ── Navigation prev/next ── */
.sc-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 32px;
}
.sc-nav-btn {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 12px 14px;
  transition: all .2s;
  color: inherit;
  display: block;
  min-height: 56px;
}
.sc-nav-btn:hover { border-color: var(--primary); background: var(--badge-blue-bg); }
.sc-nav-next {
  background: var(--primary);
  border-color: var(--primary);
}
.sc-nav-next:hover { background: var(--primary-light); border-color: var(--primary-light); }
.sc-nav-label {
  font-size: 10px;
  color: var(--slate-500);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.sc-nav-next .sc-nav-label { color: rgba(255,255,255,0.55); }
.sc-nav-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-nav-next .sc-nav-title { color: var(--white); }

/* ============================================================
   CORE WEB VITALS — PATCH v1.1.0
   CLS, touch targets 44px, aspect-ratio images
   ============================================================ */

/* ── 1. CLS — Réserver l'espace des images avant chargement ── */
.course-detail-image img { aspect-ratio: 16 / 9; width: 100%; height: auto; max-height: 400px; object-fit: cover; display: block; }




/* ── 2. ZONES TACTILES MINIMALES 44×44px (WCAG 2.5.5) ── */

/* Navigation principale */
/* [règles tactiles déplacées en section mobile] */









/* ── 3. FONT-DISPLAY SWAP — évite FOIT (texte invisible) ── */
@font-face {
  font-family: 'Inter';
  font-display: swap;
}

/* ── 4. CONTAIN — évite les repaints coûteux ── */
.course-card,
.quick-card,
.resource-card,

/* ── 5. SCROLL BEHAVIOR — pas d'effet sur prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  html                       { scroll-behavior: auto; }
  .course-card,
  .quick-card                { transition: none; }
  .sc-progress-fill          { transition: none; }
  .hero-badge-dot            { animation: none; }
}

/* ── 6. ACCESSIBILITÉ — focus visible ── */
a:focus-visible,
button:focus-visible,
.filter-tab:focus-visible,
.sc-faq-q:focus-visible,
.sc-toc-item:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* ── 7. IMAGES — éviter le CLS sur les thumbnails de cards ── */

.sc-hero-inner img,

/* ============================================================
   PAGE CONTACT — REFONTE v1.1.2
   ============================================================ */

.contact-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* En-tête — aligné sur .courses-page-header */
.contact-header {
  margin-bottom: 1.75rem;
}
.contact-header-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .35rem;
}
.contact-header-inner .courses-page-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.contact-header-inner h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}
.contact-header-inner p {
  font-size: .875rem;
  color: var(--slate-500);
  margin: 0 0 0 56px;
}

/* Grille 2 colonnes */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 300px 1fr; }
}

/* Colonne infos */
.contact-infos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Carte info générique */
.contact-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 1.125rem 1.25rem;
}
.contact-card-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate-500);
  margin-bottom: .75rem;
}

/* Lien email */
.contact-email-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--primary);
  font-size: .9375rem;
  font-weight: 600;
  transition: color .2s;
  margin-bottom: .5rem;
}
.contact-email-link:hover { color: var(--primary-light); }
.contact-email-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-email-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--white);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-card-hint {
  font-size: .8rem;
  color: var(--slate-500);
  margin: 0;
}

/* Niveaux */
.contact-niveaux {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

/* Tips */
.contact-card-hint-block {
  background: var(--slate-50);
  border-color: var(--slate-200);
}
.contact-tips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.contact-tips li {
  font-size: .8125rem;
  color: var(--slate-500);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.contact-tips li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Colonne formulaire */
.contact-form-wrap {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}
.contact-form-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 1.25rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--slate-100);
}

/* Ligne 2 colonnes dans le formulaire */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: .875rem;
  margin-bottom: .875rem;
}
@media (min-width: 480px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .8125rem; font-weight: 600; color: var(--slate-700); }
.form-required { color: var(--accent); font-weight: 700; }
.form-input,
.form-select,
.form-textarea {
  padding: .625rem .875rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  font-size: .875rem;
  font-family: inherit;
  color: var(--slate-800);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-input,
.form-select {
  height: 44px;
  min-height: unset;
  resize: none;
}
.form-textarea {
  min-height: 130px;
  resize: vertical;
  margin-bottom: .875rem;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,95,.08);
}


/* Footer du formulaire */
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.form-required-note {
  font-size: .75rem;
  color: var(--slate-500);
}
.form-submit {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
  min-height: 44px;
}
.form-submit:hover { background: var(--primary-light); transform: translateY(-1px); }
.form-submit svg {
  width: 15px;
  height: 15px;
  stroke: var(--white);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Succès / erreur */
.contact-success {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--badge-green-light);
  border: 1px solid var(--badge-green3-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  color: var(--badge-green2-text);
  font-weight: 600;
  font-size: .9rem;
}
.contact-success svg {
  width: 20px;
  height: 20px;
  stroke: var(--badge-green2-text);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.contact-error {
  background: var(--badge-red-bg);
  border: 1px solid var(--badge-red-border);
  border-radius: 10px;
  padding: .875rem 1.125rem;
  color: var(--badge-red-text);
  font-size: .875rem;
  margin-bottom: 1rem;
}

/* ── Compteur de caractères formulaire contact ── */
.form-counter {
  font-size: .75rem;
  color: var(--slate-500);
  text-align: right;
  margin-top: .25rem;
}

/* ── Bouton déconnexion (visible uniquement si connecté) ── */
.header-logout {
  display: none;
  align-items: center;
  gap: .4rem;
  padding: .4rem .75rem;
  border-radius: var(--radius);
  font-size: .8rem;
  font-weight: 500;
  color: var(--slate-500);
  transition: background .2s, color .2s;
}
.logged-in .header-logout { display: flex; }
.header-logout:hover { background: var(--slate-100); color: var(--slate-800); }
.header-logout svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.header-logout-label { display: none; }
@media (min-width: 640px) { .header-logout-label { display: inline; } }

/* ── Skip link accessibilité ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--primary);
  color: var(--white);
  padding: .5rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  z-index: 9999;
  transition: top .15s;
}
.skip-link:focus { top: .5rem; }

/* ── Main landmark ── */
/* FIX #10 — outline: none supprimait le repère de focus pour les utilisateurs clavier
   activant le skip-link. :focus:not(:focus-visible) cible uniquement les focus souris/touch,
   qui n'ont pas besoin d'un indicateur visuel. Les focus clavier conservent leur outline. */
#main-content:focus:not(:focus-visible) { outline: none; }

/* ── Logo image ── */



/* Sur fond sombre (hero) si le logo est utilisé en dehors du header, inverser */
.dark-bg .site-logo {
  filter: brightness(0) invert(1);
}

/* Masquer le logo-icon et logo-text natifs si un logo image est défini */
.custom-logo-link .logo-icon,
.custom-logo-link .logo-text {
  display: none;
}

/* Retirer l'ancien logo-icon du site-branding quand logo image présent */
.site-branding img.site-logo + .logo-icon { display: none; }

/* Footer logo — version claire sur fond marine */
.site-footer .site-logo {
  height: 32px;
  filter: brightness(0) invert(1);
  opacity: .85;
}

/* ============================================================
   LOGO — Dark mode & responsive v1.1.7
   ============================================================ */

.site-logo {
  height: 42px;
  width: auto;
  max-width: 200px;
  display: block;
  object-fit: contain;
  /* Éviter le layout shift pendant le chargement */
  aspect-ratio: 320 / 132;
}

/* Footer : logo version claire (blanc) déjà généré côté serveur */
.site-logo--footer {
  height: 34px;
  opacity: .9;
}

/* ── Dark mode — header INTENTIONNELLEMENT identique au mode clair ──
   Le header reste blanc/clair quel que soit le thème système.
   Le logo bleu marine est conçu pour fond blanc — on conserve ce rendu.
── */



/* ── Notice RGPD formulaire contact ── */
.form-rgpd-notice {
  font-size: .75rem;
  color: var(--slate-500);
  text-align: center;
  margin-top: .75rem;
  line-height: 1.5;
}
.form-rgpd-notice a {
  color: var(--slate-500);
  text-decoration: underline;
}
.form-rgpd-notice a:hover {
  color: var(--primary);
}

/* ============================================================
   HEADER v1.2.3 — Logo icône + texte + navigation pill
   ============================================================ */

/* ── Branding : icône carrée arrondie + nom + sous-titre ── */
.site-branding-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary);           /* bleu marine */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 6px;
}

.header-logo-icon img,
.header-logo-icon picture {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Logo bleu marine sur fond bleu marine → inverser en blanc */
  filter: brightness(0) invert(1);
  display: block;
}

.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-logo-name {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.01em;
}

.header-logo-sub {
  font-size: .75rem;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Navigation desktop — liens pill ── */
.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation ul li a {
  display: flex;
  align-items: center;
  padding: .3rem .75rem;
  border-radius: 7px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
  line-height: 1;
  height: 34px;
}

.main-navigation ul li a:hover {
  background: var(--slate-100);
  color: var(--primary);
}

/* Lien actif — fond bleu marine, texte blanc, même hauteur */
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current_page_item > a,
.main-navigation ul li.current-menu-ancestor > a {
  background: var(--primary);
  color: var(--white);
}

.main-navigation ul li.current-menu-item > a::after,
.main-navigation ul li.current_page_item > a::after {
  display: none;
}

/* ── Dark mode : header reste blanc (intentionnel) ── */
@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(255,255,255,.95);
    border-bottom-color: rgba(226,232,240,.6);
  }
  .site-header .site-logo { filter: none; }
  .header-logo-name { color: var(--primary); }
  .header-logo-sub  { color: var(--slate-500); }
  .main-navigation ul li a { color: var(--primary); }
  .main-navigation ul li a:hover { background: var(--slate-100); }
  .main-navigation ul li.current-menu-item > a,
  .main-navigation ul li.current_page_item > a { background: var(--primary); color: var(--white); }
  .mobile-nav { background: rgba(255,255,255,.95); border-top-color: var(--slate-100); }
  .mobile-nav ul li a { color: var(--slate-600); }
  .mobile-nav ul li a:hover { background: var(--slate-100); }
  .mobile-nav ul li.current-menu-item > a { background: var(--primary); color: var(--white); }
  .menu-toggle { color: var(--slate-700); }
  .menu-toggle:hover { background: var(--slate-100); }
  .header-logout { color: var(--slate-500); }
  .header-logout:hover { background: var(--slate-100); color: var(--slate-800); }
}

/* ============================================================
   FILTRES DROPDOWN v2 — barre de filtres style modèle
   ============================================================ */
.filters-bar-v2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  padding: 1.25rem var(--page-pad);
  background: var(--bg-alt);
  flex-wrap: wrap;
}
@media (min-width: 641px) {
  .filters-bar-v2 { flex-direction: row; align-items: center; gap: 1rem; }
}

.filters-left {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.filters-icon svg { stroke: var(--slate-400); display: block; }
.filters-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--slate-500);
  white-space: nowrap;
}

/* ── Dropdown ── */
.filter-dropdown { position: relative; }

.filter-dropdown-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .75rem; /* base petits écrans */
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 9999px;
  font-size: .75rem; /* base mobile */
  font-weight: 500;
  color: var(--slate-700);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  white-space: nowrap;
  height: 34px; /* base ≤375px */
}
@media (min-width: 376px) { .filter-dropdown-btn { height: 38px; } }
@media (min-width: 641px) { .filter-dropdown-btn { font-size: .8125rem; padding: .35rem 1rem; } }
.filter-dropdown-btn:hover {
  border-color: var(--slate-300);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.filter-dropdown-btn[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30,58,95,.12);
}
.filter-dropdown-btn svg { flex-shrink: 0; stroke: var(--slate-400); transition: transform .2s; }
.filter-dropdown-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.filter-dropdown-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  list-style: none;
  padding: .25rem;
  margin: 0;
  z-index: 200;
}
.filter-dropdown-list.open { display: block; }

.filter-dropdown-list li a {
  display: block;
  padding: .4rem .75rem;
  font-size: .8125rem;
  color: var(--slate-700);
  border-radius: 6px;
  text-decoration: none;
  transition: background .12s;
}
.filter-dropdown-list li a:hover { background: var(--slate-100); color: var(--primary); }
.filter-dropdown-list li[aria-selected="true"] a {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

/* ── Recherche ── */
.filter-search-form { flex-shrink: 0; width: 100%; }
.filter-search-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0 .875rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 9999px;
  height: 38px;
  width: 100%;
  min-width: unset;
  transition: border-color .15s, box-shadow .15s;
}
@media (min-width: 641px) {
  .filter-search-form { width: auto; }
  .filter-search-wrap { width: auto; min-width: min(300px, 100%); }
}
.filter-search-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30,58,95,.12);
}
.filter-search-wrap svg { stroke: var(--slate-400); flex-shrink: 0; }
.filter-search-input {
  border: none;
  outline: none;
  font-size: 1rem; /* FIX #1 — iOS auto-zoom : ≥ 1rem requis */
  color: var(--slate-700);
  background: transparent;
  width: 100%;
}
.filter-search-input::placeholder { color: var(--slate-500); }

/* ============================================================
   CARDS COURS v1.2.8 — structure alignée sur le modèle
   ============================================================ */

/* Titre de groupe matière */
.courses-page-body { background: var(--bg-alt); padding: 1.25rem var(--page-pad) 3rem; min-height: 300px; }
.course-group { margin-bottom: 2.5rem; }
.course-group-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-left: .75rem;
  border-left: 3px solid var(--accent);
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Badge matière (tag avec icône) */
.badge-matiere {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: .2rem .6rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 500;
  color: var(--slate-600);
  background: var(--white);
}
.badge-matiere svg { stroke: var(--slate-400); flex-shrink: 0; }

/* Préfixe chapitre dans le titre */
.card-chapter-prefix {
  color: var(--slate-500);
  font-weight: 500;
}

/* ── Cards ressources — alignées sur le modèle ── */
.resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.25rem var(--page-pad) 3rem;
  background: var(--bg-alt);
  min-height: 300px;
  align-items: stretch;
}
@media (min-width: 640px)  { .resource-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .resource-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Card ressource ── */
.resource-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: 16px;
  padding: 1.25rem;
  color: inherit;
  transition: box-shadow .25s, border-color .25s, transform .25s;
  /* Hauteur uniforme dans la grille */
  height: 100%;
  box-sizing: border-box;
}
.resource-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
  border-color: var(--slate-200);
  transform: translateY(-3px);
}

/* ── Icône wrap ── */
.resource-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.resource-icon-wrap svg { width: 22px; height: 22px; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Couleurs icônes par type */
.resource-icon-wrap.exercice         { background: var(--badge-green-light); } .resource-icon-wrap.exercice svg         { stroke: var(--badge-green3-text); }
.resource-icon-wrap.lien-externe     { background: var(--badge-blue-bg); } .resource-icon-wrap.lien-externe svg     { stroke: var(--badge-blue2-text); }
.resource-icon-wrap.video,
.resource-icon-wrap.vidéo            { background: var(--badge-red2-bg); } .resource-icon-wrap.video svg,
                                                                .resource-icon-wrap.vidéo svg            { stroke: var(--badge-red2-text); }
.resource-icon-wrap.fiche-de-revision{ background: var(--badge-cyan-bg); } .resource-icon-wrap.fiche-de-revision svg{ stroke: var(--badge-sky-text); }
.resource-icon-wrap.annale           { background: var(--badge-fuchsia-bg); } .resource-icon-wrap.annale svg           { stroke: var(--badge-fuchsia-text); }
.resource-icon-wrap.document         { background: var(--badge-yellow-bg); } .resource-icon-wrap.document svg         { stroke: var(--badge-yellow2-text); }
.resource-icon-wrap.diaporama        { background: var(--badge-orange-bg); } .resource-icon-wrap.diaporama svg        { stroke: var(--badge-orange3-text); }

/* Corps */
.resource-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .4rem; height: 100%; }

  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.resource-icon svg { width: 24px; height: 24px; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Couleurs par type */
.resource-icon.exercice        { background: var(--badge-green-light); } .resource-icon.exercice svg        { stroke: var(--badge-green3-text); }
.resource-icon.lien,
.resource-icon.lien-externe    { background: var(--badge-blue-bg); } .resource-icon.lien svg,
                                                          .resource-icon.lien-externe svg    { stroke: var(--badge-blue2-text); }
.resource-icon.vidéo,
.resource-icon.video           { background: var(--badge-red2-bg); } .resource-icon.vidéo svg,
                                                          .resource-icon.video svg           { stroke: var(--badge-red2-text); }
.resource-icon.fiche,
.resource-icon.fiche-de-revision { background: var(--badge-blue-bg); } .resource-icon.fiche svg,
                                                             .resource-icon.fiche-de-revision svg { stroke: var(--badge-sky2-text); }
.resource-icon.annale          { background: var(--badge-fuchsia-bg); } .resource-icon.annale svg          { stroke: var(--badge-fuchsia-text); }
.resource-icon.document        { background: var(--badge-yellow-bg); } .resource-icon.document svg        { stroke: var(--badge-yellow2-text); }

.resource-title-link {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  line-height: 1.35;
  display: block;
}
.resource-card:hover .resource-title-link { text-decoration: none; color: var(--primary); }

.resource-desc {
  font-size: .8125rem;
  color: var(--slate-500);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
}

.resource-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: .125rem;
}

/* CTA en bas de card — Télécharger ou Ouvrir le lien */
.resource-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: auto;
  padding-top: .625rem;
  color: var(--primary);
  transition: opacity .15s;
}
.resource-cta:hover { opacity: .7; }
.resource-cta svg { flex-shrink: 0; }
.resource-cta--download { color: var(--primary); }
.resource-cta--link     { color: var(--badge-blue2-text); }

/* ============================================================
   PAGE RESSOURCES — CSS fidèle au modèle source (v1.3.6)
   ============================================================ */

/* ── Wrapper page ── */
.res-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem .75rem; /* base : très petits écrans ≤375px */
}
@media (min-width: 376px) { .res-page { padding: 1.5rem 1rem; } }
@media (min-width: 641px) { .res-page { padding: 3rem 1.5rem; } }

/* ── En-tête ── */
.res-header { margin-bottom: 2rem; }
.res-header-top {
  display: flex;
  align-items: center;
  gap: .5rem; /* base mobile */
  margin-bottom: .375rem;
}
@media (min-width: 641px) { .res-header-top { gap: .75rem; } }
.res-header-icon {
  width: 36px; height: 36px; /* base mobile */
  border-radius: 12px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
@media (min-width: 641px) { .res-header-icon { width: 40px; height: 40px; } }
.res-header-icon svg { width: 20px; height: 20px; stroke: var(--white); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.res-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--slate-800); margin: 0; }
@media (min-width: 641px) { .res-header h1 { font-size: 1.875rem; } }
.res-header-sub { font-size: .9375rem; color: var(--slate-500); margin: 0 0 1.5rem 0; }
@media (min-width: 641px) { .res-header-sub { margin: 0 0 1.5rem calc(40px + .75rem); } }

/* ── Filtres ── */
.res-filters {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .625rem; /* base mobile */
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
@media (min-width: 641px) { .res-filters { flex-direction: row; align-items: center; gap: .75rem; } }
.res-filters-left { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.res-search-form { width: 100%; margin-left: 0; }
@media (min-width: 641px) { .res-search-form { width: auto; margin-left: auto; } }
.res-search-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0 .875rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 9999px;
  height: 34px; /* base très petits écrans */
  width: 100%;
  min-width: unset;
  transition: border-color .15s, box-shadow .15s;
}
@media (min-width: 376px)  { .res-search-wrap { height: 38px; } }
@media (min-width: 641px)  { .res-search-wrap { width: auto; min-width: 260px; } }
.res-search-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(30,58,95,.1); }
.res-search-wrap svg { stroke: var(--slate-400); flex-shrink: 0; }
/* FIX #1 — iOS auto-zoom : font-size ≥ 1rem sur .res-search-input. */
.res-search-input { border: none; outline: none; font-size: 1rem; color: var(--slate-700); background: transparent; width: 100%; }
.res-search-input::placeholder { color: var(--slate-500); }

/* ── Grille — identique au modèle ── */
.res-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .625rem;
  align-items: stretch; /* correctif hauteur égale */
}
@media (min-width: 640px)  { .res-grid { grid-template-columns: repeat(2, 1fr); gap: .875rem; } }
@media (min-width: 1024px) { .res-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }

/* ── Card — layout horizontal row ── */
.res-card {
  display: flex;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--slate-200);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: box-shadow .18s, border-color .18s, transform .18s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* Accent coloré gauche selon le type — défaut neutre */
  border-left: 3px solid var(--slate-200);
}
/* Accents par type */
.res-card--document      { border-left-color: var(--badge-blue-border); }
.res-card--exercice      { border-left-color: var(--badge-green-border); }
.res-card--video,
.res-card--vidéo         { border-left-color: var(--badge-red2-border); }
.res-card--lien-externe,
.res-card--lien          { border-left-color: var(--badge-purple2-border); }
.res-card--annale        { border-left-color: var(--badge-amber-border); }
.res-card--fiche-de-revision,
.res-card--fiche         { border-left-color: var(--badge-cyan-border); }
.res-card--fiche-notion  { border-left-color: var(--badge-cyan-border); }
.res-card--quiz,
.res-card--quizz         { border-left-color: var(--badge-blue-border); }
.res-card--flashcard,
.res-card--flashcards    { border-left-color: var(--badge-amber-border); }
.res-card--diaporama     { border-left-color: var(--badge-orange-border); }

/* Feedback tactile mobile */
.res-card:active { transform: scale(.98); }

/* Hover desktop uniquement */
@media (hover: hover) and (pointer: fine) {
  .res-card:hover {
    box-shadow: 0 6px 24px rgba(30,58,95,.10);
    border-color: var(--primary);
    transform: translateY(-1px);
  }
  .res-card:hover .res-chevron { opacity: 1; transform: translateX(2px); }
  .res-card:hover .res-title   { color: var(--primary); }
}

/* Intérieur de la card — horizontal */
.res-card-inner {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1rem;
  width: 100%;
  min-width: 0;
}
@media (min-width: 481px) { .res-card-inner { padding: 1rem 1.125rem; gap: 1rem; } }

/* ── Icône ── */
.res-icon {
  width: 40px; height: 40px; /* base mobile */
  border-radius: 10px;
  border: 1px solid;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
@media (min-width: 481px) { .res-icon { width: 44px; height: 44px; border-radius: .75rem; } }
.res-icon svg { width: 18px; height: 18px; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 481px) { .res-icon svg { width: 20px; height: 20px; } }

/* Couleurs par type — exactement comme le modèle */
.res-icon--document         { background: var(--badge-blue-bg); border-color: var(--badge-blue-border); } .res-icon--document svg         { stroke: var(--badge-blue-text); }
.res-icon--exercice         { background: var(--badge-green-bg); border-color: var(--badge-green-border); } .res-icon--exercice svg         { stroke: var(--badge-green-text); }
.res-icon--video,
.res-icon--vidéo            { background: var(--badge-red2-bg); border-color: var(--badge-red2-border); } .res-icon--video svg,
                                                                              .res-icon--vidéo svg            { stroke: var(--red-700); }
.res-icon--lien-externe     { background: var(--badge-purple2-bg); border-color: var(--badge-purple2-border); } .res-icon--lien-externe svg     { stroke: var(--badge-purple2-text); }
.res-icon--lien             { background: var(--badge-purple2-bg); border-color: var(--badge-purple2-border); } .res-icon--lien svg             { stroke: var(--badge-purple2-text); }
.res-icon--annale           { background: var(--badge-amber-bg); border-color: var(--badge-amber-border); } .res-icon--annale svg           { stroke: var(--badge-amber-text); }
.res-icon--fiche-de-revision{ background: var(--badge-cyan-bg); border-color: var(--badge-cyan-border); } .res-icon--fiche-de-revision svg{ stroke: var(--badge-cyan-text); }
.res-icon--fiche            { background: var(--badge-cyan-bg); border-color: var(--badge-cyan-border); } .res-icon--fiche svg            { stroke: var(--badge-cyan-text); }
.res-icon--diaporama        { background: var(--badge-orange-bg); border-color: var(--badge-orange-border); } .res-icon--diaporama svg        { stroke: var(--badge-orange-text); }

/* ── Corps ── */
/* ── Corps ── */
.res-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.res-title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--slate-800);
  line-height: 1.4;
  margin: 0;
  transition: color .18s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.res-desc {
  font-size: .8125rem;
  color: var(--slate-500);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pied de card : badges + action */
.res-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .375rem;
  margin-top: .375rem;
  flex-wrap: wrap;
}

.res-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
}

.res-badge {
  display: inline-flex;
  align-items: center;
  font-size: .625rem;
  font-weight: 600;
  padding: .15rem .45rem;
  border-radius: 9999px;
  border: 1px solid;
  white-space: nowrap;
}

/* Badges colorés par type */
.res-badge--document         { background: var(--badge-blue-bg);     color: var(--badge-blue-text);     border-color: var(--badge-blue-border); }
.res-badge--exercice         { background: var(--badge-green-bg);    color: var(--badge-green-text);    border-color: var(--badge-green-border); }
.res-badge--video,
.res-badge--vidéo            { background: var(--badge-red2-bg);     color: #be123c;                    border-color: var(--badge-red2-border); }
.res-badge--lien-externe,
.res-badge--lien             { background: var(--badge-purple2-bg);  color: var(--badge-purple2-text);  border-color: var(--badge-purple2-border); }
.res-badge--annale           { background: var(--badge-amber-bg);    color: var(--badge-amber-text);    border-color: var(--badge-amber-border); }
.res-badge--fiche-de-revision,
.res-badge--fiche            { background: var(--badge-cyan-bg);     color: var(--badge-cyan-text);     border-color: var(--badge-cyan-border); }
.res-badge--diaporama        { background: var(--badge-orange-bg);   color: var(--badge-orange-text);   border-color: var(--badge-orange-border); }
.res-badge--outline          { background: transparent; color: var(--slate-500); border-color: var(--slate-200); }

/* Action pill — toujours visible, sans hover */
.res-action {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .6875rem;
  font-weight: 700;
  color: var(--primary);
  background: #eff6ff;
  border: 1px solid var(--badge-blue-border);
  border-radius: 9999px;
  padding: .2rem .55rem;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Couleur action selon le type */
.res-action--document       { background: #eff6ff; color: var(--badge-blue-text);    border-color: var(--badge-blue-border); }
.res-action--exercice       { background: #dcfce7; color: var(--badge-green-text);   border-color: var(--badge-green-border); }
.res-action--video,
.res-action--vidéo          { background: #fff1f2; color: #be123c;                   border-color: var(--badge-red2-border); }
.res-action--lien-externe,
.res-action--lien           { background: #faf5ff; color: var(--badge-purple2-text); border-color: var(--badge-purple2-border); }
.res-action--annale         { background: #fffbeb; color: var(--badge-amber-text);   border-color: var(--badge-amber-border); }
.res-action--fiche-de-revision,
.res-action--fiche,
.res-action--fiche-notion   { background: #ecfeff; color: var(--badge-cyan-text);    border-color: var(--badge-cyan-border); }
.res-action--quiz,
.res-action--quizz,
.res-action--flashcard,
.res-action--flashcards     { background: #eff6ff; color: var(--badge-blue-text);    border-color: var(--badge-blue-border); }
.res-action--diaporama      { background: #fff7ed; color: var(--badge-orange-text);  border-color: var(--badge-orange-border); }

/* Chevron persistant à droite */
.res-chevron {
  width: 16px; height: 16px;
  stroke: var(--slate-300);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  opacity: .5;
  transition: opacity .18s, transform .18s;
}

/* ── Empty state ── */
.res-empty {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--slate-500);
}
.res-empty svg { width: 3rem; height: 3rem; stroke: var(--slate-300); fill: none; stroke-width: 2; margin: 0 auto 1rem; display: block; stroke-linecap: round; stroke-linejoin: round; }
.res-empty h3 { font-size: 1rem; font-weight: 600; color: var(--slate-500); }

/* ── Mobile : géré en mobile-first dans les règles de base ci-dessus ── */

/* ============================================================
   PAGE COURS — CSS fidèle au modèle (v1.3.6)
   ============================================================ */

/* Groupes matières */
.cours-groups { display: flex; flex-direction: column; gap: 3rem; }

.cours-group-title {
  font-size: 1rem; /* base mobile */
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .625rem;
}
@media (min-width: 641px) { .cours-group-title { font-size: 1.25rem; } }
.cours-group-bar {
  display: inline-block;
  width: 4px;
  height: 24px;
  background: var(--accent);
  border-radius: 9999px;
  flex-shrink: 0;
}
.cours-group-count {
  font-size: .875rem;
  font-weight: 400;
  color: var(--slate-500);
  margin-left: .25rem;
}

/* Grille cours — 3 colonnes comme modèle */
.cours-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
@media (min-width: 640px)  { .cours-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cours-grid { grid-template-columns: repeat(3, 1fr); } }

/* Card cours — structure exacte du modèle */
.cours-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 1rem;
  border: 1px solid var(--slate-100);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .3s, border-color .3s, transform .3s;
  height: 100%;
}
.cours-card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,.1);
  border-color: var(--slate-200);
  transform: translateY(-2px);
}

/* Vignette */
.cours-thumb {
  height: 6rem; /* base mobile */
  background: linear-gradient(135deg, var(--slate-100), var(--slate-50));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
@media (min-width: 641px) { .cours-thumb { height: 8rem; } }
.cours-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cours-card:hover .cours-thumb img { transform: scale(1.05); }
.cours-thumb-placeholder {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--slate-200);
}

/* Corps */
.cours-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; } /* base mobile */
@media (min-width: 641px) { .cours-body { padding: 1.25rem; } }

/* Badges */
.cours-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; margin-bottom: .75rem; }
.cours-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .6875rem; font-weight: 500;
  padding: .2rem .55rem;
  border-radius: 9999px;
  border: 1px solid;
}
/* Couleurs par niveau */
.cours-badge--premiere-stmg,
.cours-badge--première-stmg  { background: var(--badge-blue-bg); color: var(--badge-blue-text); border-color: var(--badge-blue-border); }
.cours-badge--terminale-stmg { background: var(--badge-green-light); color: var(--badge-green2-text); border-color: var(--badge-green3-border); }
.cours-badge--bts            { background: var(--badge-purple-bg); color: var(--badge-purple-text); border-color: var(--badge-purple-border); }
.cours-badge--bts-1ere-annee { background: var(--badge-purple-bg); color: var(--badge-purple-text); border-color: var(--badge-purple-border); }
.cours-badge--bts-2eme-annee { background: var(--badge-amber-bg); color: var(--badge-amber-text); border-color: var(--badge-amber-border); }
.cours-badge--terminale-generale,
.cours-badge--seconde        { background: var(--badge-orange-bg); color: var(--badge-orange-text); border-color: var(--badge-orange-border); }
.cours-badge--matiere {
  background: transparent;
  color: var(--slate-600);
  border-color: var(--slate-300);
  font-weight: 400;
}
.cours-badge--matiere svg { stroke: var(--slate-400); flex-shrink: 0; }

/* Titre */
.cours-title {
  font-weight: 700;
  color: var(--slate-800);
  font-size: .9375rem;
  line-height: 1.4;
  margin-bottom: .5rem;
  transition: color .2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.cours-card:hover .cours-title { color: var(--primary); }
.cours-chapter-prefix { font-weight: 400; color: var(--slate-500); }

/* Description */
.cours-desc {
  font-size: .8125rem;
  color: var(--slate-500);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Footer card */
.cours-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.cours-date {
  display: flex; align-items: center; gap: .25rem;
  font-size: .75rem; color: var(--slate-500);
}
.cours-date svg { stroke: currentColor; }
.cours-cta {
  display: flex; align-items: center; gap: .25rem;
  font-size: .75rem; font-weight: 500;
  color: var(--primary);
  opacity: 0;
  transition: opacity .2s;
}
.cours-card:hover .cours-cta { opacity: 1; }

/* ============================================================
   PAGE ACTUALITÉS — même structure que Cours/Ressources (v1.3.9)
   ============================================================ */

/* ── Onglets filtre priorité ── */
.ann-filter-tabs {
  display: flex;
  align-items: center;
  gap: .375rem; /* base mobile */
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
@media (min-width: 641px) { .ann-filter-tabs { gap: .5rem; } }
.ann-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .7rem; /* base mobile */
  border: 1px solid var(--slate-200);
  border-radius: 9999px;
  font-size: .75rem; /* base mobile */
  font-weight: 500;
  color: var(--slate-600);
  background: var(--white);
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
  cursor: pointer;
}
@media (min-width: 641px) { .ann-filter-tab { padding: .35rem .9rem; font-size: .8125rem; } }
.ann-filter-tab:hover { border-color: var(--slate-300); color: var(--slate-800); }
.ann-filter-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}
.ann-filter-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ann-filter-dot--urgent    { background: var(--badge-red-text); }
.ann-filter-dot--important { background: var(--badge-amber-text); }
.ann-filter-dot--normal    { background: var(--slate-500); }

/* ── Liste actualités ── */
.ann-list {
  display: flex;
  flex-direction: column;
  gap: .875rem;
  max-width: 760px;
}

/* ── Card actualité ── */
/* Card actualité — base commune */
.ann-card {
  contain: layout style;
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: 8px; /* base mobile */
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
@media (min-width: 481px) { .ann-card { border-radius: 12px; } }
.ann-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.07);
  border-color: var(--slate-200);
}
/* Variante archive — barre latérale de priorité */
.archive-ann .ann-card { display: flex; }

/* Barre de priorité à gauche */
.ann-priority-bar {
  width: 4px;
  flex-shrink: 0;
  border-radius: 0;
}
.ann-card--urgent    .ann-priority-bar { background: var(--badge-red-text); }
.ann-card--important .ann-priority-bar { background: var(--badge-amber-text); }
.ann-card--normal    .ann-priority-bar { background: var(--slate-300); }

/* Corps */
.ann-body { padding: .875rem 1rem; flex: 1; min-width: 0; } /* base mobile */
@media (min-width: 481px) { .ann-body { padding: 1.125rem 1.25rem; } }

.ann-header {
  display: flex;
  flex-direction: column; /* base mobile */
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .625rem;
}
@media (min-width: 481px) { .ann-header { flex-direction: row; gap: .75rem; } }
.ann-title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--slate-800);
  margin: 0;
  line-height: 1.4;
}
.ann-badges {
  display: flex;
  align-items: center;
  gap: .375rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.ann-badge {
  display: inline-flex;
  align-items: center;
  padding: .175rem .5rem;
  border-radius: 9999px;
  font-size: .6875rem;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}
.ann-badge--urgent    { background: var(--badge-red-bg); color: var(--badge-red-text); border-color: var(--badge-red-border); }
.ann-badge--important { background: var(--badge-amber-bg); color: var(--badge-amber-text); border-color: var(--badge-amber-border); }
.ann-badge--niveau    { background: transparent; color: var(--slate-600); border-color: var(--slate-300); }

.ann-content {
  font-size: .875rem;
  color: var(--slate-600);
  line-height: 1.6;
  margin-bottom: .75rem;
}
.ann-content p { margin: 0 0 .5rem; }
.ann-content p:last-child { margin-bottom: 0; }

.ann-date {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  color: var(--slate-500);
}
.ann-date svg { stroke: currentColor; flex-shrink: 0; }

/* Mobile-first — base = petits écrans (blocs 6 et 7 fusionnés) */
.cours-groups { display: flex; flex-direction: column; gap: 2rem; /* base mobile */ }
@media (min-width: 641px) { .cours-groups { gap: 3rem; } }

/* cours-group-title / cours-thumb / cours-body en mobile-first */
/* ── Icônes quiz et flashcard dans les ressources ── */
.res-icon--quiz, .res-icon--quizz       { background: var(--badge-blue-bg); border-color: var(--badge-blue-border); }
.res-icon--quiz svg, .res-icon--quizz svg { stroke: var(--badge-blue-text); }
.res-icon--flashcard, .res-icon--flashcards { background: var(--badge-amber-bg); border-color: var(--badge-amber-border); }
.res-icon--flashcard svg, .res-icon--flashcards svg { stroke: var(--badge-amber-text); }
.res-badge--quiz, .res-badge--quizz          { background: var(--badge-blue-bg); color: var(--badge-blue-text); border-color: var(--badge-blue-border); }
.res-badge--flashcard, .res-badge--flashcards { background: var(--badge-amber-bg); color: var(--badge-amber-text); border-color: var(--badge-amber-border); }

/* ============================================================
   TITRES COURS — Amélioration hiérarchie visuelle (v1.4.3)
   ============================================================ */

/* H2 — grande partie */
.sc-content h2 {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
  margin: 2.5rem 0 1rem !important;
  padding: .875rem 1rem !important;
  background: var(--badge-blue-bg);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  display: block !important;
  letter-spacing: -.02em;
}
.sc-content h2::before { display: none !important; }

/* H3 — sous-partie numérotée */
.sc-content h3 {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--slate-800) !important;
  margin: 1.75rem 0 .625rem !important;
  padding-left: .875rem;
  border-left: 3px solid var(--accent);
}

/* H4 — détail fin */
.sc-content h4 {
  font-size: .9375rem !important;
  font-weight: 600 !important;
  color: var(--slate-600) !important;
  margin: 1.25rem 0 .375rem !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .8125rem !important;
}

/* Ancres automatiques sur les headings pour le sommaire */
.sc-content h2[id],
.sc-content h3[id] { scroll-margin-top: var(--scroll-offset); /* FIX #9 — unifié avec --scroll-offset */ }

/* ============================================================
   FICHE NOTION — v1.6.3
   ============================================================ */

/* Badge */
.res-badge--fiche-notion {
    background: var(--badge-purple2-light);
    color: var(--badge-purple-text);
    border: 1px solid var(--badge-purple-border);
}

/* Icône dans la grille archive */
.res-icon--fiche-notion {
    background: var(--badge-purple-bg);
    color: var(--badge-violet-text);
}

/* ── Page fiche-notion ──────────────────────────────────────── */
.fiche-notion-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1rem 4rem; /* base mobile */
}

.fiche-notion-header {
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.fiche-notion-meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.fiche-notion-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 .75rem;
    color: var(--primary);
}

.fiche-notion-intro {
    font-size: 1.05rem;
    color: var(--slate-500);
    margin: 0;
    line-height: 1.6;
}

/* ── Sections ──────────────────────────────────────────────── */
.fiche-section {
    margin-bottom: 1.75rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--slate-200);
}

.fiche-section-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.25rem;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--gray-50);
    border-bottom: 1px solid var(--slate-200);
    color: var(--gray-600);
}

.fiche-section-label svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.fiche-section-content {
    padding: 1rem; /* base mobile */
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
}

.fiche-section-content p:last-child { margin-bottom: 0; }

/* Couleurs par section */
.fiche-definition { border-color: var(--badge-blue2-border); }
.fiche-definition .fiche-section-label { background: var(--badge-blue-bg); border-color: var(--badge-blue2-border); color: var(--badge-blue-text); }

.fiche-exemple { border-color: var(--badge-lime-bg); }
.fiche-exemple .fiche-section-label { background: var(--badge-green-bg); border-color: var(--badge-lime-bg); color: var(--badge-green-text); }

.fiche-contenu { border-color: var(--badge-yellow-border); }
.fiche-contenu .fiche-section-label { background: var(--badge-amber-bg); border-color: var(--badge-yellow-border); color: var(--badge-amber-text); }

.fiche-ressources-liees { border-color: var(--badge-purple2-light); }
.fiche-ressources-liees .fiche-section-label { background: var(--badge-purple-bg); border-color: var(--badge-purple2-light); color: var(--badge-purple-text); }

/* ── Liens ressources ───────────────────────────────────────── */
.fiche-links-grid {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem 1.25rem;
}

.fiche-link-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--slate-200);
    background: var(--white);
    text-decoration: none;
    color: var(--gray-700);
    font-size: .95rem;
    font-weight: 500;
    transition: background .15s, border-color .15s, box-shadow .15s;
}

.fiche-link-card:hover {
    background: var(--gray-50);
    border-color: var(--badge-purple3-text);
    box-shadow: 0 2px 8px rgba(79,70,229,.08);
    color: var(--badge-purple3-text);
}

.fiche-link-icon { display: flex; align-items: center; flex-shrink: 0; color: var(--gray-600); }
.fiche-link-card:hover .fiche-link-icon { color: var(--badge-purple3-text); }
.fiche-link-icon svg { width: 16px; height: 16px; }
.fiche-link-label { flex: 1; }
.fiche-link-ext { display: flex; align-items: center; flex-shrink: 0; color: var(--gray-300); }
.fiche-link-ext svg { width: 12px; height: 12px; }

.fiche-link-video .fiche-link-icon { color: var(--badge-red2-text); }
.fiche-link-filetext .fiche-link-icon { color: var(--badge-blue2-text); }

/* ── Pied de page ──────────────────────────────────────────── */
.fiche-notion-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--slate-200);
}

/* ── Responsive — mobile-first ── */
/* Les règles mobiles sont portées par les déclarations de base ci-dessus.
   Overrides desktop ci-dessous. */
@media (min-width: 641px) {
    .fiche-notion-page { padding-left: 1.5rem; padding-right: 1.5rem; }
    .fiche-section-content { padding: 1.25rem; }
}


/* ══════════════════════════════════════════════════
   MOBILE-FIRST ENHANCEMENTS — v1.7.0
   ══════════════════════════════════════════════════ */

/* ── 1. Zones de clic 44px sur liens du menu mobile ── */
.mobile-nav ul li a {
  min-height: 44px;
  display: flex; align-items: center;
  touch-action: manipulation;
}

/* ── 2. Lisibilité : 16px / interligne 1.6 — base globale (mobile-first) ── */
body,
p, li, td, th,
.entry-content,
.sc-main-col,
.hb-block {
  font-size: 1rem;
  line-height: 1.6;
}

/* ── 3. Sidebar : ordre colonne — base mobile (desktop override dans min-width:1024px) ── */
.sc-body.has-toc {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sc-body.has-toc .sc-main-col { order: 1; }
.sc-body.has-toc .sc-sidebar   { order: 2; }

/* ── 4. Bouton de téléchargement PDF full-width — base globale ── */
.sc-pdf-cta {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  padding: .875rem 1.25rem;
}

/* ── 5. Liens fichiers → bouton tactile large — base globale ── */
a[href$=".pdf"],
a[href$=".PDF"],
.wp-block-file a.wp-block-file__button,
.wp-block-file__content-wrapper a,
.resource-dl-btn,
.fiche-link-card {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  align-items: center;
  padding: .75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: .5rem;
}

/* ── 6. Images techniques : 100% largeur — base globale ── */
.sc-main-col img,
.entry-content img,
.wp-block-image img,
.hb-block img,
figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── 7. Barre de recherche dans le panneau mobile ── */
.mobile-search-form {
  padding: .5rem 1rem .875rem;
}
.mobile-search-wrap {
  position: relative;
}
.mobile-search-wrap svg {
  position: absolute;
  left: .875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  stroke: var(--slate-400);
  fill: none; stroke-width: 2;
  pointer-events: none;
}
.mobile-search-form input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  padding: .75rem 1rem .75rem 2.5rem;
  border: 1px solid var(--slate-200);
  border-radius: 9999px;
  font-size: 1rem;
  background: var(--slate-50);
  color: var(--slate-800);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.mobile-search-form input[type="search"]:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(30,58,95,.12);
}

/* ── 8. Accordéons groupes de cours — base mobile ── */
details.cours-group {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: .75rem;
}
details.cours-group > summary.cours-group-title {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-right: .75rem;
  min-height: 48px;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
details.cours-group > summary.cours-group-title::after {
  content: '';
  width: 18px; height: 18px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform .22s ease;
}
details.cours-group[open] > summary.cours-group-title::after {
  transform: rotate(180deg);
}
details.cours-group > summary::-webkit-details-marker { display: none; }
details.cours-group > summary::marker               { content: none; }

/* ── 9. Desktop : désactiver l'accordéon (toujours ouvert) ── */
@media (min-width: 768px) {
  .mobile-search-form { display: none; }

  details.cours-group           { display: block; }
  details.cours-group[open]     { display: block; }

  details.cours-group > summary.cours-group-title {
    pointer-events: none;
    cursor: default;
  }
  details.cours-group > summary.cours-group-title::after { display: none; }
}

/* ── 10. WebP / lazy : s'assurer que loading=lazy est toujours présent ── */
img:not([loading]) { loading: lazy; }


/* ============================================================
   PAGE 404 — not-found
   ============================================================ */
.not-found-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1rem 5rem;
}

/* Hero */
.not-found-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}
.not-found-code {
  font-size: clamp(5rem, 20vw, 8rem) !important;
  font-weight: 900 !important;
  color: #cbd5e1;
  line-height: 1;
  margin-bottom: .5rem;
  letter-spacing: -.04em;
}
.not-found-page h1.not-found-title {
  font-size: clamp(1.25rem, 4vw, 1.75rem) !important;
  font-weight: 700;
  color: #334155;
  margin: 0 0 .75rem;
}
.not-found-desc {
  font-size: .9375rem;
  color: #64748b;
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto;
}

/* Recherche */
.not-found-search-wrap {
  margin-bottom: 3rem;
}
.not-found-search-form {
  display: flex;
  gap: .625rem;
  flex-wrap: wrap;
}
.not-found-search-inner {
  flex: 1;
  min-width: 0;
}
.not-found-input {
  max-width: 100% !important;
  height: 44px;
  font-size: 1rem;
}
.not-found-search-btn {
  white-space: nowrap;
  height: 44px;
  padding: 0 1.25rem;
  font-size: .9375rem;
}

/* Titres de section */
.not-found-page h2.not-found-section-title {
  font-size: .75rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #94a3b8;
  margin: 0 0 1rem;
}

/* Grille niveaux */
.not-found-levels {
  margin-bottom: 2.5rem;
}
.not-found-levels-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .625rem;
}
@media (min-width: 480px) {
  .not-found-levels-grid { grid-template-columns: repeat(2, 1fr); }
}

.not-found-level-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  text-decoration: none;
  color: var(--slate-700);
  font-weight: 600;
  font-size: .9375rem;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  min-height: 56px;
}
.not-found-level-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  color: var(--primary);
}
.not-found-level-icon {
  width: 36px; height: 36px;
  background: var(--slate-100);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.not-found-level-icon svg { width: 18px; height: 18px; stroke: var(--primary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.not-found-level-name { flex: 1; }
.not-found-level-arrow { width: 16px; height: 16px; stroke: var(--slate-300); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Liens utiles */
.not-found-links-grid {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.not-found-link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .875rem 1rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
  min-height: 56px;
}
.not-found-link-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.not-found-link-card > svg:first-child {
  width: 20px; height: 20px;
  stroke: var(--primary); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.not-found-link-card > svg:last-child {
  width: 16px; height: 16px;
  stroke: var(--slate-300); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0; margin-left: auto;
}
.not-found-link-label {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: .125rem;
}
.not-found-link-sub {
  font-size: .8125rem;
  color: var(--slate-500);
}
/* =============================================================
   CORRECTIFS — archive-ressource.php
   À coller à la fin de style.css
   ============================================================= */

/* ── 1. Cards de hauteur égale ── */
.res-grid {
  align-items: stretch; /* remplace align-items: start */
}
.res-card {
  height: 100%;
}
.res-card-inner {
  align-items: flex-start; /* icône et corps alignés en haut */
  height: 100%;
}
.res-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.res-footer {
  margin-top: auto; /* pousse le footer en bas de chaque card */
}

/* ── 2. Troncature uniforme de la description ── */
.res-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* Assure une hauteur réservée même si la description est courte */
  min-height: calc(1.5em * 3);
}

/* ── 3. Bouton ×  pour désélectionner un filtre actif ── */
.filter-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(30, 58, 95, 0.12);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.filter-clear:hover {
  background: rgba(30, 58, 95, 0.22);
}

/* Bouton actif (filtre sélectionné) — accentuer visuellement */
.filter-dropdown-btn--active {
  border-color: var(--primary);
  background: rgba(30, 58, 95, 0.06);
  color: var(--primary);
  font-weight: 600;
}
