/* =========================================================================
   AI Desktop Studio — site de présentation

   La palette est RECOPIÉE de `src/renderer/src/index.css`, qui fait foi, et non
   échantillonnée dans les captures : une capture est compressée, et les valeurs
   relevées ainsi avaient dérivé de l'accent réel de 0,01 de luminance.
   ========================================================================= */

:root {
  /* Couleur — jetons de l'application, valeur pour valeur */
  --void:    #0C0D0F;   /* fond de page, sous le noir des panneaux — propre au site */
  --panel:   #191a1c;   /* --color-panel : surface de panneau */
  --raise:   #202124;   /* --color-surface : au-dessus d'un panneau, onglet actif */
  --edge:    #34363a;   /* --color-border : filets, bordures */
  --line:    #3c3f44;   /* --color-elevated : filet appuyé, bordure au survol */
  --accent:  #346ef2;   /* --color-accent : pincé entre trois seuils WCAG, ne pas ajuster */
  --lift:    #6193f3;   /* --color-accent-ink : l'accent lisible comme du texte */
  --sink:    #2a58c2;   /* --color-accent-hover : le survol se prend au jeton, pas à l'alpha */
  --bone:    #dfe1e5;   /* --color-text */
  --mist:    #91959b;   /* --color-muted */
  /* Texte tertiaire — les micro-libellés en capitales. Il remplace quatre gris écrits en
     dur (var(--dim), var(--dim), var(--dim), var(--dim)) dont TROIS passaient sous 4,5:1 sur le fond
     de page, pour du texte de 11 px. Mesuré ici : 5,92 sur --void, 5,30 sur --panel. */
  --dim:     #8A8E96;
  --ok:      #57a773;   /* --color-success : le voyant de version */
  --on-fill: #ffffff;   /* --color-accent-content : ce qui s'écrit SUR l'accent */

  /* Type */
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Chrome */
  --bar-h: 52px;
  --status-h: 30px;
  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1320px;

  --ease: cubic-bezier(.16, .84, .27, 1);
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
/* « clip » ne crée pas de conteneur de défilement : indispensable pour que
   position:sticky continue de fonctionner dans la scène épinglée. */
@supports (overflow: clip) { html { overflow-x: clip; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--on-fill); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-fill);
  padding: 10px 16px; border-radius: 6px;
  font-family: var(--mono); font-size: 12px;
  transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------- moteur */
/* Tout ce qui bouge est piloté en JavaScript, image par image.
   Sans JS, rien n'est masqué : la page reste lisible telle quelle. */

.js [data-fx]:not([data-split]):not([data-still]) { opacity: 0; }

/* will-change réservé aux gros calques : en mettre partout coûte plus
   cher que ça ne rapporte. */
.frame img, .stage__frame, .hero .wrap, .sw > i { will-change: transform; }

.sw {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .14em;
  margin-bottom: -.14em;
}
.sw > i { display: inline-block; font-style: normal; }
.js [data-split] .sw > i { transform: translate3d(0, 105%, 0); }

/* état de départ posé en CSS : évite le sursaut à la première image */
.frame img[data-depth] { transform: scale(1.115); }

@media (min-width: 861px) {
  .js .stage__frame { transform: scale(.60); border-radius: 30px; }
  .js .stage__frame > img { transform: scale(1.10); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #veil { opacity: 1; }
  .js [data-fx] { opacity: 1 !important; transform: none !important; }
  .js .stage__frame, .js .stage__frame > img { transform: none !important; }
  .js [data-split] .sw > i { transform: none !important; }
  .frame img { transform: none !important; }
}

/* --------------------------------------------------------------- typo */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: 'wdth' 112;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mist);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: ''; width: 22px; height: 1px; background: var(--accent); flex: none;
  transform-origin: 0 50%;
}
.js .eyebrow::before { transform: scaleX(0); transition: transform .9s var(--ease) .12s; }
.js .eyebrow.is-in::before { transform: scaleX(1); }

.lede { color: var(--mist); font-size: 1.05rem; max-width: 52ch; margin: 22px 0 0; }

/* ------------------------------------------------- barre de titre / menu */

.app-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 18px;
  padding-inline: 16px;
  background: rgba(14, 15, 17, .82);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--edge);
}

.lights { display: flex; gap: 7px; flex: none; padding-left: 4px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--edge); }
.lights i:first-child { background: var(--line); }

