/* ==========================================================================
   Terideal × IA — charte de la démonstration
   Palette : rouge carmin Terideal (#9b172d) + bordeaux nuit + crème. Aucune
   ressource externe (polices système).
   ========================================================================== */

:root {
  --brand-nuit: #4a0e1a;  /* fonds header/hero — bordeaux nuit */
  --brand: #9b172d;       /* primaire — rouge carmin Terideal */
  --brand-vif: #c9364e;   /* accents, checks, pulse, curseur */
  --creme: #f6f5f0;       /* fond page */
  --encre: #241712;
  --carte: #ffffff;
  --trait: #e3e1d8;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;

  /* Dérivés — jamais en conflit avec la charte ci-dessus. */
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --brand-vif-dark: #e0637a; /* variante claire du vif — texte sur bordeaux nuit (eyebrow, h1 em) */
  --encre-doux: #575756;  /* = gris du logotype Terideal officiel */
  --encre-pale: #8f8d8a;
  --creme-fonce: #eeece4;
  --ambre: #9a6b12;
  --brique: #a1382a;
  --ombre-s: 0 1px 2px rgba(74, 14, 26, .06), 0 2px 6px rgba(74, 14, 26, .05);
  --ombre-m: 0 2px 4px rgba(74, 14, 26, .05), 0 10px 28px rgba(74, 14, 26, .08);
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --max: 1180px;
  --topbar-h: 62px;
}

/* --- Socle ---------------------------------------------------------------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1.0625rem;      /* 17px : lisible en projection */
  line-height: 1.62;
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-nuit); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--brand-nuit); color: var(--creme);
  padding: 12px 18px; border-radius: 0 0 var(--r-s) 0; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Libellés d'instrumentation : le fil conducteur typographique de la page. */
.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
}

/* --- Barre supérieure ----------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--topbar-h);
  padding: 0 clamp(16px, 4vw, 40px);
  background: var(--creme);
  border-bottom: 1px solid var(--trait);
}

/* Fond clair volontaire : le logo officiel (gris + rouge, sur transparent)
   n'est jamais recoloré ni filtré — il lui faut un fond clair pour rester lisible. */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 28px; width: auto; display: block; }
.brand-x {
  font-family: var(--mono);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
}

/* --- Badges --------------------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--trait);
  background: var(--creme-fonce);
  color: var(--brand);
  white-space: nowrap;
}
.badge.ok, .badge--ok { color: var(--brand); background: rgba(201, 54, 78, .12); border-color: rgba(201, 54, 78, .35); }
.badge.warn, .badge--warn { color: var(--ambre); background: rgba(154, 107, 18, .10); border-color: rgba(154, 107, 18, .30); }
.badge.alert, .badge--alert { color: var(--brique); background: rgba(161, 56, 42, .09); border-color: rgba(161, 56, 42, .28); }
.badge.cache, .badge--cache { color: var(--encre-doux); background: transparent; border-color: var(--trait); }

#live-badge {
  background: rgba(155, 23, 45, .10);
  border-color: rgba(155, 23, 45, .34);
  color: var(--brand);
  animation: live-glow 2.6s ease-out infinite;
}

.live-indicator { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.live-sub {
  margin: 0;
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--encre-doux);
  white-space: nowrap;
}

/* --- Boutons -------------------------------------------------------------- */

.btn-primary, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .005em;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn-primary:hover, .btn:hover { background: var(--brand-nuit); transform: translateY(-1px); box-shadow: var(--ombre-m); }
.btn-primary:active, .btn:active { transform: translateY(0); box-shadow: none; }
.btn-primary:disabled, .btn:disabled {
  background: var(--creme-fonce); color: var(--encre-pale); border-color: var(--trait);
  cursor: not-allowed; transform: none; box-shadow: none;
}

.btn-ghost {
  background: transparent; color: var(--brand); border-color: var(--trait);
  font-weight: 500;
}
.btn-ghost:hover { background: var(--creme-fonce); color: var(--brand-nuit); box-shadow: none; }

#hero .btn-primary { background: var(--brand-vif); color: var(--brand-nuit); font-weight: 650; }
#hero .btn-primary:hover { background: #d9526a; }

/* --- Hero ----------------------------------------------------------------- */

