/* Valgent · landing page, prototype. Charte v3 : encre, porcelaine, cuivre, menthe, ardoise, brume.
   Le moteur (scrollcraft.css) n'est pas modifié : ce fichier thème ses jetons et stylise la page. */

@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("fonts/InstrumentSans-Regular.ttf") format("truetype"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-display: swap; src: url("fonts/InstrumentSans-Bold.ttf") format("truetype"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype"); }

:root {
  --v-encre: #0B1F24;
  --v-porcelaine: #F3F1EA;
  --v-cuivre: #D96F4B;
  --v-menthe: #9CC8B7;
  --v-ardoise: #526568;
  --v-brume: #D7E0DC;
  --v-tache: color-mix(in oklab, var(--v-brume) 58%, var(--v-encre));

  --sc-canvas: var(--v-encre);
  --sc-surface: #112A30;
  --sc-ink: var(--v-porcelaine);
  --sc-ink-soft: #B9C4C0;
  --sc-accent: var(--v-cuivre);
  --sc-accent-ink: var(--v-encre);
  --sc-font-display: "Instrument Sans", system-ui, sans-serif;
  --sc-font-text: "Instrument Sans", system-ui, sans-serif;
  --sc-font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --sc-shadow-color: 192 53% 4%;

  --hauteur-piste: 4.75rem;
}

body { letter-spacing: 0.002em; }

/* ------------------------------------------------------------ éléments -- */
.titre {
  font-family: var(--sc-font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: var(--sc-track-tight);
  text-wrap: balance;
  margin: 0;
}
.titre--ouverture { font-size: clamp(2rem, 1.1rem + 2.5vw, 3.4rem); max-width: 30ch; }
.titre--scene { font-size: clamp(1.8rem, 1.2rem + 2vw, 3.1rem); }
.titre--conviction { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 4.4rem); max-width: 14ch; }

.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: 0.7rem 1.2rem;
  border: 0; border-radius: var(--sc-r-sm);
  background: var(--v-cuivre); color: var(--v-encre);
  font: 700 var(--sc-t-sm)/1.1 var(--sc-font-text); letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: var(--sc-e1);
  transition: background-color var(--sc-d-fast) var(--sc-ease-out), transform 120ms var(--sc-ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .bouton:hover { background: color-mix(in oklab, var(--v-cuivre) 88%, var(--v-porcelaine)); }
}
.bouton:active { transform: scale(0.97); }
.bouton:focus-visible { outline: 2px solid var(--v-porcelaine); outline-offset: 3px; }

.evitement {
  position: fixed; left: var(--sc-gutter); top: 0.75rem; z-index: 80;
  padding: 0.6rem 0.9rem; border-radius: var(--sc-r-sm);
  background: var(--v-porcelaine); color: var(--v-encre);
  transform: translateY(-160%);
}
.evitement:focus-visible { transform: none; }

/* --------------------------------------------------- bande horaire (nav) -- */
.journee {
  position: fixed; inset: auto 0 0 0; z-index: var(--sc-z-chrome);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: clamp(0.9rem, 2.4vw, 2rem);
  padding: 0.75rem var(--sc-gutter) calc(0.75rem + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--v-encre) 96%, transparent);
  border-top: 1px solid color-mix(in oklab, var(--v-porcelaine) 10%, transparent);
  transform: translateY(110%);
  transition: transform var(--sc-d-slow) var(--sc-ease-out);
}
.journee--visible { transform: none; }
.journee__signe { width: 1.75rem; height: 1.75rem; }
.journee__jour { min-width: 0; }
.journee__piste {
  position: relative; height: 0.8rem; margin-top: 0.55rem;
  border-radius: 3px;
  background: color-mix(in oklab, var(--v-porcelaine) 8%, transparent);
}
.journee__coeur, .journee__tache, .journee__agents { position: absolute; display: block; }
.journee__coeur {
  inset: 0; border-radius: 3px; background: var(--v-cuivre);
  transform-origin: 0 50%; transform: scaleX(0.62);
}
.journee__tache {
  top: 0; bottom: 0; width: 14.8%; left: calc(18% + var(--i) * 16.4%);
  border-radius: 3px; background: var(--v-tache);
  opacity: 0; transform: translateY(60%);
}
.journee__agents {
  left: 0; right: 0; top: -0.45rem; height: 2px; border-radius: 2px;
  background: var(--v-menthe); transform-origin: 0 50%; transform: scaleX(0);
}
.journee__heures {
  display: flex; justify-content: space-between; gap: 0.5rem;
  margin: 0.45rem 0 0; padding: 0; list-style: none;
  font: 400 var(--sc-t-xs)/1.2 var(--sc-font-mono); letter-spacing: 0.03em;
}
.journee__heures a {
  display: inline-block; padding: 0.15rem 0; color: var(--sc-ink-soft); text-decoration: none;
  transition: color var(--sc-d-fast) var(--sc-ease-out);
}
.journee__heures a[aria-current] { color: var(--v-porcelaine); text-decoration: underline; text-decoration-color: var(--v-cuivre); text-underline-offset: 0.35em; }
@media (hover: hover) and (pointer: fine) { .journee__heures a:hover { color: var(--v-porcelaine); } }

/* ------------------------------------------------------ 1 · promesse ---- */
.aube__scene { background: var(--v-encre); }
.aube__plan { position: absolute; inset: 0; pointer-events: none; }
.aube__plan img { max-width: none; width: 100%; height: 100%; object-fit: cover; }
.aube__plan--fond img {
  object-position: 62% 45%;
  transform-origin: 62% 40%;
  transform: translate3d(0, calc(var(--sc-p, 0) * -2.5%), 0) scale(calc(1.09 - var(--sc-p, 0) * 0.06));
}
/* Dirigeante détourée, coupée par le bas du cadre (point d'appui), plus rapide que le fond. */
.aube__plan--sujet { z-index: 25; }
.aube__plan--sujet img {
  position: absolute; right: 0; bottom: 0;
  width: auto; height: 94%; object-fit: contain;
  transform-origin: 50% 100%;
  transform: translate3d(0, calc(var(--sc-p, 0) * -4vh), 0) scale(calc(1 + var(--sc-p, 0) * 0.04));
}
/* Écran d'ordinateur étroit (4:3, 3:2) : la dirigeante croiserait le titre ; elle passe sous le voile. */
/* Coin de table flou au premier plan : le plus rapide des trois plans. */
.aube__plan--premier { z-index: 30; }
.aube__plan--premier img {
  position: absolute; right: -1vw; bottom: -3vh;
  width: clamp(16rem, 34vw, 40rem); height: auto;
  transform-origin: 100% 100%;
  transform: translate3d(0, calc(var(--sc-p, 0) * -11vh), 0) scale(calc(1 + var(--sc-p, 0) * 0.08));
}
.aube__lumiere {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(60% 70% at 8% 30%, color-mix(in oklab, var(--v-cuivre) 38%, transparent), transparent 70%);
  mix-blend-mode: soft-light;
  opacity: calc(0.35 + var(--sc-p, 0) * 0.5);
}
.aube__voile {
  z-index: 2;
  /* Coin du moteur un peu plus dense : le fond d'aube garde un mur éclairé derrière le titre. */
  background: linear-gradient(to top right,
    color-mix(in oklab, var(--v-encre) 94%, transparent) 0%,
    color-mix(in oklab, var(--v-encre) 78%, transparent) 34%,
    color-mix(in oklab, var(--v-encre) 40%, transparent) 58%,
    transparent 78%);
}
.aube__marque { position: absolute; z-index: 40; top: clamp(1rem, 3vh, 2rem); left: var(--sc-gutter); display: block; width: clamp(8.5rem, 12vw, 11rem); }
.aube__copie { bottom: calc(var(--hauteur-piste) + clamp(1.5rem, 8vh, 5rem)); max-width: min(48rem, 88vw); }
.aube__texte { font-size: var(--sc-t-lg); line-height: 1.45; max-width: 36ch; margin: var(--sc-5) 0 var(--sc-6); color: var(--v-porcelaine); opacity: 0.88; }

/* ------------------------------------------------------ 2 · quotidien --- */
.quotidien__copie { bottom: calc(var(--hauteur-piste) + clamp(1.5rem, 7vh, 4rem)); max-width: min(34rem, 46vw); }
.taches { list-style: none; margin: var(--sc-5) 0 0; padding: 0; }
.taches li, .quotidien__chute {
  display: flex; justify-content: flex-end; align-items: baseline; gap: 0.7rem;
  font-size: var(--sc-t-lg); line-height: 1.35; margin: 0.55rem 0 0;
}
.taches__bloc { flex: none; width: 0.85rem; height: 0.55rem; border-radius: 2px; background: var(--v-tache); order: 2; transform: translateY(-0.1em); }
.taches__bloc--coeur { background: var(--v-cuivre); }
.quotidien__chute { margin-top: var(--sc-5); font-weight: 700; }

/* ------------------------------------------------------- 3 · bascule ---- */
.bascule__scene { background: var(--v-encre); }
.bascule__image { position: absolute; inset: 0; margin: 0; }
.bascule__image img { max-width: none; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.bascule__voile { z-index: 3; }
.bascule__silence {
  z-index: var(--sc-z-copy); max-width: min(38rem, 84vw);
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.3rem); line-height: 1.25; letter-spacing: var(--sc-track-snug);
  margin: 0;
}
.bascule__repere {
  position: absolute; z-index: var(--sc-z-copy); top: clamp(1.2rem, 5vh, 3rem); left: var(--sc-gutter); margin: 0;
  padding: 0.3rem 0.6rem; border-radius: var(--sc-r-sm);
  font: 400 var(--sc-t-xs)/1.2 var(--sc-font-mono); letter-spacing: var(--sc-track-wide); text-transform: uppercase;
  background: color-mix(in oklab, var(--v-encre) 82%, transparent); color: var(--v-porcelaine);
}
.bascule__repere--apres { color: var(--v-encre); background: var(--v-menthe); }
.bascule__copie { bottom: calc(var(--hauteur-piste) + clamp(1.5rem, 8vh, 5rem)); max-width: min(40rem, 80vw); }
.bascule__copie .sc-body { color: var(--v-porcelaine); font-size: var(--sc-t-lg); line-height: 1.45; margin-top: var(--sc-4); max-width: 42ch; }

/* ------------------------------------------------------- 4 · méthode ---- */
.methode {
  --sc-canvas: var(--v-porcelaine); --sc-ink: var(--v-encre); --sc-ink-soft: var(--v-ardoise);
  color: var(--sc-ink); background: var(--sc-canvas);
}
.methode :focus-visible { outline-color: var(--v-encre); }
.methode__scene { background: var(--v-porcelaine); }
.etapes {
  height: 100%; align-items: center; gap: clamp(2.5rem, 6vw, 6.5rem);
  padding: 0 var(--sc-gutter) var(--hauteur-piste);
  width: max-content;
}
.etapes__tete { width: min(30rem, 84vw); flex: none; }
.etapes__tete .sc-body { margin-top: var(--sc-5); font-size: var(--sc-t-lg); line-height: 1.45; }
.etape { width: min(24rem, 78vw); flex: none; padding-top: var(--sc-5); border-top: 1px solid color-mix(in oklab, var(--v-encre) 18%, transparent); }
.etape__trace { width: 100%; height: auto; margin-bottom: var(--sc-5); overflow: visible; }
.etape__trace path {
  fill: none; stroke: var(--v-ardoise); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - clamp(0, (var(--sc-p, 0) - var(--debut, 0)) / 0.2, 1));
}
.etape__trace circle { fill: var(--v-encre); }
.etape__trace--agents path { stroke: color-mix(in oklab, var(--v-menthe) 70%, var(--v-ardoise)); stroke-width: 3; }
.etape__trace .etape__choix, .etape__trace .etape__validation { fill: none; stroke: var(--v-cuivre); stroke-width: 3; }
.etape__nom { margin: 0; font-size: var(--sc-t-xl); font-weight: 700; letter-spacing: var(--sc-track-snug); }
.etape__texte { margin: var(--sc-3) 0 0; color: var(--v-ardoise); }
.etape__livrable { margin: var(--sc-5) 0 0; display: grid; gap: 0.2rem; font-weight: 700; }
.etape--questions { width: min(28rem, 84vw); }
.questions { margin: var(--sc-4) 0 0; }
.questions dt { font-weight: 700; margin-top: var(--sc-4); }
.questions dd { margin: 0.2rem 0 0; color: var(--v-ardoise); }

