/* WebinarX2 Genius — peau V12 fonctionnelle (Phase 2).
   Swappable : quand les maquettes Claude Design arrivent, on remplace ce fichier
   (+ les templates de app.js) sans toucher au câblage API. Charte brief §6. */

:root {
  --navy: #1a1a2e;
  --navy-soft: #23244a;
  --gold: #D4A017;
  --gold-light: #f2c94c;
  --gold-pale: #e8d194;
  --red: #DC2626;
  --bg: #f7f7fb;
  --card: #ffffff;
  --text: #22243a;
  --muted: #6b7280;
  --line: #ececf4;
  --radius: 14px;
  --mono: "JetBrains Mono", monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ---- header ---- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  background: var(--navy); color: #fff; padding: 14px 22px; }
.brand { font-weight: 800; letter-spacing: .01em; }
.brand-genius { color: var(--gold-light); }
.topbar-right { font-size: .85rem; color: #b9bdd4; display: flex; gap: 14px; align-items: center; }
.topbar-right button { background: none; border: 1px solid #ffffff33; color: #cdd1e4; border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: .8rem; }

main { max-width: 980px; margin: 0 auto; padding: 26px 18px 90px; }

/* ---- pastille Genius ---- */
.pastille { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, #fdf3d1, var(--gold)); font-size: 20px; box-shadow: 0 2px 10px #d4a01744; flex: none; }
.loading-screen { text-align: center; padding: 90px 0; color: var(--muted); }

/* ---- bulles / cartes génériques ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 18px; }
.genius-bubble { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.genius-bubble .msg { background: var(--card); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 14px 18px; line-height: 1.55; }

/* ---- formulaires ---- */
input[type=email], input[type=number], input[type=text] {
  font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; width: 100%; max-width: 340px; }
input:focus { outline: 2px solid var(--gold-light); border-color: var(--gold); }
.btn { display: inline-block; border: none; cursor: pointer; font: inherit; font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--navy);
  padding: 13px 26px; border-radius: 10px; transition: transform .12s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-ghost { background: none; border: 1.5px solid var(--line); color: var(--text); font-weight: 600; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ---- bandeau plan ---- */
.plan-banner h1 { font-size: 1.5rem; margin: 0 0 6px; line-height: 1.35; }
.plan-banner .sub { color: var(--muted); font-size: .92rem; }
.mono { font-family: var(--mono); }
.counter { margin-top: 14px; background: var(--navy); color: var(--gold-pale); border-radius: 10px;
  padding: 12px 16px; font-family: var(--mono); font-size: .95rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.counter .constate { color: var(--gold-light); }

/* ---- layout plan ---- */
.plan-grid { display: grid; grid-template-columns: 1fr 240px; gap: 18px; }
@media (max-width: 780px) { .plan-grid { grid-template-columns: 1fr; } }

/* ---- file de réparations ---- */
.rep-line { display: flex; align-items: center; gap: 12px; padding: 13px 6px; border-top: 1px solid var(--line); font-size: .92rem; }
.rep-line .rank { font-family: var(--mono); font-weight: 700; color: var(--muted); width: 34px; }
.rep-line .lock { color: #c3c7d9; }
.rep-line.validated { color: var(--gold); }
.rep-line.validated .rank { color: var(--gold); }
.rep-line .grow { flex: 1; }
.rep-line .dur { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.reserve-line { padding: 12px 6px; color: var(--muted); font-size: .85rem; border-top: 1px dashed var(--line); }

/* ---- mini-heatmap ---- */
.heatmap { display: flex; flex-direction: column; gap: 7px; }
.hm-cell { display: flex; align-items: center; gap: 10px; font-size: .8rem; padding: 9px 11px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--card); }
.hm-dot { width: 13px; height: 13px; border-radius: 4px; flex: none; }
.hm-cell.red .hm-dot { background: var(--red); animation: pulse 2.4s ease-in-out infinite; }
.hm-cell.gold .hm-dot { background: linear-gradient(135deg, var(--gold), var(--gold-light)); animation: none; }
.hm-cell.gold { border-color: var(--gold-pale); background: #fdf9ec; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---- carte réparation (7 blocs) ---- */
.rep-banner { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.rep-banner .title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.badge { font-size: .72rem; background: #f4eeda; color: #8a6d0b; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.proof { background: var(--navy); color: #edf0fb; border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.proof .ts { font-family: var(--mono); color: var(--gold-light); font-size: .82rem; margin-bottom: 8px; }
.proof .verbatim { font-size: 1.12rem; line-height: 1.5; font-weight: 600; }
.diagnostic { line-height: 1.6; margin-bottom: 16px; }
.face-a-face { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (max-width: 700px) { .face-a-face { grid-template-columns: 1fr; } }
.avant, .apres { border-radius: 12px; padding: 16px 18px; line-height: 1.55; font-size: .95rem; }
.avant { background: #fdf1f1; border: 1px solid #f3caca; color: #7c2d2d; }
.avant .label { color: var(--red); }
.avant .txt { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: #dc262699; }
.apres { background: #fdf9ec; border: 1px solid var(--gold-pale); color: #5e4a08; }
.apres .label { color: var(--gold); }
.label { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: 8px; }
.pourquoi { background: #f2f3fa; border-radius: 10px; padding: 13px 16px; font-size: .9rem; color: #4b4f68; margin-bottom: 18px; }
.fil-genius { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.fil-genius input { max-width: none; }
.fil-note { font-size: .78rem; color: var(--muted); margin-top: 6px; }

/* ---- dopamine / wall / done ---- */
.dopamine { text-align: center; padding: 30px 10px; }
.dopamine .cell-flip { width: 64px; height: 64px; border-radius: 14px; margin: 0 auto 18px;
  background: var(--red); animation: flip-gold 1.1s ease forwards .3s; }
@keyframes flip-gold { 40% { transform: rotateY(90deg); background: var(--red); }
  60% { transform: rotateY(90deg); background: var(--gold); }
  100% { transform: rotateY(0); background: linear-gradient(135deg, var(--gold), var(--gold-light)); } }
.wall { text-align: center; padding: 36px 20px; }
.wall h2 { font-size: 1.35rem; margin: 0 0 12px; }
.wall .big { font-family: var(--mono); color: var(--gold); font-weight: 700; }

/* ---- fil Genius (chat) ---- */
.chat-me { background: var(--navy-soft); color: #e6e8f5; border-radius: 14px 4px 14px 14px;
  padding: 10px 15px; margin: 12px 0 8px auto; max-width: 75%; width: fit-content; font-size: .92rem; }
.chat-source { margin-top: 10px; padding: 9px 12px; background: #f2f3fa; border-left: 3px solid var(--gold);
  border-radius: 8px; font-size: .82rem; font-family: var(--mono); color: #4b4f68; }
#fil-thread { margin-bottom: 14px; }
#fil-thread .genius-bubble .msg { font-size: .92rem; white-space: pre-wrap; }

/* ---- toast ---- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy);
  color: #fff; border-radius: 10px; padding: 12px 22px; font-size: .9rem; box-shadow: 0 6px 24px #0007; z-index: 50; }
.small { font-size: .82rem; color: var(--muted); }
