/* Brand DNA · système de design v3. Un seul fichier, un seul thème : sombre, façon Trendtrack.
   Grille de 8 px, Geist partout, Geist Mono pour les noms de fichiers, un accent orange, une couleur par état. */
:root {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 40px; --space-8: 64px;
  --radius-sm: 10px; --radius: 16px; --radius-lg: 20px; --radius-btn: 11px; --pill: 999px;
  --text-xs: 12px;   /* label */
  --text-sm: 13px;   /* texte secondaire */
  --text-base: 15px; /* texte */
  --text-md: 17px;   /* titre 3 */
  --text-lg: 20px;   /* titre 2 */
  --text-xl: 28px;   /* titre 1 */
  --text-hero: 40px; /* le bonjour de l'accueil */
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --menu-w: 104px; --content-w: 1480px;
  --control-h: 40px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* L'accent : l'orange Trendtrack, le même dans les deux thèmes. Texte sombre dessus (le blanc ne contraste pas assez). */
  --accent: #f97316; --accent-ink: #0b0b0d; --accent-hover: #fb8a3c;
}
/* ---- Thème sombre (par défaut) : fond presque noir, surfaces un cran plus claires, bordures fines, texte clair. */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b; --surface: #121214; --surface-2: #1a1a1e; --surface-3: #222227;
  --line: #26262b; --line-strong: #36363d;
  --ink: #eeeef0; --ink-2: #c2c2c8; --ink-3: #9a9aa3; --ink-inverse: #0b0b0d;
  --accent-text: #f97316; --accent-soft: #2a1a0e; --accent-line: #5a3417;
  --halo: rgba(249, 115, 22, .16); --overlay: rgba(9, 9, 11, .88);
  --placeholder: #6e6e78; --media: #000;
  /* Une couleur par état : à monter = orange, en relecture = bleu, en ligne = vert, à refaire = rouge. Fond teinté sombre, texte clair. */
  --todo-bg: #3a2410; --todo-ink: #fdba74; --todo: #f97316;
  --review-bg: #15233f; --review-ink: #93c5fd; --review: #3b82f6; --review-line: #22407a;
  --ok-bg: #0f2e1c; --ok-ink: #4ade80; --ok: #22c55e; --ok-line: #1d5a35;
  --bad-bg: #3b1414; --bad-ink: #fca5a5; --bad: #ef4444; --bad-line: #5b2222; --bad-hover: #4a1a1a;
  --neutral-bg: #2a2a30; --neutral-ink: #d4d4da;
  --violet: #8b5cf6;
}
/* ---- Thème clair : le même langage que Trendtrack en clair. Fond #FAFAFA, surfaces blanches, bordures #E6E6EA, texte #09090B. */
[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa; --surface: #ffffff; --surface-2: #f2f2f5; --surface-3: #e9e9ed;
  --line: #e6e6ea; --line-strong: #d4d4da;
  --ink: #09090b; --ink-2: #4b4b52; --ink-3: #6b6b74; --ink-inverse: #ffffff;
  --accent-text: #c2410c; --accent-soft: #fff1e6; --accent-line: #fdba74;
  --halo: rgba(249, 115, 22, .12); --overlay: rgba(250, 250, 250, .9);
  --placeholder: #9a9aa3; --media: #111;
  --todo-bg: #ffedd5; --todo-ink: #9a3412; --todo: #f97316;
  --review-bg: #dbeafe; --review-ink: #1e40af; --review: #3b82f6; --review-line: #bfdbfe;
  --ok-bg: #dcfce7; --ok-ink: #166534; --ok: #22c55e; --ok-line: #bbf7d0;
  --bad-bg: #fee2e2; --bad-ink: #991b1b; --bad: #ef4444; --bad-line: #fecaca; --bad-hover: #fecaca;
  --neutral-bg: #eeeef1; --neutral-ink: #3f3f46;
  --violet: #7c3aed;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--text-base); line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; transition: background .2s var(--ease), color .2s var(--ease); }
a { color: var(--accent-text); text-decoration: none; transition: color .15s var(--ease); }
a:hover { text-decoration: underline; }
input, select, textarea, button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding-left: 20px; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; color: var(--ink); }
video, img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---- Coquille : barre latérale étroite à gauche (icône, libellé dessous), contenu à droite, halo chaud en haut */
.shell { min-height: 100vh; display: flex; }
.menu { width: var(--menu-w); flex: 0 0 var(--menu-w); background: var(--bg); border-right: 1px solid var(--line); padding: var(--space-4) var(--space-2); display: flex; flex-direction: column; gap: var(--space-1); position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu .brand { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-2) 0 var(--space-4); text-align: center; }
.menu .brand b { display: block; font-size: var(--text-xs); font-weight: 600; line-height: 1.2; letter-spacing: .02em; }
.menu .brand span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; line-height: 1.3; overflow-wrap: anywhere; }
.menu .item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 60px; padding: var(--space-2) var(--space-1); border-radius: var(--radius-sm); font-size: 11px; font-weight: 500; line-height: 1.2; text-align: center; color: var(--ink-3); position: relative; transition: background .15s var(--ease), color .15s var(--ease); }
.menu .item svg { width: 20px; height: 20px; flex: 0 0 20px; }
.menu .item:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.menu .item:active { transform: scale(.97); }
.menu .item.on { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.menu .item.on::before { content: ""; position: absolute; left: -8px; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: var(--accent); }
.menu .item .count { position: absolute; top: 6px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.menu .item .count.zero { display: none; }
.menu .group { margin-top: var(--space-4); padding: var(--space-2) var(--space-1) var(--space-1); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); text-align: center; border-top: 1px solid var(--line); }
.menu .group-field { padding: 0 0 var(--space-2); }
.menu .group-field select { height: 32px; font-size: var(--text-xs); padding: 0 24px 0 var(--space-2); background-position: right 8px center; }
.menu details.more { border: 0; }
.menu details.more > summary { min-height: 0; padding: var(--space-2) var(--space-1); justify-content: center; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); text-align: center; border-radius: var(--radius-sm); }
.menu details.more > summary::after { display: none; }
.menu details.more > summary:hover { color: var(--ink); background: var(--surface-2); }
.menu details.more > .nav-more { display: flex; flex-direction: column; gap: var(--space-1); }
.menu .foot { margin-top: auto; padding: var(--space-3) 0 0; font-size: 11px; color: var(--ink-3); line-height: 1.4; display: flex; flex-direction: column; gap: var(--space-2); text-align: center; border-top: 1px solid var(--line); }
.menu .foot a { color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--space-2) 0; border-radius: var(--radius-sm); }
.menu .foot a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.menu .foot a svg { width: 18px; height: 18px; }
.menu form.theme { margin: 0; }
.menu button.item { width: 100%; background: none; border: 0; cursor: pointer; font-family: inherit; }
.menu button.item svg { width: 20px; height: 20px; }
main { flex: 1 1 auto; min-width: 0; padding: var(--space-6) var(--space-7) var(--space-8); position: relative; }
main::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 420px; background: radial-gradient(60% 70% at 50% -10%, var(--halo), transparent 70%); pointer-events: none; }
.content { position: relative; max-width: var(--content-w); margin: 0; display: flex; flex-direction: column; gap: var(--space-6); }
.content.narrow { max-width: 640px; margin-left: 0; }

