/* Guides et actualités v2 — mise en page « magazine » (scripts/guide-v2.mjs, équipe Guides, DESIGN=v2 seulement).
   Rythme : nuit (en-tête sur le plan de Fès) · clair (article, « L'essentiel » en panneau nuit) · sable (guides liés) · « Et maintenant ? » · nuit (contact).
   Fonctions conservées : reading.css (progression, sommaire, partage), listen.js, glossary.css, flow.css. */

.v2 .v2g-head, .v2 .v2g-key { --g-on: #f3f1ff; --g-soft: rgba(236, 234, 255, .82); --g-faint: rgba(236, 234, 255, .66); --g-rule: rgba(201, 198, 244, .2); }

/* ── En-tête ─────────────────────────────────────────────────────────────── */
.v2 .v2g-head { background: #0b0d22; padding-block: clamp(7rem, 6rem + 3vw, 8.6rem) 0; display: flex; flex-direction: column; }
/* Plan chargé après la page (v2-guide.js ajoute .on) pour ne pas retarder l'affichage ; sans JavaScript, chargé directement */
.v2 .v2g-plan { position: absolute; inset: 0; z-index: -2; pointer-events: none; background: none 62% 46% / 2700px auto no-repeat; opacity: 0; transition: opacity 1.2s var(--ease);
  -webkit-mask-image: linear-gradient(100deg, transparent 18%, #000 62%); mask-image: linear-gradient(100deg, transparent 18%, #000 62%); }
.v2 .v2g-plan.on, .v2.no-js .v2g-plan { background-image: url("../img/plan/fes.svg"); opacity: .55; }
.v2[dir="rtl"] .v2g-plan { background-position: 38% 46%; -webkit-mask-image: linear-gradient(-100deg, transparent 18%, #000 62%); mask-image: linear-gradient(-100deg, transparent 18%, #000 62%); }
.v2 .v2g-head::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 80% at 82% 40%, rgba(23, 26, 78, .55), transparent 70%), linear-gradient(to bottom, rgba(11, 13, 34, .7), transparent 22%, transparent 70%, rgba(11, 13, 34, .9)); }
.v2[dir="rtl"] .v2g-head::before { background: radial-gradient(60% 80% at 18% 40%, rgba(23, 26, 78, .55), transparent 70%), linear-gradient(to bottom, rgba(11, 13, 34, .7), transparent 22%, transparent 70%, rgba(11, 13, 34, .9)); }
.v2 .v2g-head-in { display: grid; grid-template-columns: minmax(0, 1fr) clamp(15rem, 10rem + 9vw, 20rem); gap: 2rem clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.v2 .v2g-head-txt { min-width: 0; }
.v2 .v2g-head .crumbs { color: var(--g-faint); margin-bottom: 1.6rem; flex-wrap: wrap; }
.v2 .v2g-head .crumbs a { text-decoration: underline; text-decoration-color: rgba(236, 234, 255, .3); text-underline-offset: 4px; }
.v2 .v2g-head .eyebrow { color: var(--copper-l); margin-bottom: 1rem; flex-wrap: wrap; max-width: 100%; overflow-wrap: anywhere; }
.v2 .v2g-head .eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; flex: none; }
.v2 .v2g-head h1 { font-size: clamp(2.25rem, 1.45rem + 3vw, 3.9rem); font-weight: 790; line-height: 1.06; letter-spacing: -.033em; max-width: 21ch; margin: 0 0 .5em; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.v2[dir="rtl"] .v2g-head h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.5rem); line-height: 1.32; letter-spacing: 0; font-weight: 700; }
.v2 .v2g-head h1 em { font-style: normal; color: var(--copper-l); }
.v2 .v2g-head .lead { color: var(--g-soft); font-size: clamp(1.06rem, 1rem + .3vw, 1.2rem); max-width: 40rem; }
.v2 .v2g-head .meta { color: var(--g-faint); font-size: .9rem; margin-top: 1.4rem; max-width: 44rem; }
.v2 .v2g-head .listen-btn { margin-top: .4rem; justify-self: start; padding: .8rem 1.3rem; }

/* Illustration du sujet, posée comme sur une feuille de plan (repères d'angle) */
.v2 .v2g-art { justify-self: end; width: 100%; }
.v2 .v2g-sheet { position: relative; aspect-ratio: 1; display: grid; place-items: center; color: #c9c6f4; --illu-acc: var(--copper-l);
  background: radial-gradient(70% 70% at 50% 45%, rgba(23, 26, 78, .9), rgba(11, 13, 34, .82)); border: 1px solid var(--g-rule); border-radius: 22px; }
.v2 .v2g-sheet .illu { width: 80%; height: auto; }
.v2 .v2g-c { position: absolute; width: 14px; height: 14px; border-color: var(--copper-l); border-style: solid; border-width: 0; }
.v2 .v2g-c1 { top: 12px; inset-inline-start: 12px; border-block-start-width: 1.5px; border-inline-start-width: 1.5px; }
.v2 .v2g-c2 { top: 12px; inset-inline-end: 12px; border-block-start-width: 1.5px; border-inline-end-width: 1.5px; }
.v2 .v2g-c3 { bottom: 12px; inset-inline-start: 12px; border-block-end-width: 1.5px; border-inline-start-width: 1.5px; }
.v2 .v2g-c4 { bottom: 12px; inset-inline-end: 12px; border-block-end-width: 1.5px; border-inline-end-width: 1.5px; }
.v2 .v2g-sheet .illu [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 0; animation: v2g-draw 1.8s var(--ease) .15s backwards; }
.v2 .v2g-sheet .illu .dash, .v2 .v2g-sheet .illu .tint, .v2 .v2g-sheet .illu .dot { animation: v2g-fade .8s ease 1.2s backwards; }
@keyframes v2g-draw { from { stroke-dashoffset: 1; } }
@keyframes v2g-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .v2 .v2g-sheet .illu *, .v2 .v2g-sheet .illu [pathLength] { animation: none; } .v2 .v2g-plan { transition: none; } }

/* Cartouche : durée de lecture et structure du guide */
.v2 .v2g-facts { list-style: none; margin: clamp(2.2rem, 1.6rem + 2vw, 3.4rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); border-top: 1px solid var(--g-rule); }
.v2 .v2g-facts li { display: flex; align-items: baseline; gap: .7rem; padding: 1.15rem 1.2rem 1.3rem; border-inline-start: 1px solid var(--g-rule); min-width: 0; }
.v2 .v2g-facts li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.v2 .v2g-fn { font-family: var(--mono); font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); line-height: 1; color: #fff; font-weight: 500; }
.v2 .v2g-fl { color: var(--g-faint); font-size: .92rem; line-height: 1.3; min-width: 0; overflow-wrap: break-word; }

/* ── Corps de l'article ──────────────────────────────────────────────────── */
.v2 .v2g-body { background: var(--v2-paper); padding-block: clamp(3rem, 2.2rem + 3vw, 5.5rem) clamp(4rem, 3rem + 3vw, 6rem); }
.v2 .v2g-body .guide-grid { grid-template-columns: 15.5rem minmax(0, 1fr); gap: clamp(2.5rem, 1rem + 4vw, 5rem); }
.v2 .v2g-body .prose { max-width: 46rem; }
.v2 .v2g-body .prose p, .v2 .v2g-body .prose li { color: var(--text); }
.v2 .v2g-body .prose a:not(.share-btn) { color: var(--g-text); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.v2 .v2g-body .prose h2 { font-size: clamp(1.6rem, 1.25rem + 1.2vw, 2.2rem); line-height: 1.16; letter-spacing: -.022em; margin: 0 0 .8em; scroll-margin-top: 104px; }
.v2[dir="rtl"] .v2g-body .prose h2 { line-height: 1.4; letter-spacing: 0; }
.v2 .v2g-sec { margin-top: clamp(3rem, 2.4rem + 2vw, 4.2rem); }
.v2 .v2g-hn { display: flex; align-items: center; gap: .8rem; font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: .12em; color: var(--copper-ink); margin-bottom: .9rem; }
.v2 .v2g-hn::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Sommaire : numéros alignés sur ceux des parties, partie en cours marquée */
.v2 .v2g-toc { top: 104px; font-size: .95rem; }
.v2 .v2g-toc ol { border-inline-start: 0; }
.v2 .v2g-toc li a { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .2rem; padding: .5rem .6rem; padding-inline-start: .7rem; border-radius: 0 10px 10px 0; color: var(--muted); line-height: 1.4; border-inline-start: 2px solid var(--line); margin-inline-start: 0; }
.v2[dir="rtl"] .v2g-toc li a { border-radius: 10px 0 0 10px; }
.v2 .v2g-tn { font-family: var(--mono); font-size: .78rem; padding-top: .14em; color: var(--copper-ink); }
.v2 .v2g-toc li a:hover { color: var(--text); background: rgba(150, 85, 42, .06); }
.v2 .v2g-toc li a[aria-current="true"] { color: var(--text); font-weight: 700; border-inline-start-color: var(--copper); background: rgba(200, 123, 66, .09); }
.v2 .v2g-toc .v2g-tx:first-of-type { margin-top: .5rem; }

/* « L'essentiel » : panneau nuit */
.v2 .v2g-key { position: relative; isolation: isolate; overflow: hidden; margin: 0 0 1rem; padding: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem); border-radius: 24px; color: var(--g-on);
  background: radial-gradient(70% 90% at 100% 0%, rgba(224, 153, 92, .16), transparent 60%), linear-gradient(160deg, #15184a, #0b0d22 70%); border: 1px solid rgba(201, 198, 244, .14); }
.v2[dir="rtl"] .v2g-key { background: radial-gradient(70% 90% at 0% 0%, rgba(224, 153, 92, .16), transparent 60%), linear-gradient(200deg, #15184a, #0b0d22 70%); }
.v2 .v2g-key::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(201, 198, 244, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(201, 198, 244, .08) 1px, transparent 1px); background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%); mask-image: linear-gradient(to bottom, #000, transparent 75%); }
.v2 .v2g-key .eyebrow { color: var(--copper-l); font-size: .85rem; margin-bottom: 1.1rem; flex-wrap: wrap; max-width: 100%; }
.v2 .v2g-key .eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; }
.v2 .v2g-key ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.v2 .v2g-key li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .3rem; padding: .85rem 0; border-top: 1px solid var(--g-rule); }
.v2 .v2g-key li:first-child { border-top: 0; padding-top: 0; }
.v2 .v2g-key li:last-child { padding-bottom: 0; }
.v2 .v2g-body .prose .v2g-key li p { margin: 0; color: var(--g-on); font-size: 1.06rem; line-height: 1.6; }
.v2 .v2g-kn { font-family: var(--mono); font-size: .82rem; color: var(--copper-l); padding-top: .3em; }
.v2 .v2g-body .prose .v2g-key a { color: #9bd89e; }
.v2 .v2g-key strong { color: #fff; }

/* Repère d'une partie (coût, pièges) et partie « coût » en encadré sable */
.v2 .v2g-tag { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .8rem; padding: .3rem .75rem; border-radius: 999px; font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.v2[dir="rtl"] .v2g-tag { font-family: var(--sans); letter-spacing: 0; font-size: .88rem; }
.v2 .v2g-tag svg { width: 16px; height: 16px; flex: none; }
.v2 .v2g-sec.is-cost .v2g-tag { background: #e3e1f6; color: #2a2675; }
.v2 .v2g-sec.is-warn .v2g-tag { background: #f6e3d3; color: #7c4420; }
.v2 .v2g-sec.is-cost { background: var(--v2-sand); border-radius: 24px; padding: clamp(1.4rem, 1rem + 1.6vw, 2.2rem); }
.v2 .v2g-sec.is-cost .v2g-hn::after { background: rgba(25, 27, 51, .18); }

/* Frise : étapes numérotées reliées par un trait */
.v2 .v2g-body .prose .v2g-steps { list-style: none; margin: 1.6rem 0 1.8rem; padding: 0; }
.v2 .v2g-steps > li { position: relative; display: grid; grid-template-columns: 2.9rem minmax(0, 1fr); gap: 1.1rem; padding: 0 0 1.5rem; }
.v2 .v2g-steps > li:last-child { padding-bottom: 0; }
.v2 .v2g-steps > li:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: calc(1.45rem - 1px); top: 3.1rem; bottom: .25rem; width: 0; border-inline-start: 2px dotted rgba(200, 123, 66, .55); }
.v2 .v2g-sn { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 1.5px solid var(--copper); background: var(--surface); color: var(--copper-ink); font-family: var(--mono); font-size: .9rem; font-weight: 600; }
.v2 .v2g-steps > li:first-child .v2g-sn { background: var(--copper-btn); border-color: var(--copper-btn); color: #fff; }
.v2 .v2g-sb { min-width: 0; padding: .55rem 0 0; }
.v2 .v2g-body .prose .v2g-sb p { margin: 0; }
.v2 .v2g-body .prose .v2g-sb p + p { margin-top: .3rem; color: var(--muted); }
.v2 .v2g-body .prose .v2g-st { font-weight: 700; font-size: 1.1rem; color: var(--text); line-height: 1.4; }
.v2 .v2g-st strong { font-weight: inherit; }
.v2 .v2g-st + p::first-letter, .v2 .v2g-ct + p::first-letter { text-transform: uppercase; }

/* Fiches « **Titre** : texte » */
.v2 .v2g-body .prose .v2g-cards { list-style: none; margin: 1.5rem 0 1.8rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.v2 .v2g-cards.odd > li:last-child { grid-column: 1 / -1; }
.v2 .v2g-cards > li { min-width: 0; padding: 1.15rem 1.25rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 0 rgba(25, 27, 51, .03); position: relative; }
.v2 .v2g-cards > li::before { content: ""; position: absolute; top: 1.35rem; inset-inline-start: -1px; width: 3px; height: 1.3rem; border-radius: 3px; background: var(--copper); }
.v2 .v2g-body .prose .v2g-cards p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--muted); }
.v2 .v2g-body .prose .v2g-cards .v2g-ct { color: var(--text); font-size: 1.05rem; line-height: 1.4; margin-bottom: .35rem; }
.v2 .v2g-body .prose .v2g-cards .v2g-c1 { color: var(--muted); }
.v2 .v2g-c1 strong { color: var(--text); }
.v2 .v2g-sec.is-cost .v2g-cards > li, .v2 .v2g-sec.is-cost .v2g-sn { background: var(--v2-paper); }
.v2 .v2g-body .prose .ticks li { padding-block: .55rem; }

/* Chiffres : valeurs mises en avant, barre proportionnelle */
.v2 .v2g-body .prose .v2g-figs { list-style: none; margin: 1.5rem 0 1.8rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(8.2rem, 1fr)); gap: .8rem; }
.v2 .v2g-figs > li { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.v2 .v2g-figs > li::after { content: ""; order: -1; height: 4px; width: var(--w); min-width: 12%; border-radius: 4px; background: linear-gradient(90deg, var(--copper), var(--copper-l)); margin-bottom: .5rem; }
.v2[dir="rtl"] .v2g-figs > li::after { background: linear-gradient(270deg, var(--copper), var(--copper-l)); }
.v2 .v2g-body .prose .v2g-fv { color: var(--text); font-weight: 650; font-size: 1.05rem; line-height: 1.2; }
.v2 .v2g-fv b { font-family: var(--mono); font-size: 2rem; font-weight: 500; color: var(--copper-ink); }
.v2 .v2g-body .prose .v2g-fc { color: var(--muted); font-size: .95rem; line-height: 1.45; }

/* Encadrés typés (à partir des `note` du guide) */
.v2 .v2g-note { --k: var(--copper-ink); --kb: #fbf1e7; }
.v2 .v2g-body .prose .v2g-note { margin: 1.6rem 0 0; padding: 1.15rem 1.35rem 1.25rem; border: 0; border-inline-start: 4px solid var(--k); border-radius: 14px; background: var(--kb); font-size: 1.02rem; }
.v2 .v2g-note.is-tip, .v2 .v2g-note.is-role { --k: #2c702e; --kb: #eaf3e8; }
.v2 .v2g-note.is-cost, .v2 .v2g-note.is-law { --k: #3a3690; --kb: #ecebf8; }
.v2 .v2g-note.is-example { --k: #5b5e75; --kb: var(--surface); }
.v2 .v2g-body .prose .v2g-note p { margin: 0; color: var(--text); }
.v2 .v2g-body .prose .v2g-note .v2g-nk { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; color: var(--k); font-family: var(--mono); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.v2[dir="rtl"] .v2g-body .prose .v2g-note .v2g-nk { font-family: var(--sans); letter-spacing: 0; font-size: .95rem; }
.v2 .v2g-nk svg { flex: none; }

/* FAQ : questions en cartes */
.v2 .v2g-body .prose h2#faq, .v2 .v2g-body .prose h2#sources { margin-top: clamp(3rem, 2.4rem + 2vw, 4.2rem); }
.v2 .v2g-faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.v2 .v2g-faq details { min-width: 0; }
.v2 .v2g-faq summary > span { flex: 1; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.v2 .v2g-faq details, .v2 .v2g-faq details:last-child { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 0; transition: border-color .2s, box-shadow .2s; }
.v2 .v2g-faq details[open] { border-color: rgba(200, 123, 66, .5); box-shadow: 0 10px 30px -18px rgba(25, 27, 51, .35); }
.v2 .v2g-faq summary { padding: 1.05rem 1.25rem; font-size: 1.06rem; line-height: 1.45; align-items: center; border-radius: 16px; }
.v2 .v2g-faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); font-size: 1.15rem; }
.v2 .v2g-faq details > div { padding: 0 1.25rem 1.1rem; }
.v2 .v2g-body .prose .v2g-faq details > div p { color: var(--text); }
.v2 .v2g-faq details > div p:last-child { margin-bottom: 0; }

/* Sources : liste numérotée, organisme en petites capitales */
.v2 .v2g-body .prose .v2g-src { list-style: none; counter-reset: src; margin: 0 0 2rem; padding: 0; font-size: 1rem; border-top: 1px solid var(--line); }
.v2 .v2g-src li { counter-increment: src; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); column-gap: .3rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.v2 .v2g-src li::before { content: counter(src, decimal-leading-zero); grid-row: span 2; font-family: var(--mono); font-size: .8rem; color: var(--copper-ink); padding-top: .2em; }
.v2 .v2g-src a { font-weight: 600; }
.v2 .v2g-src a svg { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; margin-inline-start: .35rem; }
.v2[dir="rtl"] .v2g-src a svg { transform: scaleX(-1); }
.v2 .v2g-body .prose .v2g-src .v2g-org { display: block; color: var(--muted); font-size: .88rem; margin-top: .15rem; }
.v2 .v2g-body .prose .v2g-disc { background: transparent; border-inline-start: 2px solid var(--line); border-radius: 0; padding: .2rem 1rem; color: var(--muted); font-size: .95rem; }
.v2 .v2g-body .share-end { border-top-color: var(--line); }

/* ── Guides liés (sable, carrousel) ─────────────────────────────────────── */
.v2 .v2g-rel { background: var(--v2-sand); padding-block: clamp(3.5rem, 2.6rem + 3vw, 6rem); }
.v2 .v2g-rel .sec-head { margin-bottom: 2rem; }
.v2 .v2g-rel h2 { font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.5rem); }
.v2 .v2g-rel .eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; }
.v2 .v2g-rc { display: flex; flex-direction: column; gap: .55rem; height: 100%; padding: 1.6rem 1.6rem 1.4rem; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; --illu-acc: var(--copper);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.v2 .v2g-rc:hover { transform: translateY(-3px); border-color: rgba(200, 123, 66, .55); box-shadow: 0 20px 40px -26px rgba(25, 27, 51, .45); }
.v2 .v2g-ri { color: var(--n-text); margin-bottom: .5rem; }
.v2 .v2g-ri .illu { width: 52px; height: 52px; }
.v2 .v2g-rc .tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--g-text); }
.v2[dir="rtl"] .v2g-rc .tag { font-family: var(--sans); letter-spacing: 0; font-size: .88rem; }
.v2 .v2g-rc h3 { font-size: 1.2rem; line-height: 1.3; margin: 0; }
.v2 .v2g-rc p { color: var(--muted); font-size: 1rem; line-height: 1.6; margin: 0; flex: 1; }
.v2 .v2g-go { display: inline-flex; align-items: center; gap: .4rem; margin-top: .6rem; color: var(--copper-ink); font-weight: 700; font-size: .98rem; }
.v2 .v2g-go svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.v2[dir="rtl"] .v2g-go svg { transform: scaleX(-1); }
.v2 .v2g-rc:hover .v2g-go svg { transform: translateX(3px); }
.v2[dir="rtl"] .v2g-rc:hover .v2g-go svg { transform: scaleX(-1) translateX(3px); }
.v2 .v2g-rel .v2-car-b { background: var(--v2-paper); }

/* ── Thème sombre ───────────────────────────────────────────────────────── */
:root.v2[data-theme="dark"] .v2g-key { border-color: rgba(201, 198, 244, .2); background: radial-gradient(70% 90% at 100% 0%, rgba(224, 153, 92, .14), transparent 60%), linear-gradient(160deg, #1a1d55, #070818 75%); }
:root.v2[data-theme="dark"] .v2g-note { --kb: rgba(224, 153, 92, .1); --k: var(--copper-l); }
:root.v2[data-theme="dark"] .v2g-note.is-tip, :root.v2[data-theme="dark"] .v2g-note.is-role { --k: #8fd492; --kb: rgba(95, 176, 98, .1); }
:root.v2[data-theme="dark"] .v2g-note.is-cost, :root.v2[data-theme="dark"] .v2g-note.is-law { --k: #c9c6f4; --kb: rgba(201, 198, 244, .09); }
:root.v2[data-theme="dark"] .v2g-note.is-example { --k: #c0c2d8; --kb: var(--surface); }
:root.v2[data-theme="dark"] .v2g-sec.is-cost .v2g-tag { background: rgba(201, 198, 244, .14); color: #e1dffb; }
:root.v2[data-theme="dark"] .v2g-sec.is-warn .v2g-tag { background: rgba(224, 153, 92, .16); color: #f0bb8c; }
:root.v2[data-theme="dark"] .v2g-sec.is-cost .v2g-hn::after { background: var(--line); }
:root.v2[data-theme="dark"] .v2g-toc li a:hover, :root.v2[data-theme="dark"] .v2g-toc li a[aria-current="true"] { background: rgba(224, 153, 92, .1); }
@media (prefers-color-scheme: dark) {
  :root.v2:not([data-theme="light"]) .v2g-key { border-color: rgba(201, 198, 244, .2); background: radial-gradient(70% 90% at 100% 0%, rgba(224, 153, 92, .14), transparent 60%), linear-gradient(160deg, #1a1d55, #070818 75%); }
  :root.v2:not([data-theme="light"]) .v2g-note { --kb: rgba(224, 153, 92, .1); --k: var(--copper-l); }
  :root.v2:not([data-theme="light"]) .v2g-note.is-tip, :root.v2:not([data-theme="light"]) .v2g-note.is-role { --k: #8fd492; --kb: rgba(95, 176, 98, .1); }
  :root.v2:not([data-theme="light"]) .v2g-note.is-cost, :root.v2:not([data-theme="light"]) .v2g-note.is-law { --k: #c9c6f4; --kb: rgba(201, 198, 244, .09); }
  :root.v2:not([data-theme="light"]) .v2g-note.is-example { --k: #c0c2d8; --kb: var(--surface); }
  :root.v2:not([data-theme="light"]) .v2g-sec.is-cost .v2g-tag { background: rgba(201, 198, 244, .14); color: #e1dffb; }
  :root.v2:not([data-theme="light"]) .v2g-sec.is-warn .v2g-tag { background: rgba(224, 153, 92, .16); color: #f0bb8c; }
  :root.v2:not([data-theme="light"]) .v2g-sec.is-cost .v2g-hn::after { background: var(--line); }
  :root.v2:not([data-theme="light"]) .v2g-toc li a:hover, :root.v2:not([data-theme="light"]) .v2g-toc li a[aria-current="true"] { background: rgba(224, 153, 92, .1); }
}

/* ── Tablette et téléphone ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .v2 .v2g-body .guide-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .v2 .v2g-body .prose { max-width: none; }
  .v2:not(.rd-on) .v2g-toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem 1.2rem .8rem; }
  .v2.rd-on .v2g-toc { background: var(--surface); }
}
@media (max-width: 820px) {
  .v2 .v2g-head-in { grid-template-columns: minmax(0, 1fr) 7.5rem; align-items: start; gap: 1rem; }
  .v2 .v2g-art { grid-column: 2; grid-row: 1; }
  .v2 .v2g-sheet { border-radius: 16px; }
  .v2 .v2g-c { width: 9px; height: 9px; }
  .v2 .v2g-c1, .v2 .v2g-c2 { top: 7px; } .v2 .v2g-c3, .v2 .v2g-c4 { bottom: 7px; }
  .v2 .v2g-c1, .v2 .v2g-c3 { inset-inline-start: 7px; } .v2 .v2g-c2, .v2 .v2g-c4 { inset-inline-end: 7px; }
  .v2 .v2g-head-txt { display: contents; }
  .v2 .v2g-head .crumbs, .v2 .v2g-head .eyebrow { grid-column: 1; }
  .v2 .v2g-head .crumbs { grid-row: 1; align-self: center; margin: 0; }
  .v2 .v2g-head .eyebrow { grid-row: 2; margin: 0; }
  .v2 .v2g-head h1, .v2 .v2g-head .lead, .v2 .v2g-head .meta, .v2 .v2g-head .share, .v2 .v2g-head .listen-btn, .v2 .v2g-head .listen-note { grid-column: 1 / -1; }
  .v2 .v2g-head h1 { margin-top: .4rem; }
  .v2 .v2g-head .eyebrow { align-self: end; }
  .v2 .v2g-art { grid-row: 1 / span 2; }
}
@media (max-width: 640px) {
  .v2 .v2g-head { padding-top: 6.2rem; }
  .v2 .v2g-head .eyebrow::before { width: 1.2rem; }
  .v2 .v2g-toc .eyebrow, .v2 .v2g-rel .eyebrow { flex-wrap: wrap; max-width: 100%; }
  .v2 .v2g-plan { background-size: 1900px auto; background-position: 70% 0; -webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 60%); mask-image: linear-gradient(to bottom, #000 10%, transparent 60%); }
  .v2[dir="rtl"] .v2g-plan { background-position: 30% 0; -webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 60%); mask-image: linear-gradient(to bottom, #000 10%, transparent 60%); }
  .v2 .v2g-head-in { grid-template-columns: minmax(0, 1fr) 88px; }
  .v2 .v2g-head h1 { font-size: clamp(1.95rem, 1.2rem + 4.6vw, 2.5rem); }
  .v2[dir="rtl"] .v2g-head h1 { font-size: clamp(1.75rem, 1.1rem + 4.4vw, 2.3rem); }
  .v2 .v2g-head .lead { font-size: 1.02rem; }
  .v2 .v2g-head .meta { font-size: .85rem; }
  .v2 .v2g-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.8rem; }
  .v2 .v2g-facts li { padding: .9rem .9rem 1rem; border-top: 1px solid var(--g-rule); }
  .v2 .v2g-facts li:nth-child(-n+2) { border-top: 0; }
  .v2 .v2g-facts li:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .v2 .v2g-fn { font-size: 1.5rem; }
  .v2 .v2g-body .prose .v2g-cards { grid-template-columns: minmax(0, 1fr); }
  .v2 .v2g-key { border-radius: 20px; margin-inline: -.35rem; }
  .v2 .v2g-key li { grid-template-columns: 2.1rem minmax(0, 1fr); }
  .v2 .v2g-body .prose .v2g-key li p { font-size: 1rem; }
  .v2 .v2g-sec.is-cost { margin-inline: -.6rem; padding: 1.2rem 1rem; border-radius: 18px; }
  .v2 .v2g-steps > li { grid-template-columns: 2.5rem minmax(0, 1fr); gap: .85rem; }
  .v2 .v2g-sn { width: 2.5rem; height: 2.5rem; font-size: .82rem; }
  .v2 .v2g-steps > li:not(:last-child)::before { inset-inline-start: calc(1.25rem - 1px); top: 2.7rem; }
  .v2 .v2g-sb { padding-top: .35rem; }
  .v2 .v2g-body .prose .v2g-note { padding: 1rem 1.05rem 1.1rem; }
  .v2 .v2g-faq summary { padding: .95rem 1rem; font-size: 1rem; }
  .v2 .v2g-faq details > div { padding: 0 1rem 1rem; }
  .v2 .v2g-rc { padding: 1.3rem 1.25rem 1.2rem; }
}
@media (max-width: 360px) {
  .v2 .v2g-key .eyebrow::before, .v2 .v2g-toc .eyebrow::before, .v2 .v2g-rel .eyebrow::before { display: none; }
  .v2 .v2g-key .eyebrow { letter-spacing: .06em; }
  .v2 .v2g-key { padding-inline: 1.1rem; }
  .v2 .v2g-head-in { grid-template-columns: minmax(0, 1fr) 68px; }
  .v2 .v2g-facts li { gap: .45rem; flex-direction: column; align-items: flex-start; }
}

/* Contraste renforcé */
.v2.a11y-hc .v2g-plan.on { opacity: .25; }
.v2.a11y-hc .v2g-head .lead, .v2.a11y-hc .v2g-head .meta, .v2.a11y-hc .v2g-fl, .v2.a11y-hc .v2g-head .crumbs { color: #fff; }

@media print {
  .v2 .v2g-plan, .v2 .v2g-art, .v2 .v2g-facts, .v2 .v2g-rel { display: none !important; }
  .v2 .v2g-head, .v2 .v2g-key { background: none !important; color: #000; }
  .v2 .v2g-body .prose .v2g-key li p { color: #000; }
}
