/* Icosa · l'accueil (proposition du 11/11/2026, devenu index.html le 22/11/2026 avec la refonte UX).
   Refonte du 22/11 (audit UX du 21/11) : scène du haut sur deux chapitres (entier, déplié ; il se referme à la signature),
   titre avant le décor sur téléphone, preuve faite d'une vraie demande, trois fonctions sur un écran, porte de contact.
   Puis (22/11, choix d'Arthur) : la capture de l'appli en haut de page, le bouton « Postuler pour un mois d'essai gratuit ».
   S'ajoute à assets/styles.css (charte Monolithe, polices, en-tête, boutons, fenêtres).
   Une seule idée porte la page : l'icosaèdre, en traits nets depuis le 18/11 (le même que le logo et que la page des
   cerveaux). Il ouvre la page (entier, déplié en vingt faces, refermé), s'efface pendant la lecture, puis revient la signer.
   Deux compositions pour la scène du haut : grand écran (le décor remplit la fenêtre, le texte passe devant) et
   écran étroit (le décor tient dans une scène collée en haut, le texte défile dessous). */

:root {
  --u: clamp(15px, 1.05vw, 18px);              /* l'unité fluide des espacements de cette page */
  --scene: max(36vh, 250px);                   /* hauteur de la scène sur écran étroit */
  --sortie: cubic-bezier(.16, 1, .3, 1);
}
@supports (height: 1lvh) { :root { --scene: max(36lvh, 250px); } }

html { scrollbar-color: var(--trait) var(--fond); }
::selection { background: var(--ambre); color: var(--fond); }
main { position: relative; }

/* ------------------------------------------------------------------ la scène du haut : le décor reste collé tant que ses trois chapitres défilent */
.scene { position: relative; }
/* le premier chapitre remonte sur le décor (marge sur le chapitre, pas sur le décor : sinon le décor collé déborde de la scène) */
.decor { position: sticky; top: 0; z-index: 0; height: 100vh; overflow: hidden; pointer-events: none;
  /* secours : ce fond reste seul si la 3D ne démarre pas */
  background: radial-gradient(40% 44% at 75% 33%, rgba(244,244,242,.07), transparent 72%), var(--fond); }
.decor + .chapitre { margin-top: -100vh; }
@supports (height: 1lvh) { .decor { height: 100lvh; } .decor + .chapitre { margin-top: -100lvh; } }
.decor canvas, .decor-fin canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.decor .secours { position: absolute; top: 33%; left: 75%; width: min(34vw, 48vh); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .55; }

/* les mots posés sur les faces dépliées (grand écran seulement, placés par le script) */
.etiquettes { position: absolute; inset: 0; overflow: hidden; font-size: 10.5px; }
.etiquettes span { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; will-change: transform, opacity;
  font: 600 1em/1 var(--corps); letter-spacing: .1em; text-transform: uppercase; color: var(--blanc);
  text-shadow: 0 0 14px var(--fond), 0 0 4px var(--fond); }
.etiquettes span.amb { color: var(--ambre); }

/* ------------------------------------------------------------------ les trois chapitres */
.chapitre { position: relative; z-index: 1; }
.cadre { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; position: relative;
  width: 100%; max-width: calc(var(--page) + 2 * var(--gout)); margin: 0 auto;
  padding: calc(var(--hdr) + var(--u) * 2) var(--gout) calc(var(--u) * 3); }
.bloc { max-width: 39rem; }
.bloc h1, .bloc h2 { text-wrap: balance; }
.bloc h1 { margin-bottom: calc(var(--u) * 1.4); }
.bloc h2 { margin-bottom: calc(var(--u) * 1.1); }
.bloc .lead { margin-bottom: calc(var(--u) * 2); max-width: 34em; }
.ch3 .lead { color: var(--fumee); }

/* le texte est visible d'office ; le script ne fait que l'accompagner */
.js .bloc { transition: opacity .7s var(--sortie), transform .9s var(--sortie), filter .7s var(--sortie); }
.js .bloc:not(.vu) { opacity: 0; transform: translateY(18px); filter: blur(6px); }