/* ---- Titres et textes */
h1 { font-size: var(--text-xl); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: var(--text-lg); font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }
h3 { font-size: var(--text-md); font-weight: 500; line-height: 1.3; }
.head { display: flex; flex-direction: column; gap: var(--space-2); }
.head .over { font-size: var(--text-sm); color: var(--ink-3); }
.lead { color: var(--ink-2); max-width: 64ch; }
.sm { font-size: var(--text-sm); color: var(--ink-3); }
.label, label { display: block; font-size: var(--text-xs); font-weight: 500; color: var(--ink-3); letter-spacing: .01em; }
.hint { font-size: var(--text-sm); color: var(--ink-3); }
.pt { font-size: var(--text-md); line-height: 1.4; }
.big { font-size: var(--text-xl); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.forbidden { color: var(--bad-ink); font-weight: 600; }
.crumb { font-size: var(--text-sm); color: var(--ink-3); }
.crumb a { color: var(--ink-2); }
/* L'accueil : un grand bonjour centré, puis la prochaine action. */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: var(--space-5) 0 var(--space-2); }
.hero h1 { font-size: var(--text-hero); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.hero .lead { max-width: 56ch; }

/* ---- Blocs */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); transition: border-color .15s var(--ease); }
.card.tight { padding: 0; gap: 0; overflow: hidden; }
.card.tight.table-wrap { overflow-x: auto; }
.card.bad { border-color: var(--bad-line); border-left: 3px solid var(--bad); }
.section { display: flex; flex-direction: column; gap: var(--space-4); }
.section > h2, .section > h3 { padding: 0 2px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.row { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: var(--space-2); }
.list { display: flex; flex-direction: column; }
.list > * { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-height: 52px; padding: var(--space-2) var(--space-4); border-top: 1px solid var(--line); }
.list > *:first-child { border-top: 0; }
.list .grow { flex: 1 1 200px; min-width: 0; }
.list a.rowlink { color: var(--ink); transition: background .15s var(--ease); }
.list a.rowlink:hover { background: var(--surface-2); text-decoration: none; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: var(--space-2) var(--space-4); align-items: baseline; align-content: start; }
.kv dt { font-size: var(--text-sm); color: var(--ink-3); }
.kv dd { margin: 0; }
.empty { padding: var(--space-5); text-align: center; color: var(--ink-3); display: flex; flex-direction: column; gap: var(--space-3); align-items: center; }
.flash { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok-ink); font-weight: 500; border: 1px solid var(--ok-line); }
.flash.err { background: var(--bad-bg); color: var(--bad-ink); border-color: var(--bad-line); }
.help { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info-ink); font-size: var(--text-sm); border: 1px solid var(--review-line); }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: var(--space-2); list-style: none; padding: 0; }
.steps li { counter-increment: s; display: flex; gap: var(--space-3); }
.steps li::before { content: counter(s); flex: 0 0 24px; height: 24px; border-radius: 12px; background: var(--neutral-bg); color: var(--neutral-ink); font-size: var(--text-xs); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.thumb { width: 72px; height: 128px; flex: 0 0 72px; border-radius: var(--radius-sm); background: var(--surface-3); overflow: hidden; border: 1px solid var(--line); }
.thumb video, .thumb img { width: 100%; height: 100%; object-fit: cover; }
.player { width: 100%; max-width: 320px; aspect-ratio: 9 / 16; border-radius: var(--radius-sm); background: var(--media); border: 1px solid var(--line); }
.player.wide { max-width: 100%; aspect-ratio: auto; }
details { border-top: 1px solid var(--line); }
details:first-of-type { border-top: 0; }
details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 52px; padding: var(--space-2) var(--space-4); font-weight: 600; transition: background .15s var(--ease); }
details > summary:hover { background: var(--surface-2); }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: var(--text-lg); }
details[open] > summary::after { content: "\2212"; }
details > .body { padding: 0 var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }

