/* RAYON — système de design.
   Un SaaS de 2026, pas une maquette : fond clair, une seule couleur
   d'accent, chiffres en monospace, surfaces à 1 px, mouvements courts.
   Rien de la nuit/jaune d'AnimaLynx, rien du papier-plan de 1MT. */

:root {
  --bg: #f6f6f8;
  --bg-2: #efeff3;
  --surface: #ffffff;
  --ink: #0b0b10;
  --ink-2: #3a3a45;
  --muted: #71717d;
  --line: #e6e6ec;
  --line-2: #d6d6df;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: #eeedfd;
  --ok: #15803d;
  --ok-soft: #e8f7ec;
  --warn: #b45309;
  --warn-soft: #fff4e5;
  --danger: #b91c1c;
  --danger-soft: #fdecec;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 1px 2px rgba(11, 11, 16, .04), 0 8px 24px rgba(11, 11, 16, .06);
  --shadow-lg: 0 2px 4px rgba(11, 11, 16, .05), 0 24px 60px rgba(11, 11, 16, .10);
  --font: -apple-system, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font);
  letter-spacing: -.005em;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; font-weight: 600; }
h1 { font-size: 28px; line-height: 1.15; }
h2 { font-size: 20px; line-height: 1.25; }
h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.hidden { display: none !important; }

