/* =============================
   ReviseTonBrevet — style.css
   Aesthetic: Editorial / Clean Bold
   ============================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper: #fefcff;
  --cream: #f5f0ff;
  --cream-dark: #e4d9f5;
  --ink: #2d1b6b;
  --deep: #16103a;
  --indigo: #8b5cf6;
  --indigo-light: #c4b5fd;
  --pink: #f472b6;
  --pink-light: #fce7f3;
  --accent-maths: #8b5cf6;
  --accent-fr: #f472b6;
  --accent-hg: #22d3ee;
  --accent-svt: #34d399;
  --accent-pc: #fbbf24;
  --text-muted: #7c6bc9;
  --radius: 16px;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- NAV ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 4rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--ink);
}
.nav-logo span { color: var(--indigo); }
.nav-links { display: flex; gap: 1rem; align-items: center; list-style: none; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 500; transition: opacity .2s; font-size: .9rem; }
.nav-links a:hover { opacity: 0.6; }
.btn-nav {
  background: var(--ink);
  color: var(--paper) !important;
  padding: .5rem 1.2rem;
  border-radius: 100px;
  font-weight: 500;
}
.btn-nav:hover { opacity: 0.8 !important; }

/* ---- BURGER (mobile) ---- */
.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  z-index: 200;
}
.burger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  margin: 5px 0;
  transition: transform .3s ease, opacity .3s ease;
}
.burger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5rem 4rem;
  overflow: hidden;
  background: linear-gradient(135deg, #fefcff 0%, #fdf0ff 30%, #fce7f9 60%, #ede9fe 100%);
}
.hero-badge {
  display: inline-block;
  background: var(--cream);
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  padding: .4rem 1rem;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 2rem;
  width: fit-content;
  animation: fadeUp .6s ease both;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -3px;
  margin-bottom: 1.5rem;
  animation: fadeUp .7s ease both;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--indigo), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}
.hero-title em::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(135deg, var(--indigo), var(--pink));
  opacity: .25;
  border-radius: 4px;
}
.hero-sub {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  animation: fadeUp .8s ease both;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
  animation: fadeUp .9s ease both;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding: .85rem 2rem;
  border-radius: 100px;
  font-weight: 500;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform .2s, box-shadow .2s;
  display: inline-block;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.btn-ghost {
  text-decoration: none;
  color: var(--ink);
  padding: .85rem 2rem;
  border-radius: 100px;
  border: 1.5px solid var(--ink);
  font-weight: 500;
  font-family: var(--font-body);
  transition: background .2s;
  display: inline-block;
}
.btn-ghost:hover { background: var(--cream); }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .9rem;
  color: var(--text-muted);
  animation: fadeUp 1s ease both;
}
.hero-stats .stat span { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink); margin-right: .3rem; }
.stat-sep { opacity: .3; font-size: 1.4rem; }

/* ---- SECTIONS COMMUNES ---- */
section { padding: 6rem 4rem; }
.section-label {
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-align: center;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 3rem;
  text-align: center;
}