/* les sept mots : liste lisible partout où les faces ne portent pas d'étiquette */
.faces { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.faces li { font: 600 10.5px/1 var(--corps); letter-spacing: .2em; text-transform: uppercase; border: 1px solid var(--blanc); color: var(--blanc); padding: 8px 10px; }
.faces li.amb { border-color: var(--ambre); background: var(--ambre); color: var(--fond); }

/* le fil : invite discrète à descendre, sous le premier écran */
.fil { position: absolute; left: var(--gout); bottom: calc(var(--u) * 1.6); width: 1px; height: 56px; background: var(--trait); overflow: hidden; transition: opacity .5s; }
.fil i { position: absolute; left: 0; top: 0; width: 1px; height: 18px; background: var(--blanc); animation: fil 2.4s var(--sortie) infinite; }
.descendu .fil { opacity: 0; }
@keyframes fil { from { transform: translateY(-18px); } to { transform: translateY(56px); } }

/* ------------------------------------------------------------------ grand écran : le texte tient en place pendant que la forme change */
@media (min-width: 961px) {
  .ch1 .bloc { max-width: min(39rem, 54vw); }          /* le texte ne mord pas sur la forme quand la fenêtre est étroite */
  .ch2 { height: 110vh; }
  .ch2 .cadre { position: sticky; top: 0; align-items: flex-start; padding-top: calc(var(--hdr) + 7vh); }
  .ch2 .bloc { max-width: 52rem; }
  /* le dernier chapitre tient aussi : la forme refermée a le temps d'être vue avant que la scène ne parte */
  .ch3 { height: 125vh; }
  .ch3 .cadre { position: sticky; top: 0; justify-content: flex-end; }
  .ch3 .bloc { width: min(34rem, 44%); }
  .sans3d .ch2 .bloc { max-width: 39rem; }
  .sans3d .ch3 { height: auto; }
  /* les faces portent les mots : la liste reste pour les lecteurs d'écran */
  .js:not(.sans3d) .faces { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (min-width: 961px) and (max-height: 620px) {
  .ch2, .ch3 { height: auto; } .ch2 .cadre, .ch3 .cadre { position: relative; }
}

/* ------------------------------------------------------------------ écran étroit : la scène en haut, le texte dessous */
@media (max-width: 960px) {
  .decor { height: var(--scene); z-index: 3; overflow: visible; background: var(--fond); }
  .decor + .chapitre { margin-top: calc(-1 * var(--scene)); }
  .decor::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28px; background: linear-gradient(transparent, var(--fond)); }
  /* un voile sous la scène : le texte s'efface avant de passer derrière */
  .decor::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 36px; background: linear-gradient(var(--fond), transparent); }
  .decor .secours { left: 50%; top: 56%; width: auto; height: 74%; }
  .etiquettes { display: none; }
  .cadre { align-items: flex-start; padding-top: calc(var(--scene) + 44px); padding-bottom: calc(var(--u) * 4); }
  /* les chapitres se suivent sans vide : le texte du suivant arrive pendant que le précédent passe derrière la scène */
  .ch1 .cadre { min-height: 0; padding-bottom: 18vh; }
  .ch2 .cadre { min-height: 0; padding-top: 0; padding-bottom: 30vh; }
  .ch3 .cadre { min-height: 0; padding-top: 0; padding-bottom: 12vh; }
  .bloc { max-width: 36rem; }
  .fil { display: none; }
}
@media (max-width: 720px) {
  .bloc h1 { font-size: clamp(26px, 7.4vw, 34px); }
}

/* ------------------------------------------------------------------ 22/11 · le haut de page : ce que c'est, pour qui, quoi faire */
.ch1 .bloc .lead { margin-bottom: calc(var(--u) * 1.3); }
.ch1 .ctas { gap: 12px; }
.ch1 .ctas .btn { padding: 0 20px; }
.trois { list-style: none; max-width: 34rem; margin-bottom: calc(var(--u) * 1.8); border-top: 1px solid var(--trait-2); }
.trois li { display: flex; gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--trait-2); font-size: 16px; line-height: 1.45; color: var(--texte); }
.ch1 .suite { margin-top: 14px; font-size: 14px; color: var(--fumee); }
.trois b { flex: none; min-width: 9.6em; font: 500 12px/1.3 var(--titre); letter-spacing: .1em; text-transform: uppercase; color: var(--blanc); }