/* ---- Boutons : un seul système, façon Apple. Primaire orange plein, secondaire surface avec bordure fine, tertiaire texte seul.
   40 px de haut, rayon 11 px, survol, pressé et focus visibles, transition 150 ms, icône facultative à gauche. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--control-h); padding: 0 var(--space-4); border-radius: var(--radius-btn); border: 1px solid transparent; font-size: var(--text-base); font-weight: 500; line-height: 1; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--ink); background: transparent; transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease); }
.btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary, .btn.big-btn { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover, .btn.big-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.primary:active, .btn.big-btn:active { background: #ea6a0f; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn.secondary:active { background: var(--surface-3); }
.btn.tertiary, .linkbtn { background: transparent; color: var(--ink-2); border-color: transparent; padding: 0 var(--space-3); }
.btn.tertiary:hover, .linkbtn:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--surface); color: var(--bad-ink); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.big-btn { padding: 0 var(--space-5); }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: default; transform: none; }
.linkbtn { display: inline-flex; align-items: center; height: var(--control-h); border-radius: var(--radius-btn); border: 1px solid transparent; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }

/* ---- Champs */
.field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.field label { margin-bottom: 2px; }
.field .hint { order: 3; }
input[type=text], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea { width: 100%; height: var(--control-h); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 var(--space-3); background: var(--bg); font-size: var(--text-base); color: var(--ink); transition: border-color .15s var(--ease); }
textarea { height: auto; min-height: 80px; padding: var(--space-2) var(--space-3); resize: vertical; line-height: 1.45; }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a8a93' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
[data-theme="dark"] input[type=date]::-webkit-calendar-picker-indicator, :root:not([data-theme]) input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.8); }
.check { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-base); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink); }
.fields { display: grid; gap: var(--space-4); }
.fields.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inline-form { display: flex; gap: var(--space-2); align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 120px; }
form.card > .actions, .actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }

