/* ============================================================
   OPTERIA : « Guide des données » (14/10/2026, demande Axel). Pages /guide-des-donnees, /guide-des-donnees/<partie>,
   /guide-des-donnees/<partie>/<article>, générées par outils/generer_guide.py. Chargé après da-labo.css.
   Structure reprise du Data Guide de Prisma : accueil avec titre et illustration en haut à droite, une carte par partie
   avec sa liste d'articles dépliable façon FAQ ; pages d'article à trois colonnes (navigation du guide à gauche, texte au
   centre, « Sur cette page » à droite), article précédent / suivant en bas.
   DA du site : fond blanc, Switzer 400, titres en deux tons, filets de 1 px. Aucune animation, aucune transition,
   aucune ombre portée (décision du 10/10/2026). Mode nuit : variables de da-theme.css (#141414 page, #1f1f1f cartes).
   ============================================================ */
.guide { --gd-carte: #fff; --gd-rang: #fff; --gd-survol: #f6f6f3; --gd-actif: #fff0ea; --gd-orange: #FB4D17; --gd-orange-txt: #d63d0c; --gd-r: 24px; }
html[data-theme="nuit"] .guide { --gd-carte: #1f1f1f; --gd-rang: #1f1f1f; --gd-survol: #282828; --gd-actif: rgba(251,77,23,.16); --gd-orange-txt: #ff8a5c; }
.gd-page *, .gd-page *::before, .gd-page *::after { transition: none !important; animation: none !important; }
.gd-page { padding: 44px 0 64px; }
.gd-page a { color: inherit; }
.gd-page :is(h1, h2, h3) { color: var(--ink); }
.gd-page .lx-fil { margin-bottom: 18px; font-size: 14px; }
.gd-page .lx-fil a { color: var(--ink-2); text-decoration: none; }
.gd-page .lx-fil a:hover { color: var(--ink); text-decoration: underline; }
.gd-page .g { color: var(--ink-3); }

/* ---------- Boutons ---------- */
.gd-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: 999px; background: #191919; color: #fff !important; font-size: 14.5px; line-height: 1; text-decoration: none !important; white-space: nowrap; }
.gd-btn:hover { background: #3a3a3a; }
.gd-btn--ligne { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--line-2); }
.gd-btn--ligne:hover { background: var(--gd-survol); }
html[data-theme="nuit"] .gd-btn:not(.gd-btn--ligne) { background: #fff; color: #141414 !important; }
html[data-theme="nuit"] .gd-btn:not(.gd-btn--ligne):hover { background: #e9e9e6; }

/* ============================================================ Accueil du guide ============================================================ */
.gd-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: center; gap: 40px; width: calc(100% - 48px); max-width: 1128px; margin: 0 auto; padding: 24px 0 56px; }
.gd-hero h1 { margin: 0 0 22px; font-size: clamp(40px, 5.2vw, 68px); font-weight: 400; line-height: 1.04; letter-spacing: -.035em; }
.gd-hero__chapo { max-width: 560px; margin: 0; font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.gd-hero__meta { margin: 22px 0 0; font-size: 14px; color: var(--ink-3); }
.gd-hero__img { justify-self: end; width: 100%; max-width: 380px; height: auto; }

.gd-blocs { display: grid; gap: 20px; width: calc(100% - 48px); max-width: 880px; margin: 0 auto; }
.gd-bloc { padding: 40px 40px 32px; border-radius: var(--gd-r); background: var(--gd-carte); box-shadow: inset 0 0 0 1px var(--line); scroll-margin-top: 96px; }
.gd-bloc__tete { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 32px; align-items: start; }
.gd-bloc__num { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--gd-orange-txt); }
.gd-bloc h2 { margin: 0 0 14px; font-size: clamp(26px, 2.6vw, 32px); font-weight: 400; letter-spacing: -.025em; line-height: 1.15; }
.gd-bloc h2 a { text-decoration: none; }
.gd-bloc h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.gd-bloc__txt > p:last-child { margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.gd-bloc__img { width: 200px; height: 170px; object-fit: contain; object-position: right top; }

/* liste dépliable façon FAQ */
.gd-plis { margin-top: 26px; border-top: 1px solid var(--line); }
.gd-plis > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 2px; list-style: none; cursor: pointer; font-size: 15.5px; color: var(--ink); }
.gd-plis > summary::-webkit-details-marker { display: none; }
.gd-plis > summary:hover span:first-child { text-decoration: underline; text-underline-offset: 4px; }
.gd-plis > summary:focus-visible { outline: 2px solid var(--gd-orange); outline-offset: 4px; border-radius: 6px; }
.gd-plus { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); }
.gd-plus::before, .gd-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; margin: -.75px 0 0 -5.5px; background: currentColor; border-radius: 1px; }
.gd-plus::after { transform: rotate(90deg); }
.gd-plis[open] .gd-plus::after { display: none; }
.gd-plis[open] .gd-plus { background: #191919; color: #fff; box-shadow: none; }
html[data-theme="nuit"] .gd-plis[open] .gd-plus { background: #fff; color: #141414; }
.gd-plis .gd-rangs { margin-top: 16px; }

.gd-rangs { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gd-rang { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; padding: 14px 18px; border-radius: 12px; background: var(--gd-rang); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none !important; font-size: 15.5px; font-weight: 500; line-height: 1.35; }
.gd-rang svg { flex: none; width: 15px; height: 15px; color: var(--ink-3); }
.gd-rang:hover { background: var(--gd-survol); }
.gd-rang:hover svg { color: var(--gd-orange); }
.gd-rang:focus-visible { outline: 2px solid var(--gd-orange); outline-offset: 2px; }
.gd-rang--partie { box-shadow: none; background: transparent; font-weight: 400; color: var(--ink-2); min-height: 44px; }
.gd-rang--desc span { display: grid; gap: 4px; }
.gd-rang--desc b { font-weight: 500; }
.gd-rang--desc small { font-size: 14px; font-weight: 400; line-height: 1.45; color: var(--ink-2); }

/* ============================================================ Pages de partie et d'article ============================================================ */
.gd-page--doc { display: grid; grid-template-columns: 252px minmax(0, 820px) 232px; justify-content: center; align-items: start; gap: 28px; width: calc(100% - 48px); max-width: 1400px; margin: 0 auto; }
.gd-page--partie { grid-template-columns: 252px minmax(0, 820px); }
.gd-centre { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.gd-centre > * { min-width: 0; }
.gd-carte { padding: 36px 40px; border-radius: var(--gd-r); background: var(--gd-carte); box-shadow: inset 0 0 0 1px var(--line); }
.gd-carte__titre { margin: 0 0 20px; font-size: 26px; font-weight: 400; letter-spacing: -.02em; }

/* barre latérale */
.gd-cote { align-self: stretch; }
.gd-cote__in { position: sticky; top: 96px; display: grid; gap: 18px; max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px 4px 16px 2px; }
.gd-cote__carte { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--gd-carte); box-shadow: inset 0 0 0 1px var(--line); }
.gd-cote__carte p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink); }
.gd-cote__carte .gd-btn { justify-self: start; height: 36px; padding: 0 14px; font-size: 13.5px; }
.gd-nav { display: grid; gap: 4px; }
.gd-nav__accueil { display: block; padding: 8px 10px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.gd-nav__accueil:hover, .gd-nav li a:hover { background: var(--gd-survol); }
.gd-nav__partie > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) 12px; align-items: start; gap: 8px; padding: 8px 10px; border-radius: 10px; list-style: none; cursor: pointer; font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--ink); }
.gd-nav__partie > summary::-webkit-details-marker { display: none; }
.gd-nav__partie > summary:hover { background: var(--gd-survol); }
.gd-nav__partie > summary svg { width: 12px; height: 12px; margin-top: 4px; color: var(--ink-3); transform: rotate(-90deg); }
.gd-nav__partie[open] > summary svg { transform: none; }
.gd-nav__num { font-family: var(--mono); font-size: 11.5px; line-height: 19px; color: var(--ink-3); }
.gd-nav ul { display: grid; gap: 1px; margin: 2px 0 10px; padding: 0 0 0 30px; list-style: none; }
.gd-nav li a { display: block; padding: 6px 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.38; color: var(--ink-2); text-decoration: none; }
.gd-nav a[aria-current="page"] { background: var(--gd-actif); color: var(--gd-orange-txt); }