/* --------------------------------------------------------- 5 · soir ---- */
.soir { position: relative; min-height: 100svh; overflow: clip; display: grid; grid-template-rows: 1fr auto; background: var(--v-encre); isolation: isolate; }
.soir__fond { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 40%; z-index: -2; }
.soir__voile {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to right, color-mix(in oklab, var(--v-encre) 90%, transparent) 0%, color-mix(in oklab, var(--v-encre) 62%, transparent) 36%, color-mix(in oklab, var(--v-encre) 28%, transparent) 58%, color-mix(in oklab, var(--v-encre) 70%, transparent) 100%),
    linear-gradient(to top, color-mix(in oklab, var(--v-encre) 92%, transparent) 0%, transparent 40%);
}
.soir__grille {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; align-self: center;
  gap: clamp(2rem, 6vw, 7rem);
  width: 100%; max-width: var(--sc-maxw); margin-inline: auto;
  padding: clamp(2.5rem, 7vh, 5rem) var(--sc-gutter) var(--sc-5);
}
.soir__texte { margin: var(--sc-5) 0 0; font-size: var(--sc-t-lg); line-height: 1.45; max-width: 34ch; }
.soir__fait { margin: var(--sc-5) 0 0; font: 400 var(--sc-t-sm)/1.5 var(--sc-font-mono); color: var(--v-menthe); }

