/* ==========================================================================
 * CONCOURS SANTÉ — SYSTÈME DE DESIGN PREMIUM & INSTITUTIONNEL
 * EAP Échelle 11 — Infirmier Grade Principal Maroc
 * ========================================================================== */

/* Polices : chargées via <link rel="stylesheet"> dans le <head> de chaque page.
   Un @import ici sérialisait CSS → CSS et retardait le premier rendu.
   Plus Jakarta Sans a été retirée : jamais utilisée, simple repli de Manrope. */

:root {
  /* Charte institutionnelle d'excellence : Vert impérial + Or + Crème */
  --bleu: #0e5d54;
  --bleu-fonce: #0a3f39;
  --vert-imp: #08332e;
  --turquoise: #c79a2e;
  --vert: #1f8a5b;
  --orange: #cf8a2c;
  --rouge: #d24b40;
  --violet: #3f7d72;
  --rose: #b8862b;
  --jaune: #e8c14a;
  
  /* Tokens de surface et de fond (Thème Clair) */
  --fond: #fdfbf7;
  --bg2: #f5f0e6;
  --carte: #ffffff;
  --surf: #ffffff;
  --texte: #1d2b27;
  --ink: #1d2b27;
  --gris: #5c6b66;
  --muted: #5c6b66;
  --line: #e7dfd0;
  
  /* Ombres et rayons — sobres, pas le "soft UI" par défaut */
  --ombre: 0 2px 10px rgba(10, 63, 57, 0.07);
  --shadow-lg: 0 8px 22px rgba(10, 63, 57, 0.13);
  --radius: 8px;
  --radius-lg: 10px;
  --gold: #d4af37;
  --gold2: #c39d2a;
  --cc: #0e5d54;

  /* Tokens éditoriaux consolidés — source unique de vérité */
  --paper: #fbf8f1;
  --paper-2: #f3eee3;
  --surface: #fffefa;
  --deep: #123f38;
  --deep-2: #082d28;
  --accent: #176b5f;
  --accent-soft: #e5f0eb;
  --ink-soft: #52615c;
  --rule: #dfd6c5;
  --warm-rule: #d4c49d;
  --shadow-soft: 0 8px 24px rgba(24, 58, 49, .07);
  --shadow-lift: 0 18px 40px rgba(24, 58, 49, .13);
  --ease-human: cubic-bezier(.22, .74, .24, 1);
  --vert-fonce: var(--bleu-fonce);
  --or: var(--gold);}

/* Base et Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: 'Manrope', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--fond);
  color: var(--texte);
  line-height: 1.65;
  transition: background 0.3s ease, color 0.3s ease;
}
a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
img { max-width: 100%; height: auto; }

/* Typographie Premium */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.serif { font-family: 'Fraunces', Georgia, serif; }

/* ==========================================================================
 * TOPBAR INSTITUTIONNELLE
 * ========================================================================== */
.cs-topbar {
  background: var(--bleu-fonce);
  color: #fff;
  padding: 0.55rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 150;
  position: relative;
}
.cs-topbar a { color: var(--jaune); font-weight: 700; }
.cs-topbar a:hover { text-decoration: underline; color: #fff; }
@media (max-width: 768px) {
  .cs-topbar { justify-content: center; text-align: center; font-size: 0.78rem; padding: 0.45rem 0.9rem; }
  .cs-topbar div:last-child { display: none; }
}

/* ==========================================================================
 * HEADER & NAVIGATION STICKY
 * ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--fond) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}
nav {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.4rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.22rem;
  color: var(--ink);
}
.logo .badge-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(14, 93, 84, 0.25);
}
.logo .wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-size: 1.18rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.logo .wordmark small {
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}
.navlinks { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.navlinks a {
  padding: 0.5rem 0.95rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  transition: all 0.2s ease;
  position: relative;
}
.navlinks a:hover, .navlinks a.active {
  background: var(--bleu);
  color: #fff;
  transform: translateY(-1px);
}
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.burger {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 0.2rem;
}
@media (max-width: 900px) {
  .navlinks {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
  }
  .navlinks.open { display: flex; }
  .navlinks a { width: 100%; text-align: center; }
  .burger { display: block; }
}
@media (max-width: 480px) {
  nav { padding: 0.6rem 0.9rem; gap: 0.5rem; }
  .logo { gap: 0.5rem; }
  .logo .badge-img { width: 38px; height: 38px; }
  .logo .wordmark { font-size: 0.98rem; }
  .logo .wordmark small { font-size: 0.58rem; }
}

/* ==========================================================================
 * HERO SECTION ÉBLOUISSANTE (GLASSMORPHISM)
 * ========================================================================== */
.hero {
  position: relative;
  /* Vert fixe, volontairement pas var(--vert-imp) : ce vert doit rester
     riche et lisible même en thème sombre, où vert-imp vire presque noir. */
  background: #0a3f39;
  color: #fff;
  overflow: hidden;
  border-bottom: 3px solid var(--gold);
}
.hero-in {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 2.5rem 1.4rem 3.2rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.2rem;
  align-items: center;
}
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; text-align: center; gap: 2rem; padding: 2.2rem 1.2rem 2.8rem; }
}
.hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fdf3d4;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 0.8rem;
}
.hero h1 em { font-style: normal; color: var(--jaune); }
.hero p.lead {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin-bottom: 1.4rem;
  line-height: 1.6;
}
@media (max-width: 960px) { .hero p.lead { margin: 0 auto 1.4rem; } }

/* Boutons Premium */
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
@media (max-width: 960px) { .hero-cta { justify-content: center; } }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 14px;
  padding: 0.85rem 1.65rem;
  font-size: 0.98rem;
  transition: all 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-primary, .btn-gold {
  background: var(--gold);
  color: #3a2e05 !important;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.3);
}
.btn-primary:hover, .btn-gold:hover {
  background: var(--gold2);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-3px);
}
.btn-line {
  background: transparent;
  color: var(--bleu);
  border: 2px solid var(--bleu);
}
.btn-line:hover { background: var(--bleu); color: #fff; }

/* Stats Bar en temps réel */
.stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
@media (max-width: 960px) { .stats { justify-content: center; } }
.stat .n { font-size: 1.9rem; font-weight: 800; color: #fff; font-family: 'Fraunces', serif; }
.stat .n span { color: var(--jaune); }
.stat .l { font-size: 0.82rem; color: rgba(255, 255, 255, 0.75); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* Hero Card - Tableau de Bord Interactif */
.hero-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.hero-card h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--jaune);
  margin-bottom: 1.4rem;
}
.hc-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.hc-row:last-child { border: none; padding-bottom: 0; }
.hc-ic {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.18);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex: none;
}
.hc-row .t { font-weight: 700; font-size: 0.96rem; color: #fff; margin-bottom: 0.15rem; }
.hc-row .s { font-size: 0.82rem; color: rgba(255, 255, 255, 0.7); font-weight: 500; }

/* BANDEAU VALEUR */
.valueband {
  max-width: 1160px;
  margin: -1.8rem auto 0;
  padding: 0 1.4rem;
  position: relative;
  z-index: 10;
}
.valueband-in {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1.3rem 1.4rem;
  text-align: center;
}
.vb { padding: 0.4rem; }
.vb b { display: block; font-size: 1.8rem; color: var(--bleu); font-weight: 800; font-family: 'Fraunces', serif; }
.vb span { font-size: 0.84rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.vb .gold { color: var(--gold); }

/* ==========================================================================
 * SECTIONS & HEADERS
 * ========================================================================== */
section { max-width: 1160px; margin: 0 auto; padding: 2.8rem 1.4rem; }
section.alt { background: var(--bg2); max-width: 100%; }
section.alt .wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.4rem; }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 2.2rem; }
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}
.kicker:before, .kicker:after { content: "—"; opacity: 0.5; margin: 0 8px; }
.sec-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.sec-head p { color: var(--muted); margin-top: 0.8rem; font-size: 1.06rem; }

/* ==========================================================================
 * HUB D'ORIENTATION & CARTES
 * ========================================================================== */
.cs-hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.6rem; }
.cs-hcard {
  position: relative;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  transition: all 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.cs-hcard:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 4px;
  width: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: 0.3s ease;
}
.cs-hcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.cs-hcard:hover:before { transform: scaleX(1); }
.cs-hcard .ic {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  margin-bottom: 1.4rem;
  background: var(--bg2);
  border: 1px solid var(--line);
}
.cs-hcard h3 { font-size: 1.25rem; font-weight: 800; color: var(--ink); margin-bottom: 0.5rem; }
.cs-hcard p { font-size: 0.94rem; color: var(--muted); margin-bottom: 1.5rem; flex: 1; }
.cs-hcard .go { font-weight: 700; font-size: 0.88rem; color: var(--gold); display: inline-flex; gap: 6px; align-items: center; }
.cs-hcard .go .arr { transition: 0.25s ease; }
.cs-hcard:hover .go .arr { transform: translateX(6px); }
.cs-badge {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold);
  letter-spacing: 0.05em;
}

/* ==========================================================================
 * TIMELINE / PARCOURS EN 5 ÉTAPES
 * ========================================================================== */
.timeline { max-width: 860px; margin: 0 auto; position: relative; }
.timeline:before {
  content: "";
  position: absolute;
  left: 28px;
  top: 15px;
  bottom: 15px;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--bleu));
  border-radius: 3px;
}
@media (max-width: 768px) { .timeline:before { left: 22px; } }
.step { display: flex; gap: 24px; padding: 16px 0; position: relative; }
.step .num {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  flex: none;
  background: var(--bleu);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.3rem;
  z-index: 1;
  box-shadow: 0 8px 20px rgba(14, 93, 84, 0.3);
}
@media (max-width: 768px) { .step .num { width: 46px; height: 46px; font-size: 1.1rem; border-radius: 14px; } }
.step .body {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 2.2rem;
  flex: 1;
  transition: all 0.25s ease;
  box-shadow: var(--ombre);
}
.step:hover .body { transform: translateX(6px); border-color: var(--gold); box-shadow: var(--shadow-lg); }
.step .body h4 { font-size: 1.18rem; color: var(--ink); margin-bottom: 0.4rem; }
.step .body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }
.step .body .step-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--bleu);
  text-decoration: none;
}
.step .body .step-link:hover { text-decoration: underline; }