/* --- Boutons -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface);
  font-weight: 500; transition: transform .08s ease, background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-2); border-color: #c9c9d4; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 1px 2px rgba(79, 70, 229, .3), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { background: linear-gradient(135deg, #4338ca, #6d28d9); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-2); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 16px; border-radius: 12px; }
.btn .kbd { margin-left: 4px; }

/* --- Champs ----------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 96px; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.input-affix { position: relative; }
.input-affix .input { padding-right: 62px; }
.input-affix .affix {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  background: var(--bg-2); padding: 2px 6px; border-radius: 6px;
}

/* --- Surfaces --------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 20px;
}
.card-tight { padding: 14px 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--ink-2); white-space: nowrap;
}
.badge-accent { background: var(--accent-soft); border-color: #dcd9fb; color: var(--accent); }
.badge-ok { background: var(--ok-soft); border-color: #cdebd6; color: var(--ok); }
.badge-warn { background: var(--warn-soft); border-color: #f9dfb7; color: var(--warn); }
.badge-danger { background: var(--danger-soft); border-color: #f5c6c6; color: var(--danger); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot-live { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.kbd {
  display: inline-block; font-family: var(--mono); font-size: 11px; line-height: 1;
  padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--muted); box-shadow: 0 1px 0 var(--line-2);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 13px; transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* --- Coquille de l'application --------------------------------------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 18px 14px; border-right: 1px solid var(--line); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  position: relative; box-shadow: 0 2px 6px rgba(79, 70, 229, .35);
}
.brand .mark::after {
  content: ""; position: absolute; left: 7px; top: 13px; width: 14px; height: 2px;
  background: #fff; border-radius: 2px; box-shadow: 0 -5px 0 #fff, 0 5px 0 #fff;
  opacity: .95;
}
.brand b { font-weight: 600; letter-spacing: -.01em; }
.brand .tag { margin-left: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px;
  border-radius: 9px; color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.nav a:hover { background: var(--bg-2); }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav a .n { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.nav a.on .n { color: var(--accent); }
.nav .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.nav .lbl { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.side .bottom { margin-top: auto; }
.credits-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg);
}
.credits-card .bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.credits-card .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 3px; }

.main { padding: 28px 36px 60px; max-width: 1180px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.topbar .crumb { font-size: 12px; color: var(--muted); margin-bottom: 6px; font-family: var(--mono); }
.view { animation: rise .24s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- Étapes ----------------------------------------------------------- */
.steps { display: flex; gap: 6px; align-items: center; margin-bottom: 20px; }
.steps .s { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.steps .s i {
  width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center;
  font-family: var(--mono); font-size: 11px; border: 1px solid var(--line-2); background: var(--surface);
}
.steps .s.done i { background: var(--ok); color: #fff; border-color: var(--ok); }
.steps .s.now { color: var(--ink); font-weight: 500; }
.steps .s.now i { background: var(--ink); color: #fff; border-color: var(--ink); }
.steps .arr { color: var(--line-2); }

/* --- Stat tiles ------------------------------------------------------- */
.stat { padding: 16px 18px; }
.stat .v { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat .d { font-size: 12px; margin-top: 8px; }

/* --- Sujets ----------------------------------------------------------- */
.sujet {
  display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.sujet:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.sujet.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.sujet .q { font-weight: 500; }
.sujet .src { font-size: 12px; color: var(--muted); font-family: var(--mono); margin-top: 2px; }
.meter { display: inline-flex; gap: 2px; }
.meter i { width: 5px; height: 12px; border-radius: 2px; background: var(--line-2); }
.meter i.f { background: var(--accent); }

/* --- Produits --------------------------------------------------------- */
.produit {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s;
}
.produit.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.produit .ph {
  height: 150px; display: grid; place-items: center; background: #fff; border-bottom: 1px solid var(--line);
  position: relative;
}
.produit .ph img { max-height: 120px; max-width: 86%; object-fit: contain; }
.produit .ph .up {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: 13px; background: repeating-linear-gradient(135deg, #fafafc 0 8px, #f3f3f7 8px 16px);
  cursor: pointer;
}
.produit .ph .up b { display: block; color: var(--ink-2); }
.produit .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.produit .name { font-weight: 500; line-height: 1.3; }
.produit .price { font-family: var(--mono); font-size: 18px; }
.produit .role { font-size: 12px; color: var(--muted); }

/* --- Journal de production ------------------------------------------- */
.journal {
  background: #0e0e13; color: #d9d9e3; border-radius: var(--r-lg); padding: 18px 20px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7; box-shadow: var(--shadow-lg);
  min-height: 300px; position: relative; overflow: hidden;
}
.journal::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 200px at 20% -10%, rgba(124, 58, 237, .25), transparent 60%);
}
.journal .ln { display: flex; gap: 12px; opacity: 0; animation: ln .25s ease forwards; }
@keyframes ln { to { opacity: 1; } }
.journal .t { color: #6f6f80; min-width: 64px; }
.journal .k { color: #a5b4fc; }
.journal .ok { color: #4ade80; }
.journal .warn { color: #fbbf24; }
.journal .cost { color: #c4b5fd; }
.journal .cur::after { content: "▍"; animation: pulse 1s steps(2) infinite; color: #a5b4fc; }
.pipeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.pipeline .p {
  padding: 10px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-size: 12px; text-align: center; color: var(--muted);
}
.pipeline .p b { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.pipeline .p.done { border-color: #cdebd6; background: var(--ok-soft); color: var(--ok); }
.pipeline .p.now { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s ease; }

/* --- Vidéos ----------------------------------------------------------- */
.video-card { display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding: 14px; }
.video-card .thumb {
  aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #111; position: relative;
  border: 1px solid var(--line);
}
.video-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card .thumb .dur {
  position: absolute; right: 6px; bottom: 6px; font-family: var(--mono); font-size: 11px;
  background: rgba(0, 0, 0, .7); color: #fff; padding: 2px 6px; border-radius: 5px;
}
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button {
  height: 36px; padding: 0 12px; background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); font-weight: 500; font-size: 13px; margin-bottom: -1px;
}
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.copybox {
  position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  white-space: pre-wrap; max-height: 320px; overflow: auto;
}
.copybox .cp { position: absolute; right: 10px; top: 10px; }
.alert {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  border: 1px solid #f9dfb7; background: var(--warn-soft); color: #7c3f06; font-size: 13px;
}
.alert.ok { border-color: #cdebd6; background: var(--ok-soft); color: #14532d; }
.alert.info { border-color: #dcd9fb; background: var(--accent-soft); color: #3730a3; }

/* --- Pricing ---------------------------------------------------------- */
.plan { position: relative; padding: 22px; }
.plan.reco { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12), var(--shadow); }
.plan .p { font-family: var(--mono); font-size: 34px; font-weight: 500; letter-spacing: -.02em; margin: 8px 0 2px; }
.plan .p small { font-size: 14px; color: var(--muted); font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 14px 0 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.plan li::before { content: "—"; color: var(--accent); margin-right: 8px; }
.plan .ribbon { position: absolute; top: -11px; left: 20px; }

/* --- Landing ---------------------------------------------------------- */
.land { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.land-nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.land-nav .links { display: flex; gap: 22px; font-size: 14px; color: var(--ink-2); }
.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 52px; line-height: 1.05; letter-spacing: -.035em; font-weight: 650; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: 18px; color: var(--ink-2); margin: 18px 0 26px; max-width: 520px; line-height: 1.5; }
.hero .cta { display: flex; gap: 10px; align-items: center; }
.hero .proof { display: flex; gap: 18px; margin-top: 22px; font-size: 13px; color: var(--muted); }
.hero .proof b { color: var(--ink); font-family: var(--mono); }
.frame {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: #000;
  aspect-ratio: 16/9;
}
.frame video, .frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.section { padding: 56px 0; }
.section h2 { font-size: 32px; letter-spacing: -.03em; margin-bottom: 8px; }
.section .sub { color: var(--ink-2); font-size: 16px; max-width: 640px; margin-bottom: 28px; }
.feat { padding: 22px; }
.feat h3 { margin-bottom: 6px; }
.feat p { color: var(--ink-2); font-size: 14px; }
.feat .ico {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 14px; font-family: var(--mono); font-size: 12px; font-weight: 600;
}
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare .col { padding: 22px; }
.compare .col.bad { background: var(--bg-2); border-color: var(--line); }
.compare .col.good { border-color: var(--accent); }
.compare ul { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.compare .bad li::before { content: "×"; color: var(--danger); font-family: var(--mono); margin-right: 10px; }
.compare .good li::before { content: "✓"; color: var(--ok); font-family: var(--mono); margin-right: 10px; }
footer { padding: 40px 0 60px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 40px; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .main { padding: 20px; }
  .grid-2, .grid-3, .compare, .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; }
  .video-card { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(4, 1fr); }
}

/* ====================================================================== */
/* V2 — plusieurs chaînes, sélecteur, tableau de bord, recherche photo    */
/* ====================================================================== */

body.app { background:
  radial-gradient(900px 400px at 100% -10%, rgba(124, 58, 237, .07), transparent 60%),
  radial-gradient(700px 300px at -10% 110%, rgba(79, 70, 229, .06), transparent 60%),
  var(--bg); }
.ico { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav a .ico { color: var(--muted); }
.nav a.on .ico { color: var(--accent); }

/* le sélecteur de chaîne — l'espace de travail */
.switch {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin: 2px 0 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); text-align: left; transition: border-color .15s, box-shadow .15s;
}
.switch:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.sw-swatch { width: 30px; height: 30px; border-radius: 9px; flex: none; border: 1px solid rgba(0,0,0,.08); background: linear-gradient(135deg, var(--accent), var(--accent-2)); position: relative; overflow: hidden; }
.sw-swatch i { position: absolute; inset: 0; }
.sw-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sw-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-chev { color: var(--muted); font-size: 12px; }
.dropdown {
  position: absolute; left: 14px; right: 14px; top: 116px; z-index: 20; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: rise .16s ease both;
}
.dropdown .dd { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; width: 100%; background: none; border: 0; text-align: left; }
.dropdown .dd:hover { background: var(--bg-2); }
.dropdown .dd.on { background: var(--accent-soft); }
.dropdown .dd .sw-swatch { width: 24px; height: 24px; border-radius: 7px; }
.dropdown .dd .n { font-size: 13.5px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown .dd .c { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.dropdown .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.dropdown .dd.new { color: var(--accent); font-weight: 500; }

/* tableau de bord des chaînes */
.chaines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.chaine-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform .12s ease, box-shadow .15s; }
.chaine-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.chaine-card .band { height: 92px; position: relative; display: flex; align-items: flex-end; padding: 12px 16px; }
.chaine-card .band .da { position: absolute; right: 12px; top: 12px; display: flex; gap: 4px; }
.chaine-card .band .da i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.12); }
.chaine-card .band .nom { font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.chaine-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.chaine-card .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chaine-card .kpi { padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.chaine-card .kpi b { display: block; font-family: var(--mono); font-size: 16px; font-weight: 500; }
.chaine-card .kpi span { font-size: 11px; color: var(--muted); }
.chaine-card .last { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.chaine-card .last img { width: 64px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.chaine-new { border: 1.5px dashed var(--line-2); background: transparent; box-shadow: none; display: grid; place-items: center; min-height: 240px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.chaine-new:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chaine-new .plus { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 24px; margin: 0 auto 10px; font-weight: 300; }

/* les DA proposées */
.das { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.da-opt { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; background: var(--surface); transition: border-color .15s, box-shadow .15s; text-align: left; }
.da-opt:hover { border-color: var(--line-2); }
.da-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.da-opt .prev { height: 54px; border-radius: 8px; position: relative; overflow: hidden; margin-bottom: 8px; border: 1px solid rgba(0,0,0,.06); }
.da-opt .prev .t { position: absolute; left: 10px; bottom: 8px; font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.da-opt .prev .a { position: absolute; right: 8px; top: 8px; width: 22px; height: 8px; border-radius: 4px; }
.da-opt .n { font-size: 13px; font-weight: 500; }
.da-opt .d { font-size: 11.5px; color: var(--muted); }

/* recherche automatique de photo */
.search { display: flex; gap: 8px; }
.search .input { flex: 1; }
.produit .ph { background: #fff; background-image: radial-gradient(circle at 50% 120%, rgba(0,0,0,.05), transparent 60%); }
.produit .src { position: absolute; left: 8px; top: 8px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 4px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* rail des étapes de production */
.rail { display: flex; flex-direction: column; gap: 6px; }
.rail .r { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.rail .r i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 11px; font-family: var(--mono); color: var(--muted); flex: none; }
.rail .r .l { flex: 1; }
.rail .r .d { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.rail .r.now { border-color: var(--accent); background: var(--accent-soft); }
.rail .r.now i { border-color: var(--accent); color: var(--accent); }
.rail .r.done i { background: var(--ok); border-color: var(--ok); color: #fff; }

/* vide, avec un motif dessiné plutôt qu'une phrase seule */
.empty { text-align: center; padding: 56px 20px; }
.empty .art { width: 120px; height: 72px; margin: 0 auto 18px; position: relative; }
.empty .art i { position: absolute; border-radius: 8px; border: 1.5px solid var(--line-2); background: var(--surface); }
.empty .art i:nth-child(1) { left: 0; top: 14px; width: 48px; height: 44px; transform: rotate(-6deg); }
.empty .art i:nth-child(2) { left: 36px; top: 4px; width: 48px; height: 44px; box-shadow: var(--shadow); }
.empty .art i:nth-child(3) { left: 72px; top: 14px; width: 48px; height: 44px; transform: rotate(6deg); }

@media (max-width: 960px) { .chaines, .das { grid-template-columns: 1fr; } }

/* le format proposé, sous chaque requête */
.fmt-tag { color: var(--accent); font-family: var(--font); font-weight: 500; }

/* le plan éditorial : un épisode par ligne */
.ep { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.ep.fait { opacity: .62; }
.ep-n { font-family: var(--mono); font-size: 15px; color: var(--muted); }
.ep-t { font-weight: 500; letter-spacing: -.01em; }
.ep-m { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.ep-q { font-size: 11.5px; color: var(--muted); margin-top: 3px; opacity: .8; }
.ep .sais { color: var(--accent); }

/* ── Styles de film (styles.js) : partagés par la landing et l'app ── */
.styles-l { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; text-align: left; margin-top: 8px; }
.style-c { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.style-v { position: relative; aspect-ratio: 16 / 9; background: #0b0b10; cursor: pointer; }
.style-v img, .style-v video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.style-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); box-shadow: 0 8px 24px rgba(0,0,0,.25); cursor: pointer; transition: transform .15s; }
.style-play span { position: absolute; left: 26px; top: 20px; border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent #111; }
.style-v:hover .style-play { transform: scale(1.07); }
.style-d { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; padding: 2px 7px; border-radius: 6px; }
.style-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.style-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.style-t b { font-size: 16px; }
.style-e { font-size: 13.5px; }
.style-p { display: flex; gap: 5px; margin-top: 2px; }
.style-p i { width: 18px; height: 8px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); }
.styles-a { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.style-o { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px; background: var(--surface); cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.style-o:hover { border-color: var(--line-2); }
.style-o.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.style-o img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 7px; }
.style-o .n { font-size: 13px; font-weight: 500; }
.style-o .d { font-size: 11.5px; color: var(--muted); }
@media (max-width: 760px) { .styles-l, .styles-a { grid-template-columns: 1fr; } }


/* ── L'espace client : prise en main (13/09) ─────────────────────────── */
.aide { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.input-lg { height: 48px; font-size: 17px; }
.input-err { border-color: #e5484d !important; box-shadow: 0 0 0 3px rgba(229, 72, 77, .15); }
.chip-sm { height: 26px; font-size: 12.5px; padding: 0 10px; }
.lien-discret { background: none; border: 0; color: var(--muted); font-size: 12.5px; margin-top: 8px; cursor: pointer; padding: 2px 0; text-decoration: underline; text-underline-offset: 3px; }
.lien-discret:hover { color: var(--ink); }
.style-o { position: relative; }
.style-reco { position: absolute; left: 14px; top: 14px; z-index: 1; }
.voix { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.voix-o { border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); padding: 10px 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.voix-o span { font-size: 12px; color: var(--muted); }
.voix-o.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.plus-reglages { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.plus-reglages summary { cursor: pointer; font-size: 13.5px; font-weight: 500; }
.guide { margin-top: 14px; background: var(--bg, #f7f7fa); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.guide ol { margin: 8px 0 6px 18px; display: grid; gap: 4px; }
.wz { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; align-items: start; }
.wz-main { padding: 22px 24px; }
.wz-steps { display: flex; gap: 18px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wz-s { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.wz-s i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11.5px; }
.wz-s.now { color: var(--ink); font-weight: 600; }
.wz-s.now i { background: var(--accent); border-color: var(--accent); color: #fff; }
.wz-s.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.wz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.wz-recap { padding: 0; overflow: hidden; }
.wz-video { aspect-ratio: 16 / 9; background: #0b0b10; }
.wz-video video, .wz-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.next { padding: 22px 24px; border-color: rgba(79, 70, 229, .35); box-shadow: 0 0 0 4px rgba(79, 70, 229, .06), var(--shadow); }
.next h2 { font-size: 22px; letter-spacing: -.02em; }
.parcours { display: grid; gap: 4px; }
.pc { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: inherit; }
.pc:hover { background: var(--bg, #f7f7fa); }
.pc i { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; color: var(--muted); }
.pc b { display: block; font-size: 14px; font-weight: 500; }
.pc span { font-size: 12.5px; color: var(--muted); }
.pc.ok i { background: var(--ok); border-color: var(--ok); color: #fff; }
.pc.ok b { color: var(--muted); }
.pc.now { background: rgba(79, 70, 229, .06); }
.pc.now i { background: var(--accent); border-color: var(--accent); color: #fff; }
.ep-mini { padding: 10px 12px; }
.danger { border-color: #f3c9c9; }
.btn-danger { color: #c0343a; border-color: #f0c2c2; background: #fff; }
.btn-danger:hover { background: #fdf2f2; }
@media (max-width: 960px) { .wz, .voix { grid-template-columns: 1fr; } }

/* ── Mobile (Paul, 13/09 : « sur mobile c'est horrible ») ────────────────
   Mesuré à 390 px : la barre latérale remplissait tout le premier écran, et
   les grilles écrites en style en ligne (1.35fr .65fr…) ne se repliaient pas :
   la page faisait jusqu'à 659 px de large. */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .main { min-width: 0; padding: 16px 14px 48px; }
  /* la barre latérale devient un bandeau : marque + chaîne, puis le menu qui défile */
  .side { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 10px; padding: 10px 14px 8px; box-shadow: 0 1px 0 var(--line); }
  .side .brand { padding: 0; }
  .side .brand b { display: none; }
  .side .switch { margin: 0; min-width: 0; }
  .side .dropdown { grid-column: 1 / -1; }
  .side .nav { grid-column: 1 / -1; flex-direction: row; overflow-x: auto; gap: 4px; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; }
  .side .nav::-webkit-scrollbar { display: none; }
  .side .nav .lbl, .side .nav .sep { display: none; }
  .side .nav a { flex: none; height: 34px; white-space: nowrap; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); }
  .side .nav a.on { border-color: transparent; }
  .side .bottom { display: none; }
  /* toute grille de page passe sur une colonne, y compris celles écrites en ligne */
  .main .grid, .main .grid[style] { grid-template-columns: minmax(0, 1fr) !important; }
  .topbar { flex-direction: column-reverse; gap: 8px; margin-bottom: 16px; }
  .topbar h1 { font-size: 24px; }
  .steps { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
  .steps .s { flex: none; }
  .search { flex-direction: column; }
  .input, .select { font-size: 16px; }
  .wz-main { padding: 18px 16px; }
  .wz-steps { gap: 10px; }
  .wz-s:not(.now) span { display: none; }
  .wz-nav { flex-wrap: wrap; gap: 10px; }
  .wz .wz-video { display: none; }
  .next { padding: 18px 16px; }
  .next .btn-lg { width: 100%; justify-content: center; }
  .card { min-width: 0; }
  .sujet { grid-template-columns: minmax(0, 1fr) auto; }
  .sujet > div:last-child { grid-column: 1 / -1; }
  .copybox { word-break: break-word; }
}