/* ---- Zone de dépôt */
.drop { position: relative; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: var(--text-base); color: var(--ink-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: var(--space-6) var(--space-4); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; background: var(--surface-2); cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease); }
.drop:hover { border-color: var(--ink-3); }
.drop.on { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { font-size: var(--text-md); color: var(--ink); }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop .picked { font-weight: 600; color: var(--accent-text); overflow-wrap: anywhere; }

/* ---- Tags de statut : une couleur par statut, toujours un mot */
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--space-3); border-radius: var(--pill); font-size: var(--text-xs); font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral-ink); }
.tag.ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.tag.bad { background: var(--bad-bg); color: var(--bad-ink); }
.tag.info { background: var(--info-bg); color: var(--info-ink); }
.tag.todo { background: var(--todo-bg); color: var(--todo-ink); }
.tag.review { background: var(--review-bg); color: var(--review-ink); }
/* Un bloc coloré par état ou par section : bord gauche de la couleur, ou fond teinté. */
.card.todo { border-left: 3px solid var(--todo); }
.card.review { border-left: 3px solid var(--review); }
.card.ok { border-left: 3px solid var(--ok); }
.card.refused { border-left: 3px solid var(--bad); }
.card.solid-ok { background: radial-gradient(80% 120% at 0% 0%, var(--accent-soft), var(--surface) 70%); border-color: var(--accent-line); color: var(--ink); }
.card.solid-ok.hero-card { border-color: transparent; }
.card.solid-bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--ink); }
.card.solid-ok .sm, .card.solid-bad .sm, .card.solid-ok .kv dt, .card.solid-bad .kv dt { color: var(--ink-2); }
.card.solid-bad .forbidden { color: var(--bad-ink); }
.card.solid-ok a, .card.solid-bad a { color: var(--ink); text-decoration: underline; }
.card.solid-ok .kv dd, .card.solid-bad .kv dd { color: var(--ink); }
.card.pale { background: var(--surface-2); border-color: transparent; color: var(--ink-2); }

/* ---- Onglets et puces */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; height: var(--control-h); padding: 0 var(--space-3); margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-2); font-weight: 500; transition: color .15s var(--ease); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--accent-text); border-bottom-color: var(--accent); font-weight: 600; }
.chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 34px; padding: 0 var(--space-4); border-radius: var(--pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: var(--text-sm); font-weight: 500; cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease); }
.chip:hover { text-decoration: none; background: var(--surface-2); border-color: var(--ink-3); }
.chip.on { background: var(--ink); color: var(--ink-inverse); border-color: var(--ink); }

