/* ==========================================================================
   EasyPrac — feuille de style du site (documentation + accueil)
   Direction : Plus Jakarta Sans, primaire #3552CC, deux fonds (blanc / #F1F3FC),
   rayons 20/26, contrastes AA. Un seul jeu de couleurs (pas de mode sombre).
   ========================================================================== */

:root {
  /* couleurs */
  --primary: #3552CC;          /* blanc sur bleu 6,5:1 · bleu sur blanc 7,0:1 */
  --primary-dark: #2840a0;     /* liens sur fond teinté */
  --container: #EAEEFB;        /* pastille d'icône, bouton tonal */
  --surface: #F1F3FC;          /* surface de section */
  --border: #E2E4EC;
  --border-strong: #D5DAF6;
  --text: #1a1c22;
  --text-2: #454a57;
  --text-3: #5a5f6b;           /* 6,4:1 sur blanc · 5,8:1 sur teinte */
  --muted: #6B7180;            /* plus petit texte encore AA (4,9:1) */
  --bg: #ffffff;

  /* rayons */
  --r-sm: 12px;
  --r-md: 14px;
  --r-card: 20px;
  --r-pill: 26px;

  /* espacements (échelle M3 étendue pour le web) */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s16: 64px;
  --s20: 80px;

  --content: 1120px;
  --max-width: 960px; /* pages de contenu : tutos, FAQ, démarrage rapide */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- En-tête (header.html) ------------------------------------------------ */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--s4) var(--s6);
  display: flex;
  align-items: center;
  gap: var(--s5);
  flex-wrap: wrap;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--s3);
  color: var(--text);
  font-size: 1.19rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.site-logo:hover { text-decoration: none; }

.site-logo__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-logo__name { line-height: 1.1; }
.site-logo__byline {
  display: flex;
  align-items: center;
  gap: var(--s1);
  line-height: 1;
}
.site-logo__by {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}
.site-logo__fg-orbit {
  height: 24px;
  width: auto;
  display: block;
}

.monogram {
  width: 36px; height: 36px;
  flex: 0 0 36px;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.94rem; font-weight: 800; letter-spacing: -0.02em;
}
.site-logo__monogram {
  height: 48px;
  width: 48px;
  flex: 0 0 48px;
}
.monogram--sm { width: 24px; height: 24px; flex-basis: 24px; border-radius: 8px; font-size: 0.63rem; }

.site-nav {
  display: flex;
  gap: var(--s1);
  margin-left: auto;
  flex-wrap: wrap;
}

.site-nav a {
  padding: var(--s2) var(--s3);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
}
.site-nav a:hover { background: var(--surface); text-decoration: none; }
.site-nav a.is-active { background: var(--surface); }

.lang-switcher {
  display: flex;
  gap: var(--s1);
  padding-left: var(--s5);
  border-left: 1px solid var(--border);
}

.lang-link {
  padding: 6px 10px;
  border-radius: var(--s2);
  color: var(--text-3);
  font-size: 0.81rem;
  font-weight: 700;
}
.lang-link:hover { background: var(--surface); text-decoration: none; }
.lang-link.is-active { background: var(--primary); color: #fff; }

/* --- Boutons -------------------------------------------------------------- */

.btn,
.btn-outline,
.btn-tonal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: var(--s3) var(--s6);
  border-radius: var(--r-pill);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}
.btn:hover, .btn-outline:hover, .btn-tonal:hover { text-decoration: none; }

.btn { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-outline { background: var(--bg); color: var(--primary-dark); border: 1px solid #C6CDEF; }
.btn-outline:hover { background: var(--container); }

.btn-tonal { background: var(--container); color: var(--primary-dark); border: 1px solid transparent; min-height: 44px; padding: var(--s2) var(--s5); font-size: 0.94rem; }
.btn-tonal:hover { background: var(--border-strong); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* --- Sections ------------------------------------------------------------- */

.section { border-bottom: 1px solid var(--border); scroll-margin-top: var(--s4); }
.section--tint { background: var(--surface); }
.section--plain { border-bottom: 0; }

.section-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--s20) var(--s6);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s5) var(--s10);
  margin-bottom: var(--s10);
}