/* ---- MATIÈRES ---- */
.matieres { background: var(--deep); color: var(--paper); }
.matieres .section-label { color: rgba(255,255,255,.4); }
.matieres .section-title { color: var(--paper); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.card {
  background: #1e1545;
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .3s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.card:hover { transform: translateY(-4px); }
.card-tag {
  display: inline-block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  padding: .3rem .8rem;
  border-radius: 100px;
  margin-bottom: 1.2rem;
}
.card--maths .card-tag  { background: rgba(139,92,246,.2);  color: #c4b5fd; }
.card--fr .card-tag     { background: rgba(244,114,182,.2); color: #fbcfe8; }
.card--hg .card-tag     { background: rgba(34,211,238,.15); color: #a5f3fc; }
.card--svt .card-tag    { background: rgba(52,211,153,.15); color: #a7f3d0; }
.card--pc .card-tag     { background: rgba(251,191,36,.15); color: #fde68a; }

.card-icon { font-size: 2.2rem; margin-bottom: .8rem; }
.card h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin-bottom: .5rem; }
.card p { color: rgba(255,255,255,.9); font-size: .95rem; margin-bottom: 1.2rem; line-height: 1.6; }
.card strong { color: #fff; }
.card-themes { list-style: none; margin-bottom: 1.5rem; }
.card-themes li {
  padding: .4rem 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: .88rem;
  color: rgba(255,255,255,.65);
}
.card-cta {
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  border-bottom: 2px solid rgba(255,255,255,.3);
  padding-bottom: 2px;
  transition: border-color .2s;
}
.card--maths .card-cta:hover { border-color: #c4b5fd; color: #c4b5fd; }
.card--fr .card-cta:hover    { border-color: #fbcfe8; color: #fbcfe8; }
.card--hg .card-cta:hover    { border-color: #a5f3fc; color: #a5f3fc; }
.card--svt .card-cta:hover   { border-color: #a7f3d0; color: #a7f3d0; }
.card--pc .card-cta:hover    { border-color: #fde68a; color: #fde68a; }

/* ---- COMMENT ÇA MARCHE ---- */
.how { background: var(--cream); }
.steps {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.step {
  flex: 1;
  min-width: 180px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1.5px solid var(--ink);
}
.step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--indigo);
  opacity: .2;
  line-height: 1;
  margin-bottom: .8rem;
}
.step h4 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: .5rem; }
.step p { font-size: .9rem; color: var(--text-muted); }
.step-arrow { font-size: 2rem; color: var(--text-muted); padding-top: 2.5rem; opacity: .4; }

/* ---- ADSENSE ---- */
.ad-banner {
  text-align: center;
  padding: 1.5rem 4rem;
  background: var(--cream);
  border-top: 1px solid var(--cream-dark);
  border-bottom: 1px solid var(--cream-dark);
}
.ad-banner ins, .ad-placeholder {
  display: block;
  min-height: 90px;
  background: var(--cream-dark);
  border-radius: 8px;
  max-width: 728px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .8rem;
}

/* ---- PAGE THÈME ---- */
.theme-header {
  background: var(--deep);
  color: var(--paper);
  padding: 4rem;
  text-align: center;
}
.theme-header .breadcrumb {
  font-size: .85rem;
  opacity: .5;
  margin-bottom: 1rem;
}
.theme-header .breadcrumb a { color: var(--paper); text-decoration: none; }
.theme-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: .8rem;
}
.theme-header .theme-meta {
  font-size: .9rem;
  opacity: .5;
}

.fiche-section { max-width: 820px; margin: 0 auto; padding: 4rem 2rem; }
.fiche-section h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 2.5rem 0 1rem;
  padding-top: 2rem;
  border-top: 1.5px solid var(--cream-dark);
}
.fiche-section h2:first-child { border-top: none; margin-top: 0; }
.fiche-section h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 .6rem;
  background: linear-gradient(135deg, var(--indigo), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.fiche-section p { margin-bottom: 1rem; color: #374151; }
.fiche-section ul, .fiche-section ol {
  margin: .5rem 0 1rem 1.5rem;
  color: #374151;
}
.fiche-section li { margin-bottom: .4rem; }
.fiche-section .exemple {
  background: linear-gradient(135deg, #f3e8ff, #fce7f3);
  border-left: 4px solid var(--pink);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  font-size: .95rem;
}
.fiche-section .formule {
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  padding: .8rem 1.2rem;
  margin: .8rem 0;
  font-family: monospace;
  font-size: 1rem;
  text-align: center;
}
.fiche-section .retenir {
  background: #fef9c3;
  border: 1.5px solid #fde047;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  font-size: .95rem;
}

/* ---- QCM Duolingo style ---- */
.qcm-section {
  background: #f3e8ff;
  min-height: 100vh;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}
.qcm-inner {
  width: 100%;
  max-width: 580px;
}
.qcm-top {
  margin-bottom: 1.2rem;
}
.qcm-progress-wrap {
  height: 10px;
  background: #e9d5ff;
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: .7rem;
}
.qcm-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #f472b6);
  border-radius: 100px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.qcm-counter {
  text-align: center;
  font-size: .8rem;
  font-weight: 700;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.qcm-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(139,92,246,.15);
  animation: fadeInCard .35s ease;
}
@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.qcm-card .question-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 1.4rem;
  line-height: 1.5;
}
.qcm-container { display: flex; flex-direction: column; gap: 1.5rem; max-width: 760px; margin: 0 auto; }

/* Boutons réponse */
.options { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1rem; }
.option-btn {
  background: #faf5ff;
  border: 1.5px solid #ddd6fe;
  color: #1e1b4b;
  border-radius: 12px;
  padding: .9rem 1.2rem;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 500;
  transition: background .15s, border-color .15s, transform .1s;
  width: 100%;
}
.option-btn:hover:not(:disabled) {
  background: #ede9fe;
  border-color: #8b5cf6;
  transform: translateX(4px);
}
.option-btn.correct {
  background: #d1fae5;
  border-color: #34d399;
  color: #064e3b;
  animation: pulse-correct .5s ease;
}
.option-btn.wrong {
  background: #fee2e2;
  border-color: #f87171;
  color: #7f1d1d;
  animation: shake-wrong .5s ease;
}
@keyframes pulse-correct {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.03); }
  70%  { transform: scale(0.98); }
  100% { transform: scale(1); }
}
@keyframes shake-wrong {
  0%   { transform: translateY(0); }
  20%  { transform: translateY(-5px); }
  40%  { transform: translateY(4px); }
  60%  { transform: translateY(-3px); }
  80%  { transform: translateY(2px); }
  100% { transform: translateY(0); }
}
.option-btn:disabled { cursor: default; }

/* Explication */
.explication {
  background: #ede9fe;
  border-left: 3px solid #7c3aed;
  border-radius: 8px;
  padding: .9rem 1.1rem;
  font-size: .88rem;
  color: #2e1065;
  font-weight: 600;
  display: none;
  margin-bottom: 1rem;
}
.explication.visible { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Bouton suivant */
.btn-next {
  background: #8b5cf6;
  color: white;
  border: none;
  border-radius: 100px;
  padding: .9rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background .2s, transform .2s;
  display: none;
}
.btn-next.visible { display: block; animation: fadeIn .3s ease; }
.btn-next:hover { background: #7c3aed; transform: translateY(-2px); }
.btn-next-link {
  display: block;
  text-align: center;
  margin-top: .8rem;
  color: #7c3aed;
  font-weight: 600;
  text-decoration: none;
  font-size: .95rem;
}
.btn-next-link:hover { text-decoration: underline; }

/* Bouton lancer QCM */
.qcm-launch-wrap { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--cream-dark); }
.qcm-launch-card {
  background: var(--deep);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.qcm-launch-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--paper);
  margin-bottom: .4rem;
}
.qcm-launch-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: rgba(255,255,255,.5); }
.qcm-launch-btn {
  background: linear-gradient(135deg, var(--indigo), var(--pink));
  color: white;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: .9rem 2rem;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
}
.qcm-launch-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(139,92,246,.35); }

/* Résultat final */
.qcm-result {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 8px 32px rgba(139,92,246,.15);
  animation: fadeInCard .4s ease;
}
.qcm-result.hidden { display: none; }
.result-emoji { font-size: 3rem; margin-bottom: .5rem; }
.result-score {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: #7c3aed;
  letter-spacing: -2px;
  line-height: 1;
}
.result-score span { font-size: 1.8rem; color: #c4b5fd; }
.result-pct {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 1rem;
}
.result-msg { color: #1e1b4b; font-size: .95rem; line-height: 1.6; margin-bottom: 0; }

/* ---- PAGE LISTING THÈMES ---- */
.page-header {
  background: var(--deep);
  color: var(--paper);
  padding: 5rem 4rem 3rem;
  text-align: center;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: .8rem;
}
.page-header p { color: rgba(255,255,255,.55); font-size: 1rem; }

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 4rem;
}
.theme-card {
  background: var(--paper);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 1.8rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform .3s, box-shadow .3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.theme-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.1); }
.theme-card .tc-icon { font-size: 2rem; margin-bottom: .8rem; }
.theme-card h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; margin-bottom: .4rem; }
.theme-card p { font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.theme-card .tc-tags { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.theme-card .tc-tag {
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 100px;
  background: var(--cream);
  color: var(--text-muted);
}
.theme-card .tc-free {
  background: linear-gradient(135deg, #f3e8ff, #fce7f3);
  color: var(--indigo);
}

/* ---- FOOTER ---- */
.footer {
  background: var(--deep);
  color: var(--paper);
  padding: 3rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.footer-logo span { color: var(--indigo-light); }
.footer p { font-size: .85rem; opacity: .4; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--paper); text-decoration: none; font-size: .85rem; opacity: .5; transition: opacity .2s; }
.footer-links a:hover { opacity: 1; }

/* ---- STYLES SPECIFIQUES ARTICLES (A.CARD) ---- */
a.card {
  text-decoration: none !important;
  color: var(--paper) !important;
  display: flex !important;
  flex-direction: column;
}
a.card h3 {
  color: var(--paper) !important;
  transition: color 0.2s;
  line-height: 1.3;
}
a.card:hover h3 {
  color: var(--indigo-light) !important;
}
a.card p.card-desc {
  color: rgba(255, 255, 255, 0.7) !important;
  flex-grow: 1;
}
a.card .card-icon {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 1.6rem !important;
  margin: 0 auto 1.2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.card-btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--indigo-light);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  transition: opacity 0.2s, transform 0.2s;
}
a.card:hover .card-btn {
  transform: translateX(4px);
  color: var(--pink-light);
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1000px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav { padding: 1rem 1.5rem; }
  .burger { display: block; }
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--paper);
    z-index: 150;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-links a { font-size: 1.3rem; }
  section { padding: 4rem 1.5rem; }
  .hero { padding: 4rem 1.5rem; min-height: auto; }
  .cards-grid { grid-template-columns: 1fr; }
  .cards-grid-2 { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .step-arrow { display: none; }
  .footer { flex-direction: column; text-align: center; padding: 2rem 1.5rem; }
  .theme-header { padding: 3rem 1.5rem; }
  .fiche-section { padding: 2rem 1.5rem; }
  .qcm-section { padding: 1.5rem; }
  .qcm-card { padding: 1.5rem; }
  .themes-grid { padding: 2rem 1.5rem; }
  .page-header { padding: 3rem 1.5rem 2rem; }
  .ad-banner { padding: 1rem 1.5rem; }
}

/* ── Schémas / Visuels SVG ───────────────────────────────────────────────── */
.vis {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}
.vis svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  cursor: zoom-in;
  border-radius: 12px;
  background: var(--cream);
  padding: .75rem;
  transition: transform .15s ease, box-shadow .15s ease;
  display: block;
}
.vis svg:hover { transform: scale(1.02); box-shadow: 0 6px 24px rgba(139,92,246,.2); }
.vis-caption { text-align: center; font-size: .82rem; color: #7c3aed; font-weight: 600; margin-top: .4rem; }
.vis-hint {
  display: block;
  text-align: center;
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: -.6rem;
  margin-bottom: 1rem;
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(22,16,58,.88);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
  backdrop-filter: blur(6px);
}
.lb-overlay.open { display: flex; }
.lb-box {
  background: var(--paper);
  border-radius: 20px;
  padding: 1.5rem;
  max-width: min(90vw, 700px);
  max-height: 90vh;
  overflow: auto;
  cursor: default;
  animation: fadeInCard .25s ease;
  position: relative;
}
.lb-box svg {
  width: 100%;
  height: auto;
  display: block;
  cursor: default;
}
.lb-close {
  position: absolute;
  top: .75rem;
  right: .9rem;
  font-size: 1.4rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--ink);
  line-height: 1;
  padding: .2rem .4rem;
  border-radius: 6px;
  transition: background .15s;
}
.lb-close:hover { background: var(--cream); }
.lb-caption {
  text-align: center;
  font-size: .82rem;
  color: #7c3aed;
  font-weight: 600;
  margin-top: .8rem;
}

/* ── FAQ Section ──────────────────────────────────────────────────────────── */
.faq-section { max-width: 820px; margin: 0 auto; padding: 2rem 2rem 0; }
.faq-list { display: flex; flex-direction: column; gap: .6rem; margin-top: .8rem; }
.faq-item {
  background: var(--paper);
  border: 1.5px solid #e0e7ff;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item[open] { border-color: var(--indigo); }
.faq-item summary {
  list-style: none;
  padding: .9rem 3rem;
  font-weight: 700;
  font-size: .95rem;
  color: var(--deep);
  cursor: pointer;
  text-align: center;
  position: relative;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--indigo);
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item .faq-a {
  padding: 0 1.2rem 1rem;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
  border-top: 1px solid #e0e7ff;
  padding-top: .8rem;
}

/* ── Skip-to-content (accessibilité) ─────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  background: var(--indigo);
  color: #fff;
  padding: .7rem 1.6rem;
  border-radius: 0 0 12px 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: top .25s ease;
  box-shadow: 0 4px 16px rgba(139,92,246,.35);
}
.skip-link:focus {
  top: 0;
  outline: none;
}

/* ── Focus visible (accessibilité clavier) ────────────────────────────────── */
:focus-visible {
  outline: 2.5px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* ── Nav active ───────────────────────────────────────────────────────────── */
.nav-links a.active {
  color: var(--indigo);
  border-bottom: 2.5px solid var(--indigo);
  padding-bottom: 2px;
}

/* ── Back-to-top button ───────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  background: var(--ink);
  color: var(--paper);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity .3s ease, transform .3s ease, background .2s;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--indigo);
  border-color: var(--indigo);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(139,92,246,.4);
}
@media (max-width: 900px) {
  .back-to-top { bottom: 5rem; right: 1.2rem; width: 44px; height: 44px; }
}
