/* ==========================================================================
   Mantara V3 — pages intérieures : en-tête de page, pages provisoires, plan des maquettes
   (les gabarits propres — service, fiche, texte long — auront leur feuille)
   ========================================================================== */

/* ---------- En-tête de page ---------- */
.phead { padding-top: var(--nav-h); }
.phead__rule { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; padding-block: 14px; border-bottom: 1px solid var(--ink); }
.phead__route { color: var(--signal-ink); }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin: 0; padding: 0; list-style: none; }
.crumbs::before { content: "//"; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); transition: color 0.3s; }
.crumbs a:hover { color: var(--signal-ink); }
.crumbs [aria-current] { color: var(--ink); }
.phead__body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 3vh, 32px) var(--gap); align-items: end; padding-block: clamp(40px, 9vh, 104px) clamp(40px, 8vh, 88px); }
.phead__over { grid-column: 1 / -1; justify-self: start; margin: 0; padding: 5px 8px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); }
.phead__title { grid-column: 1 / span 10; text-wrap: balance; }
.phead__title > span { display: block; }
.phead__title .char { font-variation-settings: "wdth" var(--w, 100), "wght" var(--g, 650); }
.phead__sub { grid-column: 1 / span 6; }
.phead__actions { grid-column: 8 / span 5; justify-self: end; display: flex; flex-wrap: wrap; gap: 10px; }
/* Avec figure : le texte (.phead__copy) à gauche, calé sur le bas de la « Fig. 1 » à droite */
.phead__copy { grid-column: 1 / span 7; align-self: end; display: grid; gap: clamp(20px, 3vh, 32px); }
.phead__copy > * { grid-column: 1 / -1; }
.phead__copy > .phead__sub { max-width: 40rem; }
.phead__copy > .phead__actions { justify-self: start; }
.phead__fig { grid-column: 9 / span 4; align-self: end; margin: 0; }
.phead__fig > svg { width: 100%; height: auto; overflow: visible; }
.phead__fig--sheet { position: relative; padding: 18px 18px 40px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.phead__fig figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.phead__fig--sheet figcaption { position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0; }
@media (max-width: 960px) {
  .phead__title, .phead__sub, .phead__actions, .phead__copy { grid-column: 1 / -1; }
  .phead__actions { justify-self: start; }
  .phead__fig { grid-column: 1 / -1; max-width: 520px; }
}

/* ---------- Section en deux temps : intitulé fixe à gauche, contenu à droite ---------- */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--gap); align-items: start; }
.split__head { grid-column: 1 / span 4; position: sticky; top: calc(var(--nav-h) + 40px); display: grid; gap: 20px; }
.split__head > .label:first-child { margin: 0; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.split__head .h2 { font-size: clamp(1.875rem, 1rem + 2.2vw, 3.25rem); }
.split__head p { margin: 0; }
.split__body { grid-column: 6 / span 7; display: grid; gap: 24px; }
.split__body > p { margin: 0; }
@media (max-width: 960px) { .split__head, .split__body { grid-column: 1 / -1; } .split__head { position: static; } }

/* Carte d'énoncé : un titre court, un texte (principes, engagements) */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 7px; list-style: none; }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { display: grid; align-content: start; gap: 10px; padding: 20px 20px 24px; background: var(--white); }
.card:hover::after { inset: -2px; --t: var(--signal); }
.card .label { display: flex; justify-content: space-between; gap: 8px; }
.card p { margin: 0; color: var(--ink-2); }
@media (max-width: 1100px) { .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) { .card-grid { grid-template-columns: 1fr; gap: 20px; } .card-grid--4 { grid-template-columns: 1fr; } }

/* ---------- Page provisoire (en attendant son lot) ---------- */
.stub { padding-block: 0 var(--section); }
.stub__card { display: grid; gap: 14px; max-width: 760px; padding: clamp(20px, 3vw, 32px); background: var(--white); border: 1px dashed var(--ink); }
.stub__card .label { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0; }
.stub__card p { margin: 0; color: var(--ink-2); }
.stub__card code, .plan code { font: 500 0.8125rem var(--f-mono); color: var(--ink); }

/* ---------- Plan des maquettes ---------- */
.plan { padding-block: 0 var(--section); }
.plan__lots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; margin: 0 0 clamp(48px, 8vh, 88px); padding: 0; list-style: none; counter-reset: lot -1; }
.plan__lots li { display: grid; gap: 4px; align-content: start; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); }
.plan__lots b { font-weight: 600; }
.plan__lots span { font-size: 0.875rem; color: var(--ink-2); }
.plan__lots .is-current { border-color: var(--ink); box-shadow: 5px 5px 0 var(--signal); }
.plan__group + .plan__group { margin-top: clamp(40px, 7vh, 72px); }
.plan__group h2 { display: flex; justify-content: space-between; gap: 16px; margin: 0 0 12px; font: 500 var(--t-label)/1.35 var(--f-mono); color: var(--signal-ink); }
.plan-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); }
.plan-table th { padding: 10px 12px; border-bottom: 1px solid var(--ink); font: 500 0.6875rem/1.3 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; text-align: left; color: var(--ink-2); }
.plan-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.plan-table tr:hover td { background: var(--white); }
.plan-table td:first-child a { font-weight: 600; }
.plan-table td:first-child a:hover { color: var(--signal-ink); }
.plan-table .mono { font: 500 0.75rem var(--f-mono); color: var(--ink-2); }
.plan-table .route { color: var(--signal-ink); }
.plan-table td:nth-child(3) { width: 70px; }
.plan-table td:last-child { width: 110px; }
@media (max-width: 760px) {
  .plan-table th:nth-child(2), .plan-table td:nth-child(2), .plan-table th:nth-child(4), .plan-table td:nth-child(4) { display: none; }
  .plan-table td, .plan-table th { padding-inline: 6px; }
}