/* tête de page */
.gd-tete { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 8px 28px; align-items: start; }
.gd-tete h1 { margin: 0 0 18px; font-size: clamp(32px, 3.6vw, 46px); font-weight: 400; line-height: 1.08; letter-spacing: -.03em; }
.gd-tete__meta { margin: 0; font-size: 14px; color: var(--ink-3); }
.gd-tete__img { width: 200px; height: 180px; object-fit: contain; object-position: right top; }
.gd-tete .lx-fil a { color: var(--gd-orange-txt); }

/* « Sur cette page » */
.gd-sur { position: sticky; top: 96px; max-height: calc(100vh - 112px); overflow-y: auto; scrollbar-width: thin; padding: 8px 0 16px; }
.gd-sur__titre { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 14px; font-weight: 500; color: var(--ink); }
.gd-sur__titre svg { width: 16px; height: 16px; color: var(--ink-2); }
.gd-som { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.gd-som a { display: block; margin-left: -1px; padding: 5px 0 5px 13px; border-left: 1px solid transparent; font-size: 13.5px; line-height: 1.38; color: var(--ink-2); text-decoration: none; }
.gd-som .gd-som--h3 a { padding-left: 25px; font-size: 13px; color: var(--ink-3); }
.gd-som a:hover { color: var(--ink); }
.gd-som a.is-actif { border-left-color: var(--gd-orange); color: var(--gd-orange-txt); }
.gd-som-mobile, .gd-mobile { display: none; }

/* texte */
.gd-prose { font-size: 17px; line-height: 1.65; color: var(--texte); }
.gd-prose > :first-child { margin-top: 0; }
.gd-prose h2 { margin: 48px 0 14px; font-size: 28px; font-weight: 400; line-height: 1.2; letter-spacing: -.02em; scroll-margin-top: 100px; }
.gd-prose h3 { margin: 30px 0 8px; font-size: 19.5px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; scroll-margin-top: 100px; }
.gd-prose p { margin: 0 0 16px; }
.gd-prose ul, .gd-prose ol { margin: 0 0 18px; padding-left: 22px; }
.gd-prose li { margin: 0 0 8px; padding-left: 4px; }
.gd-prose li::marker { color: var(--gd-orange); }
.gd-prose b, .gd-prose strong { font-weight: 500; color: var(--ink); }
.gd-prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--gd-orange) 70%, transparent); text-decoration-thickness: 1px; text-underline-offset: 3px; color: var(--ink); }
.gd-prose a:hover { text-decoration-color: currentColor; }
.gd-bref { margin: 0 0 8px; padding: 22px 24px 8px; border-radius: 16px; background: var(--gd-survol); }
.gd-bref__titre { margin: 0 0 10px !important; font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.gd-bref ul { margin-bottom: 14px; }
.gd-tableau { margin: 8px 0 24px; overflow-x: auto; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.gd-tableau table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.gd-tableau th, .gd-tableau td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.gd-tableau tr:last-child > * { border-bottom: 0; }
.gd-tableau thead th { font-size: 13px; font-weight: 500; color: var(--ink-2); background: var(--gd-survol); }
.gd-tableau tbody th { font-weight: 500; color: var(--ink); }

/* appel et suite */
.gd-appel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: 28px 32px; }
.gd-appel p { margin: 0; max-width: 460px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.gd-appel p b { font-size: 18px; font-weight: 500; color: var(--ink); }
.gd-appel__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.gd-suite { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px 32px; }
.gd-suite__lien { display: grid; gap: 6px; align-content: start; padding: 6px 0; text-decoration: none; }
.gd-suite__lien small { font-size: 13px; color: var(--ink-3); }
.gd-suite__lien span { display: inline; font-size: 16.5px; font-weight: 500; line-height: 1.35; color: var(--ink); }
.gd-suite__lien svg { display: inline-block; width: 16px; height: 16px; margin: 0 0 -2px 8px; color: var(--gd-orange); }
.gd-suite__lien .gd-suite__retour { margin: 0 8px -2px 0; }
.gd-suite__lien--suiv { text-align: right; }
.gd-suite__lien:hover span { text-decoration: underline; text-underline-offset: 4px; }

/* ============================================================ Écrans plus petits ============================================================ */
@media (max-width: 1200px) {
  .gd-page--doc, .gd-page--partie { grid-template-columns: 240px minmax(0, 1fr); }
  .gd-sur { display: none; }
  .gd-som-mobile { display: block; grid-column: 1 / -1; margin-top: 18px; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .gd-page { padding-top: 28px; }
  .gd-page--doc, .gd-page--partie { display: block; width: calc(100% - 32px); }
  .gd-cote { display: none; }
  .gd-mobile { display: block; padding: 0 18px; border-radius: 16px; background: var(--gd-carte); box-shadow: inset 0 0 0 1px var(--line); }
  .gd-mobile > summary, .gd-som-mobile > summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; list-style: none; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--ink); }
  .gd-mobile > summary::-webkit-details-marker, .gd-som-mobile > summary::-webkit-details-marker { display: none; }
  .gd-mobile > summary svg, .gd-som-mobile > summary svg { width: 12px; height: 12px; }
  .gd-mobile[open] > summary svg, .gd-som-mobile[open] > summary svg { transform: rotate(180deg); }
  .gd-mobile .gd-nav { padding-bottom: 14px; }
  .gd-hero { grid-template-columns: 1fr; gap: 8px; padding-top: 16px; }
  .gd-hero__img { grid-row: 1; justify-self: end; max-width: 210px; }
}
@media (max-width: 1200px) and (min-width: 901px) { .gd-som-mobile > summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 0; list-style: none; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--ink); } .gd-som-mobile > summary svg { width: 12px; height: 12px; } .gd-som-mobile > summary::-webkit-details-marker { display: none; } .gd-som-mobile .gd-som { margin-top: 12px; } }
@media (max-width: 640px) {
  .gd-blocs { width: calc(100% - 32px); }
  .gd-hero { width: calc(100% - 32px); }
  .gd-hero__chapo { font-size: 17px; }
  .gd-bloc { padding: 26px 20px 20px; border-radius: 20px; }
  .gd-bloc__tete { grid-template-columns: 1fr; gap: 0; }
  .gd-bloc__img { grid-row: 1; justify-self: end; width: 140px; height: 120px; margin: -6px -4px 4px 0; }
  .gd-carte { padding: 24px 20px; border-radius: 20px; }
  .gd-tete { grid-template-columns: 1fr; }
  .gd-tete__img { grid-row: 1; justify-self: end; width: 140px; height: 120px; margin-bottom: 4px; }
  .gd-tete h1 { font-size: 31px; }
  .gd-prose { font-size: 16.5px; }
  .gd-prose h2 { margin-top: 38px; font-size: 24px; }
  .gd-bref { padding: 18px 18px 6px; }
  .gd-som-mobile .gd-som { margin-bottom: 8px; }
  .gd-rang { padding: 13px 14px; font-size: 15px; }
  .gd-appel { padding: 24px 20px; }
  .gd-suite { grid-template-columns: 1fr; padding: 20px; }
  .gd-suite__lien--suiv { text-align: left; }
}
