/* BEC — accueil (après site.css) : héros centré, puis « Avant le dossier » (why-, repo-), puis la
   scène où le dossier se construit au défilement (hs-, qx- pour l'écran du questionnaire reproduit) ;
   la suite de la page prolonge le même mouvement. Modes animés (.is-live, posés par accueil.js) sur
   grand écran assez haut ; sinon, et sans script, figures fixes et lecture de haut en bas. */

/* ------------------------------------------------------------ Héros centré */
.hs-top { background: var(--canvas); padding-top: calc(var(--header-h) + clamp(24px, 3vw, 48px)); padding-bottom: clamp(40px, 5vw, 72px); }
.hs { position: relative; background: var(--canvas); padding-top: clamp(40px, 5vw, 80px); padding-bottom: clamp(56px, 6vw, 96px); }
.hs__head { max-width: 40em; }
.hs__head .h2 { margin-top: 18px; }
.hs-hero { display: grid; justify-items: center; max-width: 940px; margin-inline: auto; text-align: center; }
.hs-hero .display { margin-top: 18px; max-width: 12em; font-size: clamp(2.6rem, 1rem + 3.6vw, 4.4rem); }
.hs-hero .lede { margin-top: 18px; max-width: 42em; }
.hs-hero .hero__for { margin-top: 18px; max-width: 46em; font-size: 15px; line-height: 1.6; font-weight: 450; color: var(--ink-soft); }
/* ce que l'on reçoit : trois éléments, lus d'un coup d'œil */
.hero__receive { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; width: min(100%, 860px); margin-top: 26px; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); text-align: left; }
.hero__receive li { display: grid; align-content: start; gap: 4px; padding: 14px 18px; }
.hero__receive li + li { border-left: 1px solid var(--border); }
.hero__receive b { font-size: 15.5px; font-weight: 620; letter-spacing: -0.01em; color: var(--ink); }
.hero__receive span { font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
@media (max-width: 720px) {
  .hero__receive { grid-template-columns: minmax(0, 1fr); }
  .hero__receive li { padding: 12px 4px; }
  .hero__receive li + li { border-left: 0; border-top: 1px solid var(--border); }
}
.hs-hero .hero__actions { justify-content: center; margin-top: 26px; }
/* Répartition du travail, sous le premier écran (repositionnement du 29 septembre). */
.hero__split { margin-top: 34px; }
.hero__split small { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 650; color: var(--cobalt); }
.hs-hero .hero__for b { font-weight: 620; color: var(--ink); }

/* ------------------------------------------------------------ Avant le dossier
   Une scène large : l'espace documentaire (65 %), terne et dense, puis la structure BEC (35 %) qui se
   construit. Cinq phases au défilement (accueil.js pose data-at sur .why-stage et is-in sur les objets). */
.why { background: var(--canvas); padding-top: clamp(24px, 3vw, 48px); padding-bottom: clamp(40px, 5vw, 72px); }
.why__head .h2 { margin-top: 18px; max-width: 13em; }
.why__lead { margin-top: 14px; font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }
.why__track { position: relative; margin-top: clamp(28px, 3vw, 44px); }
.why__note { margin-top: 18px; max-width: 70em; font-size: 12px; line-height: 1.55; color: var(--ink-faint); }

/* les phases, en une ligne au-dessus de la scène */
.why__cues { position: relative; display: flex; align-items: center; gap: 18px; min-height: 64px; margin-bottom: 14px; }
.why__dots { display: flex; gap: 6px; flex: none; }
.why__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--cobalt-line); transition: background-color 300ms var(--ease), box-shadow 300ms var(--ease); }
.why__dots i.is-in { background: var(--cobalt); box-shadow: none; }
.why__cue { position: absolute; left: 76px; right: 0; top: 50%; translate: 0 -50%; font-size: clamp(1rem, 0.9rem + 0.35vw, 1.2rem); line-height: 1.35; font-weight: 550; letter-spacing: -0.01em; color: var(--ink); opacity: 0; transition: opacity 400ms var(--ease); }
.why__cue.is-in { opacity: 1; transition: opacity 600ms var(--ease) 150ms; }
.why__cue--end { font-size: clamp(1.25rem, 1rem + 0.8vw, 1.65rem); font-weight: 560; letter-spacing: -0.02em; }
.why__cue small { display: block; margin-top: 4px; font-size: 14.5px; font-weight: 450; letter-spacing: 0; color: var(--ink-soft); }

/* la scène */
.why-stage { position: relative; display: grid; grid-template-columns: minmax(0, 65fr) minmax(0, 35fr); gap: clamp(20px, 2.4vw, 36px); height: min(680px, calc(100vh - var(--header-h) - 130px)); min-height: 520px; transition: grid-template-columns 900ms var(--ease); }
/* la chaîne BEC prend la place : l'espace documentaire se resserre, la structure s'élargit */
.why-stage[data-at="4"] { grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); }