/* Une seule colonne de contenu pour toute la page : hero, démo, roadmap, pied. */
.hero-inner, #demo, .roadmap-inner, .site-foot p {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

#hero {
  position: relative;
  overflow: hidden;
  background: var(--brand-nuit);
  color: var(--creme);
  padding: clamp(70px, 12vh, 130px) 0 clamp(80px, 13vh, 140px);
  min-height: min(78vh, 760px);
  display: flex; align-items: center;
}

/* Courbes de niveau : le vocabulaire du terrain, en très basse intensité. */
#hero::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    repeating-radial-gradient(circle at 80% 116%, rgba(201, 54, 78, .13) 0 1px, transparent 1px 54px),
    radial-gradient(1100px 620px at 80% 118%, rgba(201, 54, 78, .13), transparent 72%);
  -webkit-mask-image: radial-gradient(950px 760px at 80% 112%, #000, transparent 78%);
  mask-image: radial-gradient(950px 760px at 80% 112%, #000, transparent 78%);
}

.hero-inner { position: relative; z-index: 1; width: 100%; }
#hero .eyebrow { color: var(--brand-vif-dark); }

#hero h1 {
  margin: 0 0 24px;
  max-width: 900px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.4vw, 4.7rem);
  line-height: 1.03;
  letter-spacing: -.02em;
}
#hero h1 em { font-style: italic; color: var(--brand-vif-dark); }

.lede {
  margin: 0 0 36px;
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.6;
  color: rgba(246, 245, 240, .82);
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }

/* --- Section démonstration ------------------------------------------------ */

#demo {
  padding-block: clamp(52px, 8vh, 88px) clamp(60px, 9vh, 100px);
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}

.section-head { margin-bottom: 30px; }
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--brand-nuit);
}

/* --- Onglets principaux (pills) ------------------------------------------- */

#tabs {
  display: flex; gap: 6px;
  padding: 6px;
  margin-bottom: 30px;
  background: rgba(36, 23, 18, .045);
  border: 1px solid var(--trait);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
}
#tabs::-webkit-scrollbar { display: none; }
#tabs:empty, #panel-tabs:empty, #timeline:empty, #panels:empty, #input-zone:empty { display: none; }

#tabs .tab, #tabs button {
  flex: 0 0 auto;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--encre-doux);
  font-size: .95rem;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
#tabs .tab:hover, #tabs button:hover { background: rgba(255, 255, 255, .8); color: var(--brand-nuit); }
#tabs .tab.active, #tabs button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--ombre-s);
}

/* --- Scène : entrée, lancement, timeline à gauche, résultats à droite ------ */

#stage { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }

@media (min-width: 1000px) {
  #stage {
    grid-template-columns: 268px minmax(0, 1fr);
    column-gap: 40px;
    align-items: start;
    grid-template-areas:
      "input  input"
      "run    run"
      "time   ptabs"
      "time   panels";
  }
  #input-zone { grid-area: input; }
  .run-row    { grid-area: run; }
  #timeline   { grid-area: time; position: sticky; top: calc(var(--topbar-h) + 20px); }
  #panel-tabs { grid-area: ptabs; }
  #panels     { grid-area: panels; }
  #doc-area   { grid-area: panels; } /* mode document : remplace les panneaux */

  /* Tant que la timeline est vide, pas de colonne fantôme. */
  #stage:has(#timeline:empty) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "input" "run" "ptabs" "panels";
  }
}

/* --- Zone d'entrée -------------------------------------------------------- */

#input-zone {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--r-m);
  padding: clamp(16px, 2.4vw, 24px);
  box-shadow: var(--ombre-s);
}
#input-zone > :first-child { margin-top: 0; }
#input-zone > :last-child { margin-bottom: 0; }
#input-zone p { margin: 0 0 10px; color: var(--encre-doux); }
#input-zone label {
  display: block; margin-bottom: 8px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand);
}
#input-zone textarea, #input-zone input[type="text"], #input-zone select {
  width: 100%;
  padding: 13px 15px;
  background: var(--creme);
  border: 1px solid var(--trait);
  border-radius: var(--r-s);
  font-size: .98rem;
  line-height: 1.55;
  resize: vertical;
}
#input-zone textarea { min-height: 130px; }
#input-zone textarea:focus, #input-zone input:focus { border-color: var(--brand-vif); }
#input-zone img { border-radius: var(--r-s); border: 1px solid var(--trait); }
#input-zone .doc, #input-zone .meta, #input-zone small {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; color: var(--encre-doux);
}

