/* ==========================================================================
   YourEdits : feuille de style commune (site public, espace client, admin)
   Marque sœur de YourHeberg : même police (DM Sans), même sérieux,
   mais une identité « salle de montage » : rouge REC, encre sombre,
   timecodes, timeline. Pas de dégradés fluo, ombres légères.
   ========================================================================== */
@import url("assets/fonts/fonts.css");

:root {
  --bg: #fbfaf8;
  --bg-soft: #f3f1ed;
  --surface: #ffffff;
  --border: #e7e3dc;
  --border-strong: #d4cfc6;
  --text: #15171c;
  --text-2: #545862;
  --text-3: #80848d;
  --accent: #e8472a;          /* rouge « REC » */
  --accent-hover: #cf3a1f;
  --accent-soft: #fdece7;
  --accent-ink: #ffffff;
  --ink: #121317;             /* sections sombres */
  --ink-2: #1a1c21;
  --ink-3: #24272d;
  --ink-line: #2f3239;
  --ink-text: #f2f1ee;
  --ink-text-2: #a3a6ae;
  --success: #1a9a55;
  --success-soft: #e6f5ec;
  --danger: #d4301f;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(20, 18, 14, .05), 0 12px 32px -16px rgba(20, 18, 14, .18);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

/* Couleurs par jeu */
.c-val   { --c: #e2364a; --c-soft: #fcebed; }
.c-fivem { --c: #e8790f; --c-soft: #fdf0e3; }
.c-redm  { --c: #a5452a; --c-soft: #f7ebe6; }
.c-mc    { --c: #3d8c2a; --c-soft: #eaf5e6; }
.c-rbx   { --c: #4b5563; --c-soft: #eef0f3; }
.c-other { --c: #2f6fdb; --c-soft: #e9f0fc; }

/* Thème sombre */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f12; --bg-soft: #15171b; --surface: #1a1c21;
  --border: #2a2d33; --border-strong: #3a3d44;
  --text: #f0efec; --text-2: #b2b5bc; --text-3: #8a8e97;
  --accent-soft: rgba(232, 71, 42, .14);
  --success-soft: rgba(26, 154, 85, .16);
  --ink: #08090b; --ink-2: #111316; --ink-3: #1b1d22;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 12px 32px -16px rgba(0,0,0,.8);
}
[data-theme="dark"] .c-val, [data-theme="dark"] .c-fivem, [data-theme="dark"] .c-redm,
[data-theme="dark"] .c-mc, [data-theme="dark"] .c-rbx, [data-theme="dark"] .c-other { --c-soft: color-mix(in srgb, var(--c) 16%, transparent); }
[data-theme="dark"] .c-rbx { --c: #a7b0bd; }
[data-theme="dark"] .c-redm { --c: #d9805f; }

/* Zone sombre : réaffecte les variables pour que les composants s'adaptent seuls */
.dark {
  --bg-soft: var(--ink-2); --surface: var(--ink-2); --border: var(--ink-line); --border-strong: #3d4048;
  --text: var(--ink-text); --text-2: var(--ink-text-2); --text-3: #7c808a;
  --accent-soft: rgba(232, 71, 42, .16); --success-soft: rgba(26, 154, 85, .18);
  background: var(--ink); color: var(--text); color-scheme: dark;
}
.dark .c-val, .dark .c-fivem, .dark .c-redm, .dark .c-mc, .dark .c-rbx, .dark .c-other { --c-soft: color-mix(in srgb, var(--c) 18%, transparent); }
.dark .c-rbx { --c: #a7b0bd; }
.dark .c-redm { --c: #d9805f; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
strong { font-weight: 600; }
.mono, .tc { font-family: var(--mono); }
::selection { background: rgba(232, 71, 42, .22); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon, .icon-sm, .icon-lg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon { width: 20px; height: 20px; } .icon-sm { width: 16px; height: 16px; } .icon-lg { width: 24px; height: 24px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.muted { color: var(--text-2); } .dim { color: var(--text-3); } .small { font-size: .875rem; }
.hidden, [hidden] { display: none !important; }

/* ---------- Boutons (pilules) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; font-size: .9375rem; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap; transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .go { transition: transform .2s var(--ease); }
.btn:hover:not(:disabled) .go { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover:not(:disabled) { opacity: .88; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--text-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { height: 36px; padding: 0 16px; font-size: .875rem; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Annonce + navigation ---------- */
.announce { background: var(--accent); color: #fff; font-size: .875rem; font-weight: 500; text-align: center; }
.announce .container { padding-top: 9px; padding-bottom: 9px; }

.nav { position: sticky; top: 0; z-index: 50; background: rgba(18, 19, 23, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--ink-line); color: var(--ink-text); }
.nav .container { display: flex; align-items: center; gap: 36px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; }
.logo-mark { width: 28px; height: 28px; flex: none; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; font-size: .9375rem; font-weight: 500; color: var(--ink-text-2); transition: color .15s, background-color .15s; }
.nav-link:hover { color: var(--ink-text); background: var(--ink-3); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav .btn-ghost { color: var(--ink-text-2); } .nav .btn-ghost:hover { color: var(--ink-text); }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--ink-line); border-radius: 50%; background: transparent; color: var(--ink-text-2); cursor: pointer; }
.theme-btn:hover { color: var(--ink-text); border-color: #4a4d55; }
.theme-btn .icon { width: 17px; height: 17px; }
.theme-btn .i-sun, [data-theme="dark"] .theme-btn .i-moon { display: none; }
[data-theme="dark"] .theme-btn .i-sun { display: block; }

/* ---------- Hero : salle de montage ---------- */
.hero { padding: 88px 0 0; text-align: center; overflow: hidden; border-bottom: 1px solid var(--ink-line); }
.hero-tag { display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 14px 0 12px; border: 1px solid var(--ink-line); border-radius: 999px; font: 500 .8125rem var(--mono); color: var(--ink-text-2); letter-spacing: .02em; }
.hero h1 { max-width: 900px; margin: 26px auto 0; font-size: 4.25rem; line-height: 1.02; letter-spacing: -0.035em; }
.hero h1 span { color: var(--accent); }
.hero .lead { max-width: 620px; margin: 24px auto 0; font-size: 1.125rem; color: var(--text-2); }
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; margin-top: 22px; font-size: .875rem; color: var(--text-3); }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .icon-sm { color: var(--success); }

/* Maquette d'éditeur */
.editor { position: relative; max-width: 1040px; margin: 64px auto 0; text-align: left; background: var(--ink-2); border: 1px solid var(--ink-line); border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -20px 60px -30px rgba(232, 71, 42, .25); overflow: hidden; }
.ed-bar { display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 16px; border-bottom: 1px solid var(--ink-line); font: .75rem var(--mono); color: var(--text-3); }
.ed-bar .dots { display: flex; gap: 6px; } .ed-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-line); }
.ed-bar b { color: var(--text-2); font-weight: 500; }
.ed-bar .state { margin-left: auto; }
.ed-body { display: grid; grid-template-columns: 1.55fr 1fr; border-bottom: 1px solid var(--ink-line); }
.ed-viewer { position: relative; aspect-ratio: 16 / 9; margin: 14px; border-radius: 8px; background: #0a0b0d; border: 1px solid var(--ink-line); overflow: hidden; }
.ed-viewer .scene { position: absolute; inset: 0; background:
  linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55)),
  repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 56px),
  #16181d; }
.ed-viewer .cross { position: absolute; left: 50%; top: 46%; width: 22px; height: 22px; margin: -11px 0 0 -11px; color: #fff; opacity: .8; }
.ed-viewer .feed { position: absolute; right: 12px; top: 12px; display: grid; gap: 4px; font: 600 .68rem var(--mono); }
.ed-viewer .feed span { padding: 3px 8px; border-radius: 4px; background: rgba(0,0,0,.55); color: #e9e9e9; }
.ed-viewer .feed span b { color: #ff6b7d; }
.ed-viewer .badge { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; background: var(--accent); color: #fff; font: 600 .75rem var(--mono); }
.ed-viewer .tcode { position: absolute; right: 12px; bottom: 12px; font: .75rem var(--mono); color: #cfd2d8; }
.ed-list { padding: 14px 14px 14px 0; display: grid; gap: 8px; align-content: start; }
.ed-list .h { display: flex; justify-content: space-between; font: .7rem var(--mono); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 4px 2px; }
.ed-clip { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px 10px 0; border-radius: 8px; background: var(--ink-3); font-size: .8125rem; overflow: hidden; }
.ed-clip::before { content: ""; align-self: stretch; background: var(--c); margin: -10px 0; }
.ed-clip b { display: block; font-weight: 600; color: var(--text); }
.ed-clip small { font: .7rem var(--mono); color: var(--text-3); }
.ed-clip .sc { font: 600 .75rem var(--mono); color: var(--c); }
.ed-clip.on { outline: 1px solid var(--c); }
.ed-tracks { position: relative; padding: 10px 16px 16px 56px; }
.ed-ruler { display: flex; justify-content: space-between; margin-bottom: 8px; font: .65rem var(--mono); color: var(--text-3); }
.ed-track { position: relative; height: 34px; margin-top: 6px; border-radius: 4px; background: var(--ink-3); }
.ed-track::before { content: attr(data-name); position: absolute; left: -40px; top: 50%; transform: translateY(-50%); font: .68rem var(--mono); color: var(--text-3); }
.ed-track.wave { display: flex; align-items: center; gap: 2px; padding: 0 4px; }
.ed-track.wave i { flex: 1; background: #3b3f47; border-radius: 1px; }
.ed-block { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; background: color-mix(in srgb, var(--c) 30%, transparent); border: 1px solid var(--c); font: 600 .65rem var(--mono); color: #fff; padding: 0 6px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
.ed-head { position: absolute; top: 26px; bottom: 12px; width: 2px; background: var(--accent); }
.ed-head::before { content: ""; position: absolute; top: -6px; left: -5px; border: 6px solid transparent; border-top-color: var(--accent); }

/* ---------- Bandeau chiffres ---------- */
.stats { border-bottom: 1px solid var(--border); background: var(--surface); }
.stats ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats li { padding: 26px 24px; border-left: 1px solid var(--border); }
.stats li:first-child { border-left: 0; padding-left: 0; }
.stats b { display: block; font-size: 1.75rem; letter-spacing: -0.03em; line-height: 1.1; }
.stats span { font-size: .875rem; color: var(--text-2); }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: 56px; }
.section-head p { color: var(--text-2); font-size: 1.0625rem; max-width: 480px; }
.section-head.center { display: block; max-width: 680px; margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center p { margin: 16px auto 0; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; font: 500 .8125rem var(--mono); color: var(--accent); letter-spacing: .02em; }
.kicker::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.state { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--success-soft); color: var(--success); font: 600 .72rem var(--font); white-space: nowrap; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state.live::before { animation: blink 1.6s steps(1) infinite; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--c-soft, var(--bg-soft)); color: var(--c, var(--text-2)); white-space: nowrap; }

/* ---------- Studio (fenêtre sombre façon éditeur) ---------- */
.studio-app { border-radius: var(--radius-lg); border: 1px solid var(--ink-line); box-shadow: var(--shadow); overflow: hidden; }
.studio-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--border); font: .78rem var(--mono); color: var(--text-3); }
.studio-bar b { font: 600 .875rem var(--font); color: var(--text); }
.studio-bar .state { margin-left: auto; }
.studio-grid { display: grid; grid-template-columns: 370px 1fr; }
.studio-grid > * { min-width: 0; }
.studio-side { padding: 22px 20px; border-right: 1px solid var(--border); background: var(--ink-2); }
.studio-main { padding: 22px; }
.step-label { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: .8125rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.step-label .n { font: 500 .75rem var(--mono); color: var(--accent); }
.field { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 140px; padding: 20px; text-align: center; border: 1.5px dashed var(--border-strong); border-radius: 12px; background: var(--ink-3); cursor: pointer; transition: border-color .2s, background-color .2s; }
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop.is-loaded { border-style: solid; border-color: var(--success); background: var(--success-soft); }
.drop .ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 50%; background: var(--accent); color: #fff; }
.drop-title { font-weight: 600; font-size: .9375rem; overflow-wrap: anywhere; }
.drop-hint { font-size: .8125rem; color: var(--text-3); }

.games { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.game input { position: absolute; opacity: 0; pointer-events: none; }
.game label { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--ink-3); cursor: pointer; transition: border-color .15s, background-color .15s; }
.game label:hover { border-color: var(--border-strong); }
.game .ic { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--c-soft); color: var(--c); }
.game b { display: block; font-size: .8125rem; line-height: 1.2; }
.game small { display: block; font-size: .7rem; color: var(--text-3); line-height: 1.3; }
.game input:checked + label { border-color: var(--c); background: var(--c-soft); }
.game input:focus-visible + label { outline: 2px solid var(--c); outline-offset: 2px; }

.input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font-size: .9375rem; transition: border-color .15s, box-shadow .15s; }
.dark .input { background: var(--ink-3); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.input { height: auto; padding: 10px 12px; }
#customGame { margin-top: 8px; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.setting span { display: block; margin-bottom: 6px; font-size: .8125rem; color: var(--text-2); }
.studio-actions { display: grid; gap: 8px; }
.form-msg { margin-top: 14px; font-size: .875rem; color: var(--text-2); min-height: 1.4em; }
.form-msg.is-error { color: #ff8a78; }
.form-msg a { color: var(--accent); font-weight: 600; }

.preview { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; background: #08090b; border: 1px solid var(--border); overflow: hidden; }
.preview video { width: 100%; height: 100%; object-fit: contain; }
.preview video:not([src]) { visibility: hidden; }
.preview-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--text-3); font-size: .875rem; text-align: center; padding: 16px; }
.preview-empty .tc { font-size: 1.75rem; color: #3a3d44; letter-spacing: .04em; }

.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.progress li { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--text-3); }
.progress li::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--border-strong); }
.progress li.is-active { color: var(--text); font-weight: 600; }
.progress li.is-active::before { background: var(--accent); animation: blink 1s steps(1) infinite; }
.progress li.is-done { color: var(--success); }
.progress li.is-done::before { background: var(--success); }
.bar { height: 4px; margin-top: 12px; border-radius: 99px; background: var(--ink-3); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s var(--ease); }

.results { margin-top: 22px; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.results-head h3 { font-size: 1.0625rem; }
.results-export { display: flex; gap: 6px; flex-wrap: wrap; }
.timeline { width: 100%; height: 84px; margin: 14px 0; border-radius: 8px; background: var(--ink-3); cursor: pointer; }
.clips { display: grid; gap: 6px; }
.clip { display: grid; grid-template-columns: 4px 1fr auto auto; gap: 14px; align-items: center; padding: 0 12px 0 0; border-radius: 10px; background: var(--ink-3); overflow: hidden; transition: background-color .15s; }
.clip::before { content: ""; align-self: stretch; background: var(--c, var(--accent)); }
.clip > div:first-of-type { padding: 11px 0; }
.clip.is-playing { outline: 1px solid var(--c); }
.clip-n { display: none; }
.clip-type { font-weight: 600; font-size: .9375rem; }
.clip-meta { font: .75rem var(--mono); color: var(--text-3); margin-top: 2px; }
.clip-score { min-width: 84px; font: .75rem var(--mono); color: var(--text-2); text-align: right; }
.clip-score i { display: block; height: 4px; margin-top: 6px; border-radius: 99px; background: var(--ink-line); overflow: hidden; }
.clip-score i b { display: block; height: 100%; background: var(--c, var(--accent)); }

/* ---------- Détections : onglets par jeu ---------- */
.det { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.det > * { min-width: 0; }
.det-tabs { display: grid; gap: 6px; align-content: start; }
.det-tab { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; background: none; text-align: left; cursor: pointer; transition: background-color .15s, border-color .15s; }
.det-tab:hover { background: var(--surface); }
.det-tab[aria-selected="true"] { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.det-tab .ic { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--c-soft); color: var(--c); }
.det-tab b { display: block; font-size: .9375rem; }
.det-tab small { display: block; font-size: .8125rem; color: var(--text-3); }
.det-tab .tc { margin-left: auto; font-size: .72rem; color: var(--text-3); }
.det-panel { padding: 36px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.det-panel h3 { font-size: 1.75rem; letter-spacing: -0.02em; }
.det-panel > p { margin-top: 10px; color: var(--text-2); max-width: 560px; }
.det-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.det-item { padding: 18px; border: 1px solid var(--border); border-radius: 12px; }
.det-item b { display: block; margin-top: 14px; font-size: .9375rem; }
.det-item p { margin-top: 4px; font-size: .875rem; color: var(--text-2); }
.sig { display: flex; align-items: center; gap: 2px; height: 36px; }
.sig i { flex: 1; border-radius: 1px; background: var(--c); opacity: .85; }

/* ---------- Fonctionnement : étapes en timecodes ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 2px; background: var(--border); }
.step { position: relative; }
.step .tc { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: .78rem; }
.step:last-child .tc { background: var(--accent); color: #fff; }
.step h3 { margin-top: 22px; }
.step p { margin-top: 8px; font-size: .9375rem; color: var(--text-2); }

/* ---------- Tarifs ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 32px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.plan.recommended { --border: var(--ink-line); --text-2: var(--ink-text-2); --text-3: #7c808a; background: var(--ink); color: var(--ink-text); border-color: var(--ink); box-shadow: var(--shadow); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan h3 { font-size: 1.125rem; }
.plan-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; }
.plan-desc { margin-top: 4px; font-size: .875rem; color: var(--text-3); }
.plan-price { margin-top: 26px; display: flex; align-items: baseline; gap: 6px; }
.plan-price strong { font-size: 2.75rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.plan-price span { font-size: .875rem; color: var(--text-3); }
.plan-specs { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); display: grid; gap: 11px; font-size: .9375rem; color: var(--text-2); flex: 1; align-content: start; }
.plan-specs li { display: flex; align-items: flex-start; gap: 10px; }
.plan-specs .icon-sm { color: var(--accent); margin-top: 4px; }
.plan .btn { margin-top: 28px; }
.plan.recommended .btn-secondary { background: #fff; color: var(--ink); border-color: #fff; }
.plans-note { margin-top: 24px; font-size: .875rem; color: var(--text-3); }

/* ---------- Avis ---------- */
.reviews { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; }
.review { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.review:first-child { background: var(--accent); border-color: var(--accent); color: #fff; }
.review:first-child blockquote { font-size: 1.375rem; line-height: 1.35; letter-spacing: -0.01em; }
.review:first-child small, .review:first-child .tag { color: rgba(255,255,255,.85); background: rgba(255,255,255,.16); }
.review:first-child small { background: none; }
.review blockquote { margin: 0; font-size: 1rem; font-weight: 500; }
.review figcaption { display: flex; align-items: center; gap: 12px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--c-soft); color: var(--c); font-size: .8125rem; font-weight: 700; }
.review:first-child .avatar { background: rgba(255,255,255,.18); color: #fff; }
.review b { display: block; font-size: .9375rem; }
.review small { display: block; font-size: .8125rem; color: var(--text-3); }
.review .tag { margin-left: auto; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 20px; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon-sm { color: var(--accent); transition: transform .25s var(--ease); }
.faq details[open] summary .icon-sm { transform: rotate(45deg); }
.faq-body { padding: 0 0 18px; color: var(--text-2); font-size: .9375rem; }

/* ---------- Bandeau final + pied de page ---------- */
.cta-band { padding: 96px 0; text-align: center; }
.cta-band h2 { max-width: 760px; margin: 0 auto; font-size: 3rem; }
.cta-band p { margin-top: 16px; color: var(--text-2); }
.cta-band .hero-cta { margin-top: 30px; }

.footer { border-top: 1px solid var(--ink-line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 64px 0 44px; }
.footer-brand p { margin-top: 14px; font-size: .9rem; color: var(--text-2); max-width: 300px; }
.footer h4 { font-size: .8125rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; }
.footer ul a { font-size: .9375rem; color: var(--text-2); }
.footer ul a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 22px 0; border-top: 1px solid var(--border); font-size: .8125rem; color: var(--text-3); }

/* ---------- Apparition au défilement ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-side { border-right: 0; border-bottom: 1px solid var(--border); }
  .det { grid-template-columns: 1fr; }
  .det-tabs { grid-template-columns: repeat(3, 1fr); }
  .det-tab .tc { display: none; }
}
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .hero h1 { font-size: 3.25rem; }
  .ed-body { grid-template-columns: 1fr; }
  .ed-list { padding: 0 14px 14px; }
  .section-head { grid-template-columns: 1fr; }
  .stats ul { grid-template-columns: 1fr 1fr; }
  .stats li:nth-child(3) { border-left: 0; padding-left: 0; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .steps::before { display: none; }
  .plans { grid-template-columns: 1fr; max-width: 480px; }
  .reviews { grid-template-columns: 1fr; }
  .det-items { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  h2 { font-size: 1.9rem; }
  .section { padding: 72px 0; }
  .nav .btn-ghost { display: none; }
  .hero { padding-top: 56px; }
  .hero h1 { font-size: 2.4rem; }
  .editor { margin-top: 44px; }
  .ed-tracks { padding-left: 16px; }
  .ed-track::before { display: none; }
  .ed-list .ed-clip:nth-child(n+4) { display: none; }
  .stats ul, .steps, .faq, .footer-grid, .settings { grid-template-columns: 1fr; }
  .stats li { border-left: 0; padding: 18px 0; border-top: 1px solid var(--border); }
  .stats li:first-child { border-top: 0; }
  .det-tabs { grid-template-columns: 1fr 1fr; }
  .det-tab small { display: none; }
  .det-panel { padding: 22px; }
  .studio-side, .studio-main { padding: 16px; }
  .progress { grid-template-columns: 1fr 1fr; }
  .clip { grid-template-columns: 4px 1fr auto; }
  .clip-score { display: none; }
  .cta-band h2 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Formulaires, espace client, administration, pages légales
   ========================================================================== */
.link { color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; }
.form { display: grid; gap: 16px; }
.form-field { display: grid; gap: 6px; min-width: 0; }
.form-field > span { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .875rem; font-weight: 600; }
.form-field small { font-weight: 400; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.form-msg.is-ok { color: var(--success); }
.form-msg.is-error { color: var(--danger); }
.dark .form-msg.is-error { color: #ff8a78; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
code { font-family: var(--mono); font-size: .82em; padding: 1px 6px; border-radius: 4px; background: var(--bg-soft); border: 1px solid var(--border); }

/* Connexion / inscription */
.auth { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 64px 16px; background: var(--bg-soft); }
.auth-card { width: 100%; max-width: 440px; padding: 36px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 2rem; }
.auth-card > .muted { margin: 8px 0 26px; }

/* Messages */
.notice { margin-bottom: 20px; padding: 12px 16px; border-radius: 10px; font-size: .9375rem; border: 1px solid; }
.notice.ok { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.notice.warn { background: #fff7e6; color: #9a5b00; border-color: #f3d7a0; }
.notice.bad { background: var(--accent-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
[data-theme="dark"] .notice.warn { background: rgba(251,191,36,.12); color: #fcd34d; border-color: rgba(251,191,36,.35); }

/* Tableau de bord (client + admin) */
.dash { padding: 40px 0 96px; background: var(--bg-soft); min-height: calc(100vh - 64px); }
.dash-grid { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.dash-grid > * { min-width: 0; }
.dash-side { position: sticky; top: 88px; display: grid; gap: 18px; }
.dash-user { display: flex; align-items: center; gap: 12px; }
.dash-user b { display: block; font-size: .9375rem; line-height: 1.3; }
.dash-user small { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; color: var(--text-3); }
.dash-user .avatar { --c: var(--accent); --c-soft: var(--accent-soft); width: 42px; height: 42px; }
.avatar.admin { background: var(--text); color: var(--bg); }
.dash-nav { display: grid; gap: 2px; }
.dash-nav a { padding: 9px 12px; border-radius: 10px; font-size: .9375rem; font-weight: 500; color: var(--text-2); }
.dash-nav a:hover { background: var(--surface); color: var(--text); }
.dash-nav a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
.dash-side > .btn { justify-self: start; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.dash-head h1 { font-size: 1.75rem; }
.dash-sub { font-size: 1.125rem; margin: 36px 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tiles-4 { grid-template-columns: repeat(4, 1fr); }
.tile { display: grid; gap: 4px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.tile small { font-size: .8125rem; color: var(--text-3); }
.tile b { font-size: 1.6rem; letter-spacing: -0.03em; line-height: 1.2; }
.tile .dim { font-size: .8125rem; }
.meter { height: 6px; margin-top: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .5s var(--ease); }

.card { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.card h3 { margin-bottom: 4px; }
.card .btn { justify-self: start; }
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.cards-2.wide-left { grid-template-columns: 1.6fr 1fr; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { padding: 12px 16px; text-align: left; font-size: .75rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .empty { padding: 28px 16px; text-align: center; color: var(--text-3); }
.row-actions { white-space: nowrap; text-align: right; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--bg-soft); color: var(--text-2); }
.pill.ok { background: var(--success-soft); color: var(--success); }
.pill.warn { background: #fff4dc; color: #9a5b00; }
.pill.bad { background: var(--accent-soft); color: var(--danger); }
[data-theme="dark"] .pill.warn { background: rgba(251,191,36,.12); color: #fcd34d; }
.input.search { width: 280px; max-width: 100%; }

/* Choix d'offre et paiement */
.plans-dash { margin-top: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); max-width: none; }
.plan-pick { text-align: left; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.plan-pick:hover { border-color: var(--border-strong); }
.plan-pick.is-picked { outline: 3px solid var(--accent); outline-offset: 2px; }
.plan-pick .plan-specs li { display: block; }
.pay-box { display: grid; gap: 14px; margin-top: 20px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Graphiques de l'admin */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; margin-top: 18px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar-col span { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--accent); }
.bar-col small { font: .68rem var(--mono); color: var(--text-3); }
.rank { display: grid; margin-top: 12px; }
.rank li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .9375rem; }
.rank li:last-child { border-bottom: 0; }

/* Éditeurs d'offres, réglages, fenêtre modale */
.plan-editors { display: grid; gap: 14px; }
.plan-editor .settings { grid-template-columns: repeat(3, 1fr); }
.inline-checks { display: flex; gap: 24px; flex-wrap: wrap; }
.switch-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.switch-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.switch-row b { display: block; font-size: .9375rem; }
.switch-row small { display: block; font-size: .8125rem; color: var(--text-3); }
.modal { width: min(560px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(10, 10, 12, .5); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Pages légales */
.legal { padding: 56px 0 96px; background: var(--bg-soft); }
.legal-wrap { max-width: 880px; }
.legal h1 { font-size: 2.5rem; margin-bottom: 8px; }
.legal article { margin-top: 32px; padding: 12px 40px 40px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.legal article h2 { font-size: 1.2rem; margin: 32px 0 10px; letter-spacing: -0.01em; }
.legal article p, .legal article li { color: var(--text-2); margin-bottom: 10px; }
.legal article ul { list-style: disc; padding-left: 20px; margin-bottom: 10px; }
.legal article ul.plain { list-style: none; padding: 0; }
.legal article a { color: var(--accent); }
.legal mark.todo { background: #fff3c4; color: #7a5a00; padding: 0 4px; border-radius: 3px; }
.legal-form { padding: 6px 20px; border: 1px dashed var(--border-strong); border-radius: 10px; }
.table-wrap:has(.legal-table) { border: 0; background: none; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .875rem; margin: 10px 0 14px; }
.legal-table th, .legal-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.legal-table th { color: var(--text); font-weight: 600; }

/* Page 404 */
.notfound { min-height: calc(100vh - 64px); display: grid; place-content: center; justify-items: center; gap: 14px; padding: 64px 16px; text-align: center; }
.notfound .tc { font-size: 4rem; font-weight: 500; color: var(--accent); letter-spacing: .02em; }

@media (max-width: 960px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side { position: static; }
  .dash-nav { display: flex; overflow-x: auto; gap: 4px; }
  .dash-nav a { white-space: nowrap; }
  .tiles, .tiles-4 { grid-template-columns: 1fr 1fr; }
  .cards-2, .cards-2.wide-left { grid-template-columns: 1fr; }
  .plan-editor .settings { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .auth-card { padding: 24px; }
  .tiles, .tiles-4, .plan-editor .settings { grid-template-columns: 1fr; }
  .legal article { padding: 4px 18px 24px; }
  .legal h1 { font-size: 1.9rem; }
}

/* Page ouverte depuis le disque (file://) */
.file-warning { position: sticky; top: 0; z-index: 100; padding: 12px 16px; background: #fff4dc; color: #6b4300; border-bottom: 1px solid #f0d08a; font-size: .9375rem; text-align: center; }
/* Connexion du domaine admin */
.auth-admin { background: var(--ink); min-height: 100vh; }
.auth-admin .auth-card { background: var(--ink-2); }