.eyebrow {
  display: block;
  margin: 0 0 var(--s3);
  font-size: 0.81rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow--muted { color: var(--muted); }

.section-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.13rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: pretty;
}

.section-link { font-size: 1rem; font-weight: 700; }

/* --- Hero ----------------------------------------------------------------- */

.hero { background: var(--surface); border-bottom: 1px solid var(--border); }

.hero-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--s20) var(--s6);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--s12);
  align-items: center;
}

.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s6); }

.badge {
  display: inline-block;
  padding: 6px var(--s3);
  text-align: center; /* sans effet sur une ligne ; centre les deux segments quand le badge se coupe */
  line-height: 1.45;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--primary-dark);
  font-size: 0.81rem;
  font-weight: 700;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.13rem, 4.1vw, 3.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: pretty;
}

/* Anglais */
.hero--en .hero-title {
  font-size: clamp(2.13rem, 4.1vw, 3.24rem);
}

/* Espagnol */
.hero--es .hero-title {
  font-size: clamp(2.05rem, 3.8vw, 3.35rem);
}

.hero-title em { color: var(--primary); font-style: normal; }

.hero-title-lead,
.hero-title-accent {
  display: block;
}

.hero-title-accent {
  color: var(--primary);
  font-style: normal;
}


.hero-subtitle {
  margin: 0;
  max-width: 30em;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.4;
  font-weight: 600;
  color: var(--text);
  text-wrap: pretty;
}

.hero-lead {
  margin: 0;
  max-width: 30em;
  font-size: 1.19rem;
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}

.hero-note { font-size: 0.88rem; font-weight: 500; color: var(--text-3); }

/* Coupure de ligne facultative du badge : ignorée au-dessus de 700px, active
   en mobile pour que la césure tombe après la virgule (cf. hero.badge_tail
   dans _data/home.yml — clé optionnelle, seules les langues qui en ont besoin
   la renseignent). */
.badge-break { display: none; }

.hero-figure { margin: 0; display: flex; flex-direction: column; gap: var(--s3); }

.hero-figure .frame {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: var(--s5);
}
.hero-figure img { display: block; width: 100%; height: auto; border-radius: var(--r-sm); }

.hero-figure figcaption {
  padding-left: var(--s1);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-3);
}

/* --- Cartes --------------------------------------------------------------- */

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--s6);
}
.card--wide { border-radius: var(--r-pill); }
.card--accent { border-color: var(--border-strong); }

.icon-tile {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  border-radius: var(--r-md);
  background: var(--container);
  display: flex; align-items: center; justify-content: center;
}
.icon-tile svg { width: 24px; height: 24px; fill: var(--primary); }

.icon-tile--primary { background: var(--primary); width: 52px; height: 52px; flex-basis: 52px; border-radius: 18px; }
.icon-tile--primary svg { fill: #fff; width: 26px; height: 26px; }

/* grille de fonctionnalités */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s5);
}

