/* =====================================================================
   CLICK & PLAY — COMPOSANTS DES PAGES INTÉRIEURES (LOT 11D)
   Chargé par les pages intérieures seulement (jamais par l'accueil), après assets/socle/socle.css.
   Composants : ouverture de page (.page-intro), fil d'Ariane (.ariane), section (.sec, .sec-tete, .display-m, .texte),
   texte et média (.tm), liste à filets (.filets), étapes (.etapes), cartes (.carte), questions (.questions),
   bandeau de fin (.bande-fin). Repris du LOT 11C validé (socle.css, section 4). Documentation : rapports/04-documentation-technique.md
   ===================================================================== */

/* ---------- 4. Composants des pages intérieures ---------- */
.page-intro { position: relative; padding-top: calc(var(--hdr-h, 102px) + clamp(40px, 9vh, 112px)); padding-bottom: var(--sec-bottom); }
.page-intro .pi-grille { display: grid; gap: 40px; align-items: end; }
.page-intro .pi-texte { display: grid; gap: 26px; justify-items: start; min-width: 0; container-type: inline-size; }
.page-intro h1 { font-size: clamp(42px, 9.6cqi, 108px); }
.page-intro .lead { max-width: 32em; }
.pi-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; }
.pi-media { margin: 0; min-width: 0; }
.pi-media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.pi-media figcaption, .legende { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin-top: 12px; }
@media (min-width: 961px) { .page-intro .pi-grille { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4vw; } }

