/*
VOICE   ludique, nocturne, fier de ses chiffres : la même voix que les stories générées.
IDEA    la page est l'atelier d'une story Instagram : un fond noir de nuit, un ciel flou en haut.
PICTURE l'éventail de vraies slides rendues en direct, puis le carrousel lui-même.
COLOUR  et TYPE : noir #0E0E11, citron #DDFF55 pour l'action, Figtree 800 pour les titres.
LAYOUT  titre + éventail, deux cartes d'étapes, une grande zone de dépôt, le carrousel plein cadre.
*/
:root {
  color-scheme: dark;
  --bg: #0e0e11;
  --card: #16161b;
  --card-2: #1d1d24;
  --ink: #f4f4f5;
  --muted: #9a9aa2;
  --line: rgba(255, 255, 255, 0.1);
  --lime: #ddff55;
  --lime-ink: #151a00;
  --pink: #ff9ccb;
  --radius: 22px;
}
:root[data-theme=light], :root[data-theme=dark] { color-scheme: dark; }
* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.55 Figtree, "Helvetica Neue", Arial, sans-serif;
  overflow-x: clip;
}
/* Ciel flou en haut de page, écho du fond des slides. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 70vh;
  z-index: -1;
  background:
    radial-gradient(30% 50% at 12% 30%, #4c4fd8 0, transparent 70%),
    radial-gradient(28% 45% at 38% 18%, #ee4fa0 0, transparent 70%),
    radial-gradient(30% 50% at 64% 30%, #e8502e 0, transparent 70%),
    radial-gradient(26% 40% at 88% 22%, #d9e7ec 0, transparent 70%),
    radial-gradient(60% 40% at 50% 70%, #bfe83a 0, transparent 70%);
  filter: blur(60px) saturate(1.1);
  opacity: 0.55;
  mask-image: linear-gradient(#000 35%, transparent 100%);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.band { padding: clamp(28px, 4vw, 64px) max(5vw, 16px); max-width: 1240px; margin-inline: auto; }
h1, h2, h3 { font-weight: 800; line-height: 1.05; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 24px; }
h3 { font-size: 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
b { font-weight: 700; color: #fff; }

.top { display: flex; align-items: center; gap: 12px; padding: 20px max(5vw, 16px); max-width: 1240px; margin-inline: auto; }
.chip { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #ff7a59, #e8457f); box-shadow: 0 6px 22px rgba(232, 69, 127, 0.45); }
.brand { font-weight: 800; font-size: 19px; }
.tag { margin-left: auto; color: var(--muted); font-size: 14px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; align-items: center; min-height: 560px; }
.lead { font-size: 19px; color: #d8d8dc; max-width: 34em; margin: 22px 0 28px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.privacy { color: var(--muted); font-size: 14px; margin-top: 18px; }
.fan { position: relative; height: 520px; }
.fan img {
  position: absolute; top: 50%; left: 50%; width: 236px; aspect-ratio: 9 / 16; border-radius: 18px;
  background: #1a1a20; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55); border: 1px solid var(--line);
  transition: transform 0.6s cubic-bezier(.2, .8, .2, 1);
}
.fan img:nth-child(1) { transform: translate(-112%, -48%) rotate(-9deg); }
.fan img:nth-child(2) { transform: translate(-50%, -54%); z-index: 2; }
.fan img:nth-child(3) { transform: translate(12%, -48%) rotate(9deg); }
.fan:hover img:nth-child(1) { transform: translate(-122%, -48%) rotate(-12deg); }
.fan:hover img:nth-child(3) { transform: translate(22%, -48%) rotate(12deg); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: rgba(255, 255, 255, 0.28); }
.btn.primary { background: var(--lime); color: var(--lime-ink); border-color: transparent; box-shadow: 0 8px 30px rgba(221, 255, 85, 0.25); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: progress; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

/* Étapes */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card ol { padding-left: 20px; margin: 16px 0; display: grid; gap: 8px; color: #d8d8dc; }
.num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); font-size: 17px; }
.opt { font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.note { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.note.center { text-align: center; max-width: 60ch; margin-inline: auto; }
.hint { color: #d8d8dc; font-size: 15px; }
/* Carte 1 : deux cas selon le type de compte. */
.paths { display: grid; gap: 12px; margin: 4px 0 0; }
.path { position: relative; padding: 16px 16px 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.path.team { border-color: rgba(221, 255, 85, 0.45); background: rgba(221, 255, 85, 0.05); }
.path p { margin: 6px 0 0; color: #e8e8ec; }
.path ol { margin: 10px 0 0; gap: 6px; font-size: 15px; }
.path-tag { display: inline-block; font-size: 13px; font-weight: 800; color: var(--muted); }
.path.team .path-tag { color: var(--lime); }
.tabs { display: flex; gap: 6px; margin: 16px 0 10px; }
.tabs button { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.tabs button[aria-selected=true] { color: var(--ink); background: var(--card-2); }
.cmd { display: flex; gap: 10px; align-items: stretch; background: #0b0b0e; border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 10px 16px; }
.cmd pre { margin: 0; flex: 1; overflow-x: auto; align-self: center; }
.cmd code { font: 500 13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #e4f7a6; white-space: pre; }

/* Zone de dépôt */
.drop {
  margin-top: 24px; border: 2px dashed rgba(221, 255, 85, 0.45); border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px) 20px; display: grid; justify-items: center; gap: 10px; text-align: center;
  background: radial-gradient(60% 120% at 50% 0%, rgba(221, 255, 85, 0.08), transparent 70%);
  transition: background 0.2s, border-color 0.2s;
}
.drop strong { font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; }
.drop .formats { color: var(--muted); font-size: 14px; }
.drop.over { border-color: var(--lime); background: rgba(221, 255, 85, 0.1); }
.drop-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.progress { width: min(520px, 100%); display: grid; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--lime); border-radius: inherit; transition: width 0.15s; }
.sources { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sources li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; color: #d8d8dc; }
.sources li b { color: var(--lime); }
.sources li.err b { color: #ff8a80; }
.manifest { margin-top: 18px; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid rgba(221, 255, 85, 0.45); }
.manifest p { color: #d8d8dc; margin: 10px 0 14px; max-width: 70ch; }
.manifest ol { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.manifest a { color: var(--lime); font-weight: 700; text-underline-offset: 3px; }
.manifest .file { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

/* Résultat */
.result-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 20px; }
.result-head h2 { margin: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 12px; }
.opts label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.opts input, .opts select {
  min-height: 44px; width: 150px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-size: 16px;
}
.viewer { position: relative; }
.carousel {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px max(calc(50% - 190px), 8px) 24px;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel figure { margin: 0; flex: none; scroll-snap-align: center; width: min(380px, 78vw); }
.carousel img {
  display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 22px; background: #16161b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); border: 1px solid var(--line);
}
.nav {
  position: absolute; top: calc(50% - 30px); z-index: 2; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(22, 22, 27, 0.85); color: var(--ink); font-size: 30px; line-height: 1; cursor: pointer;
  backdrop-filter: blur(8px);
}
.nav.prev { left: 4px; }
.nav.next { right: 4px; }
.counter { text-align: center; color: var(--muted); margin: 0 0 18px; font-size: 14px; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.status { text-align: center; min-height: 1.6em; color: var(--lime); margin-top: 14px; }
.status.error, .drop-status.error { color: #ff8a80; }
.drop-status { margin: 6px 0 0; min-height: 1.5em; color: var(--lime); font-weight: 600; max-width: 60ch; }

.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 32px max(5vw, 16px) 48px; }
.foot p { max-width: 80ch; margin: 0 auto 8px; }
.foot .legal { font-size: 12px; opacity: 0.8; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .fan { height: 380px; }
  .fan img { width: 170px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .tag { display: none; }
  .nav { display: none; }
  .opts input, .opts select { width: 130px; }
  .toolbar .btn { flex: 1 1 100%; }
}