.feature-card { display: flex; flex-direction: column; gap: var(--s3); }
.feature-body { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.feature-card h3 {
  margin: 0;
  font-size: 1.13rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: pretty;
}
.feature-card p { margin: 0; font-size: 0.94rem; line-height: 1.6; color: var(--text-3); text-wrap: pretty; }

/* carte mise en avant (démarrage rapide) */
.highlight-card {
  display: flex;
  align-items: center;
  gap: var(--s6);
  flex-wrap: wrap;
}
.highlight-body { flex: 1 1 260px; display: flex; flex-direction: column; gap: var(--s1); }
.highlight-body strong { font-size: 1.19rem; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.highlight-body span { font-size: 0.94rem; line-height: 1.55; color: var(--text-3); }

/* --- Lignes de liens (.link-row) ----------------------------------------- */

.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s3) var(--s5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list--spaced { margin-top: var(--s5); }

.link-row {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 52px;
  padding: var(--s3) var(--s5);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}
.link-row:hover { background: var(--container); border-color: var(--border-strong); text-decoration: none; }
.link-row .num { flex: 0 0 22px; font-size: 0.81rem; font-weight: 700; color: var(--muted); }
.link-row .label { text-wrap: pretty; }

/* --- Encart freemium ------------------------------------------------------ */

.notice {
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: var(--s6) var(--s8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  text-align: center;
}
.notice p { margin: 0; font-size: 1.06rem; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.notice a { font-weight: 700; }
.notice .eyebrow { margin-bottom: 0; }

/* --- Pied de page --------------------------------------------------------- */

.site-footer { background: var(--surface); border-top: 1px solid var(--border); }

.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--s6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4) var(--s6);
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-3);
}
.footer-brand { display: flex; align-items: center; gap: var(--s3); font-weight: 600; }
.footer-links { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; font-weight: 600; }
.footer-langs { display: flex; gap: var(--s2); }

/* --- Pages de contenu (tutos, FAQ, démarrage rapide) --------------------- */

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--s6) var(--s4);
  min-height: 60vh;
}
.site-main--full { max-width: none; padding: 0; }

.page-title {
  margin-top: 0;
  font-size: clamp(1.75rem, 3vw, 2.38rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.page h2, .tuto-content h2 {
  margin-top: var(--s10);
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.page h3, .tuto-content h3 { font-size: 1.13rem; font-weight: 700; }

.tuto-wrapper { display: flex; gap: var(--s6); align-items: flex-start; }
.tuto-sidebar { flex: 0 0 240px; }
.tuto-content { flex: 1 1 auto; min-width: 0; }

.nav-tutos {
  position: sticky;
  top: var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--s4);
}

.nav-tutos-title {
  margin: 0 0 var(--s2);
  font-size: 0.81rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}

.nav-tutos-list { list-style: none; margin: 0; padding: 0; }
.nav-tutos-list li { margin-bottom: var(--s1); }

.nav-tutos-link {
  display: block;
  min-height: 44px;
  padding: var(--s2) var(--s3);
  border-radius: var(--s3);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
}
.nav-tutos-link:hover { background: var(--container); text-decoration: none; }
.nav-tutos-link.is-active { background: var(--primary); color: #fff; }

/* Captures d'écran mobile (portrait) : plafonnées à 320px et centrées */
.site-main img {
  max-width: 320px;
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  margin: var(--s5) auto;
  display: block;
}
.site-main img[src*="salle_to_plan"] { max-width: 100%; }
.site-main--full img { max-width: none; margin: 0; border-radius: 0; }

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1020px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--s5);
    padding: var(--s10) var(--s6);
    justify-items: center;
  }

  .hero-copy {
    gap: var(--s4);
    width: 100%;
    max-width: 52rem;
    margin: 0 auto;
    text-align: center;
  }

  .hero-title,
  .hero-subtitle,
  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-title-lead,
  .hero-title-accent {
    white-space: normal;
  }

  .hero-copy .btn-row {
    padding-top: var(--s1);
    justify-content: center;
  }

  .hero-figure {
    gap: var(--s2);
    width: min(100%, 46rem);
    margin: 0 auto;
    text-align: center;
  }

  .hero-figure figcaption {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
}





/* Tablette : l'ordre des blocs ne change pas (copie puis illustration) ;
   on resserre seulement les rythmes verticaux pour que l'illustration
   reste visible dans le premier écran. */
@media (max-width: 1000px) {
  .hero-lead {
      font-size: 1.06rem;
    }

    .hero-title {
      font-size: clamp(2rem, 4.6vw, 2.75rem);
    }

      .hero--en .hero-title {
        font-size: clamp(1.95rem, 4.4vw, 2.65rem);
      }

      .hero--es .hero-title {
        font-size: clamp(1.9rem, 4.2vw, 2.55rem);
      }


  .hero-figure .frame { padding: var(--s4); }

  .section-inner { padding: var(--s16) var(--s5); }
}

@media (max-width: 700px) {
  .header-inner { padding: var(--s3) var(--s4); gap: var(--s3); }
  .site-logo { font-size: 1.06rem; }
  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .site-nav a { white-space: nowrap; }
  .lang-switcher { margin-left: auto; padding-left: var(--s3); }

  .badge-break { display: inline; }
  .hero-inner { padding: var(--s8) var(--s5); gap: var(--s5); }
  .hero-copy { gap: var(--s5); }
  .hero-copy .btn-row { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-figure .frame { border-radius: var(--r-card); padding: var(--s3); }

  .section-inner { padding: var(--s10) var(--s5); }
  .section-head { margin-bottom: var(--s5); }
  .feature-grid { grid-template-columns: 1fr; gap: var(--s3); }
  .feature-card { flex-direction: row; gap: var(--s4); padding: var(--s5); }
  .feature-card .feature-body { display: flex; flex-direction: column; gap: 6px; }
  .feature-card h3 { font-size: 1.06rem; }
  .link-list { grid-template-columns: 1fr; gap: var(--s2); }
  .link-list--spaced { margin-top: var(--s2); }
  .link-row { min-height: 48px; padding: var(--s3) var(--s4); font-size: 0.94rem; }
  .notice { border-radius: var(--r-card); padding: var(--s5); }
  .notice p { font-size: 0.94rem; }

  .tuto-wrapper { flex-direction: column; }
  .tuto-sidebar { flex-basis: auto; width: 100%; }
  .nav-tutos { position: static; }

  .footer-inner { padding: var(--s5); flex-direction: column; align-items: flex-start; gap: var(--s3); }
}

/* ==========================================================================
   Pages de contenu : tutoriels, FAQ, guide de démarrage rapide.
   Mêmes tokens, mêmes composants que l'accueil (.card, .section, .link-row,
   .icon-tile, .eyebrow) — aucune nouvelle couleur, aucun nouveau rayon.
   ========================================================================== */

/* --- Bandeau de titre ----------------------------------------------------- */

.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-hero-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--s10) var(--s6) var(--s16);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s3);
}

