/* USTS, présentation partenaires : feuille de style.
   Sommaire : polices, jetons (couleurs, polices, unité --u et cadre), barres et rail,
   écrans dans l'ordre de la présentation (format large), format portrait, mouvement réduit.
   Toutes les dimensions sont en unités --u : c'est ce qui permet à chaque écran de tenir
   dans la fenêtre, de l'écran ultra-large au téléphone. */

/* ---------- polices, hébergées sur place (dossier fonts/) ---------- */
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/outfit-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  /* Atlas USTS. Un seul monde visuel, sombre par choix de marque.
     Mise en page : des écrans côte à côte, une idée par écran, tout dimensionné en --u
     (1 % d'un cadre 16:9 ajusté à la fenêtre), pour tenir sans défilement vertical. */
  --abysse: #05080E;
  --nuit: #0B1422;
  --ecume: #F2F6F4;
  --brume: #9DB0C0;
  --vert: #1DFF22;
  --ambre: #FFB547;
  --trait: rgba(242, 246, 244, 0.16);
  --doux: #C9D5DE;
  --f-sans: 'Outfit', 'Segoe UI', Arial, sans-serif;
  --f-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;
  --u: min(1vw, 1.7778vh);
  --px: calc(var(--u) * 6.4);
  /* Le contenu tient dans un cadre 16:9 centré : --gx est la marge ajoutée de chaque côté
     quand la fenêtre est plus large que ce cadre. Les fonds, eux, vont jusqu'aux bords. */
  --gx: max(0px, calc((100vw - var(--u) * 100) / 2));
  --top: calc(var(--u) * 7.4);
  --bot: calc(var(--u) * 6.6);
  /* --fl : 1 garde les tailles de texte plancher (lisibilité sur petite fenêtre) ;
     le script le réduit écran par écran quand la place manque. */
  --fl: 1;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; overscroll-behavior: none; }
