/* ==========================================================
   Style « papier » : les pages projet dans la langue de la home allumée.
   Proposition du 27/10/2026, chargée APRÈS site.css et projet.css, sur la page exemple seulement.
   Une fois validée, ces règles rejoignent site.css (fil Structure).
   Langue de la home : papier #F3F1EC, encre #0A0A0C, trait d'1 px, hachures à 45°,
   la couleur du projet seulement en filet, pas d'ombre, pas de verre.
   ========================================================== */

:root {
  --bg: #F3F1EC;
  --surface: #F3F1EC;
  --text: #2A2A2E;
  --text-strong: #0A0A0C;
  --text-muted: #55555C;
  --text-dim: #66666E;
  --border: #DCD8CF;
  --border-strong: #C4C1BA;
  /* les quatre tons du trait Hairline de la home */
  --ink: #0A0A0C;
  --ink-edge: #4A4A50;
  --ink-mid: #8A8A90;
  --ink-lo: #C4C1BA;
  --accent-retained: #0A0A0C;
  --accent-discarded: #55555C;
  --accent-result: #0A0A0C;
  --project-accent: var(--project-accent-on-light);
  /* hachures : le seul « remplissage » permis, comme les pantoufles et les stickers */
  --hatch: repeating-linear-gradient(-45deg, var(--ink-mid) 0 1px, transparent 1px 6px);
  --hatch-lo: repeating-linear-gradient(-45deg, var(--ink-lo) 0 1px, transparent 1px 6px);
  color-scheme: light;
}
html, body { background: var(--bg); }

/* ---------- En-tête : la signature de la home, pas de pilule ---------- */
.site-nav { display: none; }
.signature { position: absolute; top: 30px; left: 32px; z-index: 10; text-decoration: none; display: block; }
.signature b { display: block; font: 700 17px/1.2 var(--font-display); color: var(--ink); letter-spacing: -.01em; }
.signature span { display: block; font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.signature-retour { position: absolute; top: 30px; right: 32px; z-index: 10; font-size: 14px; color: var(--text-muted); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; min-height: 32px; }
.signature-retour::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .6; }
@media (hover: hover) { .signature-retour:hover { color: var(--ink); } }
@media (max-width: 640px) { .signature { left: 16px; top: 20px; } .signature-retour { right: 16px; top: 20px; } }

/* ---------- Hero : la chemise du projet, comme sur la carte de la home ---------- */
.hero { position: relative; }
.chemise-logo { display: block; width: 92px; color: var(--ink); margin-bottom: 20px; }
.chemise-logo svg { display: block; width: 100%; height: auto; }
.hero .kicker { color: var(--text-muted); }
.hero h1 { color: var(--ink); }
.hero .subtitle { color: var(--text-muted); }
.hero-result { border-top: 1px solid var(--ink-lo); }
.hero-result-number { color: var(--ink); }
/* le filet de couleur du projet : la seule couleur hors des écrans */
.hero-result-item { border-left-color: var(--project-accent) !important; }

/* lien d'action : le « Voir le projet → » de la home, pas de pilule pleine */
.hero-cta { background: none !important; border: 0 !important; border-radius: 0; padding: 0; min-height: 32px; color: var(--ink) !important;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--ink-mid); font-weight: 500; }
.hero-cta:hover, .hero-cta:focus-visible { text-decoration-color: var(--ink); }

/* les téléphones : un contour au trait, pas d'ombre ni de cadre noir */
.step-live, .hero-live { border: 1px solid var(--ink) !important; box-shadow: none; }
/* le téléphone de la démo : un contour au trait, le cadre de la couleur du fond, l'écran cerné d'un trait fin */
.guided-device { background: var(--bg); box-shadow: none !important; border: 1px solid var(--ink); padding: 7px; }
.guided-device > iframe { border-radius: calc(var(--device-radius) - 8px); outline: 1px solid var(--ink-mid); }

/* ---------- Libellés de marge : le trait + le mot, comme les indices de la home ---------- */
.eyebrow { color: var(--text-muted) !important; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--project-accent); flex: none; }
.section-title, h2, h3 { color: var(--ink); }

/* ---------- Fiche : lignes de formulaire à l'encre ---------- */
.fiche { border-top-color: var(--ink); border-bottom-color: var(--ink); }
.fiche-value { border-bottom-color: var(--ink-lo); }
.fiche-label { color: var(--text-muted); }

/* ---------- Chiffres ---------- */
.stat-number { color: var(--ink) !important; }
.result-item::before { width: 1px; background: var(--project-accent); }

/* ---------- Démo guidée : un cadre au trait, sans surface ---------- */
.guided { background: transparent; border: 1px solid var(--ink); }
.guided-dot { background: var(--bg); border-color: var(--ink-mid); color: var(--text-muted); }
.guided-list li.is-done .guided-dot { border-color: var(--ink); color: var(--ink); }
.guided-list li.is-current .guided-dot { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.guided-fill { background: var(--ink); width: 1px; }
.guided-step h3 { color: var(--text-dim); }
.guided-list li.is-current h3 { color: var(--ink); }
.guided-ctrl button { background: transparent !important; border: 1px solid var(--ink) !important; color: var(--ink) !important; box-shadow: none !important; }
.guided-ctrl button:hover:not([disabled]) { background: var(--ink) !important; color: var(--bg) !important; }
.guided-ring { border-color: var(--ink); }

/* Signature SeLoger : l'annonce garde son blanc (c'est le produit), cadre au trait, parties vides hachurées */
.sig-annonce-label { color: var(--text-muted); }
.sig-annonce-label::before { background: var(--ink-mid); }
.sig-card { box-shadow: none !important; border: 1px solid var(--ink); border-radius: 12px; }
.sig-ph { background: var(--bg); }
.sig-empty-ph { opacity: .0; }
.sig-ph .sig-empty { position: absolute; inset: 0; background: var(--hatch-lo); }
.sig-sk { background: var(--hatch-lo) !important; border: 1px solid var(--ink-lo); }
.sig-thumbs .sig-empty { background: var(--hatch-lo); }

/* ---------- Notes de données ---------- */
.data-note { color: var(--text-dim); }

/* ---------- Partie 2 : un intercalaire à onglet, plus de changement de couleur ---------- */
.part-detail { background: transparent; border-radius: 0; margin-top: 0; box-shadow: none; padding-top: 72px; position: relative; }
.part-detail::before { content: ""; position: absolute; left: 0; right: 0; top: 0; border-top: 1px solid var(--ink); }
.part-detail-head { border-bottom: 0; position: relative; }
.part-kicker { position: absolute; top: -73px; left: var(--tab-x, 24px); transform: translateY(-100%); margin: 0;
  padding: 7px 18px 6px; border: 1px solid var(--ink); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--bg);
  text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.part-kicker::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--bg); }

/* ---------- Registre des arbitrages : encre, écarté hachuré ---------- */
.ledger { border-bottom-color: var(--ink); }
.ledger-group { border-top-color: var(--ink-lo); }
.ledger-group:first-child { border-top-color: var(--ink); }
.ledger-row.is-kept .ledger-verdict { color: var(--ink); }
.ledger-body .ledger-alt { border-left: 0; padding-left: 0; }
.ledger-alt-tag { color: var(--ink); font-weight: 500; padding: 1px 8px 2px; border: 1px solid var(--ink-mid); border-radius: 4px;
  background: var(--hatch-lo); }
.ledger-body .ledger-alt strong { text-decoration-color: var(--ink); }

/* ---------- Leçons ---------- */
.learning-text { color: var(--ink); }

/* ---------- Menu des parties : toujours dans la couleur opposée au fond qu'il survole (Raph 27/10 14:33) ----------
   Sur le papier : pilule noire, texte papier. Sur la bande noire : pilule papier, texte noir. papier.js pose .sur-noir. */
.parts-nav { --pn-bg: #0A0A0C; --pn-fg: #F3F1EC; --pn-dim: #A3A19C; --pn-ind: rgba(243, 241, 236, .14); --pn-sep: #4A4A50;
  background: var(--pn-bg) !important; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none !important; border: 1px solid var(--pn-bg) !important;
  transition: transform 0.55s var(--ease-out), opacity 0.35s ease, background-color .3s, border-color .3s; }