.page-hero .eyebrow { margin: 0; }

.page-hero .page-title {
  margin: 0;
  max-width: 24em;
  line-height: 1.1;
  text-wrap: pretty;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: calc(var(--s3) * -1);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--primary-dark);
}

/* --- Largeurs de lecture -------------------------------------------------- */

.section-inner--reading {
  max-width: 800px;
  padding-top: var(--s10);
}

/* --- Corps de texte (.prose) --------------------------------------------- */

/* Le titre du markdown ferait doublon avec celui du bandeau. */
.prose h1 { display: none; }

/* Pages légales : les H1 servent de séparateurs de section (une par langue). */
.legal-prose h1 {
  display: block;
  margin: var(--s10) 0 var(--s4);
  padding-top: var(--s10);
  border-top: 2px solid var(--border);
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  scroll-margin-top: var(--s5);
}
.legal-prose h1:first-of-type { border-top: 0; padding-top: 0; }

.prose {
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--text-2);
}

.prose > *:first-child { margin-top: 0; }

.prose h2 {
  margin: var(--s10) 0 var(--s4);
  padding-top: var(--s6);
  border-top: 1px solid var(--border);
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: pretty;
  scroll-margin-top: var(--s5);
}

.prose h3 {
  margin: var(--s8) 0 var(--s3);
  font-size: 1.19rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.prose p { margin: 0 0 var(--s4); text-wrap: pretty; }
.prose strong { font-weight: 700; color: var(--text); }
.prose em { font-style: normal; color: var(--text-3); }

.prose ul, .prose ol { margin: 0 0 var(--s4); padding-left: var(--s5); }
.prose li { margin-bottom: var(--s2); }
.prose li::marker { color: var(--muted); }

.prose a { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.prose a:hover { color: var(--primary-dark); }

.prose hr {
  height: 1px;
  border: 0;
  margin: var(--s10) 0 var(--s6);
  background: var(--border);
}

.prose blockquote {
  margin: 0 0 var(--s4);
  padding: var(--s4) var(--s5);
  background: var(--surface);
  border-radius: var(--r-card);
  color: var(--text-2);
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

/* Dernier paragraphe après le <hr> : renvoi vers l'étape suivante */
.prose hr + p { font-weight: 600; color: var(--text); }

/* --- Captures d'écran ----------------------------------------------------- */

.prose-figure {
  margin: var(--s6) auto;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: var(--s4);
}

.prose-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
}

.prose-figure figcaption {
  padding: 0 var(--s2);
  font-size: 0.88rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--text-3);
  text-align: center;
  text-wrap: pretty;
}

/* Illustration paysage : pleine largeur de la colonne */
.prose-figure:has(img[src*="salle_to_plan"]) { max-width: 100%; }

/* Sans JavaScript : le cadre est porté par l'image elle-même */
.prose p > img {
  display: block;
  max-width: 360px;
  width: 100%;
  height: auto;
  margin: var(--s6) auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--s3);
}
.prose p > img[src*="salle_to_plan"] { max-width: 100%; }