/* ==========================================================================
 * MODES D'ENTRAÎNEMENT & QCM
 * ========================================================================== */
.grid { display: grid; gap: 1.4rem; }
.modes { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.mode {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--ombre);
  border-top: 5px solid var(--bleu);
  transition: all 0.26s ease;
}
.mode:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.mode .ico { font-size: 2.4rem; margin-bottom: 0.8rem; display: inline-block; }
.mode h3 { color: var(--ink); margin-bottom: 0.5rem; font-size: 1.15rem; }
.mode p { color: var(--muted); font-size: 0.93rem; }
.mode.m1 { border-color: var(--bleu); } .mode.m2 { border-color: var(--vert); }
.mode.m3 { border-color: var(--orange); } .mode.m4 { border-color: var(--violet); }

/* QCM Wrap & Controls */
.qcm-wrap {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  max-width: 820px;
  margin: auto;
}
@media (max-width: 768px) { .qcm-wrap { padding: 1.5rem; } }
.theme-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.8rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.4rem;
}
.theme-pick button {
  padding: 0.45rem 0.95rem;
  border-radius: 30px;
  border: 1.5px solid var(--bleu);
  background: var(--surf);
  color: var(--bleu);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.84rem;
  transition: all 0.2s ease;
}
.theme-pick button:hover, .theme-pick button.sel { background: var(--bleu); color: #fff; }

.len-pick { display: inline-flex; gap: 0.4rem; flex-wrap: wrap; vertical-align: middle; margin: 0.5rem 0; }
.len-pick button {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  border: 1.5px solid var(--turquoise);
  background: var(--surf);
  color: var(--turquoise);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.84rem;
  transition: 0.2s;
}
.len-pick button:hover, .len-pick button.sel { background: var(--turquoise); color: #fff; }

.mode-row { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-bottom: 1.5rem; }
.modebtn {
  padding: 0.65rem 1.3rem;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  transition: all 0.2s ease;
  box-shadow: var(--ombre);
}
.modebtn.sim { background: #cf8a2c; } /* fixe, pas var(--orange) : trop clair en sombre pour du texte blanc */
.modebtn.err { background: var(--bleu); }
.modebtn:hover { transform: translateY(-2px); filter: brightness(1.08); }

.qbar { height: 10px; background: var(--bg2); border-radius: 10px; overflow: hidden; margin-bottom: 1.5rem; }
.qbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--bleu)); width: 0; transition: width 0.4s ease; }
.qmeta { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--muted); margin-bottom: 0.8rem; font-weight: 700; }
.qtext { font-size: 1.25rem; font-weight: 800; color: var(--ink); margin-bottom: 1.5rem; line-height: 1.45; }

.opts { display: grid; gap: 0.8rem; }
.opt {
  padding: 1rem 1.2rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-weight: 600;
  background: var(--surf);
  color: var(--ink);
  position: relative;
}
.opt:hover { border-color: var(--bleu); background: color-mix(in srgb, var(--bleu) 6%, var(--surf)); transform: translateX(6px); }
.opt.sel-opt { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--surf)); }
.opt.correct { border-color: var(--vert); background: color-mix(in srgb, var(--vert) 15%, var(--surf)); font-weight: 700; transform: scale(1.01); box-shadow: 0 6px 18px rgba(31,138,91,.18); }
.opt.wrong { border-color: var(--rouge); background: color-mix(in srgb, var(--rouge) 15%, var(--surf)); }
.opt.disabled { pointer-events: none; }

.explain {
  margin-top: 1.2rem;
  padding: 1.2rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--bleu) 8%, var(--surf));
  border-left: 5px solid var(--bleu);
  font-size: 0.94rem;
  display: none;
  color: var(--ink);
}
.explain.show { display: block; animation: fadeIn 0.35s ease; }
.explain .src { display: block; margin-top: 0.6rem; font-size: 0.82rem; color: var(--muted); font-style: italic; font-weight: 600; }
.dev-banner { background: #fff8e1; border-bottom: 2px solid #b8860b; padding: 0.7rem 1.4rem; position: relative; z-index: 90; }
.dev-banner .db-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.dev-banner .db-ic { font-size: 1.2rem; flex: none; }
.dev-banner .db-txt { flex: 1; min-width: 240px; font-size: 0.9rem; color: #5a4200; font-weight: 600; line-height: 1.5; }
.dev-banner .db-txt b { color: #7a5800; }
.dev-banner .db-txt a { color: #7a5800; font-weight: 800; text-decoration: underline; }
.dev-banner .db-close { flex: none; background: none; border: none; font-size: 1.1rem; line-height: 1; cursor: pointer; color: #7a5800; padding: 0.3rem 0.5rem; }

.obsolete-note {
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-left: 4px solid #b8860b;
  border-radius: 0 8px 8px 0;
  background: #fff8e1;
  color: #5a4200;
  font-size: 0.85rem;
  line-height: 1.55;
  font-weight: 500;
}
.obsolete-note b { color: #7a5800; }

.qnav { display: flex; justify-content: space-between; margin-top: 1.8rem; }
.qresult { text-align: center; display: none; padding: 2rem 0; }
.qresult.show { display: block; }
.qresult .score { font-size: 3.5rem; font-weight: 800; color: var(--bleu); font-family: 'Fraunces', serif; }

/* Gamebar / Gamification */
.gamebar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
  background: var(--bleu-fonce);
  color: #fff;
  border-radius: 16px;
  padding: 0.7rem 1rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--ombre);
}
.gamebar .gchip {
  background: rgba(255, 255, 255, 0.14);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.86rem;
  font-weight: 600;
}
.gamebar .gchip b { color: var(--jaune); font-weight: 800; }

/* ==========================================================================
 * THÈMES PRIORITAIRES (BARRES)
 * ========================================================================== */
.prio { max-width: 860px; margin: auto; }
.prow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--ombre);
  padding: 1rem 1.2rem;
  transition: all 0.2s ease;
}
.prow:hover { transform: translateY(-3px); border-color: var(--gold); }
.prow .pn { flex: none; font-weight: 800; color: var(--bleu); width: 1.8rem; text-align: center; font-size: 1.1rem; }
.prow .pmid { flex: 1; }
.prow .pname { font-weight: 800; font-size: 1rem; color: var(--ink); margin-bottom: 0.35rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.prow .ptrend { font-size: 0.7rem; font-weight: 800; padding: 0.12rem 0.5rem; border-radius: 6px; }
.prow .ptrend.up { background: rgba(46, 213, 115, 0.18); color: #2ed573; }
.prow .ptrend.perm { background: rgba(212, 175, 55, 0.18); color: var(--gold); }
.prow .pbar { height: 10px; background: var(--bg2); border-radius: 8px; overflow: hidden; }
.prow .pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--bleu)); border-radius: 8px; }
.prow .ppct { flex: none; font-weight: 800; color: var(--bleu); font-size: 1rem; min-width: 50px; text-align: right; }

/* ==========================================================================
 * LOIS & ASTUCES MNÉMOTECHNIQUES
 * ========================================================================== */
.lois { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.loi { background: var(--surf); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--ombre); transition: 0.26s; }
.loi:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.loi-head { padding: 1.2rem 1.4rem; color: #fff; }
.loi-head h3 { font-size: 1.35rem; color: #fff; }
.loi-body { padding: 1.2rem 1.4rem; color: var(--ink); }
.loi-body ul { list-style: none; }
.loi-body li { padding: 0.4rem 0; border-bottom: 1px dashed var(--line); font-size: 0.94rem; display: flex; gap: 0.5rem; }
.loi-body li:last-child { border: none; }

.astuces { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; max-width: 1160px; margin: auto; }
.astuce { background: var(--surf); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--ombre); padding: 1.6rem; border-top: 5px solid var(--gold); transition: 0.25s; }
.astuce:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.astuce .ai { font-size: 2rem; margin-bottom: 0.6rem; }
.astuce h4 { color: var(--ink); margin-bottom: 0.5rem; font-size: 1.1rem; }
.astuce p { font-size: 0.93rem; color: var(--muted); }

/* ==========================================================================
 * CTA FINALE AVANT LE FOOTER
 * ========================================================================== */
.cta {
  width: min(1160px, calc(100% - 2.8rem));
  margin: 2.5rem auto 3rem;
  padding: 3rem 1.5rem;
  text-align: center;
  background: #0a3f39;
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--gold);
  color: #fff;
}
.cta h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
}
.cta p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 0 auto 1.6rem;
  font-size: 1.05rem;
}

/* ==========================================================================
 * FOOTER INSTITUTIONNEL ANONYMISÉ
 * ========================================================================== */