.file-drop {
  border: 1px dashed var(--trait);
  border-radius: var(--r-s);
  padding: 20px;
  text-align: center;
  color: var(--encre-doux);
}

/* --- Ligne de lancement --------------------------------------------------- */

.run-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }

#run-status {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--encre-doux);
}
#run-status.running, #run-status.is-running { color: var(--brand); }
#run-status.done, #run-status.is-done { color: var(--brand); }
#run-status.error, #run-status.is-error { color: var(--brique); }

/* --- Timeline verticale --------------------------------------------------- */

#timeline { list-style: none; margin: 0; padding: 2px 0; }

.step {
  position: relative;
  padding: 0 0 22px 42px;
  color: var(--encre-pale);
  font-size: .95rem;
  line-height: 1.45;
  transition: color .25s ease;
}
.step:last-child { padding-bottom: 0; }

/* Le trait : il se remplit de rouge derrière les étapes accomplies. */
.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 12px; top: 20px; bottom: -2px;
  width: 2px;
  background: var(--trait);
  transition: background .3s ease;
}
.step.done:not(:last-child)::before { background: var(--brand-vif); }

/* La pastille. */
.step::after {
  content: '';
  position: absolute;
  left: 3px; top: 2px;
  width: 19px; height: 19px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--carte);
  border: 2px solid var(--trait);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transition: background .25s ease, border-color .25s ease;
}
.step.done::after { content: '✓'; background: var(--brand-vif); border-color: var(--brand-vif); }
.step.active::after {
  border-color: var(--brand-vif);
  border-width: 3px;
  animation: pulse 1.7s ease-out infinite;
}

.step.done { color: var(--encre-doux); }
.step.active { color: var(--brand-nuit); font-weight: 600; }

.step strong, .step .step-label { display: block; font-weight: inherit; }
.step small, .step .meta, .step .step-meta, .step time {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--encre-pale);
  font-weight: 400;
}

/* Latence de réflexion du step 1 (DCE) mise en scène : trois points animés,
   jamais un chiffre de pages inventé. */
.ellipsis { display: inline-flex; gap: 3px; margin-left: 5px; vertical-align: middle; }
.ellipsis i {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .25;
  font-style: normal;
  animation: dot-blink 1.1s ease-in-out infinite;
}
.ellipsis i:nth-child(2) { animation-delay: .15s; }
.ellipsis i:nth-child(3) { animation-delay: .3s; }

/* --- Onglets de résultats (soulignés) ------------------------------------- */

#panel-tabs {
  display: flex; gap: 8px 26px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--trait);
  overflow-x: auto;
  scrollbar-width: none;
}
#panel-tabs::-webkit-scrollbar { display: none; }

#panel-tabs .tab, #panel-tabs button {
  flex: 0 0 auto;
  padding: 0 0 12px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--mono);
  font-size: .73rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--encre-pale);
  white-space: nowrap;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}
#panel-tabs .tab:hover, #panel-tabs button:hover { color: var(--brand); }
#panel-tabs .tab.active, #panel-tabs button.active { color: var(--brand-nuit); border-bottom-color: var(--brand-vif); }

/* --- Panneaux de résultats ------------------------------------------------ */

.panel { display: none; }
.panel.active {
  display: block;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--r-m);
  padding: clamp(20px, 3vw, 36px);
  box-shadow: var(--ombre-m);
  animation: fade-in .28s ease both;
}

.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.panel p { margin: 0 0 1em; }
.panel strong { color: var(--brand-nuit); font-weight: 650; }

.panel h1, .panel h2 {
  position: relative;
  margin: 1.9em 0 .9em;
  padding-bottom: .45em;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.42rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--brand);
}
.panel h1::after, .panel h2::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 42px; height: 2px;
  background: var(--brand-vif);
}
.panel h3 { margin: 1.6em 0 .5em; font-size: 1.04rem; font-weight: 700; color: var(--brand-nuit); }
.panel h4 {
  margin: 1.4em 0 .4em;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--encre-doux); font-weight: 500;
}