.formulaire {
  position: relative; padding: clamp(1.25rem, 2.4vw, 1.9rem);
  border-radius: var(--sc-r-md);
  background: color-mix(in oklab, var(--v-encre) 94%, var(--v-porcelaine));
  box-shadow: var(--sc-e3), var(--sc-edge);
}
.formulaire::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: var(--sc-r-md) var(--sc-r-md) 0 0; background: var(--v-cuivre); }
.formulaire__titre { margin: 0 0 var(--sc-4); font-size: var(--sc-t-xl); line-height: 1.15; letter-spacing: var(--sc-track-snug); }
.formulaire form { display: grid; gap: var(--sc-3); }
.formulaire__ligne { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-3); }
.champ { display: grid; gap: 0.3rem; font-size: var(--sc-t-sm); }
.champ small { color: var(--sc-ink-soft); font-size: inherit; }
.champ input, .champ textarea {
  width: 100%; padding: 0.55rem 0.75rem; border-radius: var(--sc-r-sm);
  border: 1px solid color-mix(in oklab, var(--v-porcelaine) 22%, transparent);
  background: color-mix(in oklab, var(--v-encre) 70%, black);
  color: var(--v-porcelaine); font-size: var(--sc-t-base);
  transition: border-color var(--sc-d-fast) var(--sc-ease-out);
}
.champ textarea { resize: vertical; min-height: 4.2rem; }
.champ input:focus-visible, .champ textarea:focus-visible { outline: 2px solid var(--v-cuivre); outline-offset: 1px; border-color: transparent; }
.formulaire__note { margin: 0; font-size: var(--sc-t-xs); color: var(--sc-ink-soft); }
.formulaire form .bouton { justify-self: start; }
.formulaire__statut { margin: 0; padding: 0.7rem 0.9rem; border-radius: var(--sc-r-sm); background: color-mix(in oklab, var(--v-menthe) 16%, transparent); font-size: var(--sc-t-sm); }
.formulaire__statut[data-etat="erreur"] { background: color-mix(in oklab, var(--v-cuivre) 22%, transparent); }
/* Champ piège pour les robots : hors écran, jamais atteint au clavier. */
.formulaire__piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.pied {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem;
  width: 100%; max-width: var(--sc-maxw); margin-inline: auto;
  padding: var(--sc-5) var(--sc-gutter) calc(var(--hauteur-piste) + var(--sc-5));
  border-top: 1px solid color-mix(in oklab, var(--v-porcelaine) 12%, transparent);
  font-size: var(--sc-t-xs); color: var(--sc-ink-soft);
}
.pied img { width: 1.5rem; height: 1.5rem; }
.pied p { margin: 0; }
.pied__liens { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-left: auto !important; }
.pied a, .formulaire__note a { color: inherit; text-underline-offset: 0.18em; }
.pied a:hover, .formulaire__note a:hover { color: var(--v-porcelaine); }