.tabs {
  display: flex; align-items: center; gap: 2px;
  flex: 1 1 auto; min-width: 0;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none; scroll-snap-align: center;
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 13px; border-radius: 7px;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--mist); white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.tab:hover { color: var(--bone); background: rgba(255,255,255,.05); }
.tab[aria-current='true'] {
  color: var(--bone); background: var(--raise);
  box-shadow: inset 0 0 0 1px var(--edge);
}
.tab svg { width: 14px; height: 14px; opacity: .8; flex: none; }
.tab[aria-current='true'] svg { color: var(--accent); opacity: 1; }

.bar-right { display: flex; align-items: center; gap: 8px; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 13px; border-radius: 7px;
  border: 1px solid var(--edge);
  font-family: var(--mono); font-size: 12px; color: var(--mist);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.chip:hover { color: var(--bone); border-color: var(--line); }
.chip--build { pointer-events: none; }
.chip--build .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15%, transparent);
}
.chip--cta { background: var(--accent); border-color: var(--accent); color: var(--on-fill); font-weight: 500; }
.chip--cta:hover { background: var(--lift); border-color: var(--lift); color: var(--on-fill); }

@media (max-width: 1180px) { .bar-right .chip--nav { display: none; } }
@media (max-width: 720px)  { .lights { display: none; } .bar-right .chip--build { display: none; } }

/* ------------------------------------------------------- barre de statut */

.status-bar {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  height: var(--status-h);
  display: flex; align-items: center; gap: 16px;
  padding-inline: 16px;
  background: rgba(14, 15, 17, .9);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--edge);
  font-family: var(--mono); font-size: 11px; color: var(--mist);
}
.status-bar b { font-weight: 400; color: var(--dim); }
.status-bar .sp { flex: 1 1 auto; }
.status-bar .tc { color: var(--bone); letter-spacing: .04em; }
.status-bar .cur { color: var(--accent); }
@media (max-width: 620px) { .status-bar .hide-s { display: none; } }

.progress {
  position: fixed; inset: auto 0 0 0; z-index: 61;
  height: 2px; background: var(--accent);
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------------------------------------------------------------- héros */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: var(--bar-h); padding-bottom: 90px;
  overflow: hidden;
}

/* le canevas ne défile pas : il tient tout le fond de la page */
#scene {
  position: fixed; inset: 0; z-index: 1;
  width: 100%; height: 100%; display: block;
  pointer-events: none;
}

/* voile : creuse le centre pour que le texte passe devant les particules */
#veil {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0;   /* nul pendant le héros, monté au scroll par le moteur */
  background:
    radial-gradient(ellipse 58% 48% at 50% 46%, rgba(12,13,15,.6), rgba(12,13,15,0) 72%),
    linear-gradient(to bottom, rgba(12,13,15,.4), rgba(12,13,15,0) 18%, rgba(12,13,15,0) 80%, rgba(12,13,15,.5));
}

main, .footer { position: relative; z-index: 2; }

.hero .wrap { position: relative; z-index: 2; will-change: transform, opacity; }

.brand-mark { display: inline-flex; flex-shrink: 0; align-items: center; }
.brand-mark img { width: 36px; height: 36px; }
#halo { position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(ellipse 40% 55% at var(--halo-x, 50%) var(--halo-y, 50%), rgba(52,110,242,.28), transparent 80%); }
.hero .wrap { margin-left: auto; margin-right: auto; }
.hero h1 { max-width: 68%; }

.hero h1 {
  font-size: clamp(3.4rem, 8.5vw, 6.8rem);
  font-weight: 700;
  font-variation-settings: 'wdth' 122;
  letter-spacing: -0.045em;
  line-height: .9;
  margin: 18px 0 0;
}
.hero h1 > span { display: block; }
.hero h1 .l2 { color: var(--accent); font-weight: 300; }

.hero .lede { font-size: clamp(1rem, 1.5vw, 1.22rem); max-width: 44ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: 9px;
  font-family: var(--mono); font-size: 13px;
  border: 1px solid var(--edge); color: var(--bone);
  background: rgba(25, 26, 28, .65);
  backdrop-filter: blur(8px);
  transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); border-color: var(--line); background: var(--raise); }
.btn--fill { background: var(--accent); border-color: var(--accent); color: var(--on-fill); font-weight: 500; }
.btn--fill:hover { background: var(--lift); border-color: var(--lift); }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  margin-top: 52px;
  font-family: var(--mono); font-size: 11.5px; color: var(--dim); letter-spacing: .04em;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--edge); }