/* --- Sommaires (composant .link-row) ------------------------------------- */

.link-list--stack { grid-template-columns: 1fr; gap: var(--s2); }

.link-row--current {
  background: var(--container);
  border-color: var(--border-strong);
  color: var(--primary-dark);
}
.link-row--current .num { color: var(--primary-dark); }

.toc { margin-bottom: var(--s8); }
.toc .nav-tutos-title { margin-bottom: var(--s3); }

/* --- Gabarit tutoriel ----------------------------------------------------- */

.tuto-wrapper { gap: var(--s6); }
.tuto-sidebar { flex: 0 0 248px; }

.nav-tutos { padding: var(--s5); border-radius: var(--r-pill); }

/* Desktop : colonne de lecture resserrée (moins de marge à gauche de la
   sidebar, sidebar plus proche du contenu) et sommaire flottant. Le
   `align-self: stretch` est ce qui rend le `position: sticky` du .nav-tutos
   efficace : sans lui, la colonne fait exactement la hauteur du sommaire et
   il n'a aucune place pour glisser. Sous 1000px la sidebar repasse en pleine
   largeur et le sommaire est replié — rien à figer. */
@media (min-width: 1001px) {
  /* 248 (sidebar) + 24 (gap) + 840 (colonne de lecture) + 2 × 20 (padding)
     = 1152 : la largeur du bloc est exactement celle de son contenu, donc le
     `margin: 0 auto` de .section-inner centre l'ensemble sidebar + contenu sur
     la page, quelle que soit la largeur de l'écran. Le bandeau de titre reprend
     la même largeur pour rester aligné sur la sidebar. */
  .section-inner.tuto-wrapper,
  .page-hero--tuto .page-hero-inner { max-width: 1152px; padding-left: var(--s5); padding-right: var(--s5); }

  .hero--es .hero-title {
        font-size: clamp(2.8rem, 3.4vw, 3.25rem);
  }
  .tuto-content { min-width: 0; max-width: 840px; }
  .tuto-sidebar { align-self: stretch; }
  .nav-tutos {
    top: var(--s6);
    max-height: calc(100vh - 2 * var(--s6));
    overflow-y: auto;
  }
}

/* --- Captures côte à côte (composant .figure-pair) ------------------------ */
/* Deux variantes : sans titre, et --titled où le texte associé à chaque
   capture passe en en-tête de colonne. Les deux s'empilent sous 700px. */

.figure-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: var(--s5);
  margin: var(--s6) 0;
}

.figure-pair .prose-figure { max-width: none; margin: 0; }

