/* YNOV · Médias & Création de contenus — même univers que l'outil d'audit : fond #eaf0eb, bandeau noir,
   cartes blanches soulignées du dégradé rouge → rose → jaune, LT Superior + LT Superior Serif, boule de pâte rose. */
@font-face { font-family: "LT Superior"; src: url("/fonts/LTSuperior-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "LT Superior"; src: url("/fonts/LTSuperior-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "LT Superior"; src: url("/fonts/LTSuperior-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "LT Superior Serif"; src: url("/fonts/LTSuperiorSerif-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #eaf0eb; --surface: #ffffff; --surface-2: #f4f6f4; --surface-3: #e5ebe6; --line: #dee6df;
  --ink: #0a0006; --muted: #696969; --pink: #ff84ef;
  --grad: linear-gradient(92deg, #ff1a1a 12%, #ff84ef 58%, #eeff57 98%);
  --band: #0a0006; --band-ink: #ffffff; --band-line: rgba(255, 255, 255, .16);
  --bad: #c20000; --warn: #c26400; --ok: #7a8700; --good: #018e4d; --new: #2754d6; --on-zone: #ffffff;
  --shadow: 0 20px 40px -24px rgba(10, 0, 6, .35);
  --f-sans: "LT Superior", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "LT Superior Serif", Georgia, "Times New Roman", serif;
  --r: 16px; --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.3, 1.5, .5, 1);
  --nav-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0006; --surface: #151014; --surface-2: #1e171d; --surface-3: #2a2129; --line: #2f262e; --ink: #eaf0eb; --muted: #a39ba2;
    --band-line: rgba(255, 255, 255, .12); --bad: #ff4d5e; --warn: #ffa33a; --ok: #eeff57; --good: #5affb6; --new: #7ea2ff; --on-zone: #0a0006;
    --shadow: 0 20px 40px -20px rgba(0, 0, 0, .8); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0006; --surface: #151014; --surface-2: #1e171d; --surface-3: #2a2129; --line: #2f262e; --ink: #eaf0eb; --muted: #a39ba2;
  --band-line: rgba(255, 255, 255, .12); --bad: #ff4d5e; --warn: #ffa33a; --ok: #eeff57; --good: #5affb6; --new: #7ea2ff; --on-zone: #0a0006;
  --shadow: 0 20px 40px -20px rgba(0, 0, 0, .8); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-sans); font-size: 15.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--band); }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-family: var(--f-serif); font-weight: 500; line-height: 1.08; text-wrap: balance; letter-spacing: -.01em; }