/* 22/11 (2) · l'appli en haut de page : une vraie capture (l'appli de la démo du 31/10, sur le dossier d'équipe vierge).
   Grand écran : en bas à droite, devant la forme qui a remonté. Téléphone : sous les boutons, avant la scène. */
.apercu { margin: 0; }
.apercu img { display: block; width: 100%; height: auto; border: 1px solid var(--trait-2); background: #0a0a0a;
  box-shadow: 0 28px 70px rgba(0,0,0,.7); }
.apercu figcaption { margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--fumee); }
@media (min-width: 961px) {
  .ch1 .apercu { position: absolute; right: var(--gout); bottom: calc(var(--u) * 2.2); width: min(40%, 520px); }
}
@media (max-width: 960px) {
  .ch1 .cadre { flex-direction: column; align-items: stretch; }
  .ch1 .apercu { margin-top: 30px; max-width: 36rem; }
}
@media (max-width: 720px) { .ch1 .ctas .btn { padding: 12px 18px; } }

/* écran étroit : le titre passe avant le décor ; la scène arrive dessous et se déplie pendant qu'on descend */
@media (max-width: 960px) {
  .scene { display: flex; flex-direction: column; }
  .ch1 { order: -1; }
  .decor + .chapitre { margin-top: 0; }
  .ch1 .cadre { padding-top: calc(var(--hdr) + 26px); padding-bottom: 30px; }
  .ch2 { margin-top: calc(-1 * var(--scene)); }
  .ch2 .cadre { padding-top: calc(var(--scene) + 30px); padding-bottom: 12vh; }
  /* les sept mots : du texte, pas des boutons */
  .faces { gap: 4px 0; }
  .faces li { border: 0; padding: 0; font: 500 12px/1.6 var(--titre); letter-spacing: .08em; color: var(--texte); }
  .faces li.amb { background: none; color: var(--ambre); }
  .faces li + li::before { content: "·"; margin: 0 10px; color: var(--fumee); }
}
@media (max-width: 420px) {
  .trois li { flex-direction: column; gap: 3px; padding: 8px 0; }
  .trois b { min-width: 0; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------------ le film */
.film { padding-top: calc(var(--u) * 3); }

/* ------------------------------------------------------------------ la preuve */
.preuve .sec-tete h2 { margin-top: 0; }
/* la même demande, deux réponses : celle de gauche se joue d'abord, celle de droite ensuite */
@media (min-width: 721px) {
  .duel .win + .win.joue .seq, .duel .win + .win.joue .tape { animation-delay: calc(var(--t, 0s) + 1.4s); }
}
/* téléphone : la demande tient sur plusieurs lignes, elle apparaît au lieu de se taper (sinon sa fin est coupée) */
@media (max-width: 720px) {
  .joue .tape { display: inline; overflow: visible; white-space: normal; animation: monte .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--t, 0s); }
}
.preuve .pont { display: block; margin-top: calc(var(--u) * 4); max-width: 50rem; }
.preuve .pont p { font-size: clamp(19px, 2.1vw, 28px); line-height: 1.38; color: var(--blanc); max-width: none; text-wrap: pretty; }
.preuve .pont .regles { margin-top: calc(var(--u) * 1.5); }

/* ------------------------------------------------------------------ 22/11 · la preuve : une vraie demande, deux réponses lisibles */
.preuve { padding-top: calc(var(--u) * 5); padding-bottom: calc(var(--u) * 3); }
.cmp-demande { max-width: 46rem; margin-bottom: calc(var(--u) * 1.6); padding: 2px 0 2px 16px; border-left: 2px solid var(--trait); font-size: clamp(17px, 1.5vw, 20px); color: var(--blanc); }
.cmp-demande span { display: block; margin-bottom: 6px; font-size: 14px; color: var(--fumee); }
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.cmp-col { margin: 0; padding: clamp(18px, 2.2vw, 28px); border: 1px solid var(--trait); background: var(--fond-2); }
.cmp-col figcaption { margin-bottom: 16px; font: 500 13px/1.2 var(--titre); letter-spacing: .1em; text-transform: uppercase; color: var(--fumee); }
.cmp-col blockquote p { margin-bottom: 10px; font-size: 16px; line-height: 1.6; }
.cmp-col blockquote p:last-child { margin-bottom: 0; }
.cmp-col.sans blockquote p { color: var(--fumee); }
.cmp-col.avec { border-color: var(--blanc); }
.cmp-col.avec figcaption, .cmp-col.avec blockquote p { color: var(--blanc); }
.cmp-col .coupe { color: var(--fumee); }
.cmp-change { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; margin-top: calc(var(--u) * 2); }
.cmp-change li { padding-top: 12px; border-top: 1px solid var(--trait); font-size: 15px; line-height: 1.5; color: var(--texte); }
.cmp-source { margin-top: calc(var(--u) * 1.6); font-size: 14px; color: var(--fumee); }
.cmp-source a { color: var(--blanc); text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 6px 0; }
@media (max-width: 720px) {
  .cmp, .cmp-change { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ 22/11 · ce qu'il fait : les trois fonctions sur un écran */
.fonctions { padding-top: calc(var(--u) * 3); }
.fonctions > .wrap > h2 { margin-bottom: calc(var(--u) * 2.2); }
.rangs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 2.6vw, 40px); }
.rang { display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(var(--u) * 1.4); align-content: start; }
.rang-txt { border-top: 3px solid var(--blanc); padding-top: calc(var(--u) * 1.2); }
.rang-txt h3 { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.2; margin-bottom: calc(var(--u) * .7); text-wrap: balance; }
.rang-txt p { font-size: 15.5px; color: var(--texte); }
.rang .mini { min-height: 0; padding: 18px; }
@media (max-width: 960px) {
  .rangs { grid-template-columns: minmax(0, 1fr); gap: calc(var(--u) * 2.6); max-width: 560px; }
}

/* ------------------------------------------------------------------ 22/11 · la signature : la porte de contact */
main .signature { min-height: 74vh; min-height: 74svh; }
.film .ecran, .film .film-tete { max-width: 980px; margin-left: auto; margin-right: auto; }
.preuve { padding-top: calc(var(--u) * 4); }
@media (max-width: 960px) {
  main .signature { min-height: 68vh; min-height: 68svh; }
  .preuve { padding-top: calc(var(--u) * 3); }
  .fonctions .rangs { gap: calc(var(--u) * 2); }
}
.signature .contact { margin-top: 18px; font-size: 15px; color: var(--fumee); }
.signature .contact a { color: var(--blanc); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ la signature : l'icosaèdre revient, refermé autour de vous */
.signature { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  /* avec le pied de page, elle remplit le dernier écran : le script recale la forme si le pied est plus haut que prévu */
  min-height: calc(100vh - 7.5rem); min-height: calc(100svh - 7.5rem); padding: calc(var(--hdr) + var(--u) * 2) 0 calc(var(--u) * 4.5); }
.decor-fin { position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(34% 30% at 50% 38%, rgba(244,244,242,.06), transparent 74%), var(--fond); }
.decor-fin .secours { position: absolute; left: 50%; top: 40%; width: min(64vw, 46vh); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .55; }
.signature .wrap { position: relative; z-index: 1; text-align: center; }
.signature h2 { font-size: clamp(26px, 4.2vw, 58px); line-height: 1.06; margin-bottom: calc(var(--u) * 2.2); text-wrap: balance; }
.signature .ctas { justify-content: center; }
.planche { position: relative; }

/* ------------------------------------------------------------------ moins d'animations */
.calme .fil i { animation: none; transform: none; }
.js.calme .bloc, .js.calme .bloc:not(.vu) { opacity: 1; transform: none; filter: none; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .fil i { animation: none; transform: none; }
  .js .bloc, .js .bloc:not(.vu) { opacity: 1; transform: none; filter: none; transition: none; }
}