footer {
  background: var(--vert-imp);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 3.5rem 1.4rem 2.5rem;
  font-size: 0.92rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
footer b { color: #fff; font-weight: 800; }
footer .foot-links {
  margin-top: 1.2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
footer .foot-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.5rem 1.2rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
footer .foot-btn:hover { background: var(--gold); color: #000; }
footer .foot-bot {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  opacity: 0.65;
}

/* ==========================================================================
 * UTILITAIRES & ANIMATIONS
 * ========================================================================== */
.fade { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade.in { opacity: 1; transform: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes floatUp { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.qloading{display:flex;align-items:center;justify-content:center;gap:.7rem;padding:2.4rem 0;color:var(--gris);font-weight:600}
.qloading .spin{width:1.15rem;height:1.15rem;border:3px solid var(--or);border-top-color:transparent;border-radius:50%;animation:qspin .7s linear infinite;flex:none}
@keyframes qspin{to{transform:rotate(360deg)}}

#toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(30px);
  z-index: 9999;
  background: var(--vert);
  color: #fff;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  font-weight: 800;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: 0.35s ease;
  pointer-events: none;
  font-size: 0.96rem;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.bad { background: var(--rouge); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9998; }

/* ==========================================================================
 * ANNALES & EXAMENS RÉELS
 * ========================================================================== */
.annales-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.exam {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--ombre);
  overflow: hidden;
  border-top: 5px solid var(--bleu);
  transition: all 0.26s ease;
}
.exam:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.exam-h { padding: 1.3rem 1.5rem; background: var(--bleu-fonce); color: #fff; }
.exam-h .stitre { font-size: 0.82rem; opacity: 0.9; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.exam-h h3 { font-size: 1.2rem; color: #fff; margin: 0.3rem 0 0; }
.exam-h .sess { display: inline-block; margin-top: 0.6rem; background: rgba(255, 255, 255, 0.18); padding: 0.28rem 0.8rem; border-radius: 20px; font-size: 0.82rem; font-weight: 700; }
.exam-b { padding: 1.2rem 1.5rem; }
.cadre { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.2rem; border-bottom: 1px dashed var(--line); }
.cadre:last-child { border: none; }
.cadre .ico { flex: none; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--bleu) 10%, var(--surf)); color: var(--bleu); display: grid; place-items: center; font-size: 1rem; }
.cadre .nom { font-weight: 700; font-size: 0.94rem; flex: 1; color: var(--ink); }
.cadre a.dl, .cadre button.dl { background: var(--vert); color: #fff; padding: 0.4rem 0.85rem; border-radius: 10px; font-size: 0.82rem; font-weight: 700; white-space: nowrap; transition: 0.2s; border: none; cursor: pointer; font-family: inherit; }
.cadre a.dl:hover, .cadre button.dl:hover { filter: brightness(1.1); transform: translateY(-1px); }
.cadre .soon { color: var(--muted); font-size: 0.8rem; font-style: italic; background: var(--bg2); padding: 0.35rem 0.8rem; border-radius: 10px; }
.cadre:has(.docs) { align-items: flex-start; }
.cadre .docs { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; }
.cadre .docs .dl { background: var(--bleu); }
.cadre .docs .dl:hover { filter: brightness(1.15); }

/* ==========================================================================
 * ROADMAP DES 31 COURS (SENTIER)
 * ========================================================================== */
.roadmap { position: relative; max-width: 820px; margin: 2rem auto 0; padding: 0.5rem 0 0; }
.roadmap::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 40px;
  bottom: 40px;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  border-radius: 4px;
  opacity: 0.5;
  background: linear-gradient(to bottom,
    #0e5d54 0%, #0e5d54 39%,
    #b8860b 39%, #b8860b 52%,
    #1c6e8c 52%, #1c6e8c 67%,
    #6b4e9c 67%, #6b4e9c 82%,
    #b5345b 82%, #b5345b 100%);
}
.rm-start, .rm-finish {
  position: relative;
  z-index: 2;
  text-align: center;
  font-weight: 800;
  color: var(--bleu-fonce);
  background: var(--surf);
  border: 2px solid var(--gold);
  display: table;
  margin: 0 auto 1.2rem;
  padding: 0.5rem 1.4rem;
  border-radius: 30px;
  font-size: 0.95rem;
  box-shadow: var(--ombre);
}
.rm-finish { margin: 1.8rem auto 0; }
.rm-chapter { position: relative; z-index: 1; margin-bottom: 2rem; }
.rm-flag {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 auto 1.4rem;
  background: var(--cc);
  color: #fff;
  border-radius: 30px;
  padding: 0.6rem 1.5rem;
  width: fit-content;
  max-width: 94%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}
.rm-flagnum { flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.28); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; }
.rm-flag h3 { font-size: 1rem; margin: 0; font-weight: 800; color: #fff; }
.rm-flag .rm-count { font-size: 0.75rem; opacity: 0.9; font-weight: 700; white-space: nowrap; }
.rm-item { position: relative; z-index: 1; display: block; min-height: 44px; margin-bottom: 0.8rem; text-decoration: none; color: var(--ink); }
.rm-item::after { content: ""; display: table; clear: both; }
.rm-dot {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surf);
  border: 3px solid var(--cc);
  color: var(--cc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.rm-card {
  display: block;
  width: calc(50% - 40px);
  background: var(--surf);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cc);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: var(--ombre);
  transition: all 0.2s ease;
  color: var(--ink);
}
.rm-item:nth-of-type(odd) .rm-card { float: left; }
.rm-item:nth-of-type(even) .rm-card { float: right; border-left: 1px solid var(--line); border-right: 4px solid var(--cc); }
.rm-item:hover .rm-card { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
@media (max-width: 768px) {
  .roadmap::before { left: 24px; }
  .rm-flag { margin-left: 0; justify-content: flex-start; padding-left: 1rem; }
  .rm-dot { left: 24px; }
  .rm-card { float: none !important; width: auto !important; margin-left: 54px; border-left: 4px solid var(--cc) !important; border-right: 1px solid var(--line) !important; }
}

/* ==========================================================================
 * COURS SUPPLÉMENTAIRES (COURS.JSON) & ACCORDÉON
 * ========================================================================== */
#cours-plus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1.6rem; margin-top: 1.8rem; }
.cp-card { background: var(--surf); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--ombre); overflow: hidden; border-left: 6px solid var(--bleu); display: flex; flex-direction: column; transition: 0.26s; }
.cp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cp-c-bleu { border-color: var(--bleu); } .cp-c-vert { border-color: var(--vert); }
.cp-c-orange { border-color: var(--orange); } .cp-c-violet { border-color: var(--violet); }
.cp-c-rose { border-color: var(--rose); } .cp-c-turquoise { border-color: var(--turquoise); }
.cp-c-rouge { border-color: var(--rouge); }
.cp-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.cp-tag { display: inline-block; background: color-mix(in srgb, var(--bleu) 10%, var(--surf)); color: var(--bleu); padding: 0.25rem 0.8rem; border-radius: 8px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; align-self: flex-start; }
.cp-title { color: var(--ink); font-size: 1.18rem; line-height: 1.35; display: flex; gap: 0.5rem; align-items: baseline; font-weight: 800; }
.cp-sub { color: var(--muted); font-size: 0.9rem; font-style: italic; }
.cp-summary { color: var(--ink); font-size: 0.94rem; line-height: 1.6; }
.cp-acc { border-top: 1px dashed var(--line); padding-top: 0.8rem; margin-top: 0.5rem; }
.cp-acc summary { cursor: pointer; font-weight: 800; color: var(--bleu); font-size: 0.92rem; padding: 0.4rem 0; list-style: none; display: flex; align-items: center; gap: 0.4rem; user-select: none; }
.cp-acc summary::-webkit-details-marker { display: none; }
.cp-acc summary::after { content: "⌄"; margin-left: auto; transition: 0.2s; font-size: 1.2rem; }
.cp-acc[open] summary::after { transform: rotate(180deg); }
.cp-obj, .cp-les { padding-left: 1.2rem; margin-top: 0.6rem; font-size: 0.9rem; color: var(--ink); line-height: 1.6; }
.cp-les { list-style: none; padding-left: 0; }
.cp-les li { padding: 0.45rem 0; display: flex; align-items: flex-start; gap: 0.5rem; border-bottom: 1px dashed var(--line); }
.cp-les li:last-child { border: none; }
.cp-bullet { color: var(--gold); font-weight: 800; flex: none; }
.cp-lt { flex: 1; }
.cp-dur { color: var(--muted); font-size: 0.8rem; background: var(--bg2); padding: 0.15rem 0.6rem; border-radius: 6px; white-space: nowrap; font-weight: 700; }
.cp-resources { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.cp-res { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.85rem; background: var(--bleu); color: #fff; border-radius: 10px; font-size: 0.84rem; font-weight: 700; transition: 0.2s; }
.cp-res:hover { background: var(--bleu-fonce); transform: translateY(-2px); }
.cp-meta { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.5rem; font-style: italic; }

/* Fiches & Accordéon */
.acc { max-width: 960px; margin: 0 auto; }
.fiche { background: var(--surf); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--ombre); margin-bottom: 1.2rem; overflow: hidden; border-left: 6px solid var(--bleu); transition: 0.25s; }
.fiche.f1 { border-color: var(--turquoise); } .fiche.f2 { border-color: var(--bleu); }
.fiche.f3 { border-color: var(--vert); } .fiche.f4 { border-color: var(--orange); }
.fiche.f5 { border-color: var(--violet); } .fiche.f6 { border-color: var(--rose); } .fiche.f7 { border-color: var(--rouge); }
.fiche-h { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.6rem; cursor: pointer; user-select: none; transition: 0.2s; }
.fiche-h:hover { background: color-mix(in srgb, var(--bleu) 5%, var(--surf)); }
.fiche-h .num { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--bleu); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1rem; }
/* Fonds fixes sur f1/f4/f6 : var(--turquoise)/var(--orange)/var(--rose) deviennent
   trop clairs en theme sombre pour le texte blanc de .num. */
.fiche.f1 .num { background: #c79a2e; } .fiche.f3 .num { background: var(--vert); }
.fiche.f4 .num { background: #cf8a2c; } .fiche.f5 .num { background: var(--violet); }
.fiche.f6 .num { background: #b8862b; } .fiche.f7 .num { background: var(--rouge); }
.fiche-h h3 { font-size: 1.15rem; color: var(--ink); margin: 0; }
.fiche-h h3 small { display: block; font-weight: 600; color: var(--muted); font-size: 0.84rem; margin-top: 2px; }
.fiche-h .chev { margin-left: auto; font-size: 1.4rem; color: var(--muted); transition: 0.3s ease; }
.fiche.open .chev { transform: rotate(180deg); }
.fiche-c { max-height: 0; overflow: hidden; transition: max-height 0.5s ease; }
.fiche.open .fiche-c { max-height: 5000px; }
.fiche-in { padding: 0 1.6rem 1.8rem; border-top: 1px dashed var(--line); color: var(--ink); }
.fiche-in h4 { color: var(--ink); margin: 1.3rem 0 0.5rem; font-size: 1.05rem; display: flex; align-items: center; gap: 0.5rem; }
.fiche-in p, .fiche-in li { font-size: 0.95rem; line-height: 1.65; margin: 0.35rem 0; }
.fiche-in ul, .fiche-in ol { padding-left: 1.4rem; }
.meta-line { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0; }
.chip { background: color-mix(in srgb, var(--bleu) 10%, var(--surf)); color: var(--bleu); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.chip.green { background: color-mix(in srgb, var(--vert) 12%, var(--surf)); color: var(--vert); }
.chip.orange { background: color-mix(in srgb, var(--orange) 12%, var(--surf)); color: var(--orange); }
.note { background: color-mix(in srgb, var(--jaune) 12%, var(--surf)); border-left: 4px solid var(--jaune); padding: 0.9rem 1.1rem; border-radius: 10px; font-size: 0.92rem; margin: 0.9rem 0; color: var(--ink); }
.accbtn { padding: 0.5rem 1rem; border-radius: 20px; border: 2px solid var(--bleu); background: var(--surf); color: var(--bleu); font-weight: 700; cursor: pointer; font-size: 0.88rem; transition: 0.2s; }
.accbtn:hover { background: var(--bleu); color: #fff; }

/* Bannières CSS élégantes pour fiches et cours additionnels */
img.fiche-banner, img.cp-banner { display: none !important; }
.cp-banner-css, .fiche-banner-css { display: flex; align-items: center; justify-content: center; width: calc(100% + 3.2rem); height: 130px; margin: 0 -1.6rem 1.4rem; border-bottom: 2px solid var(--gold); background: #072b26; position: relative; overflow: hidden; }
.exec-code, .fiche-banner-css .exec-code { font-family: system-ui, sans-serif; font-weight: 900; font-size: 2.8rem; letter-spacing: 2px; color: rgba(255, 255, 255, 0.18); text-transform: uppercase; transition: 0.4s ease; }
.cp-card:hover .exec-code, .fiche:hover .exec-code { color: rgba(212, 175, 55, 0.38); }
.cp-bg-bleu { background: #0a3f39; }
.cp-bg-vert { background: #0e5d54; }
.cp-bg-orange { background: #2a5243; }
.cp-bg-violet { background: #1a4a40; }

/* ==========================================================================
 * NEWSLETTER INSTITUTIONNELLE
 * ========================================================================== */
#newsletter { max-width: 820px; margin: 3rem auto; padding: 0 1.4rem; }
.nl-card { background: #0a3f39; color: #fff; border-radius: var(--radius-lg); padding: 2.5rem 2rem; text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); border-top: 3px solid var(--gold); }
.nl-in { position: relative; z-index: 1; max-width: 540px; margin: auto; }
.nl-in .ico { font-size: 2.8rem; margin-bottom: 0.6rem; }
.nl-in h2 { color: #fff; font-size: 1.8rem; margin-bottom: 0.5rem; }
.nl-in p { opacity: 0.92; font-size: 1rem; margin-bottom: 1.5rem; line-height: 1.6; }
.nl-form { display: flex; gap: 0.6rem; flex-wrap: wrap; max-width: 460px; margin: 0 auto; }
.nl-form input { flex: 1; min-width: 220px; padding: 0.9rem 1.2rem; border-radius: 14px; border: 2px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 0.98rem; outline: none; font-family: inherit; }
.nl-form input::placeholder { color: rgba(255, 255, 255, 0.7); }
.nl-form input:focus { background: rgba(255, 255, 255, 0.22); border-color: var(--jaune); }
.nl-form button { padding: 0.9rem 1.8rem; background: var(--jaune); color: var(--bleu-fonce); border: none; border-radius: 14px; font-weight: 800; cursor: pointer; font-size: 0.98rem; transition: 0.2s; box-shadow: 0 6px 18px rgba(0,0,0,0.2); }
.nl-form button:hover { background: var(--gold); color: #fff; transform: translateY(-2px); }
.nl-privacy { font-size: 0.8rem; opacity: 0.75; margin-top: 1rem; }
.nl-privacy a { color: var(--jaune); font-weight: 700; text-decoration: underline; }
.nl-success { display: none; background: rgba(46, 213, 115, 0.2); border: 2px solid #2ed573; border-radius: 14px; padding: 1.2rem; margin-top: 1.2rem; font-weight: 700; color: #fff; }
.nl-success.show { display: block; animation: fadeIn 0.35s ease; }

/* Tableaux et Boîtes */
.tbl { overflow-x: auto; background: var(--surf); border-radius: var(--radius); box-shadow: var(--ombre); margin-top: 1.4rem; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th { background: var(--bleu); color: #fff; padding: 0.9rem 1rem; text-align: left; font-size: 0.92rem; font-weight: 700; }
td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; color: var(--ink); }
tr:nth-child(even) td { background: var(--bg2); }
.formula { background: #081b26; color: #7fffd4; font-family: 'Courier New', monospace; padding: 1.1rem 1.3rem; border-radius: 14px; margin: 0.8rem 0; font-size: 0.95rem; overflow-x: auto; }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1.5rem; }
.box { background: var(--surf); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--ombre); }
.box h3 { color: var(--ink); margin-bottom: 0.9rem; display: flex; align-items: center; gap: 0.6rem; font-size: 1.18rem; }
.box ul { padding-left: 1.3rem; } .box li { margin: 0.4rem 0; font-size: 0.95rem; color: var(--ink); }
.box ul.clean { list-style: none; padding: 0; }
.box ul.clean li { padding: 0.5rem 0; border-bottom: 1px dashed var(--line); }
.box ul.clean li:last-child { border: none; }



/* ===== Sous-navigation commune (pages secondaires) ===== */
.cs-subnav{display:flex;flex-wrap:wrap;gap:.3rem;justify-content:center;padding:.5rem 1rem;background:var(--carte);border-bottom:1px solid var(--line);box-shadow:0 2px 10px rgba(10,63,57,.05)}
.cs-subnav a{color:var(--gris);text-decoration:none;font-weight:700;font-size:.83rem;padding:.35rem .8rem;border-radius:20px;transition:background .2s,color .2s;white-space:nowrap}
.cs-subnav a:hover{background:var(--bg2);color:var(--bleu)}
.cs-subnav a.active{background:var(--bleu);color:#fff}

/* ===== Footer principal ===== */
.cs-mainfooter{background:var(--vert-imp);color:#e8efe9;padding:3rem 1.5rem 1rem;margin-top:3rem}
.cs-fgrid{max-width:1150px;margin:0 auto;display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:2rem}
.cs-fcol h4{color:var(--gold);margin:0 0 .8rem;font-size:.85rem;letter-spacing:1.5px;text-transform:uppercase}
.cs-fcol a{display:block;color:#cfe0d8;text-decoration:none;font-size:.9rem;padding:.22rem 0;transition:color .2s}
.cs-fcol a:hover{color:var(--gold)}
.cs-fbrandcol p{font-size:.85rem;line-height:1.6;color:#b8cfc6;margin:.6rem 0 1rem}
.cs-fbrandcol b{font-size:1.15rem;color:#fff}
.cs-flogo{width:44px;height:44px;border-radius:50%;background:var(--bleu);border:2px solid var(--gold);display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;margin-bottom:.6rem}
.cs-yt{display:inline-block;background:#c4302b;color:#fff!important;padding:.45rem 1rem;border-radius:10px;font-weight:700;font-size:.85rem;text-decoration:none}
.cs-fbase{max-width:1150px;margin:2rem auto 0;padding-top:1rem;border-top:1px solid rgba(255,255,255,.15);text-align:center;font-size:.8rem;color:#9fbcb2}
@media(max-width:900px){.cs-fgrid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.cs-fgrid{grid-template-columns:1fr}}

/* ===== Footer collé en bas des pages courtes ===== */
body{display:flex;flex-direction:column;min-height:100vh}
body>*{flex-shrink:0;min-width:0;max-width:100%;width:100%}
/* Les enfants directs du body flex doivent occuper toute la largeur,
   sinon margin:auto les fait passer en fit-content (bandeau de valeur,
   carte flashcard... s'effondrent). Exceptions : elements flottants. */
body>button{width:auto;align-self:center}
body>#toast,body>#confetti,body>#cs-share-btn,body>#cs-share-menu,body>#cs-share-toast{width:auto}
.cs-mainfooter{margin-top:auto}

/* ============================================================
 * Accueil premium — Examens & Bibliothèque en tête de page
 * ============================================================ */

/* Bandeau de statistiques des examens */
.ax-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:.9rem;max-width:1000px;margin:0 auto 1.8rem}
.ax-stat{background:var(--carte);border:1px solid var(--line);border-radius:var(--radius);padding:1.05rem .9rem;text-align:center;box-shadow:var(--ombre);position:relative;overflow:hidden}
.ax-stat::after{content:"";position:absolute;inset:auto 0 0 0;height:3px;background:var(--gold)}
.ax-stat b{display:block;font-size:1.55rem;color:var(--bleu);font-family:'Fraunces',serif;letter-spacing:.5px}
.ax-stat span{font-size:.8rem;color:var(--gris);font-weight:600;line-height:1.25;display:block;margin-top:.15rem}

/* Bannière épreuve vedette */
.ax-featured{display:flex;align-items:center;justify-content:space-between;gap:1.4rem;flex-wrap:wrap;background:var(--bleu-fonce);color:#fff;border-radius:var(--radius-lg);padding:1.6rem 1.9rem;margin:0 auto 1.8rem;max-width:1000px;box-shadow:var(--ombre);position:relative;overflow:hidden;border-left:4px solid var(--gold)}
.ax-f-badge{display:inline-block;background:rgba(212,175,55,.25);border:1px solid rgba(212,175,55,.55);color:var(--jaune);padding:.28rem .85rem;border-radius:999px;font-size:.78rem;font-weight:800;letter-spacing:.4px;margin-bottom:.55rem}
.ax-f-left h3{color:#fff;font-size:1.35rem;margin:.1rem 0 .35rem;font-family:'Fraunces',serif}
.ax-f-left p{color:rgba(255,255,255,.85);font-size:.92rem;margin:0;max-width:520px}
.ax-f-actions{display:flex;gap:.7rem;flex-wrap:wrap}
.ax-f-actions .btn-line{border-color:rgba(255,255,255,.45);color:#fff}
.ax-f-actions .btn-line:hover{background:rgba(255,255,255,.14);border-color:#fff}

/* Puces de filtre par cadre */
.ax-chips{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center;margin:0 auto 1.5rem;max-width:1000px}
.ax-chip{border:1.5px solid var(--line);background:var(--carte);color:var(--ink);padding:.45rem 1rem;border-radius:999px;font-size:.85rem;font-weight:700;cursor:pointer;transition:.18s;font-family:inherit}
.ax-chip:hover{border-color:var(--bleu);color:var(--bleu);transform:translateY(-1px)}
.ax-chip.on{background:var(--bleu);border-color:var(--bleu);color:#fff;box-shadow:0 6px 16px rgba(14,93,84,.28)}

/* Bouton contour réutilisable (fond clair) */
.btn-line{display:inline-block;padding:.72rem 1.35rem;border-radius:14px;border:1.5px solid var(--bleu);color:var(--bleu);font-weight:800;font-size:.92rem;transition:.2s;background:transparent;text-align:center}
.btn-line:hover{background:var(--bleu);color:#fff;transform:translateY(-2px)}

/* Barre d'outils de la bibliothèque de cours */
.cl-toolbar{display:flex;gap:.7rem;flex-wrap:wrap;justify-content:center;align-items:stretch;max-width:1000px;margin:0 auto 1.8rem}
.cl-toolbar input[type="search"]{flex:1 1 300px;min-width:240px;padding:.8rem 1.15rem;border-radius:14px;border:1.5px solid var(--line);background:var(--carte);color:var(--ink);font-size:.95rem;font-family:inherit;outline:none;transition:.2s;box-shadow:var(--ombre)}
.cl-toolbar input[type="search"]:focus{border-color:var(--bleu);box-shadow:0 0 0 3px rgba(14,93,84,.14)}

/* Liens texte officiel sur les cartes de lois */
.loi-links{display:flex;gap:.45rem;flex-wrap:wrap;margin-top:.75rem;padding-top:.7rem;border-top:1px dashed var(--line)}
.loi-links a{display:inline-block;padding:.32rem .7rem;border-radius:999px;border:1.3px solid var(--line);font-size:.76rem;font-weight:700;color:var(--bleu);transition:.18s;background:var(--carte)}
.loi-links a:hover{background:var(--bleu);border-color:var(--bleu);color:#fff;transform:translateY(-1px)}



@media(max-width:640px){
  .ax-featured{padding:1.3rem 1.2rem}
  .ax-f-actions{width:100%}
  .ax-f-actions .btn{flex:1;text-align:center}
}

/* ===== Fix : en-têtes colorés des cartes .loi (classes c-*) ===== */
/* Fonds fixes (pas de var() de thème) : le texte de .loi-head est blanc en dur,
   et var(--turquoise)/var(--orange) etc. deviennent trop clairs en thème sombre
   (texte blanc illisible dessus). Ces teintes restent volontairement identiques
   quel que soit le thème, comme .hero/.cta/.nl-card. */
.loi-head.c-bleu   { background: #0a3f39; }
.loi-head.c-turq   { background: #7c5f1c; }
.loi-head.c-vert   { background: #10583b; }
.loi-head.c-orange { background: #8f5e1c; }
.loi-head.c-violet { background: #2b5850; }
.loi-head.c-rose   { background: #7e5c1d; }

/* ===== Fix mobile : lignes flex qui refusaient de passer à la ligne ===== */
.box .step, .resume .step { flex-wrap: wrap; row-gap: 8px; }

/* ============================================================
 * Portail — Choisis ton parcours (hub multi-formations)
 * ============================================================ */
.portal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1.3rem;max-width:1160px;margin:0 auto}
.portal-card{background:var(--carte);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--ombre);display:flex;flex-direction:column;transition:.22s;position:relative}
.portal-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg);border-color:var(--gold)}
.portal-card .pc-band{height:4px;background:var(--bleu-fonce)}
.portal-card .pc-band.b-bleu{background:#1f8ad0}
.portal-card .pc-band.b-orange{background:var(--orange)}
.portal-card .pc-band.b-violet{background:var(--violet)}
.portal-card .pc-in{padding:1.3rem 1.4rem;flex:1;display:flex;flex-direction:column}
.portal-card .pc-ic{font-size:2rem;margin-bottom:.5rem}
.portal-card .pc-status{align-self:flex-start;background:var(--bg2);color:var(--gris);font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.5px;padding:.2rem .6rem;border-radius:20px;margin-bottom:.55rem}
.portal-card .pc-status.ok{background:color-mix(in srgb,var(--vert) 15%,var(--carte));color:var(--vert)}
.portal-card .pc-status.new{background:var(--jaune);color:var(--bleu-fonce)}
.portal-card h3{color:var(--bleu-fonce);font-size:1.18rem;margin-bottom:.3rem}
.portal-card p{color:var(--gris);font-size:.9rem;flex:1;margin-bottom:.8rem}
.portal-card .pc-cta{color:var(--bleu);font-weight:800;font-size:.9rem}
.portal-card:hover .pc-cta{color:var(--gold)}

/* ==========================================================================
 * STYLES RESTAURÉS (perdus lors de la migration CSS inline → style.css)
 * ========================================================================== */

/* --- Les 31 cours du parcours (section Cours) --- */
.c31cat { margin-top: 1.6rem; }
.c31cat-h {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.06rem;
  color: var(--ink);
  margin: 0 0 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--line);
}
.c31cat-h .b {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--cc, #0e5d54);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.cours31-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 0.6rem; }
.cours31-grid .c31 {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  background: var(--surf);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cc, #0e5d54);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.3;
  transition: 0.15s;
}
.cours31-grid .c31:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08); transform: translateY(-1px); }
.cours31-grid .c31n {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  background: var(--cc, #0e5d54);
  color: #fff;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* --- Cartes mnémotechniques à retourner (section Mémorisation) --- */
.mnemo { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card-flip { perspective: 1000px; height: 170px; cursor: pointer; }
.card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s; transform-style: preserve-3d; }
.card-flip.flipped .card-inner { transform: rotateY(180deg); }
.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.3rem;
  text-align: center;
  box-shadow: var(--ombre);
}
.card-front { background: #0a3f39; color: #fff; }
.card-front .ico { font-size: 2rem; margin-bottom: 0.5rem; }
.card-front h4 { font-size: 1.1rem; color: #fff; }
.card-front small { opacity: 0.85; margin-top: 0.4rem; }
.card-back { background: var(--surf); color: var(--ink); transform: rotateY(180deg); border: 2px solid var(--violet); }
.card-back b { color: var(--violet); }

/* --- Pastilles A1/A2… et P1/P2… dans les encadrés (résumé, planification) --- */
.box .step, .resume .step { gap: 0.6rem; padding: 0.5rem 0; align-items: center; font-weight: 600; color: var(--ink); }
.box .step span, .resume .step span {
  background: #c79a2e; /* fixe, pas var(--turquoise) : trop clair en sombre pour du texte blanc */
  color: #fff;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* --- Les 4 piliers de la réforme (résumé structuré) --- */
.piliers { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 1.5rem; }
.pil {
  background: var(--surf);
  border-radius: 14px;
  padding: 1.2rem;
  box-shadow: var(--ombre);
  text-align: center;
  border-bottom: 4px solid var(--turquoise);
  transition: transform 0.25s, box-shadow 0.25s;
}
.pil .n { font-size: 1.6rem; font-weight: 800; color: var(--turquoise); }
.pil h4 { color: var(--ink); margin: 0.3rem 0; }
.pil p { font-size: 0.88rem; color: var(--muted); }

/* --- Bandeau dépliant du résumé structuré --- */
.resume-band {
  display: block;
  width: 100%;
  background: var(--bleu-fonce);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.85rem 1.2rem;
  border-radius: 14px;
  text-align: center;
  margin-bottom: 0.4rem;
  border: none;
  border-left: 5px solid var(--gold);
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}
.resume-band:hover { filter: brightness(1.06); }
#resChev { display: inline-block; transition: transform 0.3s; }
.resume.closed #resChev { transform: rotate(180deg); }
.resume.closed #resumeBody { display: none; }

/* --- Badges des cartes de lois (section Textes de loi) --- */
.tag {
  display: inline-block;
  background: color-mix(in srgb, var(--bleu) 10%, var(--surf));
  color: var(--bleu);
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.6rem;
}

/* --- Filigrane des bannières de fiches/cours --- */
.cp-wm {
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 0.62rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  pointer-events: none;
  z-index: 2;
}

/* --- Boutons déplier/replier des fiches --- */
.cours-intro { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-bottom: 1.5rem; }

/* --- Textes officiels du BO (cartes de lois AR/FR) --- */
.lawgrid { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); max-width: 900px; margin: auto; }
.lawcard {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--surf);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  transition: 0.2s;
  box-shadow: var(--ombre);
}
.lawcard:hover { border-color: var(--bleu); transform: translateY(-3px); }
.lawcard .ln {
  flex: none;
  background: var(--bleu);
  color: #fff;
  font-weight: 800;
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  font-size: 0.92rem;
  min-width: 54px;
  text-align: center;
}
.lawcard .lt { flex: 1; font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.lawcard .lacts { flex: none; display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-end; }
.lawcard .lf {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.28rem 0.6rem;
  border-radius: 7px;
  white-space: nowrap;
  transition: 0.18s;
  border: 1.5px solid transparent;
}
.lawcard .lf.ar { background: color-mix(in srgb, var(--bleu) 10%, var(--surf)); color: var(--bleu); }
.lawcard .lf.fr { background: color-mix(in srgb, var(--gold) 14%, var(--surf)); color: #9a7b1e; border-color: color-mix(in srgb, var(--gold) 45%, var(--surf)); }
.lawcard .lf:hover { filter: brightness(0.97); transform: translateY(-1px); border-color: currentColor; }

/* --- Cartes-liens (liens utiles) --- */
.linkcard { display: block; cursor: pointer; }
.linkcard:hover { box-shadow: 0 14px 30px rgba(10, 63, 57, 0.2); }
.linkcard .tag { transition: 0.2s; }
.linkcard:hover .tag { background: var(--bleu); color: #fff; }

/* ==========================================================================
 * POLISH GLOBAL — accessibilité & finitions (appliqué à tout le site)
 * ========================================================================== */
/* Navigation clavier : anneau de focus visible aux couleurs de la marque */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }

/* Sélection de texte aux couleurs institutionnelles */
::selection { background: var(--bleu); color: #fff; }

/* Titres : équilibrer les retours à la ligne (navigateurs récents) */
h1, h2, h3 { text-wrap: balance; }

/* Barre de défilement thémée (WebKit + Firefox) */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--bleu) 55%, var(--fond)) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--bleu) 45%, var(--fond));
  border-radius: 99px;
  border: 2px solid var(--fond);
}
::-webkit-scrollbar-thumb:hover { background: var(--bleu); }

/* Respect du réglage « réduire les animations » du visiteur */



/* ============================================================================
 * DESIGN SIMPLIFIÉ — hiérarchie, états et navigation par intention
 * ============================================================================ */
.hero-cta { align-items: center; }
.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem .2rem;
  color: var(--jaune);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero-link:hover { color: #fff; }
.qcm-quicknav, .resource-intents, .eap-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .45rem;
}
.qcm-quicknav {
  max-width: 820px;
  margin: 0 auto 1.2rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--carte);
}
.qcm-quicknav a, .resource-intents a, .eap-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .45rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--bleu);
  background: var(--carte);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}
.qcm-quicknav a:hover, .resource-intents a:hover, .eap-subnav a:hover {
  border-color: var(--bleu);
  background: color-mix(in srgb, var(--bleu) 8%, var(--carte));
}
.resource-intents { margin: -1rem auto 1.8rem; max-width: 900px; }
.eap-subnav {
  position: sticky;
  top: 84px;
  z-index: 40;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--fond) 92%, transparent);
  backdrop-filter: blur(12px);
}
.qcm-error-state {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.4rem;
  border-left: 5px solid var(--orange);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--orange) 9%, var(--surf));
  color: var(--ink);
  font-size: 1rem;
}
.qcm-error-state strong { color: var(--bleu-fonce); font-size: 1.05rem; }
.qcm-recovery {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  color: var(--ink);
}
.qcm-recovery p { margin: 0; color: var(--muted); }
.qcm-recovery-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .2rem; }
.resource-empty { padding: 1rem; color: var(--muted); text-align: center; }
button.prow {
  width: 100%;
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  appearance: none;
}
button.prow:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (max-width: 768px) {
  .qcm-quicknav { border-radius: var(--radius); justify-content: stretch; }
  .qcm-quicknav a { flex: 1 1 45%; justify-content: center; text-align: center; }
  .eap-subnav { top: 72px; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .eap-subnav a { white-space: nowrap; }
  .resource-intents { margin-top: -.4rem; }
}
@media (max-width: 480px) {
  .hero-link { width: 100%; justify-content: center; }
  .qcm-recovery-actions .btn { flex: 1 1 100%; }
}

/* ============================================================================
 * HUMAN DESIGN SYSTEM — version éditoriale, chaleureuse et non générique
 * Le contenu et la structure fonctionnelle restent inchangés.
 * ============================================================================ */

html { background: var(--paper); scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 8% 0%, rgba(216, 186, 103, .10), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(23, 107, 95, .07), transparent 30rem),
    var(--paper);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::selection { background: var(--accent); color: #fff; }
header, .csnav {
  background: rgba(251, 248, 241, .9) !important;
  border-bottom: 1px solid rgba(18, 63, 56, .13) !important;
  box-shadow: 0 2px 18px rgba(18, 63, 56, .04);
}
.csnav nav, header nav { max-width: 1240px; padding: .72rem 1.5rem; }
.csnav .logo, header .logo { gap: .7rem; }
.csnav .badge-img, header .logo .badge-img { width: 42px; height: 42px; border-radius: 14px; box-shadow: 0 4px 12px rgba(18,63,56,.16); }
.csnav .wordmark, header .logo .wordmark { color: var(--deep) !important; letter-spacing: -.025em; }
.csnav .wordmark small, header .logo .wordmark small { color: #9a741e !important; letter-spacing: .08em; }
.csnav .navlinks a, header .navlinks a {
  color: var(--ink-soft) !important;
  border-radius: 8px;
  padding: .48rem .72rem;
  font-size: .86rem;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.csnav .navlinks a:hover, header .navlinks a:hover {
  color: var(--deep) !important;
  background: rgba(23,107,95,.08) !important;
  transform: none !important;
}
.csnav .navlinks a.active, header .navlinks a.active {
  color: var(--deep) !important;
  background: transparent !important;
  box-shadow: inset 0 -2px 0 #c79a2e;
  transform: none !important;
}
.csnav .burger, header .burger { color: var(--deep) !important; border-radius: 8px; }
.cs-topbar { background: var(--deep-2); border-bottom: 1px solid rgba(212,175,55,.55); }
.hero {
  background:
    radial-gradient(circle at 86% 22%, rgba(232,193,74,.17), transparent 18rem),
    radial-gradient(circle at 8% 120%, rgba(52,153,132,.16), transparent 24rem),
    var(--deep-2);
  border-bottom: 1px solid rgba(212,175,55,.75);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .22; pointer-events: none;
  background-image: linear-gradient(120deg, transparent 0 48%, rgba(255,255,255,.05) 49% 50%, transparent 51%);
  background-size: 34px 34px;
}
.hero-in { max-width: 1240px; padding: clamp(3.2rem, 7vw, 6.5rem) 1.5rem clamp(3.4rem, 7vw, 6rem); gap: clamp(2rem, 5vw, 5rem); }
.hero h1 { font-size: clamp(2.45rem, 5vw, 4.7rem); max-width: 10ch; letter-spacing: -.045em; }
.hero p.lead { max-width: 58ch; font-size: 1.05rem; color: rgba(255,255,255,.82); }
.hero .pill { background: rgba(255,255,255,.08); border-color: rgba(232,193,74,.48); color: #f4df9a; }
.hero-card { background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.20); border-radius: 18px; box-shadow: 0 22px 50px rgba(0,0,0,.14); }
.hero-card h2 { font-size: .7rem; letter-spacing: .18em; color: #efd47b; }
.valueband { margin-top: -2.2rem; }
.valueband-in { background: rgba(255,254,250,.96); border-color: var(--warm-rule); border-radius: 14px; box-shadow: var(--shadow-lift); }
section { max-width: 1240px; padding: clamp(3.2rem, 7vw, 6rem) 1.5rem; }
.sec-head { max-width: 760px; margin-bottom: 2.7rem; }
.sec-head h2 { font-size: clamp(1.85rem, 3vw, 2.9rem); letter-spacing: -.04em; }
.sec-head p { max-width: 62ch; margin-left: auto; margin-right: auto; color: var(--ink-soft); }
.kicker { color: #8a6614; letter-spacing: .18em; font-size: .7rem; }
.kicker::before, .kicker::after { opacity: .35; }
.btn {
  min-height: 46px; border-radius: 9px; padding: .78rem 1.25rem; letter-spacing: -.01em;
  transition: transform .16s var(--ease-human), box-shadow .16s var(--ease-human), background .16s ease;
}
.btn:active, button:active, .filter-btn:active { transform: scale(.97); }
.btn-primary, .btn-gold { background: #d0a937; box-shadow: 0 7px 18px rgba(167,122,19,.20); }
.btn-primary:hover, .btn-gold:hover { background: #b88e26; box-shadow: 0 11px 24px rgba(167,122,19,.25); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); }
.btn-line { border-width: 1px; border-radius: 9px; }
.portal-grid, .cs-hub, .grid, .annales-grid, .astuces { gap: 1rem; }
.portal-card, .cs-hcard, .mode, .loi, .astuce, .box, .fiche, .exam, .lawcard, .linkcard, .card, .cp-card, .qcm-wrap {
  background: rgba(255,254,250,.94); border-color: var(--rule); border-radius: 12px; box-shadow: var(--shadow-soft); transition: transform .22s var(--ease-human), box-shadow .22s var(--ease-human), border-color .22s ease;
}
.portal-card:hover, .cs-hcard:hover, .mode:hover, .loi:hover, .astuce:hover, .box:hover, .fiche:hover, .exam:hover, .lawcard:hover, .linkcard:hover, .card:hover, .cp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--warm-rule); }
.portal-card .pc-in, .cs-hcard { padding: 1.55rem; }
.portal-card .pc-ic, .cs-hcard .ic { filter: saturate(.78); }
.portal-card h3, .cs-hcard h3, .mode h3, .loi h3, .astuce h4 { letter-spacing: -.025em; }
.portal-card .pc-status, .cs-badge, .tag, .chip { border-radius: 6px; }
.step .body { border-color: var(--rule); border-radius: 12px; box-shadow: var(--shadow-soft); }
.step:hover .body { transform: translateX(5px); border-color: #c9a84b; box-shadow: var(--shadow-lift); }
.step .num { border-radius: 12px; box-shadow: 0 7px 15px rgba(23,107,95,.2); }
.qcm-wrap { padding: clamp(1.25rem, 4vw, 2.5rem); }
.qcm-opts { border-color: var(--rule) !important; border-radius: 12px !important; box-shadow: var(--shadow-soft) !important; }
.theme-pick button, .len-pick button, .filter-btn, .ax-chip { border-radius: 7px !important; border-width: 1px !important; }
.theme-pick button:hover, .theme-pick button.sel, .len-pick button:hover, .len-pick button.sel, .filter-btn.active { box-shadow: 0 5px 12px rgba(23,107,95,.14); }
.opt { border-width: 1px; border-radius: 9px; }
.opt:hover { transform: translateX(4px); }
.qbar { height: 7px; }
.explain, .qcm-recovery { border-radius: 10px; }
.prow { border-radius: 10px; box-shadow: var(--shadow-soft); }
button.prow { background: rgba(255,254,250,.94); }
.rm-flag, .exam-h { border-radius: 10px; }
.rm-card { border-radius: 9px; box-shadow: var(--shadow-soft); }
.fiche-h, .cp-acc summary, details > summary { min-height: 48px; }
.fiche-h:focus-visible, .cp-acc summary:focus-visible, details > summary:focus-visible { outline: 3px solid rgba(208,169,55,.75); outline-offset: 3px; }
.tbl { border-radius: 10px; box-shadow: var(--shadow-soft); }
th { background: var(--deep); }
tr:nth-child(even) td { background: rgba(243,238,227,.52); }
input, textarea, select { border-radius: 8px !important; border-color: var(--rule) !important; background: var(--surface) !important; color: var(--ink) !important; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(23,107,95,.12) !important; }
footer, .cs-mainfooter { background: var(--deep-2); }
.csnav-f .cs-fgrid, .cs-fgrid { gap: clamp(1.3rem, 3vw, 2.5rem); }
.csnav-f .cs-fcol a, .cs-fcol a { padding: .3rem 0; }
.fade { transform: translateY(14px); transition-duration: .42s; }
@media (max-width: 900px) {
  .hero h1 { max-width: none; }
  .hero-in { padding-top: 3.2rem; }
  .csnav nav, header nav { padding-inline: 1rem; }
}
@media (max-width: 640px) {
  section { padding-inline: 1rem; }
  .hero-in { padding-inline: 1rem; padding-top: 2.6rem; }
  .hero h1 { font-size: clamp(2.15rem, 12vw, 3.4rem); }
  .hero-cta .btn { width: 100%; }
  .valueband-in { grid-template-columns: repeat(2, 1fr); padding: .9rem; }
  .vb b { font-size: 1.45rem; }
  .qcm-quicknav a, .resource-intents a { flex-basis: 100%; }
  .qcm-quicknav, .resource-intents { border-radius: 10px; }
  .portal-grid, .cs-hub, .annales-grid, .astuces { grid-template-columns: 1fr; }
  .csnav .wordmark small, header .logo .wordmark small { display: none; }
  .csnav .logo, header .logo { font-size: 1rem; }
}


/* ============================================================================
 * HUMAN FINISH — familles de pages, lecture, outils et états
 * ============================================================================ */
section.hero { max-width: none; width: 100%; margin: 0; }
main { max-width: 1240px; margin-inline: auto; padding: clamp(2rem, 5vw, 4rem) 1.5rem clamp(3rem, 6vw, 5rem); }
.hero h1, section.hero h1 { font-family: 'Fraunces', Georgia, serif; font-weight: 700; }
.hero p, section.hero p { max-width: 64ch; }
.back { border-radius: 8px; background: var(--accent, #176b5f); }
.back:hover { background: var(--deep, #123f38); }
.subnav { background: rgba(255,254,250,.92); border-color: var(--rule, #dfd6c5); }
.subnav-in { max-width: 1240px; padding: .5rem 1.5rem; }
.subnav-in a { border-radius: 7px; color: var(--ink-soft, #52615c); }
.subnav-in a:hover, .subnav-in a.active { background: rgba(23,107,95,.08); color: var(--deep, #123f38); }
.grid, .fil-grid, .posts { align-items: stretch; }
.grid > .card, .fil-card, .post { min-height: 100%; }
.card .band, .portal-card .pc-band { height: 5px; }
.card .in, .fil-body, .post-body { padding: 1.55rem; }
.card .cta, .submit, .start-btn, .actions a, .actions button { border-radius: 8px; }
.note, .info, .empty { border: 1px solid var(--rule, #dfd6c5); box-shadow: var(--shadow-soft, 0 8px 24px rgba(24,58,49,.07)); border-radius: 11px; }
.note { background: rgba(243,238,227,.65); }
.form-wrap { border: 1px solid var(--rule, #dfd6c5); border-radius: 12px; box-shadow: var(--shadow-lift, 0 18px 40px rgba(24,58,49,.13)); }
.form-wrap h2, .info h3 { font-family: 'Fraunces', Georgia, serif; letter-spacing: -.025em; }
.field label { letter-spacing: -.01em; }
.types label { border-width: 1px; border-radius: 8px; background: rgba(255,254,250,.94); }
.types label:has(input:checked) { box-shadow: 0 0 0 3px rgba(23,107,95,.10); }
.priority-bar, .rules { border-radius: 9px; background: rgba(229,240,235,.8); }
.success { border-width: 1px; border-radius: 10px; }
.intro, .quiz, .results { border: 1px solid var(--rule, #dfd6c5); border-radius: 12px; box-shadow: var(--shadow-lift, 0 18px 40px rgba(24,58,49,.13)); }
.intro .ico { filter: saturate(.75); }
.toolbar { border: 1px solid var(--rule, #dfd6c5); background: rgba(229,240,235,.72); border-radius: 9px; }
.timer, .toolbar .pos { border-radius: 7px; }
.controls .btn, .start-btn { min-height: 46px; }
.progress { gap: .3rem; }
.dot { border-radius: 5px; min-width: 24px; min-height: 24px; }
.score-ring { box-shadow: 0 10px 26px rgba(23,107,95,.12); }
.review-item { border-radius: 0 9px 9px 0; }
.loading { padding: 4rem 1rem; }
/* ISPITS : catalogue dense mais respirable */
.fil-grid { gap: 1rem; }
.fil-card { border-radius: 11px; box-shadow: var(--shadow-soft, 0 8px 24px rgba(24,58,49,.07)); }
.fil-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift, 0 18px 40px rgba(24,58,49,.13)); }
.detail-head, .sem-panel { border-radius: 11px; border-color: var(--rule, #dfd6c5); box-shadow: var(--shadow-soft, 0 8px 24px rgba(24,58,49,.07)); }
.sem-tabs { gap: .35rem; }
.sem-tab, .pole-chip { border-width: 1px; border-radius: 7px; }
.course { min-height: 52px; }
.modal { border-radius: 12px; }
/* Examen blanc : hiérarchie de concentration */
.qbox .qtext { font-family: 'Fraunces', Georgia, serif; letter-spacing: -.018em; }
.opt { min-height: 48px; align-items: center; border-width: 1px; border-radius: 8px; }
.opt:hover { transform: translateX(3px); }
/* Flashcards : une scène, pas une carte générique */
.scene .card { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.scene .face { border-radius: 16px; box-shadow: 0 18px 42px rgba(8,45,40,.17); }
.scene .front { background: radial-gradient(circle at 82% 10%, rgba(232,193,74,.18), transparent 15rem), #0d5f55; }
.scene .face.back { border-width: 1px; border-top: 4px solid var(--gold, #d4af37); }
.scene + .nav .btn, .statusbar .mode { border-radius: 8px; }
.eval button { border-radius: 8px; min-height: 58px; }
.stats { border: 1px solid var(--rule, #dfd6c5); box-shadow: var(--shadow-soft, 0 8px 24px rgba(24,58,49,.07)); border-radius: 11px; }
/* Progression : tableau de bord calme */
.kpis { gap: .8rem; }
.kpi { border: 1px solid var(--rule, #dfd6c5); box-shadow: var(--shadow-soft, 0 8px 24px rgba(24,58,49,.07)); border-radius: 11px; }
.progres .card, .card { border-radius: 11px; }
.badge { border-radius: 8px; border-width: 1px; }
/* Blog et hubs éditoriaux */
.posts { gap: 1rem; }
.post { border-left-width: 4px; border-radius: 11px; box-shadow: var(--shadow-soft, 0 8px 24px rgba(24,58,49,.07)); }
.post:hover { box-shadow: var(--shadow-lift, 0 18px 40px rgba(24,58,49,.13)); }
.post h2 { font-family: 'Fraunces', Georgia, serif; letter-spacing: -.025em; }
.post .tag { border-radius: 6px; }
/* Documents et références */
.lawcard, .linkcard { min-height: 72px; }
.lawcard .ln { border-radius: 7px; }
.cadre .dl, .course .act, .lawcard .lf { border-radius: 7px; }
/* Contrôles et interactions */
button, a, select, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(208,169,55,.72); outline-offset: 3px; }
button:not(:disabled), .btn, .card .cta, .back, .pole-chip, .sem-tab, .filter-btn, .ax-chip { cursor: pointer; }
button:disabled { cursor: not-allowed; }
/* Impression utile pour les cours et fiches */
@media print {
  header, .cs-topbar, .csnav, .subnav, .cs-subnav, .cs-mainfooter, footer, .hero-cta, .actions, button { display: none !important; }
  body, main, section { background: #fff !important; color: #111 !important; max-width: none !important; }
  .card, .box, .fiche, .qcm, .ref, .astuce, .warn, .tbl { box-shadow: none !important; break-inside: avoid; }
}
@media (max-width: 640px) {
  main { padding-inline: 1rem; }
  .card .in, .fil-body, .post-body { padding: 1.2rem; }
  .controls { grid-template-columns: 1fr 1fr; }
  .controls .btn-finish { grid-column: 1 / -1; grid-row: 1; }
  .score-ring { width: 138px; height: 138px; }
  .scene { padding-inline: .75rem; }
  .scene .face { padding: 1.2rem; }
}
@media (max-width: 380px) {
  .hero h1, section.hero h1 { font-size: 2rem; }
  .valueband-in { gap: .4rem; }
  .vb span { font-size: .7rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Confort de lecture : mouvement réduit et sélection lisible */
::selection { background: rgba(208,169,55,.28); color: var(--deep, #123f38); }

@media (max-width: 760px) {
  .subnav-in { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
  .subnav-in a { white-space: nowrap; }
  .hero-stats { row-gap: .65rem; }
  .hero-stats .hs, .stat-pill { min-width: 0; }
}

/* Mouvement réduit — bloc unique et partagé */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Humanisation finale — élévation discrète, sans effet dashboard */
.portal-card:hover, .cs-hcard:hover, .mode:hover, .loi:hover, .astuce:hover, .box:hover, .fiche:hover, .exam:hover, .lawcard:hover, .linkcard:hover, .card:hover, .cp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(24,58,49,.10);
  border-color: var(--warm-rule);
}
.fil-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(24,58,49,.10); }


/* PAGE START REFINEMENT — édition moderne et respirante */
/* Chaque page commence par une intention claire : moins de hauteur, plus de rythme. */
:where(.hero, .hero-premium) h1 { text-wrap: balance; }
.hero:not(#accueil), .hero-premium { position: relative; overflow: hidden; }
.hero:not(#accueil)::after, .hero-premium::after { content: ""; position: absolute; inset: auto -8% -58% 46%; height: 15rem; background: radial-gradient(circle, rgba(212,175,55,.16), transparent 68%); pointer-events: none; }
.hero:not(#accueil) > *, .hero-premium > * { position: relative; z-index: 1; }
.hero:not(#accueil) { padding: clamp(2rem, 4vw, 3.8rem) 1rem clamp(2.1rem, 4vw, 3.5rem); }
.hero:not(#accueil) .hero-in { padding: 0 1rem; gap: clamp(1.4rem, 3vw, 3rem); }
.hero:not(#accueil) h1 { font-size: clamp(2.15rem, 4.4vw, 4rem); line-height: 1.04; max-width: 18ch; margin-bottom: .65rem; }
.hero:not(#accueil) p { max-width: 62ch; }
.hero:not(#accueil) .hero-stats { margin-top: 1.15rem; }
.hero:not(#accueil) + main, .hero:not(#accueil) + section { padding-top: clamp(2rem, 3.8vw, 3.6rem); }
#accueil .hero-in { padding-top: clamp(2.45rem, 4.5vw, 4.4rem); padding-bottom: clamp(2.1rem, 4vw, 3.5rem); gap: clamp(1.5rem, 3.5vw, 3.6rem); }
#accueil h1 { font-size: clamp(2.35rem, 4.65vw, 4.25rem); max-width: 12ch; }
#accueil .lead { max-width: 54ch; font-size: 1rem; }
#accueil .hero-card { padding: 1.25rem; }
#accueil + .valueband { margin-top: -1.55rem; }
#accueil + .valueband + #portail { padding-top: clamp(2rem, 3.4vw, 3.7rem); }
#accueil + .valueband + #portail .sec-head { margin-bottom: 1.8rem; }
section.cs-hub-sec:first-of-type { padding-top: clamp(1.7rem, 3.2vw, 3.2rem); }
.hero-premium { padding: clamp(2.15rem, 4vw, 3.8rem) 1rem clamp(2.2rem, 4vw, 3.6rem); }
.hero-premium .hero-stats { margin-top: 1.35rem; }
.main-container { padding-top: clamp(1.5rem, 3vw, 2.8rem); }
main > .intro { margin-top: clamp(1.2rem, 2.5vw, 2.4rem); margin-bottom: clamp(1.5rem, 3vw, 2.8rem); }
#qcm { padding-top: 1rem !important; }
#qcm > h1, #qcm h1 { text-wrap: balance; max-width: 18ch; }
#qcm .qcm-wrap, #qcm .gamebar, #qcm .dailygoal { margin-top: 1rem; }
.hero + section > .posts { margin-top: -.8rem; }
.hero + section > .form-wrap { margin-top: 0; }
@media (max-width: 760px) {
  .hero:not(#accueil), .hero-premium { padding: 1.75rem .85rem 2.35rem; }
  .hero:not(#accueil) .hero-in { padding-inline: .15rem; gap: 1.35rem; }
  .hero:not(#accueil) h1 { font-size: clamp(2rem, 9vw, 2.85rem); max-width: 15ch; }
  #accueil .hero-in { padding: 2.15rem .2rem 2.65rem; gap: 1.45rem; }
  #accueil h1 { font-size: clamp(2.2rem, 11vw, 3.25rem); max-width: 12ch; }
  #accueil .lead { font-size: .96rem; }
  #accueil .hero-cta { gap: .55rem; }
  #accueil + .valueband { margin-top: -1.1rem; }
  #accueil + .valueband + #portail { padding-top: 1.8rem; }
  section.cs-hub-sec:first-of-type { padding-top: 1.55rem; }
  main > .intro { margin-top: .9rem; }
}


/* FAMILY RHYTHM — composition éditoriale par famille */
/* Les pages ne partagent pas une carte uniforme : chaque outil reçoit son rythme. */
.hero:not(#accueil) .pill, .hero-premium .hero-badge { letter-spacing: .08em; }
.hero:not(#accueil) h1::after, .hero-premium h1::after { content: ""; display: block; width: 3.25rem; height: .18rem; margin-top: .85rem; border-radius: 99px; background: var(--gold, #d4af37); }
.hero:not(#accueil) .hero-card { backdrop-filter: blur(8px); border-color: rgba(255,255,255,.26); }
.hero:not(#accueil) + main > .grid, .hero:not(#accueil) + main > .catalogue { margin-top: 0; }

/* Blog : une mise en avant éditoriale, puis deux lectures secondaires. */
body:has(.posts) .hero + section .posts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
body:has(.posts) .hero + section .posts .post:first-child { grid-column: span 2; }
body:has(.posts) .hero + section .posts .post:first-child img { height: 220px; }

/* Cours : la recherche devient une barre de commande nette, séparée du catalogue. */
.hero-premium + .main-container .search-wrapper { margin-top: 0; padding: 1rem 1.15rem; border: 1px solid var(--warm-rule, #dfd6c5); border-radius: 16px; background: rgba(255,254,250,.86); box-shadow: var(--shadow-soft, 0 8px 24px rgba(24,58,49,.07)); }
.hero-premium + .main-container .filter-tabs { margin-top: .8rem; }

/* QCM : la zone d’action est visuellement prioritaire, sans agrandir le décor. */
#qcm { border-top: 1px solid var(--warm-rule, #dfd6c5); background: linear-gradient(180deg, rgba(247,242,231,.5), transparent 14rem); }
#qcm .qcm-wrap { border-radius: 18px; box-shadow: 0 16px 36px rgba(24,58,49,.08); }

/* Flashcards, progression et demande : un cadre d’outil immédiatement identifiable. */
.hero + .ctrl, .hero + .statusbar, .hero + section .kpis, .hero + section .form-wrap { max-width: 1080px; margin-left: auto; margin-right: auto; }
.hero + .ctrl, .hero + .statusbar { border-color: var(--warm-rule, #dfd6c5); }
.hero + section .kpis { margin-top: 0; }
.hero + section .form-wrap { margin-top: 0; }

@media (max-width: 900px) {
  body:has(.posts) .hero + section .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:has(.posts) .hero + section .posts .post:first-child { grid-column: span 2; }
}
@media (max-width: 600px) {
  .hero:not(#accueil) h1::after, .hero-premium h1::after { margin-top: .7rem; }
  body:has(.posts) .hero + section .posts { grid-template-columns: 1fr; }
  body:has(.posts) .hero + section .posts .post:first-child { grid-column: auto; }
  body:has(.posts) .hero + section .posts .post:first-child img { height: 175px; }
  .hero-premium + .main-container .search-wrapper { padding: .8rem; }
}



/* EAP KEYWORD SEO FOCUS */
.seo-focus{max-width:1120px;margin:2rem auto;padding:1.35rem 1.5rem;background:linear-gradient(135deg,rgba(14,93,84,.07),rgba(212,175,55,.12));border:1px solid color-mix(in srgb,var(--bleu,#0e5d54) 18%,var(--line,#d9e3df));border-radius:20px;box-shadow:0 12px 30px rgba(10,63,57,.08)}
.seo-focus h2{margin:0 0 .45rem;color:var(--bleu-fonce,#063e37);font-size:clamp(1.25rem,2.2vw,1.65rem);line-height:1.2}
.seo-focus p{margin:0;color:var(--gris,#596b68);max-width:860px;line-height:1.7}
.seo-focus-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:.7rem;margin-top:1rem}
.seo-focus-card{display:flex;flex-direction:column;gap:.25rem;padding:.85rem 1rem;background:rgba(255,255,255,.78);border:1px solid rgba(14,93,84,.12);border-radius:14px;color:var(--texte,#173b36)}
.seo-focus-card strong{font-size:.9rem;color:var(--bleu-fonce,#063e37)}
.seo-focus-card span{font-size:.78rem;color:var(--gris,#596b68);line-height:1.45}
.seo-focus-links{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:1rem}
.seo-focus-links a{display:inline-flex;align-items:center;padding:.45rem .7rem;border-radius:999px;background:var(--carte,#fff);border:1px solid var(--line,#d9e3df);color:var(--bleu,#0e5d54);font-weight:800;font-size:.78rem;text-decoration:none}
.seo-focus-links a:hover{border-color:var(--jaune,#d4af37);transform:translateY(-1px)}
@media(max-width:600px){.seo-focus{margin:1.25rem .8rem;padding:1.05rem}.seo-focus-grid{grid-template-columns:1fr 1fr}}