@media (max-width: 999px) {
  .hero { align-items: flex-start; padding-top: calc(var(--bar-h) + 54px); padding-bottom: 80px; min-height: 900px; }
  .hero h1 { max-width: 100%; }
  .hero .lede { max-width: 32ch; }
  .hero-meta { max-width: 100%; gap: 12px; }
  .hero-actions { margin-top: 28px; }
}


/* --------------------------------------------------------------- panneau */

.panel {
  position: relative;
  padding-block: clamp(100px, 12vw, 190px);
  scroll-margin-top: calc(var(--bar-h) + 8px);
}
.panel + .panel { border-top: 1px solid var(--edge); }
.panel__head { max-width: 62ch; }
.panel__head h2 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); }

/* ----------------------------------------------- scène épinglée (accueil) */

.stage { position: relative; height: 190vh; margin-top: clamp(40px, 6vw, 80px); }

.stage__pin {
  position: sticky;
  top: var(--bar-h);
  height: calc(100svh - var(--bar-h));
  display: grid; place-items: center;
}

.stage__frame {
  width: min(100%, calc((100svh - 190px) * 1.594));
  transform-origin: 50% 50%;
}


@media (max-width: 860px) {
  .stage { height: auto; margin-top: 40px; }
  .stage__pin { position: static; height: auto; display: block; }
  .stage__frame { width: 100%; }
}

/* ------------------------------------------------------------- cadre */

.frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  box-shadow:
    0 1px 0 rgba(255,255,255,.05) inset,
    0 40px 90px -34px rgba(0,0,0,.95),
    0 0 0 1px var(--edge);
}
.frame img { width: 100%; }

.frame--glow::before {
  content: '';
  position: absolute; inset: -1px; border-radius: inherit;
  background: linear-gradient(155deg, rgba(67,109,234,.55), transparent 46%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px; pointer-events: none; z-index: 2;
}

/* --------------------------------------------------------------- specs */

.specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(60px, 8vw, 110px);
  background: var(--edge);
  border: 1px solid var(--edge);
  border-radius: 12px;
  overflow: hidden;
}
@media (max-width: 999px) { .specs { grid-template-columns: minmax(0, 1fr); } }
.spec { background: var(--panel); padding: 30px 28px 34px; }
.spec dt {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.spec dd { margin: 0; color: var(--mist); font-size: .95rem; }
.spec dd b {
  display: block;
  font-family: var(--display); font-variation-settings: 'wdth' 108;
  font-weight: 500; font-size: 1.28rem; color: var(--bone);
  letter-spacing: -0.01em; margin-bottom: 8px;
}

/* ------------------------------------------------------ sections ateliers */

.mode {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.mode--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); }
.mode--flip .mode__text { order: 2; }
.mode--flip .mode__shot { order: 1; }

.mode__title { font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-variation-settings: 'wdth' 118; font-weight: 700; }

.mode__list { list-style: none; margin: 34px 0 0; padding: 0; border-top: 1px solid var(--edge); }
.mode__list li {
  display: flex; gap: 16px; align-items: baseline;
  padding: 13px 0; border-bottom: 1px solid var(--edge);
  font-size: .92rem; color: var(--mist);
}
.mode__list b {
  flex: none; width: 96px;
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  letter-spacing: .06em; text-transform: uppercase; color: var(--dim);
}

.mode__shot { margin: 0; position: relative; }

.chipset { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chipset span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  color: var(--dim); border: 1px solid var(--edge); border-radius: 5px; padding: 4px 9px;
}

@media (max-width: 480px) {
  .mode__list li { flex-direction: column; gap: 6px; }
  .mode__list b { width: auto; }
}
@media (max-width: 940px) {
  .mode, .mode--flip { grid-template-columns: minmax(0, 1fr); }
  .mode > * { min-width: 0; }
  .mode .frame img[data-depth] { transform: none; }
  .mode--flip .mode__text { order: 1; }
  .mode--flip .mode__shot { order: 2; }
}

/* -------------------------------------------------------------- bandeau */

.ticker {
  position: relative;
  border-block: 1px solid var(--edge);
  padding-block: 17px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker__row { display: flex; width: max-content; will-change: transform; }
.ticker__set { display: flex; }
.ticker__set span {
  font-family: var(--mono); font-size: 11px; letter-spacing: .17em;
  text-transform: uppercase; color: var(--dim); white-space: nowrap;
  display: inline-flex; align-items: center;
}
.ticker__set span::after {
  content: ''; width: 3px; height: 3px; border-radius: 50%;
  background: var(--accent); opacity: .5; margin: 0 26px;
}