/* ------------------------------------------------------------ téléphone -- */
@media (max-width: 860px) {
  :root { --hauteur-piste: 4.4rem; }
  .journee { grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; }
  .journee__signe { display: none; }
  .journee__heures li:not(:has(a[aria-current])) { display: none; }
  .bouton--piste { min-height: 2.5rem; padding: 0.55rem 0.8rem; font-size: 0.8rem; }
  .aube__plan--fond img { object-position: 56% 30%; }
  /* Téléphone : la dirigeante passe sous le voile, la copie se lit par-dessus ; pas de premier plan. */
  .aube__plan--sujet { z-index: 1; }
  .aube__plan--sujet img { right: -14vw; height: 74%; }
  .aube__plan--premier { display: none; }
  /* Copie pleine largeur en bas : la densité du voile suit la copie, plus haute que la bande du moteur. */
  .aube__voile, .quotidien__voile, .bascule__voile {
    background: linear-gradient(to top,
      color-mix(in oklab, var(--v-encre) 95%, transparent) 0%,
      color-mix(in oklab, var(--v-encre) 86%, transparent) 40%,
      color-mix(in oklab, var(--v-encre) 52%, transparent) 64%,
      transparent 84%);
  }
  .bascule__silence { left: var(--sc-gutter); right: var(--sc-gutter); translate: 0 -50%; max-width: none; }
  .aube__copie { bottom: calc(var(--hauteur-piste) + 1.25rem); }
  .aube__texte { font-size: var(--sc-t-base); }
  .quotidien__copie { max-width: none; }
  .taches li, .quotidien__chute { justify-content: flex-start; font-size: var(--sc-t-base); }
  .taches__bloc { order: 0; }
  .bascule__image img { object-position: 70% 50%; }
  .soir__grille { grid-template-columns: 1fr; padding-top: 5rem; }
  .formulaire__ligne { grid-template-columns: 1fr; }
  .pied__liens { margin-left: 0 !important; }
}