/* l'espace documentaire : dense, familier, un peu administratif */
.repo { position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-radius: 12px; background: #FBFBFC; color: #3A3F47; font-size: 12px; box-shadow: 0 0 0 1px rgba(17, 19, 24, 0.08), 0 24px 48px -30px rgba(17, 19, 24, 0.35); transition: opacity 800ms var(--ease), filter 800ms var(--ease); }
.repo-bar { display: flex; align-items: center; gap: 12px; flex: none; height: 44px; padding: 0 14px; border-bottom: 1px solid #E6E8EC; background: #F3F4F6; }
.repo-app { width: 18px; height: 18px; border-radius: 5px; background: conic-gradient(from 90deg, #8A93A3 0 25%, #A7AEBB 0 50%, #8A93A3 0 75%, #A7AEBB 0); }
.repo-bar b { font-size: 13px; font-weight: 600; color: #2B2F36; white-space: nowrap; }
.repo-search { position: relative; display: flex; align-items: center; flex: 1; max-width: 340px; height: 28px; margin-left: 12px; padding: 0 10px 0 30px; border-radius: 7px; background: var(--white); box-shadow: inset 0 0 0 1px #DADDE3; color: #9AA1AB; font-size: 12px; white-space: nowrap; overflow: hidden; }
.repo-search::before { content: ""; position: absolute; left: 11px; top: 8px; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #9AA1AB; }
.repo-search::after { content: ""; position: absolute; left: 18px; top: 16px; width: 5px; height: 1.5px; background: #9AA1AB; rotate: 45deg; }
.repo-people { display: flex; margin-left: auto; }
.repo-people i { width: 22px; height: 22px; margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px #F3F4F6; }
.repo-people i:nth-child(1) { background: #C9CED6; }
.repo-people i:nth-child(2) { background: #B5BCC7; }
.repo-people i:nth-child(3) { background: #D8DCE2; }
.repo-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 184px minmax(0, 1fr); }
.repo-tree { padding: 10px 8px; overflow: hidden; border-right: 1px solid #E6E8EC; background: #F6F7F9; font-size: 12px; }
.repo-tree li { display: flex; align-items: center; gap: 6px; height: 23px; padding-left: calc(6px + var(--d, 0) * 16px); color: #4A505A; white-space: nowrap; }
.repo-tree__root { font-weight: 600; color: #2B2F36; }
.repo-tree .chev { width: 8px; flex: none; }
.repo-tree .chev::before { content: ""; display: block; width: 0; height: 0; border-left: 4px solid #9AA1AB; border-block: 3.5px solid transparent; }
.repo-tree .chev.is-open::before { rotate: 90deg; }
.repo-tree li[style*="--d:1"] { padding-left: 36px; }
.fo { width: 15px; height: 12px; flex: none; }
.repo-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.repo-crumb { display: flex; align-items: center; gap: 8px; flex: none; height: 36px; padding: 0 14px; color: #6B7280; font-size: 12.5px; }
.repo-crumb span + span::before { content: "›"; margin-right: 8px; color: #B5BCC7; }
.repo-crumb span:last-of-type { color: #2B2F36; font-weight: 600; }
.repo-crumb em { margin-left: auto; font-style: normal; font-size: 11.5px; color: #9AA1AB; }
.repo-head, .repo-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.35fr) minmax(0, 1.25fr) 58px; column-gap: 12px; align-items: center; padding: 0 14px; }
.repo-head { flex: none; height: 28px; border-block: 1px solid #E6E8EC; background: #F8F9FA; color: #8A919C; font-size: 11px; font-weight: 600; }
.repo-list { flex: 1; min-height: 0; overflow: hidden; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.repo-row { position: relative; height: 26px; border-bottom: 1px solid #EEF0F3; transition: opacity 600ms var(--ease), background-color 500ms var(--ease), box-shadow 500ms var(--ease); }
.repo-name { display: flex; align-items: center; gap: 8px; min-width: 0; color: #2B2F36; }
.repo-name > span, .repo-where, .repo-owner { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.repo-name .fi { width: 15px; height: 18px; flex: none; }
.repo-where, .repo-owner { color: #6B7280; }
.repo-date { color: #8A919C; text-align: right; white-space: nowrap; }

/* la question, posée sur l'espace documentaire */
.why-q { position: absolute; z-index: 4; left: 50%; top: 54px; width: min(78%, 560px); translate: -50% 0; padding: 12px 18px 14px; border-radius: 12px; background: var(--white); box-shadow: 0 0 0 1px rgba(49, 87, 229, 0.18), 0 24px 44px -24px rgba(17, 19, 24, 0.45); opacity: 0; transform: translateY(-10px); transition: opacity 500ms var(--ease), transform 600ms var(--ease); }
.why-q.is-in { opacity: 1; transform: none; }
.why-q .small-label { color: var(--cobalt); }
.why-q p:last-child { margin-top: 4px; font-size: 16px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }

/* sélection : quelques fichiers se distinguent, les autres restent en arrière-plan */
.why-stage[data-at="2"] .repo-row:not(.is-pick), .why-stage[data-at="3"] .repo-row:not(.is-pick) { opacity: 0.4; }
.why-stage[data-at="2"] .repo-row.is-pick, .why-stage[data-at="3"] .repo-row.is-pick { background: #EEF2FE; box-shadow: inset 2px 0 0 var(--cobalt); transition-delay: calc(var(--k) * 160ms); }
.why-stage[data-at="4"] .repo { opacity: 0.55; filter: saturate(0.3); }

/* la structure BEC, à droite : presque vide, puis les pièces, leurs passages, enfin la chaîne */
.why-bec { position: relative; min-height: 0; overflow: hidden; border-radius: 16px; box-shadow: inset 0 0 0 1.5px #D5DAE2; container-type: inline-size; }
.why-bec::before { content: ""; position: absolute; inset: 0; background: #E8EDF5 url("/assets/img/accueil/fond-scene@2x.webp") center 30% / cover no-repeat; opacity: 0; transition: opacity 900ms var(--ease); }
.why-stage[data-at="4"] .why-bec { box-shadow: 0 1px 2px rgba(17, 19, 24, 0.06), 0 40px 80px -48px rgba(17, 19, 24, 0.45); }
.why-stage[data-at="4"] .why-bec::before { opacity: 1; }
.why-bec__label { position: absolute; z-index: 2; left: 16px; top: 14px; padding: 5px 11px; border-radius: 999px; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 650; color: #9AA1AB; transition: background-color 500ms var(--ease), color 500ms var(--ease); }
.why-stage[data-at="4"] .why-bec__label { background: rgba(255, 255, 255, 0.8); color: var(--ink); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.why-picks, .why-build { position: absolute; z-index: 1; left: 16px; right: 16px; top: 54px; }
.why-picks { display: grid; gap: 10px; }
.why-pick { padding: 10px 12px; border-radius: 10px; background: var(--white); box-shadow: 0 0 0 1px rgba(17, 19, 24, 0.06), 0 14px 28px -20px rgba(17, 19, 24, 0.4); opacity: 0; translate: 28px 0; transition: opacity 400ms var(--ease), translate 500ms var(--ease); }
.why-picks.is-in .why-pick { opacity: 1; translate: none; transition: opacity 500ms var(--ease) calc(500ms + var(--k) * 160ms), translate 700ms var(--ease) calc(500ms + var(--k) * 160ms); }
.why-pick__doc { display: flex; align-items: center; gap: 10px; }
.why-pick__doc .fi { width: 20px; height: 24px; flex: none; }
.why-pick__doc span { display: grid; min-width: 0; }
.why-pick__doc b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 600; }
.why-pick__doc small { font-size: 10.5px; color: var(--ink-faint); }
.why-pick__quote { max-height: 0; margin-top: 0; padding-left: 10px; overflow: hidden; border-left: 2px solid var(--cobalt); font-size: 12.5px; line-height: 1.45; color: var(--ink); opacity: 0; transition: max-height 600ms var(--ease), margin-top 600ms var(--ease), opacity 400ms var(--ease); }
.why-pick__quote .mono { display: block; margin-top: 3px; font-size: 10px; color: var(--ink-faint); }
.why-stage[data-at="3"] .why-pick__quote { max-height: 130px; margin-top: 9px; opacity: 1; transition: max-height 700ms var(--ease) calc(200ms + var(--k) * 200ms), margin-top 700ms var(--ease) calc(200ms + var(--k) * 200ms), opacity 500ms var(--ease) calc(400ms + var(--k) * 200ms); }
.why-picks:not(.is-in) { pointer-events: none; }

/* la chaîne : une affirmation établie, une qui ne l'est pas encore */
.why-build { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.why-build__t { margin-bottom: 7px; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 650; color: var(--ink-soft); opacity: 0; transition: opacity 400ms var(--ease); }
.why-build.is-in .why-build__t { opacity: 1; transition-delay: 300ms; }
.why-build.is-in .why-claim--open .why-build__t { transition-delay: 1300ms; }
/* colonne étroite : l'intitulé passe au-dessus du contenu, les précisions secondaires s'effacent */
@container (max-width: 700px) {
  .why-node { grid-template-columns: minmax(0, 1fr); row-gap: 1px; }
  .why-node > .small-label { grid-row: auto; padding-top: 0; }
  .why-node > p:not(.small-label) { grid-column: 1; }
  .why-node--source .why-node__d, .why-node--extract .why-node__d { display: none; }
}
/* très étroit (mobile) : une affirmation sous l'autre */
@container (max-width: 560px) {
  .why-build { grid-template-columns: minmax(0, 1fr); }
  .why-node--source .why-node__d, .why-node--extract .why-node__d { display: block; }
}
.why-chain { display: grid; gap: 8px; }
.why-node { position: relative; display: grid; grid-template-columns: 74px minmax(0, 1fr); column-gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--white); box-shadow: 0 0 0 1px rgba(17, 19, 24, 0.06), 0 12px 24px -18px rgba(17, 19, 24, 0.45); font-size: 12.5px; line-height: 1.35; opacity: 0; translate: 0 10px; transition: opacity 360ms var(--ease), translate 480ms var(--ease); }
.why-node > .small-label { grid-row: 1 / span 3; padding-top: 2px; font-size: 9.5px; color: var(--cobalt); }
.why-node > p:not(.small-label) { grid-column: 2; font-weight: 550; }
.why-node .mono { font-size: 10.5px; font-weight: 500; color: var(--ink-faint); }
.why-node + .why-node::before { content: ""; position: absolute; left: 26px; bottom: 100%; width: 1.5px; height: 8px; background: var(--cobalt); }
.why-build.is-in .why-node { opacity: 1; translate: none; transition-delay: calc(450ms + var(--n) * 170ms); }
.why-node__d { margin-top: 1px; font-size: 11px !important; font-weight: 400 !important; color: var(--ink-faint); }
.why-node__q { font-style: italic; font-weight: 450 !important; }
.why-node--missing { background: rgba(255, 255, 255, 0.72); box-shadow: inset 0 0 0 1.5px #D9A441; }
.why-node__missing { font-size: 17px !important; font-weight: 650 !important; color: var(--p-partial-text); }
.why-state { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11.5px !important; font-weight: 650 !important; }
.why-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.why-state--ok { color: var(--p-positive); }
.why-state--partial { color: var(--p-partial-text); }
.why-chain--open .why-node > .small-label { color: var(--p-partial-text); }
.why-chain--open .why-node + .why-node::before { background: #D9A441; }

/* les liaisons, des fichiers retenus vers la structure (tracées par accueil.js) */
.why-lines { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; transition: opacity 400ms var(--ease); }
.why-lines.is-in { opacity: 1; }
.why-lines path { fill: none; stroke: var(--cobalt); stroke-width: 1.2; stroke-opacity: 0.45; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 900ms var(--ease); }
.why-lines.is-in path { stroke-dashoffset: 0; transition-delay: calc(400ms + var(--k) * 160ms); }
.why-stage[data-at="3"] .why-lines { opacity: 0.5; }

/* épinglée sur grand écran : la section se déroule au défilement */
.why.is-live .why__track { height: calc(100vh + 4 * 70vh); }
.why.is-live .why__pin { position: sticky; top: var(--header-h); display: flex; align-items: center; height: calc(100vh - var(--header-h)); }
.why.is-live .why__pin > .container { width: 100%; }
.why.is-settling * { transition: none !important; }

/* sans scène animée : de haut en bas, dans l'état final de chaque phase */
.why:not(.is-live) .why-stage { display: grid; grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; gap: 16px; }
.why:not(.is-live) .repo { height: 460px; }
.why:not(.is-live) .why-q { opacity: 1; transform: none; }
.why:not(.is-live) .repo-row.is-pick { background: #EEF2FE; box-shadow: inset 2px 0 0 var(--cobalt); }
.why:not(.is-live) .why-bec { padding: 16px; box-shadow: 0 1px 2px rgba(17, 19, 24, 0.06), 0 40px 80px -48px rgba(17, 19, 24, 0.45); }
.why:not(.is-live) .why-bec::before { opacity: 1; }
.why:not(.is-live) .why-bec__label { position: static; display: inline-block; margin-bottom: 10px; background: rgba(255, 255, 255, 0.8); color: var(--ink); }
.why:not(.is-live) .why-picks, .why:not(.is-live) .why-build { position: relative; left: auto; right: auto; top: auto; }
.why:not(.is-live) .why-build { margin-top: 18px; }
.why:not(.is-live) .why-pick, .why:not(.is-live) .why-node, .why:not(.is-live) .why-build__t { opacity: 1; translate: none; }
.why:not(.is-live) .why-pick__quote { max-height: none; margin-top: 9px; opacity: 1; }
.why:not(.is-live) .why-lines { display: none; }
/* la conclusion, après la scène */
.why:not(.is-live) .why__pin > .container { display: flex; flex-direction: column; }
.why:not(.is-live) .why__cues { display: block; order: 2; min-height: 0; margin: 22px 0 0; }
.why:not(.is-live) .why__dots, .why:not(.is-live) .why__cue:not(.why__cue--end) { display: none; }
.why:not(.is-live) .why__cue--end { position: static; translate: none; opacity: 1; }
@media (max-width: 720px) {
  .why:not(.is-live) .repo { height: 400px; }
  .repo-body { grid-template-columns: minmax(0, 1fr); }
  .repo-tree { display: none; }
  .repo-head, .repo-row { grid-template-columns: minmax(0, 1fr) 54px; }
  .repo-where, .repo-owner, .repo-head span:nth-child(2), .repo-head span:nth-child(3) { display: none; }
  .repo-search { display: none; }
  .why-q { width: 88%; top: 50px; }
  .why-q p:last-child { font-size: 14.5px; }
  .why-node { grid-template-columns: minmax(0, 1fr); }
  .why-node > .small-label { grid-row: auto; }
  .why-node > p:not(.small-label) { grid-column: 1; }
}

/* ------------------------------------------------------------ Texte des temps */
.hs__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px clamp(40px, 4.6vw, 80px); align-items: start; margin-top: clamp(28px, 3vw, 44px); }
.hs-step + .hs-step { margin-top: 72px; }
.hs-step__num { font-size: 12px; font-weight: 600; color: var(--cobalt); letter-spacing: 0; }
.hs-step__title { margin-top: 10px; font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1.08; font-weight: 560; letter-spacing: -0.035em; text-wrap: balance; max-width: 13em; }
.hs-step__text { margin-top: 16px; max-width: 28em; font-size: 17px; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }
.hs-step__more { margin-top: 18px; }
.hs-fig { margin-top: 28px; max-width: 680px; }
.hs__scene { display: none; }

/* ------------------------------------------------------------ Mode animé */
.hs.is-live .hs-step { display: flex; flex-direction: column; justify-content: center; min-height: 74vh; margin-top: 0; opacity: 0.3; transition: opacity 500ms var(--ease); }
.hs.is-live .hs-step.is-current { opacity: 1; }
.hs.is-live .hs__text { padding-bottom: 12vh; transition: opacity 400ms var(--ease); }
.hs.is-live .hs-fig { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hs.is-live .hs__scene { display: block; position: sticky; top: var(--st, calc(var(--header-h) + 24px)); z-index: 3; }
/* la scène et sa légende tiennent toujours dans la fenêtre */
.hs.is-live .hs-move { max-width: calc((100vh - var(--header-h) - 130px) / 0.9); margin-left: auto; }
.hs.is-settling * { transition: none !important; }

/* ------------------------------------------------------------ L'espace de travail */
.hs-stage { position: relative; container-type: inline-size; aspect-ratio: 1 / 0.9; overflow: hidden; border-radius: 22px; background: #E8EDF5 url("/assets/img/accueil/fond-scene@2x.webp") center 30% / cover no-repeat; background-image: image-set(url("/assets/img/accueil/fond-scene.webp") 1x, url("/assets/img/accueil/fond-scene@2x.webp") 2x); box-shadow: 0 1px 2px rgba(17, 19, 24, 0.06), 0 40px 80px -48px rgba(17, 19, 24, 0.45); }
.hs-stage__head { position: absolute; z-index: 4; top: 14px; left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none; }
.hs-stage__head .hs-show { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 650; color: var(--ink); box-shadow: 0 1px 2px rgba(17, 19, 24, 0.08); }
/* un témoin discret : le dossier est en train de se construire */
.hs-stage__head .hs-show.is-shown::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--cobalt); vertical-align: 1px; animation: hs-live 1.8s ease-in-out infinite; }
.hs-dots { display: inline-flex; gap: 6px; padding: 7px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hs-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--cobalt-line); transition: background-color 300ms var(--ease), box-shadow 300ms var(--ease); }
.hs-dots i.is-on { background: var(--cobalt); box-shadow: none; }
.hs-show { display: none; }
.hs-show.is-shown { display: inline-flex; align-items: center; animation: hs-pop 360ms var(--ease) both; }

/* les fenêtres : l'écran du questionnaire, puis les vues réelles du livrable */
.hs-win { position: absolute; z-index: 2; left: 7%; right: 7%; top: 60px; margin: 0; overflow: hidden; border-radius: 12px; background: var(--white); box-shadow: 0 0 0 1px rgba(17, 19, 24, 0.07), 0 28px 60px -26px rgba(17, 19, 24, 0.5); opacity: 0; transform: translateY(28px) scale(0.98); transition: opacity 480ms var(--ease), transform 640ms var(--ease); }
.hs-win.is-in { opacity: 1; transform: none; }
/* une vue absente ne capte pas la souris (les infobulles restent celles de la vue affichée) */
.hs-win:not(.is-in) { pointer-events: none; }
.hs-win--exec { left: 5%; right: 5%; top: 60px; }
/* le dossier entier, dessous et en longueur : chaque carré est un point, domaine par domaine (comme sur Produit) */
.hs-win--grid { z-index: 3; top: auto; bottom: 4.5%; left: 5%; right: 5%; padding: 2cqw 2.6cqw 2.1cqw; }
.hs-win--grid.is-in { transition-delay: 280ms; }
.hs-grid__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.hs-grid__head .small-label { font-size: clamp(9px, 1.45cqw, 10.5px); }
.hs-grid__head .mono { font-size: clamp(9.5px, 1.5cqw, 11px); color: var(--ink-faint); }
.hs-grid__cols { display: grid; grid-template-columns: repeat(17, minmax(0, 1fr)); column-gap: 1.7cqw; margin-top: 1.5cqw; }
.hs-grid__col { display: grid; gap: 0.6cqw; justify-items: center; }
.hs-grid__col i { display: block; width: 100%; aspect-ratio: 1; border-radius: max(2px, 0.55cqw); background: var(--c, var(--border)); }
.hs-grid__col i[data-s="demonstrated"] { --c: var(--p-positive); }
.hs-grid__col i[data-s="partially_demonstrated"] { --c: var(--p-partial); }
.hs-grid__col i[data-s="not_demonstrated"] { --c: var(--p-negative); }
.hs-grid__col i[data-s="uncorroborated"] { --c: var(--p-uncorroborated); }
.hs-grid__col i[data-s="pending_review"] { --c: var(--p-pending); }
.hs-grid__col .mono { margin-top: 0.3cqw; font-size: clamp(7px, 1.3cqw, 10px); color: var(--ink-faint); }
.hs-grid .hs-counts { margin-top: 1.4cqw; gap: 2px 1.2em; font-size: clamp(10.5px, 1.65cqw, 12.5px); }
.hs-grid .hs-counts b { font-size: clamp(14px, 2.5cqw, 20px); margin-right: 1px; }
.hs-grid .hs-counts > span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--p-positive); vertical-align: 2px; }
.hs-grid .hs-counts > span:nth-child(2)::before { background: var(--p-partial); }
.hs-grid .hs-counts > span:nth-child(3)::before { background: var(--p-negative); }
/* scène étroite (mobile) : une ligne de titre, une ligne de chiffres */
@container (max-width: 520px) {
  .hs-grid__head .mono { display: none; }
  .hs-grid__x { display: none; }
  .hs-grid .hs-counts { flex-wrap: nowrap; gap: 0 2.2cqw; font-size: 2.6cqw; white-space: nowrap; }
  .hs-grid .hs-counts b { font-size: 3.4cqw; }
  .hs-grid .hs-counts > span::before { width: 6px; height: 6px; margin-right: 4px; }
}
/* à l'arrivée, les carrés se posent colonne après colonne */
.hs.is-live .hs-win--grid .hs-grid__col i { opacity: 0; transform: scale(0.5); transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
.hs.is-live .hs-win--grid.is-in .hs-grid__col i { opacity: 1; transform: none; transition: opacity 420ms var(--ease) calc(560ms + var(--c) * 40ms), transform 420ms var(--ease) calc(560ms + var(--c) * 40ms); }
/* comme sur Produit : chaque carré se lit au survol (infobulle : point, intitulé, état) et grandit */
@media (hover: hover) and (pointer: fine) {
  .hs-grid__col i { transition: scale 160ms var(--ease), box-shadow 160ms var(--ease); }
  .hs.is-live .hs-win--grid .hs-grid__col i { transition: opacity 300ms var(--ease), transform 300ms var(--ease), scale 160ms var(--ease), box-shadow 160ms var(--ease); }
  .hs.is-live .hs-win--grid.is-in .hs-grid__col i { transition: opacity 420ms var(--ease) calc(560ms + var(--c) * 40ms), transform 420ms var(--ease) calc(560ms + var(--c) * 40ms), scale 160ms var(--ease), box-shadow 160ms var(--ease); }
  .hs-grid__col i:hover { position: relative; z-index: 2; scale: 1.35; box-shadow: 0 0 0 2px var(--white), 0 6px 14px -6px rgba(17, 19, 24, 0.45); }
  .hs-grid__col .mono { cursor: default; }
}
.hs-crop { position: relative; aspect-ratio: var(--cw) / var(--ch); overflow: hidden; }
.hs-crop img { position: absolute; max-width: none; height: auto; width: calc(var(--iw) / var(--cw) * 100%); left: calc(var(--x) / var(--cw) * -100%); top: calc(var(--y) / var(--ch) * -100%); }
/* ce qui compte dans la capture, entouré */
.hs-hl { position: absolute; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--cobalt), 0 0 0 5px rgba(49, 87, 229, 0.14); background: rgba(49, 87, 229, 0.06); }
.hs.is-live .hs-win.is-in .hs-hl { animation: hs-hl 640ms var(--ease) 700ms both; }

/* l'annotation du temps */
.hs-note { position: absolute; z-index: 5; left: 14px; bottom: 14px; display: none; max-width: min(78%, 420px); padding: 10px 14px 11px; border-radius: 12px; background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 2px rgba(17, 19, 24, 0.08), 0 16px 32px -18px rgba(17, 19, 24, 0.4); }
.hs-note.is-shown { display: block; animation: hs-pop 420ms var(--ease) 350ms both; }
.hs-note__v { margin-top: 6px; }
.hs-note .mono { margin-top: 6px; font-size: 11px; color: var(--ink-faint); }
.hs-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--white); box-shadow: inset 0 0 0 1px var(--border-strong); }
.hs-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hs-chip--decl { color: var(--ink-soft); }
.hs-chip--avail { color: var(--p-partial-text); }
.hs-chip--qual { color: var(--p-positive); box-shadow: inset 0 0 0 1px rgba(15, 122, 82, 0.35); }
.hs-counts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--ink-soft); }
.hs-counts b { font-size: 20px; font-weight: 560; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.hs-caption { margin-top: 14px; font-size: 12px; line-height: 1.55; color: var(--ink-faint); }

/* ------------------------------------------------------------ L'écran du questionnaire reproduit
   (dessiné à la largeur des fiches capturées, 960 px, puis mis à l'échelle de la fenêtre) */
.qx { width: var(--qw); height: 780px; zoom: var(--k, 0.6); display: flex; flex-direction: column; background: var(--white); color: #111318; font-size: 14px; line-height: 1.45; }
.qx-top { display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 22px; border-bottom: 1px solid #E7E9EE; font-size: 15px; }
.qx-logo { height: 20px; width: auto; color: #111318; }
.qx-top b { font-weight: 650; }
.qx-top span { color: #5F6670; }
.qx-body { flex: 1; display: grid; grid-template-columns: 196px minmax(0, 1fr); min-height: 0; }
.qx-rail { padding: 24px 14px; border-right: 1px solid #E7E9EE; background: #FBFBFC; }
.qx-rail > p { padding: 0 8px 10px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 650; color: #7A808A; }
.qx-rail ol { display: grid; gap: 4px; }
.qx-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; padding: 9px 10px; border-radius: 9px; font-size: 13px; color: #6B717B; transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.qx-step__mark { font-family: var(--mono); font-size: 11px; color: #9AA0A9; }
.qx-step.is-open .qx-step__mark { font-size: 0; }
.qx-step.is-open .qx-step__mark::before { content: "✓"; font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--p-positive); }
.qx-step.is-on { background: #EEF1FD; color: #111318; font-weight: 600; box-shadow: inset 0 0 0 1px #DCE2FB; }
.qx-step.is-on .qx-step__mark { color: #4966D8; font-weight: 700; }
.qx-card { position: relative; margin: 20px 24px; border: 1px solid #E7E9EE; border-radius: 14px; overflow: hidden; }
.qx-screen { position: absolute; inset: 0; padding: 20px 26px; opacity: 0; transition: opacity 420ms var(--ease); }
.qx-screen.is-shown { opacity: 1; }
.qx-bar { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: #3A3F47; }
.qx-select { padding: 6px 10px; border-radius: 8px; border: 1px solid #DADDE3; background: #F7F8FA; color: #3A3F47; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56%; }
.qx-id { margin-left: auto; font-family: var(--mono); font-size: 11px; color: #8A9099; }
.qx-progress { position: relative; height: 3px; margin: 14px 0 20px; border-radius: 3px; background: #E7E9EE; overflow: hidden; }
.qx-progress i { position: absolute; inset: 0 62% 0 0; background: #4966D8; }
.qx-progress--b i { right: 22%; }
.qx-title { font-size: 25px; line-height: 1.2; font-weight: 560; letter-spacing: -0.02em; }
.qx-help { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: #5F6670; }
.qx-label { margin-top: 16px; font-size: 13px; font-weight: 600; }
.qx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.qx-list { display: grid; margin-top: 10px; border: 1px solid #DADDE3; border-radius: 10px; overflow: hidden; }
.qx-list .qx-choice { border: 0; border-radius: 0; }
.qx-list .qx-choice + .qx-choice { border-top: 1px solid #E7E9EE; }
.qx-choice { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid #DADDE3; border-radius: 10px; font-size: 13px; line-height: 1.35; background: var(--white); }
.qx-box { flex: none; width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px #B8BEC8; }
.qx-choice--radio .qx-box { border-radius: 50%; }
.qx-choice.is-checked { background: #EEF1FD; box-shadow: inset 0 0 0 1px #C7D1F6; }
.qx-choice.is-checked .qx-box { background: #4966D8; box-shadow: inset 0 0 0 1.5px #4966D8; }
.qx-choice--radio.is-checked .qx-box { background: var(--white); box-shadow: inset 0 0 0 1.5px #4966D8, inset 0 0 0 5px #4966D8; }
.qx-area, .qx-input { margin-top: 8px; padding: 10px 12px; min-height: 64px; border: 1px solid #DADDE3; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.qx-input { min-height: 0; background: var(--white); }
.qx-file { margin-top: 14px; padding: 2px 14px 12px; border-left: 3px solid #4966D8; border-radius: 0 10px 10px 0; background: #F4F6FE; }
.qx-foot { position: absolute; left: 26px; right: 26px; bottom: 18px; display: flex; justify-content: space-between; }
.qx-btn { padding: 9px 16px; border-radius: 9px; border: 1px solid #DADDE3; font-size: 13px; font-weight: 600; color: #3A3F47; }
.qx-btn--next { border-color: #4966D8; background: #4966D8; color: var(--white); }

/* le questionnaire en train d'être rempli (mode animé seulement) */
.hs.is-live .hs-win--q.is-in .qx-screen.is-shown .qx-choice.is-checked { animation: qx-check 380ms var(--ease) both; animation-delay: calc(700ms + var(--i) * 520ms); }
.hs.is-live .hs-win--q.is-in .qx-screen.is-shown .qx-choice.is-checked .qx-box { animation: qx-box 380ms var(--ease) both; animation-delay: calc(700ms + var(--i) * 520ms); }
.hs.is-live .hs-win--q.is-in .qx-screen.is-shown .qx-typed { animation: hs-type 2.4s steps(40, end) 2.4s both; }
.hs.is-live .hs-win--q.is-in [data-show="1"].is-shown .qx-typed { animation: hs-type 1.1s steps(24, end) 1.9s both; }
.hs.is-live .hs-win--q.is-in .qx-screen.is-shown .qx-btn--next { animation: qx-press 700ms var(--ease) 5s both; }

@keyframes qx-check { from { background: var(--white); box-shadow: none; } }
@keyframes qx-box { from { background: transparent; box-shadow: inset 0 0 0 1.5px #B8BEC8; } }
@keyframes qx-press { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 0 0 6px rgba(73, 102, 216, 0.25); } }
@keyframes hs-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes hs-pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes hs-hl { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes hs-live { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* figures fixes : l'état final de chaque temps, sans mouvement */
.hs-stage--fixed .hs-win, .hs-stage--fixed .qx-screen, .hs-stage--fixed .qx-step { transition: none; }
.hs-stage--fixed *, .hs-stage--fixed *::before { animation: none !important; }

/* ------------------------------------------------------------ La suite, dans le même mouvement */
/* l'encart bleu : le titre remonte, sans vide au-dessus */
.home-product { padding-top: clamp(56px, 5.5vw, 88px); }
@media (min-width: 1101px) {
  .home-product .split-head { align-items: start; }
  .home-product .split-head__aside { padding: 46px 0 0; }
}
/* niveaux de lecture : au fil du défilement, chaque trait se trace jusqu'à l'onglet réel du livrable,
   puis son point apparaît (accueil.js pose --t sur la scène des onglets, de 0 à 1) */
.js .home-product.is-flow .carto-tab { --k: clamp(0, calc(var(--t, 1) * 1.75 - var(--i, 0) * 0.25), 1); }
.js .home-product.is-flow .carto-tab::after { transform-origin: top; transform: scaleY(var(--k)); }
.js .home-product.is-flow .carto-tab::before { transform: scale(clamp(0, calc((var(--k) - 0.82) * 5.6), 1)); }
.js .home-product.is-flow { clip-path: inset(0 calc((1 - var(--q, 1)) * 5%) round calc((1 - var(--q, 1)) * 36px)); }
.js [data-rise].is-flow { transform: translateY(calc((1 - var(--r, 1)) * 56px)); opacity: calc(0.2 + 0.8 * var(--r, 1)); }

@media (prefers-reduced-motion: reduce) {
  .hs *, .hs *::before, .hs *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 1100px) {
  .hs__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .hs { padding-top: calc(var(--header-h) + 40px); }
  .hs-step + .hs-step { margin-top: 56px; }
  .hs-stage { border-radius: 16px; aspect-ratio: 1 / 1.05; }
  .hs-win { left: 4%; right: 4%; top: 52px; }
  .hs-win--exec { left: 4%; right: 4%; }
  .hs-win--grid { top: auto; left: 4%; right: 4%; bottom: 4%; }
  .hs-note { left: 10px; bottom: 10px; max-width: 88%; }
  .hs-stage__head .hs-show { font-size: 9.5px; padding: 5px 9px; }
}

/* écran « Documents et preuves » : plus dense, pour que le nom du fichier reste visible */
.qx-screen[data-show="1"], .qx-screen:nth-child(2) { padding-top: 16px; }
.qx-screen:nth-child(2) .qx-title { font-size: 21px; }
.qx-screen:nth-child(2) .qx-help { font-size: 12.5px; line-height: 1.45; }
.qx-screen:nth-child(2) .qx-label { margin-top: 11px; }
.qx-screen:nth-child(2) .qx-progress { margin: 12px 0 14px; }
.qx-screen:nth-child(2) .qx-choice { padding: 7px 12px; }
.qx-screen:nth-child(2) .qx-grid { gap: 6px; margin-top: 8px; }
.qx-screen:nth-child(2) .qx-list { margin-top: 8px; }
.qx-screen:nth-child(2) .qx-file { margin-top: 10px; padding-bottom: 10px; }
.qx-screen:nth-child(2) .qx-file .qx-label { margin-top: 8px; }

/* Situations : quand mobiliser BEC, puis ce que le dossier y apporte */
.proof-tab__when { display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.45; font-weight: 450; color: var(--ink-soft); text-align: left; }
.proof-use { max-width: 52em; margin: 0 0 18px; font-size: 16px; line-height: 1.55; font-weight: 500; color: var(--ink); text-wrap: pretty; }
.proof-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
/* démarrage : quatre temps, dans l'appel final */
.cta-steps { display: grid; gap: 8px; margin-top: 14px; padding-left: 0; counter-reset: cta; }
.cta-steps li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.5; color: #E6E9EE; counter-increment: cta; }
.cta-steps li::before { content: counter(cta, decimal-leading-zero); position: absolute; left: 0; top: 2px; font-family: var(--mono); font-size: 12px; font-weight: 600; color: #9DB0F5; }
/* les situations suivent directement le premier écran, sur le même fond */
.hs-top + .section { padding-top: clamp(32px, 4vw, 56px); }
.proof-use { margin-top: 22px; }

/* Repositionnement du 29 septembre : usages du livrable (quatre onglets), bénéfices, répartition. */
.proof-tabs--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-benefits { display: grid; gap: 6px; margin-top: 10px; }
.home-benefits li { position: relative; padding-left: 20px; font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.home-benefits li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 1.5px; background: var(--cobalt); }
.home-roles .h2 { max-width: 16em; }
.home-roles__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(24px, 3vw, 44px); margin-top: clamp(36px, 4vw, 56px); }
.home-role { display: grid; align-content: start; gap: 8px; padding-top: 18px; border-top: 1.5px solid var(--ink); }
.home-role:nth-child(2) { border-top-color: var(--cobalt); }
.home-role__who { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 650; color: var(--cobalt); }
.home-role__what { font-size: 19px; line-height: 1.3; font-weight: 620; letter-spacing: -0.014em; color: var(--ink); }
.home-role ul { display: grid; gap: 6px; margin-top: 6px; }
.home-role li { position: relative; padding-left: 18px; font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; }
.home-role li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 8px; height: 1.5px; background: var(--border-strong); }
.home-roles__note { margin-top: clamp(32px, 4vw, 48px); max-width: 52em; padding-left: 16px; border-left: 2px solid var(--cobalt); font-size: 15px; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }
@media (max-width: 1100px) {
  .proof-tabs--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-roles__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .proof-tabs--4 { grid-template-columns: minmax(0, 1fr); }
}
#dans-votre-mission .split-head { align-items: start; }