h4 { margin: 0; }
p { margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Clay balls (YNOV creative-factory universe) ---------- */
.blobs { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.clay { position: absolute; width: var(--s, 200px); aspect-ratio: 830 / 862; pointer-events: none; }
.clay i { position: absolute; inset: 0; background: url("/img/clay-ball.webp") center / contain no-repeat; filter: drop-shadow(0 28px 36px rgba(214, 30, 120, .22)); transform-origin: 50% 85%; animation: claybob var(--dur, 11s) ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
.blobs .c1 { --s: clamp(160px, 22vw, 310px); right: clamp(-120px, -6vw, -50px); top: 70px; --dur: 12s; }
.blobs .c2 { --s: clamp(110px, 13vw, 190px); left: clamp(-90px, -4vw, -40px); top: 56vh; --dur: 14s; --delay: -4s; }
@keyframes claybob {
  0% { transform: translateY(0) rotate(0deg) scale(1, 1); } 30% { transform: translateY(-16px) rotate(9deg) scale(1.025, .975); }
  55% { transform: translateY(4px) rotate(15deg) scale(.975, 1.03); } 80% { transform: translateY(-10px) rotate(24deg) scale(1.015, .985); }
  100% { transform: translateY(-4px) rotate(32deg) scale(1, 1); }
}

/* ---------- Header band ---------- */
.appbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 8; background: var(--band); color: var(--band-ink); border-bottom: 1px solid var(--band-line); }
.appbar .wrap { display: flex; align-items: center; gap: 10px 20px; padding-block: 12px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 14px; margin-right: auto; text-decoration: none; color: inherit; min-width: 0; }
.logo { position: relative; font-weight: 700; font-size: 27px; letter-spacing: -.04em; line-height: 1; padding-bottom: 5px; }
.logo::after { content: ""; position: absolute; left: 1px; right: 1px; bottom: 0; height: 3px; border-radius: 2px; background: var(--grad); background-size: 200% 100%; animation: flow 6s linear infinite alternate; }
.brand .pole { display: flex; flex-direction: column; line-height: 1.2; border-left: 1px solid var(--band-line); padding-left: 14px; min-width: 0; }
.brand .pole b { font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.brand .pole span { font-size: 11.5px; opacity: .65; white-space: nowrap; }
.topnav { display: flex; gap: 2px; }
.topnav a { text-decoration: none; color: rgba(255, 255, 255, .68); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 8px; transition: color .2s, background .2s; white-space: nowrap; }
.topnav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.topnav a[aria-current="page"] { color: #0a0006; background: #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-content: center; font-size: 13px; font-weight: 700; background: var(--pink); color: #0a0006; border: 0; flex: none; text-decoration: none; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
@keyframes flow { from { background-position: 0% 0; } to { background-position: 100% 0; } }

@media (max-width: 1120px) { .brand .pole span { display: none; } .topnav a { padding: 8px 9px; } }
@media (max-width: 1000px) and (min-width: 861px) { .brand .pole { display: none; } }
/* Bottom tab bar on phones (app feel) */
.tabbar { display: none; }
@media (max-width: 860px) {
  :root { --nav-h: 64px; }
  .topnav, .brand .pole span, .newbtn { display: none !important; }
  .brand .pole b { overflow: hidden; text-overflow: ellipsis; }
  #demo .banner { font-size: 12.5px; padding: 8px 12px; gap: 4px 10px; }
  #demo .banner .btn { padding: 4px 9px; font-size: 12px; }
  .tabbar a > span:first-child { height: 30px; display: grid; place-content: center; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--band); border-top: 1px solid var(--band-line); padding: 6px max(6px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: rgba(255, 255, 255, .6); font-size: 10.5px; font-weight: 500; padding: 5px 2px; border-radius: 10px; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: #fff; }
  .tabbar a[aria-current="page"] svg { color: var(--pink); }
  .tabbar a.plus span:first-child { width: 40px; height: 30px; border-radius: 10px; display: grid; place-content: center; background: var(--grad); color: #0a0006; }
}

main { padding-block: 28px 90px; }
.banner { border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); border-radius: 12px; padding: 11px 15px; margin-bottom: 20px; font-size: 14px; display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; }
.banner b { font-weight: 500; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--ink); background: transparent; padding: 10px 16px; border-radius: 10px; font-weight: 500; font-size: 14px; text-decoration: none; transition: transform .15s var(--ease), background .2s, color .2s, border-color .2s, box-shadow .25s; white-space: nowrap; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { box-shadow: 0 10px 24px -12px rgba(10, 0, 6, .6); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: var(--on-zone); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { padding: 14px 22px; font-size: 16px; }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.band-btn { border-color: rgba(255, 255, 255, .55); color: #fff; }
.band-btn:hover { background: #fff; color: #0a0006; }
.btn.grad { border: 0; background: var(--grad); color: #0a0006; }
.btn.grad:hover { background: var(--grad); color: #0a0006; box-shadow: 0 10px 24px -10px rgba(255, 26, 26, .5); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes slidein { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes slideback { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes burst { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes rec { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 70%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
.enter .rv { animation: rise .55s var(--ease) both; animation-delay: calc(var(--d, 0) * 45ms); }
.step-fwd { animation: slidein .4s var(--ease) both; }
.step-back { animation: slideback .4s var(--ease) both; }
::view-transition-old(root) { animation: vt-out .25s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .4s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); filter: blur(3px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); filter: blur(3px); } }
@media (prefers-reduced-motion: reduce) { *, ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; transition: none !important; } }

/* ---------- Panels & cards ---------- */
.panel { position: relative; background: var(--surface); border-radius: var(--r); overflow: hidden; }
.panel.gl::after, .card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); }
.pad { padding: 22px 22px 24px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { position: relative; overflow: hidden; text-align: left; background: var(--surface); border: 0; border-radius: var(--r); padding: 18px 18px 21px; display: flex; flex-direction: column; gap: 12px; min-width: 0; text-decoration: none; color: inherit; transition: transform .35s var(--ease), box-shadow .35s; }
.card::after { transform: scaleX(.18); transform-origin: left; transition: transform .5s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::after { transform: scaleX(1); }
.card h3 { font-size: 23px; }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.card .meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 30px; }
.empty { padding: 34px 22px; text-align: center; color: var(--muted); }
.empty b { display: block; font-family: var(--f-serif); font-weight: 500; font-size: 24px; color: var(--ink); margin-bottom: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: end; margin-bottom: 26px; }
.hero h1 { font-size: clamp(42px, 7vw, 82px); line-height: 1; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin-top: 14px; color: var(--muted); max-width: 56ch; font-size: 16.5px; }
.cta-card { position: relative; overflow: hidden; border-radius: var(--r); padding: 24px; background: var(--band); color: #fff; border: 0; text-align: left; display: flex; flex-direction: column; gap: 8px; min-height: 180px; text-decoration: none; transition: transform .25s var(--ease), box-shadow .3s; }
.cta-card::before { content: ""; position: absolute; width: 240px; aspect-ratio: 830 / 862; right: -60px; top: -76px; background: url("/img/clay-ball.webp") center / contain no-repeat; transition: transform .9s var(--spring); }
.cta-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); }
.cta-card:hover { box-shadow: var(--shadow); }
.cta-card:hover::before { transform: rotate(-28deg) scale(1.12, 1.04) translate(-12px, 12px); }
.cta-card > * { position: relative; }
.cta-card b { font-family: var(--f-serif); font-weight: 500; font-size: 32px; line-height: 1; max-width: 12ch; }
.cta-card > span { font-size: 14px; opacity: .75; max-width: 40ch; }
.cta-card .go { margin-top: auto; display: inline-flex; gap: 10px; align-items: center; font-weight: 500; opacity: 1; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; text-decoration: none; color: inherit; }
.stat b { font-size: clamp(30px, 4vw, 44px); font-weight: 500; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- Pills & chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.t-new { color: var(--new); background: color-mix(in srgb, var(--new) 12%, transparent); }
.pill.t-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.pill.t-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.pill.t-pink { color: #b0189a; background: color-mix(in srgb, var(--pink) 22%, transparent); }
.pill.t-live { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.pill.t-live::before { animation: rec 1.6s infinite; }
.pill.t-good { color: var(--good); background: color-mix(in srgb, var(--good) 13%, transparent); }
.pill.t-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.pill.plain::before { display: none; }
:root[data-theme="dark"] .pill.t-pink { color: var(--pink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.t-pink { color: var(--pink); } }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; padding: 3px 9px; border-radius: 7px; background: var(--surface-2); color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }

/* Selectable chips (multi-choice) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button, .choice { border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 7px 13px; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: background .2s, color .2s, border-color .2s, transform .15s; }
.chips button:hover { border-color: var(--ink); color: var(--ink); }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips button:active { transform: scale(.96); }
.seg { display: inline-flex; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 7px; font-weight: 500; font-size: 13.5px; color: var(--muted); transition: color .2s, background .25s var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Type tiles in the request form */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 8px; }
.tile { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 8px; min-height: 84px; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.tile i { font-style: normal; width: 30px; height: 30px; border-radius: 8px; display: grid; place-content: center; background: var(--surface); font-size: 15px; }
.tile span { font-weight: 500; font-size: 14px; line-height: 1.25; }
.tile:hover { border-color: var(--ink); transform: translateY(-2px); }
.tile[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tile[aria-pressed="true"] i { background: var(--pink); color: #0a0006; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 500; }
.field > label small, .field > .lbl small { color: var(--muted); font-weight: 400; }
.req::after { content: " *"; color: var(--bad); }
.hint { font-size: 12.5px; color: var(--muted); }
.inp, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 15px; min-width: 0; transition: border-color .2s, box-shadow .2s, background .2s; }
.inp:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 35%, transparent); background: var(--surface); }
.field textarea, textarea.inp { min-height: 96px; resize: vertical; line-height: 1.5; }
.field.err input, .field.err textarea, .field.err select { border-color: var(--bad); }
.field .errmsg { font-size: 12.5px; color: var(--bad); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

/* ---------- Wizard ---------- */
.wizard { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; }
.steps { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 80px); list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.steps button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 9px 10px; border-radius: 10px; text-align: left; font-size: 14px; font-weight: 500; color: var(--muted); }
.steps button i { font-style: normal; width: 24px; height: 24px; border-radius: 7px; display: grid; place-content: center; font-size: 12px; background: var(--surface-2); flex: none; font-variant-numeric: tabular-nums; }
.steps button:hover { color: var(--ink); background: var(--surface-2); }
.steps button[aria-current="step"] { color: var(--ink); background: var(--surface-2); }
.steps button[aria-current="step"] i { background: var(--ink); color: var(--bg); }
.steps button.done i { background: var(--pink); color: #0a0006; }
.progress { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; margin: 6px 10px 4px; }
.progress i { display: block; height: 100%; background: var(--grad); transition: width .5s var(--ease); }
.step-body h2 { font-size: clamp(30px, 4vw, 42px); }
.step-body > header { margin-bottom: 20px; }
.step-body > header p { color: var(--muted); margin-top: 6px; }
.step-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.subhead { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 22px 0 10px; }
.subhead:first-child { margin-top: 0; }
@media (max-width: 860px) {
  .wizard { grid-template-columns: minmax(0, 1fr); }
  .steps { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 6px; }
  .steps::-webkit-scrollbar { display: none; }
  .steps li { flex: none; }
  .steps button span { display: none; }
  .steps button[aria-current="step"] span { display: inline; }
  .progress { display: none; }
}

/* Slots (créneaux) */
.slot { display: grid; grid-template-columns: minmax(130px, 1.1fr) minmax(130px, 1fr) 100px 100px minmax(0, 1.4fr) 36px; gap: 8px; align-items: end; padding: 12px; background: var(--surface-2); border-radius: 12px; }
.slot + .slot { margin-top: 8px; }
.slot .field > label { font-size: 11.5px; color: var(--muted); }
.slot .inp, .slot .field input, .slot .field select { background: var(--surface); }
.iconbtn { width: 36px; height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 18px; display: grid; place-content: center; }
.iconbtn:hover { background: var(--surface-3); color: var(--bad); }
@media (max-width: 760px) { .slot { grid-template-columns: 1fr 1fr; } .slot .wide { grid-column: 1 / -1; } .slot .iconbtn { justify-self: end; } }

/* Roles stepper */
.rolegroup + .rolegroup { margin-top: 16px; }
.rolegroup h4 { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.role { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; background: var(--surface-2); border: 1px solid transparent; border-radius: 10px; font-size: 14px; transition: border-color .2s, background .2s; }
.role.on { background: color-mix(in srgb, var(--pink) 16%, var(--surface)); border-color: color-mix(in srgb, var(--pink) 60%, transparent); }
.role > span { flex: 1; min-width: 0; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border-radius: 8px; padding: 2px; }
.stepper button { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; font-size: 16px; line-height: 1; }
.stepper button:hover { background: var(--surface-3); }
.stepper b { min-width: 18px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Recap / detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.detail aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 80px); display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 980px) { .detail { grid-template-columns: minmax(0, 1fr); } .detail aside { position: static; } }
.dhero { margin-bottom: 18px; }
.dhero h1 { font-size: clamp(34px, 5.5vw, 62px); line-height: 1.02; letter-spacing: -.02em; margin-top: 10px; }
.dhero .meta { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 12px; }
.kv { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 0; font-size: 14.5px; }
.kv > div { padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.kv > div:nth-child(odd) { color: var(--muted); padding-right: 12px; }
.kv > div:nth-child(-n+2) { border-top: 0; }
.block h3 { font-size: 24px; margin-bottom: 12px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.timeline li:first-child { border-top: 0; }
.datebox { text-align: center; background: var(--surface-2); border-radius: 10px; padding: 6px 0; line-height: 1.05; }
.datebox b { display: block; font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.datebox span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.datebox.k-tournage { background: var(--ink); color: var(--bg); }
.datebox.k-tournage span { color: inherit; opacity: .7; }
.crew { list-style: none; margin: 0; padding: 0; }
.crew li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.crew li:first-child { border-top: 0; }
.crew .who { flex: 1; min-width: 140px; }
.crew .who b { font-weight: 500; display: block; }
.crew .who span { font-size: 12.5px; color: var(--muted); }
.fill { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.bar { flex: 1; height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; min-width: 40px; }
.bar i { display: block; height: 100%; background: var(--grad); transition: width .5s var(--ease); }

/* Comments */
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; margin-bottom: 12px; }
.msg { background: var(--surface-2); border-radius: 12px 12px 12px 4px; padding: 10px 12px; font-size: 14px; max-width: 92%; }
.msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--pink) 20%, var(--surface)); border-radius: 12px 12px 4px 12px; }
.msg.sys { align-self: center; background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: 12.5px; text-align: center; border-radius: 10px; }
.msg header { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; display: flex; gap: 8px; }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Toolbar & tables ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .inp { width: auto; flex: 1 1 220px; }
.toolbar select.inp { flex: 0 1 180px; }
.tablewrap { overflow-x: auto; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 760px; }
.tbl th, .tbl td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; position: sticky; top: 0; background: var(--surface); }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr[data-href] { cursor: pointer; }
.tbl td.t { font-weight: 500; }
.tbl .sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }

/* People */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.person { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.person header { display: flex; align-items: center; gap: 12px; }
.person header b { font-weight: 500; font-size: 16px; display: block; }
.person header span { font-size: 12.5px; color: var(--muted); }
.person .links { display: flex; gap: 10px; font-size: 13px; flex-wrap: wrap; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-head h2 { font-size: 34px; text-transform: capitalize; margin-right: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; }
.cal > div { background: var(--surface); min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .dow { min-height: 0; padding: 8px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); }
.cal .out { background: var(--surface-2); }
.cal .out .d { opacity: .4; }
.cal .d { font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; width: 24px; height: 24px; display: grid; place-content: center; border-radius: 50%; }
.cal .today .d { background: var(--ink); color: var(--bg); }
.ev { display: block; font-size: 11.5px; line-height: 1.25; padding: 3px 6px; border-radius: 6px; background: var(--surface-2); text-decoration: none; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--muted); }
.ev.k-tournage { border-left-color: var(--pink); background: color-mix(in srgb, var(--pink) 18%, var(--surface)); }
.ev:hover { filter: brightness(.95); }
@media (max-width: 700px) {
  .cal > div { min-height: 64px; padding: 3px; }
  .ev { font-size: 0; height: 6px; padding: 0; border-left-width: 0; background: var(--pink); }
  .cal .dow { font-size: 9.5px; padding: 6px 2px; text-align: center; }
}
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li a { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.agenda li:first-child a { border-top: 0; }
.agenda li b { font-weight: 500; display: block; }
.agenda li span.sub { font-size: 12.5px; color: var(--muted); }

/* ---------- Login ---------- */
.login-stage { position: relative; max-width: 900px; margin: 5vh auto 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); align-items: center; gap: 24px; }
.login-ball { --s: min(100%, 380px); position: relative; justify-self: center; animation: burst 1s var(--spring) both; }
.login-ball i { --dur: 8s; }
.login { padding: 28px 26px 30px; display: flex; flex-direction: column; gap: 8px; }
.login h1 { font-size: 46px; }
.loginform { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.loginmsg { min-height: 1.4em; font-size: 14px; color: var(--muted); }
.loginmsg.err { color: var(--bad); }
.otp { letter-spacing: .5em; font-size: 24px !important; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .login-stage { grid-template-columns: minmax(0, 1fr); margin-top: 2vh; } .login-ball { --s: 150px; margin-bottom: -40px; } .login { position: relative; z-index: 1; } }

/* ---------- Modal & toast ---------- */
.overlay { position: fixed; inset: 0; z-index: 30; background: rgba(10, 0, 6, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); animation: rise .3s var(--ease); }
.modal { position: relative; overflow: hidden; background: var(--surface); border-radius: 20px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.modal::after { content: ""; position: sticky; display: block; left: 0; right: 0; bottom: -26px; height: 4px; margin: 0 -24px -26px; background: var(--grad); }
.modal h2 { font-size: 30px; }
.modal .x { position: absolute; top: 14px; right: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--nav-h) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; background: var(--band); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); animation: toastin .35s var(--ease); max-width: calc(100vw - 32px); }
.toast.err { background: var(--bad); }
.qrbox { background: #fff; border-radius: 12px; padding: 8px; line-height: 0; align-self: center; }
.linkbox { display: flex; gap: 8px; }
.linkbox .inp { font-size: 13px; }
.done-stage { text-align: center; max-width: 620px; margin: 6vh auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.done-stage .clay { position: relative; --s: 170px; animation: burst 1s var(--spring) both; }
.done-stage h1 { font-size: clamp(38px, 6vw, 64px); }
.ref { font-family: var(--f-sans); font-weight: 500; font-size: 13px; letter-spacing: .06em; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv > div:nth-child(odd) { padding-bottom: 0; font-size: 12.5px; }
  .kv > div:nth-child(even) { border-top: 0; padding-top: 2px; }
  .pad { padding: 18px 16px 20px; }
  .section-head h2 { font-size: 26px; }
  .step-nav .btn { flex: 1; }
}

/* ---------- Print: fiche de tournage ---------- */
@media print {
  .appbar, .tabbar, .blobs, aside .no-print, .no-print, .banner { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .panel, .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .detail { grid-template-columns: 1fr; }
  main { padding: 0; }
}