.panel ul, .panel ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.panel li { margin-bottom: .45em; }
.panel li::marker { color: var(--brand-vif); }

.panel blockquote {
  margin: 1.2em 0;
  padding: .2em 0 .2em 1.1em;
  border-left: 2px solid var(--brand-vif);
  font-family: var(--serif);
  font-style: italic;
  color: var(--encre-doux);
}

.panel hr { margin: 2em 0; border: 0; border-top: 1px solid var(--trait); }

.panel code {
  font-family: var(--mono); font-size: .86em;
  background: var(--creme); border: 1px solid var(--trait);
  border-radius: 5px; padding: .12em .38em;
}
.panel pre {
  overflow-x: auto;
  background: var(--creme); border: 1px solid var(--trait);
  border-radius: var(--r-s); padding: 16px;
  font-size: .86rem; line-height: 1.5;
}
.panel pre code { background: none; border: 0; padding: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.panel table {
  width: 100%;
  margin: 0 0 1.2em;
  border-collapse: collapse;
  font-size: .92rem;
  line-height: 1.45;
}
.panel th, .panel td {
  border: 1px solid var(--trait);
  padding: 10px 13px;
  text-align: left;
  vertical-align: top;
}
.panel th {
  background: var(--creme);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--brand);
}
.panel tbody tr:nth-child(even) { background: rgba(36, 23, 18, .018); }

/* Cartes imbriquées dans un panneau : à plat, pour ne pas empiler les ombres. */
.panel .card {
  background: var(--creme);
  border: 1px solid var(--trait);
  border-radius: var(--r-s);
  box-shadow: none;
  padding: 18px 20px;
}

/* Curseur de streaming ▊ — dessiné en CSS : aucune dépendance à une glyphe
   système. Règle de base d'abord (elle survit partout), puis affinage :has()
   qui pose le curseur en fin du dernier bloc rendu au lieu du bas du panneau. */
.streaming::after {
  content: '';
  display: inline-block;
  width: .42em;
  height: 1.02em;
  margin-left: .1em;
  vertical-align: -.17em;
  background: var(--brand-vif);
  border-radius: 1px;
  animation: caret 1.05s steps(1) infinite;
}
.streaming:has(*) > :last-child::after,
.streaming:has(*) > :is(ul, ol):last-child > li:last-child::after {
  content: '';
  display: inline-block;
  width: .42em;
  height: 1.02em;
  margin-left: .1em;
  vertical-align: -.17em;
  background: var(--brand-vif);
  border-radius: 1px;
  animation: caret 1.05s steps(1) infinite;
}
.streaming:has(*)::after,
.streaming:has(*) > :is(ul, ol, table, pre, blockquote):last-child::after {
  content: none;
}

/* --- Cartes (base) -------------------------------------------------------- */

.cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.card {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--r-m);
  padding: 24px;
  box-shadow: var(--ombre-s);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h3 { margin: 0 0 8px; font-size: 1.02rem; color: var(--brand-nuit); }
.card p { margin: 0; color: var(--encre-doux); }

/* --- Roadmap : bande sombre qui referme la page --------------------------- */

#roadmap {
  background: var(--brand-nuit);
  color: var(--creme);
  padding-block: clamp(60px, 10vh, 104px);
}
#roadmap .eyebrow { color: var(--brand-vif-dark); }

#roadmap h2 {
  margin: 0 0 40px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -.015em;
}

/* Le motif de la timeline revient ici : pastille + trait = une séquence. */
#roadmap .card {
  position: relative;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--r-m);
  box-shadow: none;
  padding: 26px 26px 28px;
}
#roadmap .card::before {
  content: '';
  position: absolute; left: 26px; top: 0;
  width: 34px; height: 2px;
  background: var(--brand-vif);
}
#roadmap .card h3 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--brand-vif-dark);
}
#roadmap .card p { color: rgba(246, 245, 240, .8); }

.roadmap-foot {
  margin: 34px 0 0;
  max-width: 60ch;
  color: rgba(246, 245, 240, .62);
  font-size: .98rem;
}

/* --- Pied de page --------------------------------------------------------- */

.site-foot {
  background: var(--brand-nuit);
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding-block: 22px 30px;
}
.site-foot p {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(246, 245, 240, .45);
}