/* fil d'Ariane : discret, en mono, au-dessus du surtitre */
.ariane ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.ariane li + li::before { content: "/"; margin-right: 10px; color: var(--dim); }
.ariane a { display: inline-flex; align-items: center; min-height: 32px; color: #b9b5c2; }
.ariane a:hover { color: var(--paper); }
.ariane [aria-current="page"] { color: var(--paper); }
@media (pointer: coarse) { .ariane a { min-height: 44px; } }

/* sections : espace + séparateur de l'INDEX, puis un titre de section */
.sec { padding-bottom: var(--sec-bottom); }
.sec-tete { display: grid; gap: 18px; margin-bottom: clamp(36px, 6vh, 64px); max-width: 52em; }
.display-m { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-stretch: 108%; letter-spacing: -.015em; line-height: .95; text-wrap: balance;
  font-size: clamp(32px, 4.4vw, 72px); }
.display-m em { background: linear-gradient(100deg, var(--paper) 10%, #ffc9a3 45%, #f2296f 78%, #8f5bff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; }
.texte { max-width: 36em; display: grid; gap: 1em; color: #c9c5d0; }
.texte strong { color: var(--paper); font-weight: 600; }

/* texte et média */
.tm { display: grid; gap: 40px; align-items: center; }
@media (min-width: 961px) { .tm { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 5vw; } }
.tm figure { margin: 0; min-width: 0; }
/* LOT 11D — l'image révélée est agrandie de 4 % (règle de l'INDEX) : son cadre la contient, sinon elle élargissait la page de 2 à 4 px */
.socle [data-reveal="image"] { overflow: clip; }
.tm img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }

/* liste à filets */
.filets { border-top: 1px solid var(--line); }
.filets li { display: grid; gap: 8px 4vw; padding-block: 22px; border-bottom: 1px solid var(--line); }
.filets h3 { font-family: var(--f-display); font-weight: 700; font-stretch: 108%; text-transform: uppercase; font-size: 19px; letter-spacing: .01em; line-height: 1.2; }
.filets p { color: var(--mute); max-width: 40em; }
@media (min-width: 761px) { .filets li { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: baseline; } }

/* étapes : numérotées parce que l'ordre est réel */
.etapes { display: grid; gap: 0; counter-reset: e; }
.etapes li { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 18px; padding: 20px 0; border-top: 1px solid var(--line); counter-increment: e; }
.etapes li::before { content: counter(e, decimal-leading-zero); grid-row: span 2; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--orange); padding-top: 4px; }
.etapes h3 { font-family: var(--f-display); font-weight: 700; font-stretch: 108%; text-transform: uppercase; font-size: 18px; line-height: 1.25; }
.etapes p { color: var(--mute); }
@media (min-width: 961px) { .etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 3vw; } }

/* cartes : seulement des objets cliquables et équivalents ; filet lumineux en tête plutôt que boîte arrondie */
.cartes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.carte { position: relative; display: grid; gap: 14px; align-content: start; padding: 28px 24px 26px; min-height: 100%;
  background: linear-gradient(180deg, rgba(238, 235, 229, .045), rgba(238, 235, 229, .015)); border: 1px solid rgba(238, 235, 229, .08); border-radius: 4px;
  color: inherit; transition: background-color .4s, border-color .4s, transform .5s var(--ease); }
.carte::before { content: ""; position: absolute; left: -1px; top: -1px; width: 56px; height: 1px; background: var(--grad); box-shadow: 0 0 10px rgba(242, 41, 111, .55); }
.carte .c-k { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.carte h3 { font-family: var(--f-display); font-weight: 800; font-stretch: 108%; text-transform: uppercase; font-size: 22px; line-height: 1.05; letter-spacing: -.005em; text-wrap: balance; }
.carte p { color: var(--mute); font-size: 15.5px; }
.carte .c-lien { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 500; color: var(--paper); display: inline-flex; gap: 10px; }
.carte .c-lien span { transition: transform .5s var(--ease); }
.carte:hover { border-color: rgba(238, 235, 229, .18); background: linear-gradient(180deg, rgba(238, 235, 229, .07), rgba(238, 235, 229, .02)); }
.carte:hover .c-lien span { transform: translateX(6px); }
.carte:focus-visible { outline-offset: 4px; border-radius: 4px; }

/* questions */
.questions { border-top: 1px solid var(--line); max-width: 60em; }
.questions details { border-bottom: 1px solid var(--line); }
.questions summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; min-height: 64px; padding-block: 14px; cursor: pointer; list-style: none;
  font-family: var(--f-display); font-weight: 700; font-stretch: 108%; text-transform: uppercase; font-size: 18px; line-height: 1.25; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; font-family: var(--f-mono); font-weight: 400; font-size: 18px; color: var(--mute); transition: transform .4s var(--ease); flex: none; }
.questions details[open] summary::after { transform: rotate(45deg); }
.questions details > div { padding: 0 0 22px; color: var(--mute); max-width: 44em; display: grid; gap: .8em; }
.questions summary:focus-visible { outline-offset: 2px; border-radius: 4px; }

/* bandeau de fin court (F2) : même grammaire que le CTA de l'INDEX, environ deux fois moins haut, texte propre à la page */
.bande-fin { position: relative; isolation: isolate; padding-block: clamp(72px, 12vh, 132px) clamp(64px, 10vh, 110px); text-align: center; overflow: hidden; }
.bande-fin::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(var(--fin-rx) 70% at 50% 100%, rgba(255, 143, 26, .13), rgba(242, 41, 111, .08) 38%, rgba(107, 43, 255, .045) 68%, transparent 100%); }
.bande-fin .bf-inner { display: grid; gap: 22px; justify-items: center; }
.bande-fin .eyebrow { justify-content: center; }
.bande-fin .display-m { max-width: 14em; }
.bande-fin .bf-texte { color: var(--mute); max-width: 30em; }
.bande-fin .bf-actions { display: grid; gap: 14px; justify-items: center; margin-top: 8px; }


/* cibles tactiles : liens fléchés des pages intérieures à 44 px au doigt */
@media (pointer: coarse) { .page-intro .link-arrow, .sec .link-arrow { min-height: 44px; } }

/* ancres des pages intérieures (body.socle) : l'en-tête fixe ne recouvre pas le titre visé. Limité aux pages intérieures :
   sur l'INDEX, ce réglage aurait déplacé l'arrivée des ancres validées (#expertises, #realisations…). */
.socle [id] { scroll-margin-top: 96px; }
.socle main:focus { outline: none; }

/* animations des pages intérieures : sobres, et rien n'attend une animation sans JavaScript */
@media (prefers-reduced-motion: reduce) { .carte, .carte .c-lien span, .questions summary::after { transition: none; } }