/* subgrid : les titres partagent la même ligne, donc les deux images
   démarrent à la même hauteur même si un titre tient sur deux lignes. */
.figure-pair--titled { grid-template-rows: auto auto; }
.figure-pair--titled .prose-figure {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  gap: var(--s3);
}

.figure-title {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text-2);
  text-wrap: pretty;
}
.figure-title strong { color: var(--text); }

/* --- Guide précédent / suivant ------------------------------------------- */

.tuto-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
  margin-top: var(--s10);
}

.tuto-nav--single { grid-template-columns: 1fr; }

.tuto-nav-link {
  display: flex;
  align-items: center;
  gap: var(--s4);
  color: var(--text);
}
.tuto-nav-link:hover { background: var(--surface); text-decoration: none; }
.tuto-nav-link--next { text-align: right; justify-content: flex-end; }

.tuto-nav-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tuto-nav-label { font-size: 0.81rem; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); }
.tuto-nav-title { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; text-wrap: pretty; }

.icon-flip svg { transform: scaleX(-1); }

/* --- Blocs repliables (<details> natif) ---------------------------------- */

.collapsible > summary,
.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}
.collapsible > summary::-webkit-details-marker,
.faq-item > summary::-webkit-details-marker { display: none; }

/* Chevron dessiné en CSS : pas d'icône supplémentaire à maintenir. */
.collapsible > summary::after,
.faq-item > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-right: 3px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform 120ms ease;
}
.collapsible[open] > summary::after,
.faq-item[open] > summary::after { transform: rotate(-135deg); }

.collapsible > summary:hover::after,
.faq-item > summary:hover::after { border-color: var(--primary); }

.collapsible[open] > summary { margin-bottom: var(--s3); }

/* --- FAQ ------------------------------------------------------------------ */

.faq-list { display: flex; flex-direction: column; gap: var(--s4); }

.faq-item { padding: var(--s5) var(--s6); }
.faq-item:hover { border-color: var(--border-strong); }

.faq-question {
  font-size: 1.13rem;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: pretty;
}
.faq-item[open] .faq-question { color: var(--primary-dark); }

.faq-answer { font-size: 1rem; padding-top: var(--s2); }
.faq-answer > *:last-child { margin-bottom: 0; }

.faq-footer {
  margin: var(--s10) 0 0;
  font-size: 0.94rem;
  color: var(--text-3);
}
.faq-footer a { font-weight: 700; white-space: nowrap; }

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1000px) {
  .tuto-wrapper { flex-direction: column; gap: var(--s6); }
  .tuto-sidebar { flex-basis: auto; width: 100%; }
  .nav-tutos { position: static; }
  .page-hero-inner { padding: var(--s6) var(--s5) var(--s10); }
}

@media (max-width: 700px) {
  .figure-pair { grid-template-columns: 1fr; gap: var(--s6); }
  .figure-pair .prose-figure { max-width: 360px; margin: 0 auto; }
  .figure-pair--titled .prose-figure {
    display: flex;
    flex-direction: column;
    grid-row: auto;
    grid-template-rows: none;
  }

  .page-hero-inner { padding: var(--s5) var(--s5) var(--s8); gap: var(--s2); }
  .section-inner--reading { padding-top: var(--s6); }
  .prose { font-size: 1rem; }
  .prose h2 { margin-top: var(--s8); padding-top: var(--s5); font-size: 1.31rem; }
  .prose-figure { border-radius: var(--r-card); padding: var(--s3); }
  .nav-tutos { padding: var(--s4); border-radius: var(--r-card); }
  .tuto-nav { grid-template-columns: 1fr; gap: var(--s2); margin-top: var(--s8); }
  .tuto-nav-link--next { text-align: left; justify-content: flex-start; flex-direction: row-reverse; }
  .faq-item { padding: var(--s4) var(--s5); }
  .faq-question { font-size: 1.06rem; }
  .tuto-nav--single { grid-template-columns: 1fr; }
}