/* ---- Tableaux */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
table.t th { position: sticky; top: 0; background: var(--surface); text-align: left; font-size: var(--text-xs); font-weight: 500; letter-spacing: .01em; color: var(--ink-3); height: 48px; padding: 0 var(--space-4); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { height: 48px; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t td:first-child { max-width: 560px; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t th.num, table.t td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Prose (fiches du DNA) */
.prose { line-height: 1.6; }
.prose > * + * { margin-top: var(--space-2); }
.prose h2 { font-size: var(--text-md); margin-top: var(--space-5); }
.prose h3 { font-size: var(--text-base); margin-top: var(--space-4); }
.prose ul, .prose ol { padding-left: 20px; }
.prose li + li { margin-top: var(--space-1); }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: var(--space-2); text-align: left; vertical-align: top; }
.prose p.script { white-space: pre-line; }

/* ---- Connexion */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--space-7) var(--space-4); position: relative; }
.center::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 60vh; background: radial-gradient(50% 60% at 50% 0%, var(--halo), transparent 70%); pointer-events: none; }
.login { position: relative; width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.login .brand { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; padding-bottom: var(--space-2); }

/* ---- Aujourd'hui : bienvenue en 3 étapes, la prochaine action */
.progress { height: 6px; border-radius: 3px; background: var(--neutral-bg); overflow: hidden; max-width: 420px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s var(--ease); }
.step-n { display: inline-flex; width: 28px; height: 28px; border-radius: 14px; align-items: center; justify-content: center; font-weight: 600; font-size: var(--text-sm); background: var(--neutral-bg); color: var(--neutral-ink); }
.card.solid-ok .step-n { background: var(--accent); color: var(--accent-ink); }
.card.solid-ok h3, .card.solid-ok h2 { color: var(--ink); }
.card.solid-ok .lead { color: var(--ink-2); }
.card.solid-ok .over { color: var(--accent-text); font-weight: 600; }
.card.solid-ok a.btn, .next.solid-ok a.btn { text-decoration: none; }
.card.solid-ok a.btn.big-btn, .card.solid-ok a.btn.primary, .card.solid-bad a.btn.primary { color: var(--accent-ink); }
.card.solid-ok a.btn.secondary { color: var(--ink); }
.steps-cards .card { min-height: 100%; }
.next { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.next .over { font-size: var(--text-sm); color: var(--ink-3); }
.next h2 { font-size: var(--text-lg); }
.next .btn { margin-top: var(--space-2); }
.next.hero-card { align-items: center; text-align: center; max-width: 760px; margin: 0 auto; width: 100%; padding: var(--space-6); border-color: transparent; }
.next.hero-card h2 { font-size: 24px; letter-spacing: -.02em; }
.next.hero-card .lead { max-width: 56ch; }

/* ---- Vignettes en grand (liste des vidéos qui marchent) */
.thumb.lg { width: 132px; height: 235px; flex: 0 0 132px; }
@media (max-width: 900px) { .thumb.lg { width: 96px; height: 171px; flex: 0 0 96px; } }
.drop-preview { display: flex; gap: var(--space-4); align-items: center; }
.drop-preview .thumb { flex: 0 0 72px; }
/* ---- Brief : intro sur 3 lignes, bandeau Format / Offre / Interdit */
.lead.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.compact { padding: var(--space-4); gap: var(--space-2); border-color: transparent; background: var(--surface-2); }
.card.compact h3 { font-size: var(--text-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.card.compact.solid-ok h3 { color: var(--accent-text); }
.card.compact.solid-bad h3 { color: var(--bad-ink); }
.kv.tight { gap: 2px var(--space-3); grid-template-columns: 1fr auto; }
.band { grid-template-columns: minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; }
/* La carte d'une vidéo à monter : la vidéo de départ, les 3 choses à faire, le bouton. */
.todo-card { display: grid; grid-template-columns: 120px minmax(0, 1fr) 260px; gap: var(--space-5); align-items: start; }
.todo-card .source { display: flex; flex-direction: column; gap: var(--space-2); }
.todo-card .source .player { max-width: 120px; }
.todo-card .do { display: flex; flex-direction: column; gap: var(--space-3); }
.todo-card .right { display: flex; flex-direction: column; gap: var(--space-2); align-items: stretch; }
.steps.big li { gap: var(--space-3); font-size: var(--text-base); line-height: 1.5; font-weight: 400; }
.steps.big li > span { font-weight: 400; }
.steps.big strong { font-weight: 600; }
.steps.big li::before { flex-basis: 28px; width: 28px; height: 28px; border-radius: 14px; font-size: var(--text-sm); background: var(--accent); color: var(--accent-ink); margin-top: 1px; }
.steps.big .pt { display: block; margin-top: var(--space-1); }
@media (max-width: 1100px) { .todo-card { grid-template-columns: 120px minmax(0, 1fr); } .todo-card .right { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } .todo-card .source .player { max-width: 120px; } }
@media (max-width: 900px) { .band { grid-template-columns: 1fr; } .todo-card { grid-template-columns: 1fr; } }
/* ---- Brief : une carte par vidéo */
.video-card { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: var(--space-5); align-items: start; }
.video-card > * { align-self: start; }
.video-card .side { display: flex; flex-direction: column; gap: var(--space-2); }
.video-card .side .player { max-width: 200px; }

/* ---- Menu mobile : barre en haut, bouton qui ouvre la liste */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .menu { width: 100%; flex: 0 0 auto; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--line); padding: var(--space-3) var(--space-4); flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
  .menu .brand { padding: 0; flex: 1 1 auto; flex-direction: row; text-align: left; gap: var(--space-3); }
  .menu .brand b { font-size: var(--text-base); }
  .menu .brand span { font-size: var(--text-sm); }
  .menu-toggle { display: inline-flex; width: var(--control-h); height: var(--control-h); align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--surface); color: var(--ink); cursor: pointer; transition: background .15s var(--ease); }
  .menu-toggle:hover { background: var(--surface-2); }
  .menu .nav { display: none; width: 100%; flex-direction: column; gap: var(--space-1); padding-top: var(--space-3); }
  .menu.open .nav { display: flex; }
  .menu .item { flex-direction: row; justify-content: flex-start; min-height: 48px; padding: 0 var(--space-3); font-size: var(--text-base); gap: var(--space-3); }
  .menu .item.on::before { left: 0; top: 12px; bottom: 12px; }
  .menu .item .count { position: static; margin-left: auto; }
  .menu .group, .menu details.more > summary { text-align: left; justify-content: flex-start; padding-left: var(--space-3); }
  .menu .foot { margin-top: var(--space-2); padding-top: var(--space-3); text-align: left; font-size: var(--text-sm); }
  .menu .foot a { flex-direction: row; justify-content: flex-start; gap: var(--space-3); padding: var(--space-2) var(--space-3); }
  main { padding: var(--space-5) var(--space-4) var(--space-8); }
  .hero h1 { font-size: 30px; }
  .grid-2, .grid-3, .fields.cols-2, .fields.cols-3 { grid-template-columns: 1fr; }
  .video-card { grid-template-columns: 1fr; }
  .video-card .side .player { max-width: 160px; }
  .kv { grid-template-columns: 1fr; gap: var(--space-1) 0; }
  .kv dt { margin-top: var(--space-2); }
  .content.narrow { max-width: none; }
}
@media (min-width: 901px) { .menu .nav { display: flex; flex-direction: column; gap: var(--space-1); } }

/* ---- Drive : le dossier Google Drive de la marque, façon Google Drive */
.drive { position: relative; min-height: 320px; }
.drive-bar label.btn { text-transform: none; letter-spacing: 0; }
.drive-state { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.drive-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.drive-crumb { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; font-size: var(--text-base); min-width: 0; }
.drive-crumb a { color: var(--ink-2); }
.drive-crumb .sep { color: var(--ink-3); }
.drive-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.drive-h { font-size: var(--text-xs); font-weight: 500; letter-spacing: .01em; color: var(--ink-3); }
.drive-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); }
.drive-folder { display: flex; align-items: center; gap: var(--space-3); height: 48px; padding: 0 var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font-weight: 500; min-width: 0; transition: background .15s var(--ease), border-color .15s var(--ease); }
.drive-folder .grow { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-folder:hover { background: var(--surface-3); border-color: var(--ink-3); text-decoration: none; }
.drive-ico { display: inline-flex; color: var(--ink-3); flex: 0 0 auto; }
.drive-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); }
.drive-file { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: border-color .15s var(--ease); }
.drive-file:hover { border-color: var(--ink-3); }
.drive-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--surface-3); overflow: hidden; }
.drive-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drive-meta { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3); min-width: 0; }
.drive-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); font-family: var(--mono); font-weight: 500; }
.drive-over { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; border: 2px dashed var(--accent); border-radius: var(--radius); background: var(--overlay); color: var(--accent-text); font-size: var(--text-md); z-index: 2; pointer-events: none; }
.drive.on .drive-over { display: flex; }
.drive-queue { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.drive-queue > div { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.drive-queue .progress { max-width: none; }
.drive-queue .msg { font-size: var(--text-sm); color: var(--ink-2); }
.drive-queue .msg.ok { color: var(--ok-ink); font-weight: 500; }
.drive-queue .msg.err { color: var(--bad-ink); font-weight: 500; }
@media (max-width: 900px) { .drive-files { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .drive-folders { grid-template-columns: 1fr; } }

/* ---- Formation : la formation La Cuisine rejouée chez nous */
.lesson-video { width: 100%; max-width: 960px; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--media); border: 1px solid var(--line); }
pre.doc { margin: 0; padding: var(--space-3) var(--space-4); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--mono); font-size: var(--text-sm); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow: auto; color: var(--ink-2); }
.prose.doc { max-height: 640px; overflow: auto; padding-right: var(--space-2); }
.prose.doc pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); padding: var(--space-3); border-radius: var(--radius-sm); font-size: var(--text-sm); font-family: var(--mono); }
.card.info { border-left: 3px solid var(--review); }
.list .rowlink .step-n { flex: 0 0 28px; }