body { background: var(--abysse); color: var(--ecume); font-family: var(--f-sans); overflow: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--vert); outline-offset: 3px; border-radius: 6px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- le cadre : barre haute, rail, barre basse ---------- */
.bar { position: fixed; z-index: 5; left: 0; right: 0; top: 0; height: calc(var(--u) * 6.2); padding: 0 calc(var(--px) + var(--gx)); display: flex; align-items: center; gap: calc(var(--u) * 3); pointer-events: none; }
.bar > * { pointer-events: auto; }
.brand { display: block; height: max(22px, calc(var(--u) * 2.1)); flex: none; }
.brand img { height: 100%; width: auto; }
.brand .lg-d { display: none; }
.rail { flex: 1; display: flex; gap: calc(var(--u) * 0.45); min-width: 0; }
.seg { flex: 1; height: 18px; display: flex; align-items: center; min-width: 0; }
.seg i { display: block; width: 100%; height: 3px; border-radius: 3px; background: rgba(242, 246, 244, 0.2); transition: background-color .3s, height .3s; }
.seg:hover i { background: rgba(242, 246, 244, 0.5); }
.seg.on i { background: var(--vert); height: 5px; }
.count { flex: none; font-family: var(--f-mono); font-size: max(12px, calc(var(--u) * 1.02)); letter-spacing: .12em; color: var(--brume); font-variant-numeric: tabular-nums; }
.foot { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; height: calc(var(--u) * 5.8); padding: 0 calc(var(--px) + var(--gx)); display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.foot > * { pointer-events: auto; }
.where { font-family: var(--f-mono); font-size: max(12px, calc(var(--u) * 1.02)); letter-spacing: .14em; text-transform: uppercase; color: var(--brume); }
.ctl { display: flex; gap: calc(var(--u) * 0.7); }
.nav { width: max(40px, calc(var(--u) * 3.1)); height: max(40px, calc(var(--u) * 3.1)); border: 1px solid rgba(242, 246, 244, 0.3); border-radius: 50%; display: grid; place-items: center; transition: background-color .2s, border-color .2s, transform .2s; }
.nav:hover { border-color: var(--vert); background: rgba(29, 255, 34, 0.1); }
.nav:active { transform: scale(.94); }
.nav[disabled] { opacity: .3; cursor: default; }
.nav svg { width: 42%; height: 42%; }
body[data-tone="vert"] .brand .lg-l { display: none; }
body[data-tone="vert"] .brand .lg-d { display: block; }
body[data-tone="vert"] .count, body[data-tone="vert"] .where { color: #0B3316; }
body[data-tone="vert"] .seg i { background: rgba(4, 19, 10, 0.22); }
body[data-tone="vert"] .seg.on i { background: #04130A; }
body[data-tone="vert"] .nav { border-color: rgba(4, 19, 10, 0.45); color: #04130A; }
body[data-tone="vert"] .nav:hover { background: rgba(4, 19, 10, 0.1); border-color: #04130A; }
body[data-tone="vert"] :focus-visible { outline-color: #04130A; }

/* ---------- les écrans ---------- */
.deck { height: 100%; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.deck::-webkit-scrollbar { display: none; }
.sc { --fond: 5, 8, 14; flex: 0 0 100%; min-width: 0; height: 100%; position: relative; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; background: var(--abysse); }
.in { position: absolute; left: calc(var(--px) + var(--gx)); right: calc(var(--px) + var(--gx)); top: var(--top); bottom: var(--bot); display: flex; flex-direction: column; min-height: 0; }
/* Dernier recours, posé par le script quand un écran ne tient pas même réduit : il défile, avec un fondu en bas tant qu'il reste du contenu. */
.sc.scroll .in { overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.sc.scroll .in::-webkit-scrollbar { display: none; }
.sc.scroll::after { content: ''; position: absolute; left: 0; right: 0; bottom: var(--bot); height: calc(var(--u) * 6); background: linear-gradient(rgba(var(--fond), 0), rgb(var(--fond))); pointer-events: none; transition: opacity .25s; }
.sc.scroll.end::after { opacity: 0; }
.pt { display: none; }
.grow { flex: 1; min-height: 0; }
.head { display: flex; flex-direction: column; gap: calc(var(--u) * 0.9); }
.t { font-size: calc(var(--u) * 3.7); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.lead { font-size: max(calc(16px * var(--fl)), calc(var(--u) * 1.95)); line-height: 1.3; color: var(--brume); }
.body { font-size: max(calc(15px * var(--fl)), calc(var(--u) * 1.42)); line-height: 1.45; color: var(--doux); }
.lab { font-family: var(--f-mono); font-size: max(calc(12px * var(--fl)), calc(var(--u) * 1.02)); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--brume); }
.src { font-size: max(calc(12px * var(--fl)), calc(var(--u) * 1)); line-height: 1.4; color: #8194A5; }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; }

/* entrées : l'état de repos est l'état visible ; le script ne masque que les écrans hors champ */
@keyframes rise { from { opacity: 0; transform: translateY(calc(var(--u) * 1.6)); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } }
.js .sc:not(.play) [data-a] { opacity: 0; }
/* Une entrée ne dure qu'un temps : le script pose ensuite .done sur l'écran, et ses éléments reprennent leur style
   de repos. Aucune animation ne reste en cours sur un écran au repos, ce qui garde exacte la mesure des écrans. */
.sc.play:not(.done) [data-a] { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 85ms); }
.sc.play:not(.done) [data-a="fade"] { animation-name: fade; animation-duration: 1s; }
.sc.play:not(.done) [data-a="pop"] { animation-name: pop; }

/* ---------- 1. ouverture ---------- */
.swell { position: absolute; inset: 0; width: 100%; height: 100%; }
.glow { position: absolute; inset: 0; background: radial-gradient(60% 70% at 78% 62%, rgba(20, 70, 130, 0.42), rgba(5, 8, 14, 0) 70%); }
.sig { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: calc(var(--u) * 7.6); line-height: .98; letter-spacing: -0.012em; }
.hero-lead { margin-top: calc(var(--u) * 2); font-size: max(calc(16px * var(--fl)), calc(var(--u) * 2)); line-height: 1.32; color: var(--doux); }
.seals { margin-top: calc(var(--u) * 3); display: flex; gap: calc(var(--u) * 1.4); }
.seal { display: block; width: calc(var(--u) * 8.4); border-radius: 50%; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.seal:hover, .seal:focus-visible { transform: translateY(calc(var(--u) * -0.5)) rotate(-6deg); }
.hint { display: flex; align-items: center; gap: .7em; }
.hint-t { display: none; align-items: center; gap: .7em; }
.hint-t svg { width: 2.2em; height: 1em; }
@media (hover: none) and (pointer: coarse) { .hint { display: none; } .hint-t { display: flex; } }
.kbd { display: inline-grid; place-items: center; width: 2.3em; height: 2.3em; border: 1px solid rgba(242, 246, 244, 0.3); border-radius: 6px; color: var(--ecume); }
.kbd svg { width: 1em; height: 1em; }

/* ---------- 2. n°1 ---------- */
.sc-vert { --fond: 31, 230, 58; background: #1FE63A; color: #04130A; }
.n1 { display: flex; align-items: center; gap: calc(var(--u) * 3.6); }
.n1-big { font-size: calc(var(--u) * 21); font-weight: 700; line-height: .9; letter-spacing: -0.03em; }
.n1-txt { display: flex; flex-direction: column; gap: calc(var(--u) * 1.1); }
.n1-t { font-size: calc(var(--u) * 5.4); font-weight: 600; line-height: 1.02; letter-spacing: -0.03em; }
.n1-line { font-size: max(calc(16px * var(--fl)), calc(var(--u) * 2.05)); line-height: 1.25; color: #0B3316; }
.n1-line b { font-weight: 700; color: #04130A; font-variant-numeric: tabular-nums; }
.sc-vert .src { color: #0B3316; }

/* ---------- 3. simulateur CII / CIR ---------- */
.sim { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1fr); gap: calc(var(--u) * 1.6); align-items: stretch; }
.panel { background: var(--nuit); border: 1px solid rgba(242, 246, 244, 0.14); border-radius: calc(var(--u) * 1.1); padding: calc(var(--u) * 1.8) calc(var(--u) * 2); display: flex; flex-direction: column; gap: calc(var(--u) * 1.1); min-width: 0; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid rgba(242, 246, 244, 0.22); border-radius: 999px; }
.seg2 button { padding: .6em .4em; border-radius: 999px; font-size: max(calc(14px * var(--fl)), calc(var(--u) * 1.3)); font-weight: 500; color: var(--brume); transition: background-color .25s, color .25s; }
.seg2 button[aria-pressed="true"] { background: var(--vert); color: #04130A; font-weight: 600; }
.budget { font-size: calc(var(--u) * 3.1); font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--vert) var(--p, 23%), rgba(242, 246, 244, 0.22) var(--p, 23%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(242, 246, 244, 0.22); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--vert); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: var(--ecume); border: 4px solid var(--vert); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ecume); border: 4px solid var(--vert); }
.scale { display: flex; justify-content: space-between; }
.cr-h { display: flex; align-items: center; gap: calc(var(--u) * 1.2); }
.cr-seal { width: calc(var(--u) * 5.6); flex: none; }
.cr-t { font-size: max(calc(16px * var(--fl)), calc(var(--u) * 1.75)); font-weight: 600; line-height: 1.15; }
.rate { display: flex; align-items: baseline; gap: .12em; font-weight: 600; line-height: .95; letter-spacing: -0.03em; color: var(--ecume); transition: color .35s; }
.rate-n { font-size: calc(var(--u) * 8.6); font-variant-numeric: tabular-nums; }
.rate-p { font-size: calc(var(--u) * 3.6); font-weight: 500; }
.is-drom .rate { color: var(--vert); }
.meter { height: calc(var(--u) * 0.7); min-height: 8px; border-radius: 99px; background: rgba(242, 246, 244, 0.14); overflow: hidden; }
.meter i { display: block; height: 100%; width: 20%; border-radius: 99px; background: var(--vert); transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: .35em 1em; align-items: baseline; }
.kv dt { font-size: max(calc(14px * var(--fl)), calc(var(--u) * 1.25)); color: var(--brume); }
.kv dd { font-size: max(calc(16px * var(--fl)), calc(var(--u) * 1.75)); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.kv .hi { color: var(--vert); }

/* ---------- 4. Qualiopi ---------- */
.quali { display: flex; align-items: center; gap: calc(var(--u) * 5); }
.quali-seal { width: calc(var(--u) * 21); flex: none; }
.quali-b { display: flex; flex-direction: column; gap: calc(var(--u) * 2.2); }
.quali-s { font-size: calc(var(--u) * 2.5); line-height: 1.28; }
.pills { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 0.8); }
.pill { font-size: max(calc(14px * var(--fl)), calc(var(--u) * 1.42)); font-weight: 500; border: 1px solid rgba(242, 246, 244, 0.3); border-radius: 999px; padding: .5em 1.1em; }

/* ---------- 5. quatre métiers ---------- */
.cols4 { flex: 1; min-height: 0; margin-top: calc(var(--u) * 3); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(var(--u) * 2.2); }
.col { display: flex; flex-direction: column; gap: calc(var(--u) * 1); border-top: 1px solid rgba(242, 246, 244, 0.28); padding-top: calc(var(--u) * 1.5); transition: border-color .3s; }
.col:hover { border-top-color: var(--vert); }
.col-t { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: calc(var(--u) * 5); line-height: 1; letter-spacing: -0.01em; transition: color .3s; }
.col:hover .col-t { color: var(--vert); }
.tag { margin-top: auto; border-top: 1px solid rgba(242, 246, 244, 0.28); padding-top: calc(var(--u) * 1.1); font-family: var(--f-mono); font-size: max(calc(12px * var(--fl)), calc(var(--u) * 1.1)); font-weight: 500; line-height: 1.45; color: var(--vert); min-height: calc(var(--u) * 4.4); }

/* ---------- 6 et 7. le globe ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); gap: calc(var(--u) * 3); flex: 1; min-height: 0; }
.pane { display: flex; flex-direction: column; min-height: 0; gap: calc(var(--u) * 1.15); }
.globe-w { position: relative; min-height: 0; }
.globe-w canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: manipulation; cursor: grab; }
.globe-w canvas:active { cursor: grabbing; }
.globe-w .fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.js:not(.no-globe) .globe-w .fallback, .js:not(.no-globe) .bleed.fallback { display: none; }
.no-globe .globe-w canvas, .no-globe canvas.bleed { display: none; }
.bleed { position: absolute; right: 0; top: 0; width: 62%; height: 100%; }
img.bleed { object-fit: contain; }
canvas.bleed { touch-action: manipulation; cursor: grab; }
canvas.bleed:active { cursor: grabbing; }
.chips { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 0.6); }
.chip { font-size: max(calc(14px * var(--fl)), calc(var(--u) * 1.3)); font-weight: 500; padding: .5em 1.05em; border: 1px solid rgba(242, 246, 244, 0.28); border-radius: 999px; color: var(--doux); transition: background-color .25s, color .25s, border-color .25s; }
.chip:hover { border-color: var(--ecume); }
.chip[aria-pressed="true"] { background: var(--ecume); color: var(--abysse); border-color: var(--ecume); font-weight: 600; }
.places { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: calc(var(--u) * 0.5); }
.place { display: inline-flex; align-items: center; gap: .55em; font-size: max(calc(14px * var(--fl)), calc(var(--u) * 1.3)); padding: .42em .9em .42em .7em; border-radius: 8px; border: 1px solid transparent; color: var(--doux); transition: background-color .2s, border-color .2s; }
.place:hover { background: rgba(242, 246, 244, 0.07); }
.place[aria-pressed="true"] { border-color: rgba(242, 246, 244, 0.4); background: rgba(242, 246, 244, 0.07); color: var(--ecume); }
.places li[hidden] { display: none; }
.dot { width: .62em; height: .62em; border-radius: 50%; background: var(--vert); flex: none; }
.dot.s { background: var(--ecume); }
.dot.c { background: transparent; border: 2px solid var(--ambre); }
.fiche { margin-top: auto; background: var(--nuit); border: 1px solid rgba(242, 246, 244, 0.14); border-radius: calc(var(--u) * 1.1); padding: calc(var(--u) * 1.3) calc(var(--u) * 1.8); display: grid; grid-template-columns: 1fr auto; gap: calc(var(--u) * 0.4) calc(var(--u) * 2); align-items: end; }
.fiche-n { font-size: calc(var(--u) * 2.4); font-weight: 600; line-height: 1.1; }
.fiche-st { grid-column: 1; }
.fiche-st.c { color: var(--ambre); }
.fiche-e { grid-column: 1; font-size: max(calc(15px * var(--fl)), calc(var(--u) * 1.42)); line-height: 1.4; color: var(--doux); }
.fiche-k { grid-column: 2; grid-row: 1 / span 3; text-align: right; }
.fiche-k b { display: block; font-size: calc(var(--u) * 4.6); font-weight: 600; line-height: .95; color: var(--vert); font-variant-numeric: tabular-nums; }
.fiche-k[hidden] { display: none; }
.teams { display: flex; flex-direction: column; gap: calc(var(--u) * 0.5); }
.team { display: grid; grid-template-columns: calc(var(--u) * 9) 1fr; align-items: center; gap: calc(var(--u) * 1.4); text-align: left; padding: calc(var(--u) * 0.7) calc(var(--u) * 1.2); border-radius: calc(var(--u) * 1); border: 1px solid transparent; transition: background-color .25s, border-color .25s; }
.team:hover { background: rgba(242, 246, 244, 0.05); }
.team[aria-pressed="true"] { background: var(--nuit); border-color: rgba(242, 246, 244, 0.16); }
.team-n { font-size: calc(var(--u) * 6.6); font-weight: 600; line-height: 1; letter-spacing: -0.03em; color: var(--vert); font-variant-numeric: tabular-nums; }
.team-b { display: flex; flex-direction: column; gap: .15em; min-width: 0; }
.team-t { font-size: calc(var(--u) * 2.05); font-weight: 600; line-height: 1.15; }
.team-s { font-size: max(calc(14px * var(--fl)), calc(var(--u) * 1.35)); color: var(--brume); }
.people { display: flex; gap: .4em; margin-top: .45em; flex-wrap: wrap; }
.people i { width: calc(var(--u) * 0.72); height: calc(var(--u) * 0.72); min-width: 7px; min-height: 7px; border-radius: 50%; background: var(--vert); opacity: .9; }

/* ---------- 8. la suite SAIA ---------- */
.saia { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: calc(var(--u) * 1.5); }
.pub { display: flex; flex-direction: column; gap: calc(var(--u) * 1.2); border-top: 1px solid rgba(242, 246, 244, 0.28); padding-top: calc(var(--u) * 1.3); }
.pub-n { font-size: max(calc(15px * var(--fl)), calc(var(--u) * 1.42)); font-weight: 500; color: var(--doux); margin-top: .2em; }
.ag { display: flex; flex-direction: column; gap: .2em; }
.ag-n { font-size: calc(var(--u) * 2.1); font-weight: 600; line-height: 1.15; }
.ag-r { font-size: max(calc(13px * var(--fl)), calc(var(--u) * 1.22)); line-height: 1.35; color: var(--brume); }
a.ag { text-decoration: none; border-radius: 8px; }
a.ag .ag-n { color: var(--vert); display: inline-flex; align-items: center; gap: .35em; }
a.ag .ag-n svg { width: .62em; height: .62em; transition: transform .25s; }
a.ag:hover .ag-n svg { transform: translateX(.25em); }

/* ---------- 9 à 11. fiches produit ---------- */
.prod { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); gap: calc(var(--u) * 3.4); }
.prod-l { display: flex; flex-direction: column; gap: calc(var(--u) * 2); min-height: 0; }
.prod-sig { font-family: var(--f-serif); font-style: italic; font-size: calc(var(--u) * 2.9); line-height: 1.1; color: var(--brume); }
.steps { display: flex; flex-direction: column; }
.stp { position: relative; display: grid; grid-template-columns: calc(var(--u) * 8.4) 1fr; gap: calc(var(--u) * 1.4); text-align: left; padding: calc(var(--u) * 0.95) 0; border-top: 1px solid rgba(242, 246, 244, 0.18); opacity: .5; transition: opacity .35s; }
.stp:hover { opacity: .8; }
.stp.on { opacity: 1; }
.stp::before { content: ''; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--vert); }
.stp.on::before { width: 100%; }
.stp.on.run::before { animation: fill var(--dur, 3.8s) linear both; }
@keyframes fill { from { width: 0; } to { width: 100%; } }
.stp-k { font-size: max(calc(15px * var(--fl)), calc(var(--u) * 1.5)); font-weight: 600; color: var(--vert); }
.stp-v { font-size: max(calc(15px * var(--fl)), calc(var(--u) * 1.42)); line-height: 1.4; color: var(--doux); }
.prod-r { display: flex; flex-direction: column; gap: calc(var(--u) * 1.1); min-width: 0; }
.shot { border: 1px solid rgba(242, 246, 244, 0.22); border-radius: calc(var(--u) * 0.8); overflow: hidden; background: var(--nuit); }
.shot-bar { display: flex; align-items: center; gap: .45em; padding: .55em .8em; border-bottom: 1px solid rgba(242, 246, 244, 0.14); font-family: var(--f-mono); font-size: max(calc(11px * var(--fl)), calc(var(--u) * 0.92)); color: var(--brume); }
.shot-bar i { width: .6em; height: .6em; border-radius: 50%; background: rgba(242, 246, 244, 0.25); }
.shot-bar span { margin-left: .6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot img { width: 100%; aspect-ratio: 1280 / 666; object-fit: cover; }
.prod-m { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--u) * 1.5); }
.btn { display: inline-flex; align-items: center; gap: .55em; flex: none; padding: .7em 1.25em; border-radius: 999px; background: var(--vert); color: #04130A; font-size: max(calc(14px * var(--fl)), calc(var(--u) * 1.3)); font-weight: 600; text-decoration: none; transition: transform .2s, background-color .2s; }
.btn:hover { transform: translateY(-2px); background: #5BFF5F; }
.btn svg { width: .8em; height: .8em; }
.btn.ghost { background: transparent; color: var(--ecume); border: 1px solid rgba(242, 246, 244, 0.35); }
.btn.ghost:hover { background: rgba(242, 246, 244, 0.08); }

/* ---------- 12. clients : un secteur par ligne ---------- */
.sect { flex: 1; min-height: 0; margin-top: calc(var(--u) * 2.2); display: flex; flex-direction: column; border-bottom: 1px solid var(--trait); }
.sect-r { flex: 1 0 auto; min-height: calc(var(--u) * 4.7); display: flex; align-items: center; gap: calc(var(--u) * 1.5); border-top: 1px solid var(--trait); }
.sect-k { flex: none; width: calc(var(--u) * 24.5); font-size: max(calc(14px * var(--fl)), calc(var(--u) * 1.45)); font-weight: 500; line-height: 1.2; }
.sect-l { display: flex; align-items: center; gap: calc(var(--u) * 3.3); min-width: 0; }
.sect-l img { height: calc(var(--u) * 3.5); width: calc(var(--u) * var(--w, 8)); flex: 0 1 auto; min-width: 0; object-fit: contain; opacity: .86; transition: opacity .25s, transform .25s; }
.sect-l img:hover { opacity: 1; transform: scale(1.06); }

/* ---------- 13. répartition : deux classements en barres, à la même échelle ----------
   --v est la part exacte en % ; la barre la plus longue (25,2 %) occupe la piste moins la place de sa valeur.
   Au survol, au clavier ou au toucher, le nombre de projets s'affiche à la place de l'unité.
   La piste garde 15 unités de large au minimum : sur une très petite fenêtre le graphique déborde plutôt que de
   s'écraser, et le script réduit alors le texte de l'écran, comme pour les autres. */
.charts { flex: 1 0 auto; margin-top: calc(var(--u) * 2.2); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: calc(var(--u) * 3.3); }
.chart { display: flex; flex-direction: column; min-width: 0; }
.chart-h { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; border-bottom: 1px solid rgba(242, 246, 244, 0.28); padding-bottom: calc(var(--u) * 0.7); margin-bottom: calc(var(--u) * 0.5); }
.chart-t { font-size: max(calc(15px * var(--fl)), calc(var(--u) * 1.7)); font-weight: 600; line-height: 1.2; }
.chart-u { font-family: var(--f-mono); font-size: max(calc(12px * var(--fl)), calc(var(--u) * 1.1)); font-weight: 500; line-height: 1.2; color: var(--brume); white-space: nowrap; transition: color .2s; }
.chart-u.on { color: var(--ecume); }
.bars { --lab: max(calc(12.5px * var(--fl)), calc(var(--u) * 1.25)); list-style: none; padding: 0; }
.bar-r { display: grid; grid-template-columns: calc(var(--lab) * 16.4) minmax(calc(var(--u) * 15), 1fr); align-items: center; height: max(calc(var(--u) * 2.3), calc(var(--lab) * 1.45)); border-radius: 4px; outline-offset: 0; transition: opacity .2s; }
.bar-r.dim { opacity: .4; }
.bar-k { font-size: var(--lab); line-height: 1.2; color: var(--doux); white-space: nowrap; }
.bar-t { display: flex; align-items: center; gap: calc(var(--lab) * 0.55); height: 100%; min-width: 0; border-left: 1px solid rgba(242, 246, 244, 0.34); }
.bar-f { flex: none; display: block; width: calc((100% - var(--lab) * 3.6) * var(--v) / 25.2); height: calc(var(--u) * 0.94); min-height: 8px; border-radius: 0 4px 4px 0; background: var(--vert); transform-origin: left center; }
.bar-o .bar-f { background: #5E7285; }
.bar-v { font-size: var(--lab); font-weight: 600; line-height: 1; white-space: nowrap; }
@keyframes barx { from { transform: scaleX(0); } }
.js .sc:not(.play) .bar-f { transform: scaleX(0); }
.js .sc:not(.play) .bar-v { opacity: 0; }
.sc.play:not(.done) .bar-f { animation: barx .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms + 150ms); }
.sc.play:not(.done) .bar-v { animation: fade .5s ease-out both; animation-delay: calc(var(--i, 0) * 45ms + 500ms); }
.chart-q { margin-top: auto; padding-top: calc(var(--u) * 1.2); font-size: calc(var(--u) * 3.1); line-height: 1.08; }
#repartition .src { margin-top: calc(var(--u) * 1); }

/* ---------- 14. références : cinq par ligne, le budget posé sur la capture ---------- */
.refs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: calc(var(--u) * 1.3) calc(var(--u) * 1.46); }
.ref { display: flex; flex-direction: column; gap: calc(var(--u) * 0.22); min-width: 0; text-decoration: none; border-radius: calc(var(--u) * 0.55); }
.ref-p { position: relative; margin-bottom: calc(var(--u) * 0.5); transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.ref-i { width: 100%; aspect-ratio: 760 / 340; object-fit: cover; border: 1px solid rgba(242, 246, 244, 0.18); border-radius: calc(var(--u) * 0.55); transition: border-color .3s; }
.ref:hover .ref-p { transform: translateY(calc(var(--u) * -0.35)); }
.ref:hover .ref-i, .ref:hover .ref-m { border-color: var(--vert); }
.ref-b { position: absolute; left: .5em; bottom: .5em; font-family: var(--f-mono); font-size: max(calc(12px * var(--fl)), calc(var(--u) * 1.15)); font-weight: 500; line-height: 1.3; color: var(--vert); white-space: nowrap; background: rgba(5, 8, 14, 0.9); border: 1px solid rgba(242, 246, 244, 0.22); border-radius: .45em; padding: .1em .6em; }
.ref-n { font-size: max(calc(15px * var(--fl)), calc(var(--u) * 1.45)); font-weight: 600; line-height: 1.25; }
.ref-s { font-family: var(--f-mono); font-size: max(calc(12px * var(--fl)), calc(var(--u) * 1.15)); font-weight: 500; line-height: 1.3; color: var(--doux); }
.ref-d { font-size: max(calc(13px * var(--fl)), calc(var(--u) * 1.2)); line-height: 1.35; color: var(--brume); }
.ref-m { aspect-ratio: 760 / 340; display: grid; place-items: center; margin-bottom: calc(var(--u) * 0.5); border: 1px solid rgba(242, 246, 244, 0.18); border-radius: calc(var(--u) * 0.55); background: var(--nuit); font-size: calc(var(--u) * 4.4); font-weight: 600; line-height: 1; letter-spacing: -0.02em; transition: border-color .3s, transform .35s cubic-bezier(.2, .7, .2, 1); }
.ref:hover .ref-m { transform: translateY(calc(var(--u) * -0.35)); }

/* ---------- 15. contact ---------- */
.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 8, 14, 0.97) 0%, rgba(5, 8, 14, 0.84) 46%, rgba(5, 8, 14, 0.38) 100%); }
.contacts { margin-top: calc(var(--u) * 2.6); display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--u) * 1); }
.mail { font-size: calc(var(--u) * 2.6); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--vert); padding-bottom: .1em; }
.contact-lines { display: flex; flex-direction: column; gap: .4em; }

/* ---------- format portrait : téléphones, tablettes tenues debout, fenêtres étroites ----------
   (fenêtre plus haute que large, ou de moins de 560 px de large)
   Même principe que le cadre 16:9, avec un cadre debout de 43 unités de large sur 73 de haut :
   la hauteur visible d'un téléphone quand les barres du navigateur sont affichées.
   Tout est en unités --u, sans taille en pixels, pour que l'écran entier se réduise d'un bloc
   sur un petit téléphone au lieu de déborder. */
@media (max-aspect-ratio: 9/10), (max-width: 559px) {
  :root {
    --u: min(2.3256vw, 1.3699vh);
    --px: calc(var(--u) * 3.4);
    --gx: max(0px, calc((100vw - var(--u) * 50) / 2));
    --top: calc(var(--u) * 7.6);
    --bot: calc(var(--u) * 7.6);
    --fl: 0;
  }
  .lg { display: none; }
  .pt { display: inline; }
  .bar { height: calc(var(--u) * 7); gap: calc(var(--u) * 2.4); }
  .foot { height: calc(var(--u) * 7.2); }
  .seg { height: 28px; }
  .where { font-size: max(11px, calc(var(--u) * 1.2)); }
  .head { gap: calc(var(--u) * 0.8); }
  .t { font-size: calc(var(--u) * 4.6); }
  .lead { font-size: calc(var(--u) * 1.65); }
  .body { font-size: calc(var(--u) * 1.5); }
  .lab { font-size: calc(var(--u) * 1.22); letter-spacing: .12em; }
  .src { font-size: calc(var(--u) * 1.2); }
  .btn { font-size: calc(var(--u) * 1.5); }

  /* 1. ouverture */
  .sig { font-size: calc(var(--u) * 7.8); }
  .hero-lead { font-size: calc(var(--u) * 1.72); margin-top: calc(var(--u) * 1.8); }
  .seals { margin-top: calc(var(--u) * 2.6); gap: calc(var(--u) * 1); }
  .seal { width: calc(var(--u) * 8.3); }
  .hint { display: none; }
  .hint-t { margin-top: calc(var(--u) * 1.2); }

  /* 2. n°1 */
  .n1 { flex-direction: column; align-items: flex-start; gap: calc(var(--u) * 2); }
  .n1-big { font-size: calc(var(--u) * 24); }
  .n1-t { font-size: calc(var(--u) * 6.4); }
  .n1-line { font-size: calc(var(--u) * 1.95); }

  /* 3. simulateur : les réglages sur toute la largeur, puis CII et CIR côte à côte */
  .sim { grid-template-columns: 1fr 1fr; gap: calc(var(--u) * 1); margin-top: calc(var(--u) * 1.2); }
  .panel { padding: calc(var(--u) * 1.3) calc(var(--u) * 1.5); gap: calc(var(--u) * 0.7); border-radius: calc(var(--u) * 1.4); }
  .sim > div.panel { grid-column: 1 / -1; display: grid; grid-template-columns: calc(var(--u) * 12.5) minmax(0, 1fr); align-items: center; gap: calc(var(--u) * 0.7) calc(var(--u) * 1.2); }
  .sim > div.panel .grow, .scale { display: none; }
  .sim > div.panel input { grid-column: 1 / -1; }
  .seg2 button { font-size: calc(var(--u) * 1.5); padding: .5em .4em; }
  .budget { font-size: calc(var(--u) * 3); text-align: right; }
  .cr-h { gap: calc(var(--u) * 0.8); }
  .cr-seal { width: calc(var(--u) * 3.8); }
  .cr-t { font-size: calc(var(--u) * 1.45); }
  .rate-n { font-size: calc(var(--u) * 6.2); }
  .rate-p { font-size: calc(var(--u) * 2.8); }
  .meter { height: calc(var(--u) * 0.8); min-height: 0; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { font-size: calc(var(--u) * 1.22); margin-top: .55em; }
  .kv dd { font-size: calc(var(--u) * 1.75); text-align: left; line-height: 1.25; }
  .kv dt:first-of-type { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #credit-impot .src { margin-top: calc(var(--u) * 1.2); }

  /* 4. Qualiopi */
  .quali { flex-direction: column; align-items: flex-start; gap: calc(var(--u) * 1.8); }
  .quali-seal { width: calc(var(--u) * 13); }
  .quali-b { gap: calc(var(--u) * 1.8); }
  .quali-s { font-size: calc(var(--u) * 2.6); }
  .pill { font-size: calc(var(--u) * 1.5); }

  /* 5. métiers : deux par deux */
  .cols4 { grid-template-columns: 1fr 1fr; gap: calc(var(--u) * 2.2) calc(var(--u) * 1.8); flex: none; margin: auto 0; padding-top: calc(var(--u) * 2); }
  .col { gap: calc(var(--u) * 0.6); padding-top: calc(var(--u) * 1.1); }
  .col-t { font-size: calc(var(--u) * 4.2); }
  .col .body { font-size: calc(var(--u) * 1.45); line-height: 1.4; }
  .tag { min-height: 0; border-top: 0; padding-top: 0; font-size: calc(var(--u) * 1.15); }

  /* 6. consortium : le titre, les océans, le globe (il prend la hauteur disponible), les territoires, la fiche */
  .split { display: flex; flex-direction: column; gap: calc(var(--u) * 1.2); }
  .pane { display: contents; }
  #consortium .head { order: 1; }
  #consortium .head .lead { display: none; }
  #consortium .chips { order: 2; }
  #consortium .globe-w { order: 3; flex: 1 1 calc(var(--u) * 21); min-height: calc(var(--u) * 17); }
  #consortium .places { order: 4; }
  #consortium .fiche { order: 5; margin-top: 0; }
  .chip { font-size: calc(var(--u) * 1.5); }
  .places { gap: calc(var(--u) * 0.3); }
  .place { font-size: calc(var(--u) * 1.4); padding: .4em .7em .4em .5em; min-height: calc(var(--u) * 3.4); }
  .fiche { grid-template-columns: auto 1fr auto; align-items: baseline; padding: calc(var(--u) * 1.1) calc(var(--u) * 1.5); gap: calc(var(--u) * 0.3) calc(var(--u) * 1.2); }
  .fiche-n { font-size: calc(var(--u) * 2.6); }
  .fiche-st { grid-column: 2; }
  .fiche-e { grid-column: 1 / 3; font-size: calc(var(--u) * 1.45); }
  .fiche-k { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .fiche-k b { font-size: calc(var(--u) * 4.4); }

  /* 7. commerciaux : le texte en haut sur 36,5 unités, le globe occupe tout ce qui reste en dessous.
     Le bloc ::after réserve la hauteur minimale du globe, pour que le contrôle de débordement en tienne compte. */
  .bleed { left: 0; right: 0; width: 100%; top: auto; bottom: 0; height: calc(100% - var(--top) - var(--u) * 36.5); }
  #commerciaux .split::after { content: ''; flex: none; height: calc(var(--u) * 19.5); }
  #commerciaux .grow { display: none; }
  .teams { gap: calc(var(--u) * 0.3); }
  .team { grid-template-columns: calc(var(--u) * 7.6) 1fr; padding: calc(var(--u) * 0.35) calc(var(--u) * 1); gap: calc(var(--u) * 1.2); }
  .team-n { font-size: calc(var(--u) * 5.2); }
  .team-b { gap: calc(var(--u) * 0.2); }
  .team-t { font-size: calc(var(--u) * 2.2); }
  .team-s { font-size: calc(var(--u) * 1.4); line-height: 1.2; }
  .people { margin-top: calc(var(--u) * 0.4); gap: calc(var(--u) * 0.45); }
  .people i { min-width: 0; min-height: 0; }
  #commerciaux .body { font-size: calc(var(--u) * 1.45); }

  /* 8. suite SAIA : une société par bloc, un agent par ligne, son rôle à la suite */
  .saia { display: flex; flex-direction: column; gap: 0; margin-top: calc(var(--u) * 1); }
  .pub { display: block; padding: calc(var(--u) * 0.62) 0 calc(var(--u) * 0.6); }
  .pub > div:first-child { display: flex; align-items: baseline; gap: .9em; margin-bottom: calc(var(--u) * 0.35); }
  .pub-n { margin-top: 0; font-size: calc(var(--u) * 1.3); }
  .ag { display: block; line-height: 1.25; padding: calc(var(--u) * 0.13) 0; }
  .ag-n, a.ag .ag-n { display: inline; font-size: calc(var(--u) * 1.95); margin-right: .45em; }
  a.ag .ag-n svg { display: inline-block; margin-left: .15em; }
  .ag-r { display: inline; font-size: calc(var(--u) * 1.3); }
  #saia > .in > .body { font-size: calc(var(--u) * 1.3); margin-top: calc(var(--u) * 0.9); }

  /* 9 à 11. produits : le texte, puis la capture qui prend la hauteur disponible */
  .prod { display: flex; flex-direction: column; gap: calc(var(--u) * 1.4); }
  .prod-l { flex: none; gap: calc(var(--u) * 1.2); }
  .prod-sig { font-size: calc(var(--u) * 2.8); }
  .stp { grid-template-columns: calc(var(--u) * 8.8) 1fr; padding: calc(var(--u) * 0.65) 0; gap: calc(var(--u) * 1); }
  .stp-k { font-size: calc(var(--u) * 1.55); }
  .stp-v { font-size: calc(var(--u) * 1.42); line-height: 1.35; }
  .prod-r { flex: 1; min-height: 0; }
  .shot { flex: 1 1 auto; min-height: calc(var(--u) * 12); display: flex; flex-direction: column; }
  .shot-bar { font-size: calc(var(--u) * 1.15); padding: .45em .8em; }
  .shot img { flex: 1 1 0; min-height: 0; height: 0; aspect-ratio: auto; object-position: 50% 30%; }
  .prod-m .body { font-size: calc(var(--u) * 1.38); }

  /* 12. clients : le secteur au-dessus de ses logos */
  #clients .head .lead { display: none; }
  .sect { margin-top: calc(var(--u) * 1.6); }
  .sect-r { min-height: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: calc(var(--u) * 0.75); padding: calc(var(--u) * 1.05) 0 calc(var(--u) * 1.15); }
  .sect-k { width: auto; font-size: calc(var(--u) * 1.5); }
  .sect-l { flex-wrap: wrap; gap: calc(var(--u) * 1.1) calc(var(--u) * 1.6); }
  .sect-l img { height: calc(var(--u) * 2.6); width: calc(var(--u) * var(--w, 8) * 0.72); max-width: 100%; }

  /* 13. répartition : les deux classements l'un sous l'autre, sans la phrase */
  #repartition .t { font-size: calc(var(--u) * 3.7); }
  #repartition .lead { display: none; }
  .charts { flex: none; display: flex; flex-direction: column; gap: calc(var(--u) * 1.6); margin-top: calc(var(--u) * 1.4); }
  .chart-h { padding-bottom: calc(var(--u) * 0.5); margin-bottom: calc(var(--u) * 0.3); }
  .chart-t { font-size: calc(var(--u) * 1.75); }
  .chart-u { font-size: calc(var(--u) * 1.15); }
  .bars { --lab: calc(var(--u) * 1.3); }
  .bar-r { grid-template-columns: calc(var(--lab) * 16.4) minmax(0, 1fr); height: calc(var(--u) * 2.12); }
  .bar-f { height: calc(var(--u) * 0.8); min-height: 0; }
  .chart-q { display: none; }
  #repartition .src { margin-top: calc(var(--u) * 0.9); }

  /* 14. références : une ligne par référence, la capture à gauche, le budget à droite */
  .refs { display: flex; flex-direction: column; gap: calc(var(--u) * 0.7); margin-top: calc(var(--u) * 1.2); }
  .ref { display: grid; grid-template-columns: calc(var(--u) * 8.65) minmax(0, 1fr) auto; grid-template-rows: 1fr 1fr; column-gap: calc(var(--u) * 1.3); row-gap: calc(var(--u) * 0.15); height: calc(var(--u) * 4.1); }
  .ref-p { display: contents; }
  .ref-i { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: auto; width: 100%; height: calc(var(--u) * 4.1); }
  .ref-b { grid-column: 3; grid-row: 1 / span 2; align-self: center; position: static; font-size: calc(var(--u) * 1.3); background: none; border: 0; padding: 0; }
  .ref-n { grid-column: 2; grid-row: 1; align-self: end; font-size: calc(var(--u) * 1.55); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ref-s { grid-column: 2; grid-row: 2; align-self: start; font-size: calc(var(--u) * 1.15); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ref-d { display: none; }
  .ref-m { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: auto; height: calc(var(--u) * 4.1); margin: 0; font-size: calc(var(--u) * 2.1); }
  .ref:hover .ref-m { transform: none; }

  /* 15. contact */
  .contacts { gap: calc(var(--u) * 1.2); }
  .mail { font-size: calc(var(--u) * 3.6); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .sc:not(.play) [data-a], .js .sc:not(.play) .bar-v { opacity: 1; }
  .js .sc:not(.play) .bar-f { transform: none; }
}