/* ------------------------------------------- écran d'ordinateur 4:3 ou 3:2 -- */
/* Les images 16:9 y sont recadrées au centre : la dirigeante croiserait les textes. */
@media (min-width: 861px) and (max-aspect-ratio: 3/2) {
  .aube__plan--sujet { z-index: 1; }
  .aube__plan--sujet img { right: -12vw; height: 88%; }
  .aube__copie { max-width: min(40rem, 62vw); }
  /* Scène 2 : la vidéo glisse vers la gauche, la copie tombe sur le mur et le calendrier. */
  .quotidien .sc-stage :is(video[data-sc-scrub], .sc-stage__poster) { object-position: 90% 50%; }
  .quotidien__copie { max-width: min(30rem, 44vw); }
  .quotidien__voile, .bascule__voile { --v-voile-sens: to top left; }
  .quotidien__voile, .bascule__voile {
    background: linear-gradient(var(--v-voile-sens, to top right),
      color-mix(in oklab, var(--v-encre) 95%, transparent) 0%,
      color-mix(in oklab, var(--v-encre) 82%, transparent) 36%,
      color-mix(in oklab, var(--v-encre) 45%, transparent) 60%,
      transparent 80%);
  }
  .bascule__voile { --v-voile-sens: to top right; }
}

/* ------------------------------------------------------- mouvement réduit -- */
@media (prefers-reduced-motion: reduce) {
  .aube__plan img { transform: none !important; }
  .aube__lumiere { opacity: 0.6; }
  .etape__trace path { stroke-dashoffset: 0; }
  /* Sans balayage, l'après apparaît par fondu une fois le silence passé. */
  .bascule__image--apres { opacity: clamp(0, (var(--sc-p, 0) - 0.5) * 8, 1); }
  .journee, .journee__heures a, .bouton { transition: none; }
  /* Méthode : sans défilement latéral, le moteur laisse une zone à faire défiler horizontalement,
     invisible sur téléphone (seul le titre restait à l'écran). On déplie la rangée en sections
     ordinaires, sans épinglage ni longueur de défilement réservée. */
  .methode.sc-act--pinned { height: auto !important; }
  .methode [data-sc-stage] { position: relative; height: auto; overflow: visible; }
  .methode .etapes {
    width: auto; height: auto; max-width: var(--sc-maxw); margin-inline: auto;
    flex-wrap: wrap; align-items: flex-start; row-gap: clamp(2.5rem, 6vh, 4rem);
    padding: clamp(4rem, 12vh, 7rem) var(--sc-gutter) calc(var(--hauteur-piste) + clamp(3rem, 8vh, 5rem));
  }
}