.parts-nav.sur-noir { --pn-bg: #F3F1EC; --pn-fg: #0A0A0C; --pn-dim: #55555C; --pn-ind: rgba(10, 10, 12, .1); --pn-sep: #C4C1BA; }
.parts-nav .parts-link, .parts-nav .parts-num, .parts-nav .parts-step { color: var(--pn-dim); }
.parts-nav .parts-link:hover, .parts-nav .parts-link:focus-visible, .parts-nav .parts-link.is-current, .parts-nav .parts-link.is-current .parts-num { color: var(--pn-fg); }
.parts-nav .parts-sep { background: var(--pn-sep); }
.parts-nav .parts-indicator { background: var(--pn-ind) !important; border: 0; box-shadow: none !important; }
.parts-nav :focus-visible { outline-color: var(--pn-fg); }

/* ---------- Projet suivant : la chemise du projet suivant, au trait ---------- */
.next-band, [class*="next-band"] { background: var(--bg) !important; color: var(--ink) !important; border-top: 1px solid var(--ink); }
.next-case .label { color: var(--text-muted) !important; }
.next-case .next-link, .next-case h2, .next-case h3 { color: var(--ink) !important; }
.divider { background: var(--ink); }
.next-case .next-link { background: var(--bg) !important; border-radius: 0; box-shadow: none; border-top: 1px solid var(--ink); color: var(--ink); }
.next-case .next-link + div { background: var(--bg) !important; }
.next-case .next-title { color: var(--ink); }
.next-case .next-name { color: var(--project-accent-next, var(--ink)); }
.back-link { color: var(--text-muted) !important; }
.guided-now-arrow { background: transparent !important; border: 1px solid var(--ink) !important; color: var(--ink) !important; box-shadow: none !important; }
@media (max-width: 640px) { .chemise-logo { width: 76px; } .hero { padding-top: 96px; } }

/* ---------- Respiration : la réponse (Solution + Résultats) sur le noir de la home éteinte (Raph 27/10 14:26) ----------
   Mêmes règles au trait, encre et papier inversés. Le noir est celui de la home, pas le noir teinté du projet. */
.bande-noire {
  --bg: #0A0A0C; --surface: #0A0A0C; --text: #D9D7D2; --text-strong: #F3F1EC; --text-muted: #A3A19C; --text-dim: #8E8C88;
  --border: #2A2A2E; --border-strong: #3A3A3F;
  --ink: #F3F1EC; --ink-edge: #B8B6B1; --ink-mid: #77767A; --ink-lo: #3A3A3F;
  --hatch-lo: repeating-linear-gradient(-45deg, #4A4A50 0 1px, transparent 1px 6px);
  --project-accent: #F5303C; /* SeLoger ; chaque projet garde sa couleur sur le noir (Raph 28/10 : Flash en bleu ou jaune) */
  background: var(--bg); color: var(--text); color-scheme: dark;
  padding: 112px 0 104px; margin: 24px 0;
}
[data-projet="flash"] .bande-noire { --project-accent: #00AEC3; }
[data-projet="inti"] .bande-noire { --project-accent: #3D88F6; }
.bande-noire .sig-card { --ink: #0A0A0C; border-color: #F3F1EC; }
.bande-noire .sig-ph, .bande-noire .sig-thumbs .sig-empty, .bande-noire .sig-sk { --hatch-lo: repeating-linear-gradient(-45deg, #C4C1BA 0 1px, transparent 1px 6px); }
.bande-noire .sig-ph { background: #F3F1EC; }
.bande-noire .section-spacer-sm { height: 72px; }
@media (max-width: 640px) { .bande-noire { padding: 72px 0 64px; } }

/* « Passer la démo » sur téléphone : une pastille pleine au trait, sans flou */
@media (max-width: 760px) { .pin-skip { background: var(--bg); border: 1px solid var(--ink-lo); backdrop-filter: none; color: var(--text-muted); } }

/* ---------- Figures de partie : une figure Hairline commune par type de partie (Raph 27/10) ----------
   Grand écran : dans la marge, sous le libellé, alignée à droite. Sinon : petite, au-dessus du titre. */
.figure-partie { --hairline-plate: #F3F1EC; --hairline-hi: #0A0A0C; --hairline-edge: #4A4A50; --hairline-mid: #8A8A90; --hairline-lo: #C4C1BA;
  width: 112px; margin: 0 0 8px -6px; }
.figure-partie:empty { display: none; }
.figure-partie svg { display: block; width: 100%; height: auto; overflow: visible; }
.bande-noire .figure-partie { --hairline-plate: #0A0A0C; --hairline-hi: #F3F1EC; --hairline-edge: #B8B6B1; --hairline-mid: #77767A; --hairline-lo: #3A3A3F; }
@media (min-width: 1101px) {
  .section > .figure-partie { position: absolute; right: calc(100% + 40px); top: 52px; width: 150px; margin: 0; }
}
@media (min-width: 1101px) {
  /* Raph 15:18 : le classeur et la boîte à fiches s'enchaînaient dans la même marge. Le classeur passe à droite
     du titre de partie : la marge de gauche reste aux sections, la droite à l'intercalaire. */
  .part-detail-head > .figure-partie { left: calc(100% + 8px); right: auto; top: -84px; width: 200px; }
}

/* Téléphone au trait autour du prototype du hero (Raph, 27/10 15:18) : le corps est dessiné par appareil.js
   dans la perspective de la home, l'écran vivant est déformé par la même projection. */
.hero-live.appareil-iso { --app-ecran-l: 300; --app-ecran-h: 633; --app-zoom: 0.8333;
  border: 0 !important; border-radius: 0; background: transparent; overflow: visible; }
@media (max-width: 720px) { .hero-live.appareil-iso { --app-ecran-l: 240; --app-ecran-h: 507; --app-zoom: 0.6667; } }
.appareil-iso > .appareil-trait { position: absolute; top: 0; left: 0; overflow: visible; }
.appareil-trait path { vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.appareil-trait .app-plein { fill: var(--bg); stroke: var(--ink); stroke-width: 1; }
.appareil-trait .app-fond { fill: var(--bg); stroke: none; }
.appareil-trait .app-arete { fill: none; stroke: var(--ink); stroke-width: 1; }
.appareil-trait .app-ecran { fill: #fff; stroke: var(--ink-mid); stroke-width: 1; }
.appareil-trait .app-bouton { fill: var(--bg); stroke: var(--ink); stroke-width: 1; }
.appareil-iso > iframe { background: #fff; }

/* ---------- Titres et débuts de section (Raph 27/10 15:18 : « les titres sont trop paqués »,
   « on ne sait pas où ça commence et finit ») ----------
   Titres : graisse 600 au lieu de 800/700, approche presque neutre, interligne un peu plus ouvert.
   Hiérarchie lisible d'un coup d'œil : titre du hero > titre de partie > titre de section > sous-titre.
   Chaque section numérotée s'ouvre sur un filet à l'encre, avec son numéro et son libellé posés dessus ;
   le filet suivant marque la fin. Les parties gardent le filet pleine largeur et l'onglet. */
.hero h1 { font-weight: 600 !important; letter-spacing: -0.01em !important; line-height: 1.08; }
.section-title { font-weight: 600 !important; letter-spacing: -0.008em !important; line-height: 1.18; font-size: clamp(28px, 3.4vw, 38px); }
.part-detail-head .section-title { font-size: clamp(34px, 4.6vw, 50px); line-height: 1.1; letter-spacing: -0.012em !important; }
.section > h3:not(.sig-title) { font-weight: 600; font-size: 19px; line-height: 1.3; letter-spacing: 0; margin-top: 40px; }
.section > .section-title + h3 { margin-top: 8px; }

.eyebrow-num { display: inline !important; font-family: var(--font-display); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.eyebrow-num::after { content: none !important; }
.eyebrow::before { display: none; }
.eyebrow { gap: 10px; }
.section[data-spy]:not(.hero) { position: relative; }
.section[data-spy]:not(.hero)::before { content: ""; position: absolute; top: -48px; left: 24px; right: 24px; border-top: 1px solid var(--ink); }
@media (min-width: 1101px) {
  .section[data-spy]:not(.hero)::before { left: -180px; }
  .section > .eyebrow { transform: none; top: -36px; }
  .section > .figure-partie { top: 8px; }
  .section > .eyebrow + .figure-partie + .section-title, .section > .eyebrow + .section-title { padding-top: 0; }
}
@media (max-width: 1100px) {
  .section[data-spy]:not(.hero)::before { top: -28px; }
  .section > .eyebrow { margin-top: 0; }
}
/* La fiche se referme sur sa dernière ligne : le filet du Constat, juste après, ouvre la suite sans doubler le trait */
.fiche { border-bottom: 0; }
.fiche-item:last-child .fiche-value { border-bottom: 0; }
.section:has(> .fiche) + .section-spacer-sm { height: 120px; }
@media (min-width: 1101px) {
  /* le classeur à droite du titre de partie, centré sur lui (le haut de son cadre garde la place de la couverture ouverte) */
  .section.part-detail-head > .figure-partie { left: calc(100% - 60px); right: auto; top: -113px; width: 200px; }
}

/* ---------- Retours de Raph, 27/10 15:37 ---------- */
/* Titre du hero sur 3 lignes au lieu de 4 : colonne de texte plus large, corps un peu plus petit, interligne ouvert */
@media (min-width: 861px) {
  .hero.hero--split { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); min-height: 0; padding-bottom: 24px; }
  .hero--split > .hero-text { margin-top: clamp(40px, 8vh, 96px); }
}
.hero h1 { font-size: clamp(34px, 3.6vw, 50px) !important; line-height: 1.12 !important; max-width: 15em; }
#hero + .section-spacer-sm { height: 48px; }

/* Accès rapide sous « Essayer le prototype » : le sommaire des parties, en deux groupes (l'essentiel, la version expliquée) */
.hero-sommaire { display: flex; flex-wrap: wrap; gap: 4px 40px; margin-top: 28px; max-width: 520px; }
.hero-sommaire ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hero-sommaire a { display: inline-flex; align-items: baseline; gap: 10px; min-height: 32px; align-items: center; color: var(--text); text-decoration: none; font-size: 15px; }
.hero-sommaire-num { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hero-sommaire a:hover, .hero-sommaire a:focus-visible { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* La fiche n'a plus de trait au-dessus : le hero se termine, la fiche suit */
.fiche { border-top: 0; padding-top: 0; }

/* « Version expliquée » faisait doublon avec « Comment on y est arrivé » : l'onglet et le classeur sont retirés,
   le filet pleine largeur reste seul pour marquer la partie 2 */
.part-kicker { display: none !important; }

/* ---------- Ouvertures de section : trois directions à l'essai (Raph 27/10 15:37) ----------
   html[data-ouverture="a"] : l'intercalaire. Un filet, un onglet « 01 Constat » posé dessus, la figure debout sur le filet à droite.
   html[data-ouverture="b"] : le grand numéro. Pas de filet ; le numéro en grand, au trait, avec le nom dessous et la figure.
   html[data-ouverture="c"] : l'en-tête de chapitre. La figure en grand à gauche, numéro et titre à droite, un filet dessous. */
html[data-ouverture] .section[data-spy]:not(.hero)::before { content: none; }
.ouverture { position: relative; }
.ouverture > .eyebrow { position: static !important; transform: none !important; width: auto !important; margin: 0; justify-content: flex-start !important; text-align: left !important; }
.ouverture > .figure-partie { position: static !important; margin: 0; }
.ouverture > .section-title { margin: 0; }
.section > .ouverture + * { margin-top: 32px; }

/* A. L'intercalaire */
[data-ouverture="a"] .section[data-spy] + * { }
[data-ouverture="a"] .ouverture { border-top: 1px solid var(--ink); padding-top: 44px; margin-top: 64px; }
[data-ouverture="a"] .ouverture > .eyebrow { position: absolute !important; top: 0; left: 0; transform: translateY(-100%) !important;
  padding: 6px 14px 5px; border: 1px solid var(--ink); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--bg);
  color: var(--ink) !important; font-size: 14px; gap: 8px; }
[data-ouverture="a"] .ouverture > .eyebrow::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--bg); }
[data-ouverture="a"] .ouverture > .figure-partie { position: absolute !important; right: 0; top: 0; transform: translateY(calc(-100% + 6px)); width: 132px; z-index: 1; }
[data-ouverture="a"] .eyebrow-num { color: var(--ink); }
@media (min-width: 1101px) {
  [data-ouverture="a"] .ouverture { margin-left: -180px; padding-left: 180px; }
  [data-ouverture="a"] .ouverture > .figure-partie { width: 150px; }
}
@media (max-width: 1100px) { [data-ouverture="a"] .ouverture > .figure-partie { width: 104px; } }

/* B. Le grand numéro */
[data-ouverture="b"] .ouverture { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; align-items: end; margin-top: 40px; }
[data-ouverture="b"] .ouverture > .eyebrow { grid-column: 1; grid-row: 1; display: grid !important; gap: 4px; align-content: end; color: var(--text-muted) !important; font-size: 14px; }
[data-ouverture="b"] .eyebrow-num { font-size: 96px; line-height: 0.82; font-weight: 600; letter-spacing: -0.03em; color: transparent !important; -webkit-text-stroke: 1px var(--ink); }
[data-ouverture="b"] .ouverture > .figure-partie { grid-column: 2; grid-row: 1; justify-self: start; width: 104px; }
[data-ouverture="b"] .ouverture > .section-title { grid-column: 1 / -1; grid-row: 2; margin-top: 28px; }
@media (min-width: 1101px) {
  [data-ouverture="b"] .ouverture { display: block; }
  [data-ouverture="b"] .ouverture > .eyebrow { position: absolute !important; right: calc(100% + 40px); top: -6px; width: 140px !important; justify-items: end; text-align: right !important; }
  [data-ouverture="b"] .eyebrow-num { font-size: 128px; }
  [data-ouverture="b"] .ouverture > .figure-partie { position: absolute !important; right: calc(100% + 40px); top: 150px; width: 140px; }
  [data-ouverture="b"] .ouverture > .section-title { margin-top: 0; padding-top: 4px; }
  [data-ouverture="b"] .section[data-spy]:not(.hero) { min-height: 300px; }
}

/* C. L'en-tête de chapitre */
[data-ouverture="c"] .ouverture { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 24px; align-items: end;
  padding-bottom: 28px; border-bottom: 1px solid var(--ink); margin-top: 24px; }
[data-ouverture="c"] .ouverture > .figure-partie { grid-column: 1; grid-row: 1 / span 2; align-self: end; width: 120px; }
[data-ouverture="c"] .ouverture > .eyebrow { grid-column: 2; grid-row: 1; color: var(--text-muted) !important; font-size: 14px; gap: 8px; margin-bottom: 12px; }
[data-ouverture="c"] .ouverture > .section-title { grid-column: 2; grid-row: 2; }
[data-ouverture="c"] .ouverture--sans-figure { grid-template-columns: minmax(0, 1fr); }
[data-ouverture="c"] .ouverture--sans-figure > * { grid-column: 1 !important; }
@media (min-width: 1101px) {
  [data-ouverture="c"] .ouverture { grid-template-columns: 200px minmax(0, 1fr); column-gap: 40px; margin-left: -240px; }
  [data-ouverture="c"] .ouverture > .figure-partie { width: 200px; }
  [data-ouverture="c"] .ouverture--sans-figure { grid-template-columns: 200px minmax(0, 1fr); }
  [data-ouverture="c"] .ouverture--sans-figure > * { grid-column: 2 !important; }
}

@media (max-width: 720px) {
  [data-ouverture="c"] .ouverture { grid-template-columns: minmax(0, 1fr); }
  [data-ouverture="c"] .ouverture > .figure-partie { grid-row: 1; width: 112px; margin-bottom: 16px; }
  [data-ouverture="c"] .ouverture > .eyebrow { grid-column: 1; grid-row: 2; }
  [data-ouverture="c"] .ouverture > .section-title { grid-column: 1; grid-row: 3; }
}

/* ---------- Retours de Raph, 27/10 15:54 ---------- */
/* Hero : plus de lien « Essayer le prototype » ; les parties 01 à 06 sur une ligne ; rien sur téléphone */
.hero-sommaire { margin-top: 36px; max-width: none; }
.hero-sommaire ol { display: flex; flex-wrap: wrap; gap: 0 22px; } /* une ligne quand elle tient (INTI : le duo réduit la colonne) */
.hero-sommaire a { gap: 7px; font-size: 14px; white-space: nowrap; }
.hero-sommaire-num { font-size: 12px; }
@media (max-width: 760px) { .hero-sommaire { display: none; } }

/* Fiche (Pour, Quand, Mon rôle, Statut) en carte noire en mosaïque, qui fait la transition du hero vers la suite.
   Trois tests : 1 = bloc 2 × 2 à filets intérieurs ; 2 = mosaïque asymétrique, l'année en grand ; 3 = tuiles séparées. */
[data-fiche] .section:has(> .fiche) { max-width: 1168px; }
[data-fiche] .fiche { --c-fond: #0A0A0C; --c-trait: #3A3A3F; --c-texte: #F3F1EC; --c-label: #A3A19C;
  display: grid; gap: 0; padding: 0; border: 0; color: var(--c-texte); }
[data-fiche] .fiche-item { display: flex; flex-direction: column; gap: 10px; padding: 28px 32px 30px; min-width: 0; border: 0 !important; }
[data-fiche] .fiche-label { color: var(--c-label) !important; font-size: 13px; letter-spacing: 0; }
[data-fiche] .fiche-value { color: var(--c-texte); border: 0 !important; padding: 0; font-size: 17px; line-height: 1.5; }

/* 1. Bloc 2 × 2 */
[data-fiche="1"] .fiche { grid-template-columns: 1fr 1fr; background: var(--c-fond); border-radius: 14px; overflow: hidden; }
[data-fiche="1"] .fiche-item:nth-child(odd) { border-right: 1px solid var(--c-trait) !important; }
[data-fiche="1"] .fiche-item:nth-child(-n+2) { border-bottom: 1px solid var(--c-trait) !important; }

/* 2. Mosaïque asymétrique : l'année ouvre la carte en grand, le rôle prend la place qu'il faut */
[data-fiche="2"] .fiche { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); grid-template-areas: "quand pour pour" "role role statut";
  background: var(--c-fond); border-radius: 14px; overflow: hidden; }
[data-fiche="2"] .fiche-item:nth-child(1) { grid-area: pour; border-bottom: 1px solid var(--c-trait) !important; border-left: 1px solid var(--c-trait) !important; }
[data-fiche="2"] .fiche-item:nth-child(2) { grid-area: quand; border-bottom: 1px solid var(--c-trait) !important; }
[data-fiche="2"] .fiche-item:nth-child(2) .fiche-value { font: 600 34px/1.05 var(--font-display); letter-spacing: -0.01em; }
[data-fiche="2"] .fiche-item:nth-child(3) { grid-area: role; }
[data-fiche="2"] .fiche-item:nth-child(3) .fiche-value { font-size: 20px; line-height: 1.4; }
[data-fiche="2"] .fiche-item:nth-child(4) { grid-area: statut; border-left: 1px solid var(--c-trait) !important; }
[data-fiche="2"] .fiche-item:nth-child(4) .fiche-value { font-size: 15px; color: #D9D7D2; }

/* 3. Tuiles séparées, de tailles différentes, posées sur le papier */
[data-fiche="3"] .fiche { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-areas: "quand pour pour pour" "role role role statut"; gap: 8px; }
[data-fiche="3"] .fiche-item { background: var(--c-fond); border-radius: 12px; }
[data-fiche="3"] .fiche-item:nth-child(1) { grid-area: pour; }
[data-fiche="3"] .fiche-item:nth-child(2) { grid-area: quand; }
[data-fiche="3"] .fiche-item:nth-child(2) .fiche-value { font: 600 30px/1.05 var(--font-display); }
[data-fiche="3"] .fiche-item:nth-child(3) { grid-area: role; }
[data-fiche="3"] .fiche-item:nth-child(3) .fiche-value { font-size: 20px; line-height: 1.4; }
[data-fiche="3"] .fiche-item:nth-child(4) { grid-area: statut; }
[data-fiche="3"] .fiche-item:nth-child(4) .fiche-value { font-size: 14px; color: #D9D7D2; }

@media (max-width: 760px) {
  [data-fiche] .fiche { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; grid-template-areas: "quand quand" "pour pour" "role role" "statut statut" !important; }
  [data-fiche="1"] .fiche { grid-template-areas: none !important; }
  [data-fiche="1"] .fiche-item { grid-column: 1 / -1; border-right: 0 !important; border-bottom: 1px solid var(--c-trait) !important; }
  [data-fiche="1"] .fiche-item:last-child { border-bottom: 0 !important; }
  [data-fiche="2"] .fiche-item { border-left: 0 !important; border-bottom: 1px solid var(--c-trait) !important; }
  [data-fiche="2"] .fiche-item:last-child { border-bottom: 0 !important; }
  [data-fiche] .fiche-item { padding: 22px 22px 24px; }
}

/* D. Figure et nom de section (Raph 27/10 15:54 : ni intercalaire ni numéro) : la figure et « Constat » sur une même
   ligne ouvrent la section, le titre suit. La séparation vient de cette ligne et de l'espace, sans filet. */
[data-ouverture="d"] .ouverture { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; align-items: end; margin-top: 40px; }
[data-ouverture="d"] .ouverture > .figure-partie { grid-column: 1; grid-row: 1; width: 92px; }
[data-ouverture="d"] .ouverture > .eyebrow { grid-column: 2; grid-row: 1; font: 600 22px/1.1 var(--font-display) !important; color: var(--ink) !important; padding-bottom: 6px; }
[data-ouverture="d"] .eyebrow-num { display: none !important; }
[data-ouverture="d"] .ouverture > .section-title { grid-column: 1 / -1; grid-row: 2; margin-top: 28px; }
[data-ouverture="d"] .ouverture--sans-figure { grid-template-columns: minmax(0, 1fr); }
[data-ouverture="d"] .ouverture--sans-figure > .eyebrow { grid-column: 1; }
@media (min-width: 1101px) {
  [data-ouverture="d"] .ouverture { grid-template-columns: 140px minmax(0, 1fr); column-gap: 40px; margin-left: -180px; margin-top: 56px; }
  [data-ouverture="d"] .ouverture > .figure-partie { justify-self: end; width: 150px; }
  [data-ouverture="d"] .ouverture > .eyebrow { font-size: 26px !important; padding-bottom: 10px; }
  [data-ouverture="d"] .ouverture > .section-title { grid-column: 2; }
  [data-ouverture="d"] .ouverture--sans-figure > .eyebrow { grid-column: 2; }
}

/* ---------- Retours de Raph, 27/10 17:04 ---------- */
/* Accès rapide du hero : survol et focus. Le nom passe à l'encre et se souligne de gauche à droite,
   le numéro prend la couleur du projet. */
.hero-sommaire a { position: relative; text-decoration: none !important; transition: color .2s; }
.hero-sommaire a > :last-child, .hero-sommaire a { background: none; }
.hero-sommaire a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out, cubic-bezier(.23,1,.32,1)); }
.hero-sommaire-num { transition: color .2s; }
.hero-sommaire a:hover, .hero-sommaire a:focus-visible { color: var(--ink); }
.hero-sommaire a:hover::after, .hero-sommaire a:focus-visible::after { transform: scaleX(1); }
.hero-sommaire a:hover .hero-sommaire-num, .hero-sommaire a:focus-visible .hero-sommaire-num { color: var(--project-accent); }
.hero-sommaire a:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { .hero-sommaire a::after { transition: none; } }

/* Ouverture : le nom de la section se distingue du titre (Raph : « Constat » et « Sur mobile… » avaient presque
   la même graisse et la même taille). Nom petit, couleur du projet ; titre grand, encre. */
[data-ouverture="d"] .ouverture > .eyebrow { font: 600 16px/1.2 var(--font-display) !important; color: var(--project-accent) !important; padding-bottom: 4px; }
@media (min-width: 1101px) {
  [data-ouverture="d"] .ouverture > .eyebrow { font-size: 17px !important; padding-bottom: 8px; }
  [data-ouverture="d"] .ouverture > .section-title { font-size: clamp(30px, 3vw, 42px); margin-top: 20px; }
}

/* ---------- Retours de Raph, 27/10 17:10 : centrages ----------
   Le hero, la fiche et la démo partagent la même largeur utile (1152 px) et les mêmes bords. */
[data-fiche] .section:has(> .fiche) { max-width: 1200px; }
@media (min-width: 861px) { .hero.hero--split > .hero-live { justify-self: end; } }
/* La figure et le nom de section sont centrés l'un sur l'autre */
[data-ouverture="d"] .ouverture { align-items: center; }
[data-ouverture="d"] .ouverture > .eyebrow { padding-bottom: 0 !important; }
/* Un seul axe gauche pour toute la page (Raph 17:10, « problème de centrage ») : sur grand écran, chaque section
   occupe la même largeur que le hero (1152 px utiles). La colonne des figures commence sur le bord du hero,
   le texte 180 px plus loin ; les blocs larges (démo) reprennent toute la largeur. */
@media (min-width: 1101px) {
  .section[data-spy]:not(.hero), .part-detail-head { max-width: 1200px; padding-left: 204px; }
  [data-ouverture="d"] .ouverture > .figure-partie { justify-self: start; }
  .guided-pin { width: calc(100% + 180px); margin-left: -180px; }
}
/* Démo guidée : les trois colonnes partent du même haut, réparties sur toute la largeur du cadre */
@media (min-width: 1100px) {
  .guided.sig-ad { grid-template-columns: minmax(0, 300px) minmax(0, var(--device-w)) minmax(0, 380px); justify-content: space-between;
    grid-template-areas: "list device ad" "ctrl device ad"; grid-template-rows: auto 1fr; align-items: start; padding: 48px; }
  .guided.sig-ad .guided-list, .guided.sig-ad .guided-device, .guided.sig-ad .sig-annonce { align-self: start; }
  .guided.sig-ad .guided-list { margin-top: 8px; }
}

/* ---------- Échelle d'espacement unique (Raph 27/10 17:15 : « problème de padding entre les éléments ») ----------
   Mesurée par script : les écarts entre sections allaient de 80 à 236 px, sans règle. Une seule échelle maintenant :
   entre deux sections 128 · ouverture d'une bande noire ou d'une partie 96 · titre → contenu 32 · nom → titre 24 ·
   paragraphe → visuel 48 · visuel → sa note 16 · sous-titre : 48 au-dessus, 12 dessous. Mobile : 96 / 72 / 24. */
:root { --esp-section: 128px; --esp-bloc: 96px; --esp-visuel: 48px; }
@media (max-width: 760px) { :root { --esp-section: 96px; --esp-bloc: 72px; --esp-visuel: 32px; } }
.section-spacer, .section-spacer-sm { height: 0 !important; }
.hero.hero--split { padding-bottom: 0 !important; }
.section:has(> .fiche) { padding-top: var(--esp-bloc); }
.section[data-spy]:not(.hero) { padding-top: var(--esp-section); }
.section > :last-child, .section > :last-child > :last-child { margin-bottom: 0 !important; }
[data-ouverture] .ouverture { margin-top: 0 !important; }
[data-ouverture="d"] .ouverture > .section-title { margin-top: 24px !important; }
.section > .ouverture + * { margin-top: 32px !important; }
/* Bande noire : 96 au-dessus et en dessous, 128 entre ses sections */
.bande-noire { padding: var(--esp-bloc) 0 !important; margin: var(--esp-section) 0 0 !important; }
.bande-noire > .section:first-child { padding-top: 0; }
/* Partie 2 : 128 avant le filet, 96 du filet au titre, 96 du titre à la première section */
.part-detail { margin-top: var(--esp-section) !important; padding-top: var(--esp-bloc) !important; padding-bottom: 0 !important; }
.part-detail-head { padding-bottom: 0 !important; }
.part-detail-head + .section-spacer-sm + .section[data-spy], .part-detail-head ~ .section[data-spy]:first-of-type { padding-top: var(--esp-bloc); }
/* Projet suivant : 128 après les Leçons */
.section:has(> .next-case) { padding-top: var(--esp-section); }
/* Dans une section */
.section > p + .stat-grid, .section > p + .results-grid, .section > .section-title + .results-grid { margin-top: var(--esp-visuel) !important; }
.stat-grid, .results-grid { margin-bottom: 16px !important; }
.section > .data-note { margin-top: 16px !important; display: block; }
.section-intro { margin-bottom: 0 !important; }
.section-intro + .guided-pin, .section-intro + .guided { margin-top: var(--esp-visuel) !important; }
.guided-pin + .data-note { margin-top: 16px !important; }
.section > h3:not(.sig-title) { margin-top: var(--esp-visuel) !important; margin-bottom: 12px !important; }
.section > .section-title + h3, .section > .ouverture + h3 { margin-top: 32px !important; }

/* Repère de partie (Raph 27/10 17:19) : figure + nom dans la colonne de gauche, collés au défilement
   jusqu'à la fin de la partie ; la Solution le garde de l'étape 1 à 6. Le nom d'origine reste dans le titre
   pour les lecteurs d'écran (.eyebrow--lecteur), le repère est décoratif. */
.ouverture > .eyebrow--lecteur { position: absolute !important; width: 1px !important; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.repere { display: flex; align-items: center; gap: 18px; }
.repere > .figure-partie { position: static !important; width: 92px; margin: 0; flex: none; }
.repere > .eyebrow { margin: 0; padding: 0; font: 600 16px/1.2 var(--font-display) !important; color: var(--project-accent) !important; }
.repere .eyebrow-num { display: none !important; }
.section > .repere + .ouverture > .section-title { margin-top: 24px !important; }
/* Colonnes (Raph 27/10 17:27) : le contenu au centre de la page, une colonne de chaque côté ;
   celle de gauche porte le repère (figure + nom), celle de droite reste vide. */
@media (min-width: 1101px) {
  :root { --marge: clamp(150px, 14vw, 240px); --col: 960px; }
  .section[data-spy]:not(.hero), .part-detail-head { max-width: calc(var(--col) + 2 * var(--marge)) !important; padding-left: var(--marge) !important; padding-right: var(--marge) !important; margin-left: auto !important; margin-right: auto !important; }
  .section > .repere { position: sticky; top: 108px; z-index: 2; height: auto; margin: 0 0 -170px calc(-1 * var(--marge)); width: calc(var(--marge) - 40px);
    flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 14px; }
  .repere > .figure-partie { width: min(150px, 100%); }
  .repere > .eyebrow { font-size: 17px !important; }
  [data-ouverture="d"] .section > .repere + .ouverture, [data-ouverture="d"] .sol-tete > .ouverture { display: block; margin-left: 0 !important; }
  .section > .repere + .ouverture > .section-title, .sol-tete .section-title { margin-top: 0 !important; }
  .guided-pin { width: 100% !important; margin-left: 0 !important; }
  /* Solution : la tête (titre + intro) entre dans le bloc collé, au-dessus du cadre, qui est tracé à part */
  .guided.sig-ad { padding: 0 32px 32px !important; border: 0 !important; grid-template-columns: minmax(0, 240px) minmax(0, var(--device-w)) minmax(0, 336px) !important; column-gap: 28px !important;
    grid-template-areas: "tete tete tete" "list device ad" "ctrl device ad" !important; grid-template-rows: auto auto 1fr !important; }
  .guided.sig-ad::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--tete-h, 0px) + 24px); border: 1px solid var(--ink); border-radius: inherit; pointer-events: none; }
  .guided > .sol-tete { grid-area: tete; margin: 0 -32px 56px; }
  .sol-tete > .section-intro { margin-top: 16px !important; }
  .guided.sig-ad .pin-skip { top: calc(var(--tete-h, 0px) + 24px + 12px) !important; }
  .bande-noire .guided.sig-ad { --device-w: 260px; }
}
@media (min-width: 1101px) {
  .section > .repere + .guided-pin, .section > .repere ~ .guided-pin { margin-top: 0 !important; }
  .sol-tete > .section-intro { max-width: none !important; }
  .section > .repere { margin-bottom: 0; }
}
@media (min-width: 1101px) {
  [data-ouverture="d"] .sol-tete .ouverture > .section-title { margin-top: 0 !important; }
  /* le bloc collé (tête + cadre) doit tenir entre le haut de l'écran et le menu des parties */
  .guided.sig-ad { padding: 0 28px 24px !important; grid-template-columns: minmax(0, 240px) minmax(0, var(--device-w)) minmax(0, 304px) !important; }
  .guided.sig-ad::before { top: calc(var(--tete-h, 0px) + 20px); }
  .guided > .sol-tete { margin: 0 -28px 44px; }
  .guided.sig-ad .pin-skip { top: calc(var(--tete-h, 0px) + 28px) !important; }
}
@media (min-width: 1101px) {
  .guided.sig-ad { grid-template-columns: minmax(0, 240px) minmax(0, var(--device-w)) minmax(0, 336px) !important; }
}
/* l'annonce est la plus haute colonne : sur un écran de moins de 1000 px de haut, elle se réduit un peu pour que le cadre tienne */
@media (min-width: 1101px) and (max-height: 1000px) { .guided.sig-ad .sig-annonce { zoom: .88; } }
@media (min-width: 1101px) and (max-height: 860px) { .guided.sig-ad .sig-annonce { zoom: .8; } }
/* Hero et fiche sur la même colonne centrale que le contenu et le cadre de la démo (Raph 27/10 17:27) */
@media (min-width: 1101px) {
  .hero.hero--split { max-width: calc(var(--col) + 2 * var(--marge)) !important; padding-left: var(--marge) !important; padding-right: var(--marge) !important; margin-left: auto !important; margin-right: auto !important;
    grid-template-columns: minmax(0, 600px) minmax(0, 1fr) !important; }
  [data-fiche] .section:has(> .fiche) { max-width: calc(var(--col) + 2 * var(--marge)) !important; padding-left: var(--marge) !important; padding-right: var(--marge) !important; margin-left: auto !important; margin-right: auto !important; }
  [data-fiche] .section:has(> .fiche) > .fiche { width: 100% !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
}
@media (min-width: 1101px) { .hero.hero--split > .hero-live { margin-right: 22px; } }

/* Réglages de 17:40 (Raph) : pas de filet sous le sous-titre du hero ni avant la partie 2, Projet suivant en carte */
.hero-result { border-top: 0 !important; padding-top: 0 !important; margin-top: 40px !important; }
.part-detail::before, .part-detail-head::before, .part-detail .section[data-spy]::before { display: none !important; }
.section[data-spy]:not(.hero)::before { display: none !important; }

.section:has(> .next-case) { padding-bottom: 96px; }
@media (min-width: 1101px) {
  .section:has(> .next-case) { max-width: calc(var(--col) + 2 * var(--marge)) !important; padding-left: var(--marge) !important; padding-right: var(--marge) !important; margin-left: auto !important; margin-right: auto !important; }
}
.next-case { padding: 0 !important; }
.next-case .next-link { width: auto !important; margin: 0 !important; padding: 48px !important; border: 0 !important; border-radius: 14px !important; box-shadow: none !important;
  background: #0A0A0C !important; color: #F3F1EC !important; grid-template-columns: minmax(0, 1fr) auto !important; grid-template-rows: auto 1fr auto; align-items: start !important; column-gap: 48px !important; row-gap: 0; }
.next-case .next-head { position: static !important; grid-column: 1 !important; grid-row: 1 !important; width: auto !important; margin: 0 0 20px !important; text-align: left !important; align-items: flex-start !important; flex-direction: row !important; gap: 12px !important; }
.next-case .next-kicker { color: #A3A19C !important; }
.next-case .next-name { color: var(--card-accent, #F3F1EC) !important; font-size: var(--fs-1) !important; }
.next-case .next-name::before { content: "·"; margin-right: 12px; color: #A3A19C; }
.next-case .next-title { grid-column: 1 !important; grid-row: 2 !important; color: #F3F1EC !important; font-size: clamp(28px, 2.6vw, 38px); max-width: 16ch; }
.next-case .next-link::after { grid-column: 2 !important; grid-row: 1 / span 3 !important; align-self: center !important; }
.next-cta { grid-column: 1; grid-row: 3; justify-self: start; display: inline-flex; align-items: center; gap: 10px; margin-top: 32px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: #F3F1EC; color: #0A0A0C; font: 600 16px/1 var(--font-display); letter-spacing: 0; }
.next-cta-fleche { display: inline-block; transition: translate .3s cubic-bezier(.23, 1, .32, 1); }
@media (hover: hover) { a.next-link:hover .next-cta-fleche { translate: 5px 0; } a.next-link:hover .next-title { text-decoration-color: transparent !important; } }
.next-case .next-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.next-case .next-link + div { width: auto !important; margin: 0 !important; padding: 24px 0 0 !important; background: none !important; }
@media (max-width: 760px) {
  .next-case .next-link { padding: 28px 24px !important; grid-template-columns: minmax(0, 1fr) !important; }
  .next-case .next-link::after { grid-column: 1 !important; grid-row: 4 !important; justify-self: center !important; margin-top: 24px; height: 180px !important; }
  .next-case .next-title { font-size: 26px; }
}
/* sans filet, la partie 2 s'ouvre comme une partie : 128 après la bande noire */
.part-detail { padding-top: 0 !important; }
/* Démo (Raph 27/10 17:43) : téléphone et annonce gardent toujours les mêmes tailles l'un par rapport à l'autre.
   site.js ne réduit plus le seul téléphone (largeur fixée ici) ; papier.js réduit d'un bloc les trois colonnes
   (zoom) quand le cadre ne tient pas dans la hauteur ou la largeur de l'écran. */
@media (min-width: 1101px) {
  .bande-noire .guided.sig-ad { --device-w: 300px !important; grid-template-columns: 220px var(--device-w) 320px !important; justify-content: space-between !important; }
  .guided.sig-ad .sig-annonce { zoom: 1 !important; }
}
@media (min-width: 1101px) {
  .bande-noire .guided.sig-ad { grid-template-columns: calc(220px * var(--z, 1)) calc(316px * var(--z, 1)) calc(320px * var(--z, 1)) !important; }
  .bande-noire .guided.sig-ad > .guided-list, .bande-noire .guided.sig-ad > .guided-device, .bande-noire .guided.sig-ad > .sig-annonce { zoom: var(--z, 1) !important; }
}
@media (min-width: 1101px) { .guided.sig-ad .pin-skip { top: auto !important; bottom: 10px !important; right: 16px !important; } }
/* le nom de partie garde 24 px de bord de page sur les écrans étroits */
@media (min-width: 1101px) { .section > .repere { margin-left: calc(24px - var(--marge)) !important; width: calc(var(--marge) - 64px) !important; } }
@media (min-width: 1500px) { .section > .repere { margin-left: calc(-1 * var(--marge)) !important; width: calc(var(--marge) - 40px) !important; } }
/* écran bas : la tête défile au-dessus du cadre, seul le cadre se colle, plus haut (le menu du haut est caché à ce moment-là) */
@media (min-width: 1101px) {
  .section > .sol-tete + .guided-pin { margin-top: 24px !important; }
  .guided.sig-ad.sans-tete { padding-top: 24px !important; }
  .guided.sig-ad.sans-tete::before { top: 0; }
  html.has-parts-nav .guided--scroll.sans-tete { top: 24px !important; }
}
/* Arbitrages (Raph 17:50) : pas de trait au-dessus du premier choix ni sous le dernier, seulement entre deux choix */
.ledger { border-bottom: 0 !important; }
.ledger-group:first-child { border-top: 0 !important; padding-top: 0 !important; }

/* Figures au trait du contenu (Raph 27/10 21:20) : à droite du paragraphe qu'elles illustrent,
   dans la colonne centrale. Gradins, écran éclaté (Démarche), escalier, carte au scan (Arbitrages). */
.figure-trait { --hairline-plate: #F3F1EC; --hairline-hi: #0A0A0C; --hairline-edge: #4A4A50; --hairline-mid: #8A8A90; --hairline-lo: #C4C1BA; --hairline-stroke: 1; }
.figure-trait [data-hairline] { width: 100%; }
.trait-lecture { margin: 4px 0 0; min-height: 1.4em; font: 500 12px/1.4 var(--font-body, inherit); color: #6E6B66; text-align: center; font-variant-numeric: tabular-nums; }
.avec-trait .figure-trait { max-width: 260px; margin: 24px auto 32px; } /* la légende sous la figure garde de l'air avant le filet ou le texte suivant (Raph 28/10) */
@media (max-width: 1100px) { .ledger-body.avec-trait { display: flex; flex-direction: column; } .ledger-body.avec-trait > .figure-trait { order: 9; width: 100%; } }
@media (min-width: 1101px) {
  /* la figure se pose dans le vide à droite du texte, centrée sur lui, sans changer la hauteur du paragraphe */
  .avec-trait { position: relative; }
  .avec-trait > .figure-trait { position: absolute; top: 50%; right: 0; width: min(260px, calc(100% - 598px - 32px)); max-width: none; margin: 0; transform: translateY(-50%); }
  .ledger-body.avec-trait > .figure-trait { width: min(250px, calc(100% - 546px - 24px)); }
  div.avec-trait:not(.ledger-body):not(.avec-trait--titre):not(.steps-body-inner) { min-height: 260px; } /* sous-parties courtes (Flash) : la figure tient dans sa propre case au lieu de déborder sur la voisine */
  div.avec-trait:not(.ledger-body):not(.avec-trait--titre):not(.steps-body-inner) > .figure-trait { top: 0; transform: none; }
  .avec-trait--titre > .figure-trait { top: calc(100% + 20px); transform: none; } /* INTI « Niveau par niveau » : un titre seul, la figure descend le long de la liste au lieu de monter sur le titre de partie */
}

/* Autres pages (27/10 soir) : les blocs larges de site.css (plan de Flash, démo en paysage, deux apps)
   restent dans la colonne centrale, comme la démo de la page exemple. */
@media (min-width: 1101px) {
  .section > .route-map, .section > .guided:not(.sig-ad), .section > .apps-duo { width: auto !important; max-width: 100%; margin-left: 0 !important; margin-right: 0 !important; transform: none !important; }
}
/* Les apps de Flash dans des téléphones au trait (appareil.js), écran nu (?bare) */
.app-tel { position: relative; width: 270px; margin: 8px auto 0; --app-ecran-l: 300; --app-ecran-h: 667; }
.app-tel > iframe.embed { position: relative; display: block; width: 270px !important; height: 600px !important; max-width: none; aspect-ratio: auto; border: 0; background: #fff; box-shadow: none; border-radius: 26px; }
/* La fiche : une période « 2017 : concours » se lit année en grand, ce qui s'y passe en dessous */
.fiche-periode { display: block; }
.fiche-periode + .fiche-periode { margin-top: 14px; }
.fiche-periode b { display: block; font-weight: inherit; }
.fiche-periode span { display: block; margin-top: 4px; font: 400 15px/1.4 var(--font-body); letter-spacing: 0; color: #D9D7D2; }
@media (min-width: 1101px) {
  /* démo de borne en paysage : les étapes gardent 220 px, l'écran prend le reste de la colonne */
  .section > .guided--landscape { grid-template-columns: 250px minmax(0, 1fr) !important; column-gap: 36px; padding: 32px; }
  .section > .guided--landscape .guided-ctrl { flex-wrap: nowrap; white-space: nowrap; }
}
@media (min-width: 1101px) {
  /* plan de Flash dans la colonne de 960 : les étapes gagnent de la place sur le plan, l'image de l'étape se réduit
     pour que la dernière étape tienne dans le cadre à 690 px de haut */
  .route-map.route-map--pinned > .route-map-stage { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 36px; }
  .route-map--pinned .route-map-visual { height: clamp(96px, calc(var(--stage-h) - 470px), 260px); }
}
/* INTI : l'app libre (390 × 844) réduite dans un téléphone au trait de 300 px */
.app-tel--390 { width: 300px; height: 649px; --app-ecran-l: 390; --app-ecran-h: 844; }
.app-tel--390 > iframe.embed { position: absolute; top: 0; left: 0; margin: 0 !important; width: 390px !important; height: 844px !important; transform: scale(0.7692); transform-origin: 0 0; }
@media (max-height: 760px) { .app-tel--390 { width: 270px; height: 584px; } .app-tel--390 > iframe.embed { transform: scale(0.6923); } }
/* INTI : le héros garde le ticket et le téléphone côte à côte, le texte prend le reste */
/* INTI : le téléphone du héros au trait, aux mesures de la démo (390 × 844) */
.duo .hero-live.appareil-iso { --app-ecran-l: 390; --app-ecran-h: 844; --app-zoom: 1; overflow: visible; border-radius: 0; }
@media (min-width: 1101px) {
  /* les visuels « larges » de site.css (1120 px) restent eux aussi dans la colonne centrale :
     les côtés restent vides, le nom de la partie y est seul (Raph 27/10 17:27) */
  .section .visual-wide, .section .object-wall, .section .compare-list, .section .key-screens, .section .guided-caption {
    width: 100% !important; max-width: 100%; margin-left: 0 !important; margin-right: 0 !important; transform: none !important; }
}
@media (min-width: 1101px) {
  /* dans la colonne de 960, les cinq esquisses du sprint tiennent sur une ligne ; les comparaisons ne débordent plus */
  .section .object-wall--sketches { --sketch-h: clamp(150px, 15.5vw, 230px); gap: 40px 20px; }
  .section .compare-list { padding-inline: 24px; box-sizing: border-box; }
}

/* Dossier de location : héros empilé (titre, appareils, chiffres) */
.hero.hero--split:has(> .duo-wrap){grid-template-columns:minmax(0,1fr)!important}
.duo--stack .duo-phone .hero-live.appareil-iso{--app-ecran-l:360;--app-ecran-h:760;--app-zoom:1;border:0!important;overflow:visible;box-shadow:none!important;background:transparent;border-radius:0}
.duo--stack .hero-live--desk.appareil-iso{--app-ecran-l:1280;--app-ecran-h:720;--app-zoom:1;border:0!important;overflow:visible;box-shadow:none!important;background:transparent;border-radius:0}
/* Dossier, espace propriétaire : étapes à gauche, écran à droite (l'écran garde de la taille sur un écran bas) */
@media (min-width:1101px){
  .section .guided.guided--desk{grid-template-columns:240px minmax(0,1fr)!important;grid-template-areas:"head head" "list device" "ctrl ctrl"!important;grid-template-rows:none!important;column-gap:36px;row-gap:20px;align-items:center}
  .section .guided.guided--desk .guided-list{display:block}
  .section .guided.guided--desk .guided-list > li + li{margin-top:18px}
  .section .guided.guided--desk .guided-device{width:100%;justify-self:stretch}
  .js .section .guided.guided--desk .guided-list li p{max-height:0;overflow:hidden;opacity:0;transition:max-height .35s,opacity .3s}
  .js .section .guided.guided--desk .guided-list li.is-current p{max-height:8em;opacity:1}
}

/* Retours Raph 28/10 */
/* une étape montrée en image fixe (le ticket papier d'INTI) n'a pas de cadre d'appareil autour */
.guided-device.is-still { border-color: transparent !important; background: transparent !important; }
/* Héros comme le dossier de location (Raph 28/10) : bloc de texte centré (logo, titre, sous-titre, ancres),
   puis le visuel sur toute la colonne, puis les chiffres. Le dossier a déjà ce héros (.duo-wrap). */
.hero.hero--split:not(:has(> .duo-wrap)) { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; justify-items: center; row-gap: 0 !important; column-gap: 0 !important; }
.hero.hero--split:not(:has(> .duo-wrap)) > .hero-text { display: contents; }
.hero.hero--split:not(:has(> .duo-wrap)) > .hero-text > * { width: min(692px, 100%); max-width: none; justify-self: center; }
.hero.hero--split:not(:has(> .duo-wrap)) > .hero-text > .chemise-logo { order: 1; }
.hero.hero--split:not(:has(> .duo-wrap)) > .hero-text > h1 { order: 2; }
.hero.hero--split:not(:has(> .duo-wrap)) > .hero-text > .subtitle { order: 3; }
.hero.hero--split:not(:has(> .duo-wrap)) > .hero-text > .hero-sommaire { order: 4; }
.hero.hero--split:not(:has(> .duo-wrap)) > :not(.hero-text) { order: 5; justify-self: center !important; margin-top: 40px; }
.hero.hero--split:not(:has(> .duo-wrap)) > .hero-text > .hero-result { order: 6; margin-top: 40px !important; }
.hero.hero--split:not(:has(> .duo-wrap)) > .hero-text > .data-note { order: 7; margin-top: 12px; }
.hero.hero--split:not(:has(> .duo-wrap)) > .hero-text > .chemise-logo { box-sizing: border-box; padding-right: calc(min(692px, 100%) - 92px); }
@media (max-width: 640px) { .hero.hero--split:not(:has(> .duo-wrap)) > .hero-text > .chemise-logo { padding-right: calc(100% - 76px); } }
/* Retour en haut de page, en tête du menu des parties (Raph 28/10) */
.parts-nav { display: flex; align-items: center; }
.parts-haut { all: unset; position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; color: var(--pn-dim); cursor: pointer; transition: color .3s, translate .25s var(--ease-out, ease); }
.parts-haut:hover, .parts-haut:focus-visible { color: var(--pn-fg); }
@media (hover: hover) and (pointer: fine) { .parts-haut:hover { translate: 0 -2px; } }
.parts-haut:focus-visible { outline: 2px solid var(--pn-fg); outline-offset: 2px; }
.parts-haut-sep { width: 1px; height: 18px; margin: 0 4px 0 2px; background: var(--pn-sep); flex: none; }
@media (max-width: 760px) { .parts-haut { width: 44px; height: 44px; } }
/* INTI, niveaux : la citation débordait sous la figure (24 px) ; le texte s'arrête avant elle */
@media (min-width: 1101px) { .steps-body-inner.avec-trait { padding-right: 292px; box-sizing: border-box; } .steps-body-inner.avec-trait > .figure-trait { width: 260px; } }
/* Écran bas (Raph 28/10, écran 1250 × 690) : le visuel du héros est limité à ~440 px pour que les chiffres restent près du titre */
@media (min-width: 1101px) and (max-height: 760px) {
  .hero.hero--split:not(:has(> .duo-wrap)) .duo-item img.illu-3d { height: 400px; width: auto; max-width: 100%; }
  .hero.hero--split:not(:has(> .duo-wrap)) > .hero-live.appareil-iso { --app-ecran-l: 208.4; --app-ecran-h: 440; --app-zoom: 0.5789; width: 208.4px; height: 440px; }
  .hero.hero--split:not(:has(> .duo-wrap)) > .hero-live.appareil-iso iframe { transform: scale(0.5789); }
  .duo { --ph: 440; --dk: 0.47; --ph2: 320; --dk2: 0.56; --ov2: 60px; }
}

/* ===== Méga review (28/10, fil « Revue complète des 4 pages ») : alignements et espacements ===== */
/* Le nom de partie s'aligne sur la signature (x = 32) tant que la marge est étroite ; plus large, il reste en tête
   de la colonne de gauche. --sb = largeur de la barre de défilement (papier.js). */
@media (min-width: 1101px) {
  .section > .repere {
    --rep-ml: max(calc(32px - max(var(--marge), (100vw - var(--sb, 0px) - var(--col)) / 2)), calc(-1 * var(--marge)));
    margin-left: var(--rep-ml) !important; width: calc(-1 * var(--rep-ml) - 40px) !important; }
}
/* Texte → visuel : 48 (32 sur mobile), visuel → texte : 48, visuel → légende : 16 */
.section > :is(p, blockquote) + :is(figure, .route-map, .guided, .guided-pin, .trio, .apps-duo, .object-wall, .compare-list, .photo-strip) { margin-top: var(--esp-visuel) !important; }
.section > :is(figure.diagram, .trio) + p { margin-top: var(--esp-visuel) !important; }
.section > .photo-strip { margin-bottom: 0 !important; }
.section > .photo-strip + .object-wall { margin-top: var(--esp-visuel) !important; }
.section > .object-wall + :is(.wall-caption, .wall-hint) { margin-top: 16px !important; margin-bottom: 0 !important; }
/* Légendes : sur la colonne, comme toutes les autres (elles partaient d'un bloc centré de 692 px) */
@media (min-width: 1101px) {
  .section .visual-wide figcaption, .part-detail > .visual-wide figcaption, .section > .wall-hint, .section > .wall-caption { max-width: 598px !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
  /* INTI, planche du design system : dans la colonne de 960, pas dans la marge du nom de partie */
  .part-detail > .visual-wide { width: auto !important; transform: none !important; margin: var(--esp-section) max(var(--marge), calc((100% - var(--col)) / 2)) 0 !important; }
  .part-detail > .visual-wide + .section-spacer { height: 0; }
}
/* INTI, comparaisons 2019 / 2026 côte à côte : les écrans se réduisent pour tenir dans leur demi-colonne
   (l'écran « La planète » 2019 mordait de 20 px sur l'écran « Les alternatives » 2026) */
@media (min-width: 1101px) {
  .section .compare-list { container-type: inline-size; }
  .section .compare-list .compare:not(.compare--wide) { --shot-w: min(200px, calc(25cqw - 56px)); }
}
/* Flash, sous-parties à figure : le filet de gauche suit le texte, pas la hauteur de la figure ;
   les paragraphes seuls (SeLoger) gardent la figure centrée sur eux, sans hauteur imposée */
@media (min-width: 1101px) {
  div.avec-trait:not(.ledger-body):not(.avec-trait--titre):not(.steps-body-inner) { min-height: 0; }
  div.avec-trait:not(.ledger-body):not(.avec-trait--titre):not(.steps-body-inner) > .figure-trait { top: 50%; transform: translateY(-50%); }
  .subsections > div.avec-trait { min-height: 240px !important; border-left: 0 !important; padding-left: 0 !important; }
  .subsections > div.avec-trait > .figure-trait { top: 0 !important; transform: none !important; }
  .subsections > div.avec-trait > :is(h3, p) { border-left: 2px solid var(--border-strong); padding-left: 20px; margin: 0 !important; }
  .subsections > div.avec-trait > h3 { padding-bottom: 6px; }
}
.section > .subsections + figure, .section > blockquote + p, .section > .data-note + p { margin-top: var(--esp-visuel) !important; }
.section > .section-intro + p { margin-top: 20px !important; }
.section > .repere ~ p + .guided-pin { margin-top: var(--esp-visuel) !important; }
/* Mobile : « Passer la démo » ne mord plus sur le coin de l'appareil (la démo garde de la place au-dessus) */
@media (max-width: 760px) { .js .guided.guided--scroll { padding-top: 52px; } .js .guided.guided--scroll > .pin-skip { top: 12px; } }
/* Liste d'étapes : le trait relie le centre du premier rond au centre du dernier, sans dépasser (papier.js mesure) */
.js .guided-list::before { top: var(--gl-top, 16px) !important; bottom: var(--gl-bot, 16px) !important; }
/* INTI : un seul filet entre le niveau 5 et « Pour toute l'app » (le dernier niveau en traçait un second), et le titre colle à ses choix */
.level-notes .steps-item:last-child { border-bottom: 0; }
.section > h3.chapter + .ledger { margin-top: 0 !important; }
/* Flash, les deux apps : le téléphone dessiné touchait la dernière ligne de sa description */
.apps-duo-item > .app-tel { margin-top: 56px; }
@media (max-width: 760px) { .apps-duo-item > .app-tel { margin-top: 40px; } }
/* Dossier de location : le logo du héros démarre à la même hauteur que sur les trois autres pages (96 px, il était à 151) */
.hero.hero--split:has(> .duo-wrap) > .hero-text { margin-top: 0 !important; }
/* Flash, plan du magasin : « Passer le plan » était barré par le filet du haut de la liste. Comme dans les Arbitrages,
   des filets seulement entre deux étapes, pas au-dessus de la première ni sous la dernière. */
.route-map--pinned .route-map-steps > li:first-child { border-top: 0 !important; }
.route-map--pinned .route-map-steps > li:last-child { border-bottom: 0 !important; }
/* Mobile : les derniers écarts à 40-48 px (citation, tableau miroir, chronologie, visuel avant un chapitre) passent à 32 */
.section > p + :is(blockquote, table), .section > :is(blockquote, figure, ol.chrono, .ledger) + :is(p, h3.chapter), .section > .avec-trait + ol.chrono { margin-top: var(--esp-visuel) !important; }
/* Projet suivant vers le dépôt d'annonces : l'écran dans un téléphone presque de face, coupé par le bas de la carte
   (le tiers du bas est caché, Raph 28/10). Le visuel descend jusqu'au bord en annulant le padding du bas. */
.next-case .next-link[href*="seloger/index"] { --card-visual: url("../../projets/seloger/images/ecran-apercu-tel.webp"); }
.next-case .next-link[href*="seloger/index"]::after { --vis-ratio: 600 / 795; height: 300px; align-self: end; margin-bottom: -48px; background-position: center bottom; }
/* Flash, « En coulisses, un employé veille » : l'app directeur à droite du texte, assez grande pour se lire (Raph, 28/10) */
@media (min-width: 761px) {
  .route-map--pinned .route-map-steps > li:has(.route-map-visual--phone) { position: relative; padding-right: calc(var(--tel-h) * 0.45 + 28px); --tel-h: clamp(200px, calc(var(--stage-h) - 300px), 300px); }
  .route-map--pinned .route-map-steps > li.is-current:has(.route-map-visual--phone) { min-height: calc(var(--tel-h) + 24px); }
  .route-map--pinned .route-map-visual--phone { position: absolute; right: 6px; top: 12px; height: var(--tel-h) !important; margin: 0 !important; }
}
/* Flash, photo du magasin test : la seule source fait 864 × 900. Elle reste à 560 px de large (sa taille prévue),
   au lieu d'être agrandie à toute la colonne : nette, et entière dans un écran de 690 px de haut. */
.section figure img.photo-wide { width: min(100%, 560px) !important; height: auto !important; max-width: none; }
/* Dossier, démos Locataire et Propriétaire : des numéros dans les pastilles, comme sur Flash, INTI et le dépôt (Raph, 28/10) */
.side--loc .guided-dot, .side--prop .guided-dot { font-size: 13px !important; }
.side--loc .guided-dot::after, .side--prop .guided-dot::after { content: none !important; }
/* Dossier, tableau miroir sur le papier : les deux teintes en version foncée (5,5 pour 1 au lieu de 1,7 à 1,9) */
.mirror thead th.is-loc { color: var(--loc-on-light) !important; }
.mirror thead th.is-prop { color: var(--prop-on-light) !important; }
.mirror td:nth-of-type(1) { --side-c: var(--loc-on-light); }
.mirror td:nth-of-type(2) { --side-c: var(--prop-on-light); }
/* Logos du héros au même poids visuel (Raph, 28/10) : le symbole Carrefour était 2,4 fois plus haut que le mot SeLoger.
   Carrefour 44 px de haut, SeLoger 30 (37 et 25 sur téléphone) ; les quatre titres démarrent presque au même niveau. */
.hero .chemise-logo[aria-label="Carrefour"] svg { width: 66px; }
.hero .chemise-logo[aria-label="SeLoger"] svg { width: 110px; }
@media (max-width: 640px) {
  .hero .chemise-logo[aria-label="Carrefour"] svg { width: 56px; }
  .hero .chemise-logo[aria-label="SeLoger"] svg { width: 92px; }
}
@media (max-width: 760px) { .next-case .next-link[href*="seloger/index"]::after { margin-bottom: -28px !important; height: 220px !important; } }
/* … et il ne se soulève pas au survol : sinon un filet de 6 px s'ouvrirait sous la coupe */
a.next-link[href*="seloger/index"]:hover::after { translate: none !important; }
/* Plus d'air entre la signature et le logo du héros (Raph, 28/10) : 61 px d'écart au lieu de 21 (55 au lieu de 39 sur téléphone) */
.hero { padding-top: 136px !important; }
@media (max-width: 640px) { .hero { padding-top: 120px !important; } }
/* Haut de page : l'image remonte de 32 px pour compenser l'air ajouté sous la signature (Raph, 28/10).
   Sous-titre → sommaire 32 px (56 avant), sommaire → visuel 32 px (40 avant). */
.hero .hero-sommaire { margin-top: 12px !important; }
@media (min-width: 761px) {
  .hero > .duo { margin-top: 32px !important; }
  /* le téléphone au trait dépasse de 20 px au-dessus de l'écran : on compte depuis le trait */
  .hero > .hero-live { margin-top: 52px !important; }
  .hero.hero--split:has(> .duo-wrap) { row-gap: 32px !important; }
}
/* Fiches : piste E choisie par Raph (28/10 23:00). Elle remplace la mosaïque à deux grilles décalées, qui laissait des cases à moitié vides.
   Corrige aussi le filet parasite à gauche de « Pour » sur téléphone (la règle mobile perdait en spécificité contre :nth-child(1)). */
[data-fiche="2"] .fiche { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) !important; grid-template-areas: "quand role" "pour statut" !important; }
[data-fiche="2"] .fiche-item:nth-child(n) { border: 0 !important; padding: 28px 36px 8px !important; }
[data-fiche="2"] .fiche-item:nth-child(-n+2) { border-right: 1px solid var(--c-trait) !important; }
[data-fiche="2"] .fiche-item:nth-child(1), [data-fiche="2"] .fiche-item:nth-child(4) { padding-bottom: 32px !important; padding-top: 20px !important; }
[data-fiche="2"] .fiche-item:nth-child(4) .fiche-value { font-size: 17px !important; color: var(--c-texte) !important; }
@media (max-width: 760px) {
  [data-fiche="2"] .fiche { grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: "quand" "pour" "role" "statut" !important; }
  [data-fiche="2"] .fiche-item:nth-child(n) { border: 0 !important; border-bottom: 1px solid var(--c-trait) !important; padding: 22px 22px 24px !important; }
  [data-fiche="2"] .fiche-item:nth-child(4) { border-bottom: 0 !important; }
}