/* --- Animations ----------------------------------------------------------- */

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(201, 54, 78, .55); }
  70%  { box-shadow: 0 0 0 11px rgba(201, 54, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 54, 78, 0); }
}
@keyframes live-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(155, 23, 45, .32); }
  55%      { box-shadow: 0 0 0 7px rgba(155, 23, 45, 0); }
}
@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes dot-blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hero-inner > * { animation: rise .58s cubic-bezier(.2, .7, .2, 1) both; }
.hero-inner > .eyebrow { animation-delay: .03s; }
.hero-inner > h1 { animation-delay: .09s; }
.hero-inner > .lede { animation-delay: .17s; }
.hero-inner > .hero-actions { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .streaming::after { opacity: 1; }
}

/* --- Petits écrans -------------------------------------------------------- */

@media (max-width: 700px) {
  body { font-size: 1rem; }
  #hero { min-height: auto; }
  #panel-tabs { gap: 18px; }
  .panel table { font-size: .84rem; }
  .panel th, .panel td { padding: 8px 10px; }
  .live-sub { display: none; }
}

/* --- Impression ----------------------------------------------------------- */

@media print {
  @page { margin: 16mm; }

  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.45; }
  .topbar, #tabs, #panel-tabs, .run-row, .skip-link, #start-demo, #timeline, .site-foot { display: none !important; }

  #hero, #roadmap {
    background: #fff !important;
    color: #000 !important;
    padding: 0 0 18pt !important;
    min-height: 0;
    border-bottom: 1px solid #000;
  }
  #hero::before, #roadmap .card::before { display: none; }
  #hero h1 { font-size: 24pt; }
  #hero h1 em, .eyebrow, #roadmap .eyebrow, #roadmap .card h3 { color: #000 !important; }
  .lede, #roadmap .card p, .roadmap-foot { color: #222 !important; }

  /* Une seule gouttière pour toutes les sections. */
  .hero-inner, #demo, .roadmap-inner, .site-foot p { max-width: none; padding-inline: 0; }
  #demo { padding-block: 18pt 0; }
  #stage { display: block; }

  .panel { display: block !important; box-shadow: none; border: 0; padding: 0; margin-bottom: 18pt; }
  .panel.active { box-shadow: none; border: 0; padding: 0; animation: none; }
  .panel h2, .panel h3, .panel h4 { break-after: avoid; page-break-after: avoid; color: #000 !important; }
  .panel table, .panel pre, .card { break-inside: avoid; page-break-inside: avoid; }
  .panel h1::after, .panel h2::after { background: #000; }
  .panel th { background: #f0f0f0 !important; color: #000 !important; }

  .card, #roadmap .card { background: #fff !important; border: 1px solid #999 !important; box-shadow: none; }
  .streaming::after { display: none; }
  .streaming:has(*) > :last-child::after,
  .streaming:has(*) > :is(ul, ol):last-child > li:last-child::after { display: none; }
}

/* --- Description du flux + carte dossier (démo sans upload) ----------------- */

.flux-desc {
  margin: 0 0 14px;
  padding: 12px 16px;
  background: var(--creme);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  font-size: .95rem;
  line-height: 1.55;
  color: var(--encre);
}
.flux-desc strong { color: var(--brand-nuit); }

.dossier-card {
  padding: 18px 20px;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--r-m);
  box-shadow: var(--ombre-s);
}
.dossier-kicker {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}
.dossier-title {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.32rem;
  line-height: 1.25;
  color: var(--brand-nuit);
}
.dossier-sub { margin: 0 0 12px; font-size: .88rem; color: var(--encre-doux); }
.dossier-pieces { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dossier-pieces li {
  padding: 4px 12px;
  background: var(--creme);
  border: 1px solid var(--trait);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--encre-doux);
}

/* --- Bouton voix off ------------------------------------------------------- */

.flux-desc { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.flux-desc-text { margin: 0; }
.audio-btn {
  flex: none;
  margin-top: 2px;
  padding: 7px 14px;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background: var(--carte);
  color: var(--brand);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.audio-btn:hover { background: var(--creme-fonce); color: var(--brand-nuit); }
.audio-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.dossier-link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid rgba(155, 23, 45, .35);
  padding-bottom: 1px;
}
.dossier-link:hover { color: var(--brand-nuit); border-bottom-color: var(--brand-nuit); }
