/* ════════════════════════════════════════════════════════════════
   PLATEFORME GRAAL — Direction artistique officielle
   Noir #0D0D0D · Rouge #C0392B · Blanc cassé #F2EDE8
   Typo : Barlow Condensed (titres) + DM Sans (texte)
   ════════════════════════════════════════════════════════════════ */
:root {
  --noir: #0D0D0D;
  --noir2: #161616;
  --noir3: #1e1e1e;
  --rouge: #C0392B;
  --rouge-clair: #e0594b;
  --blanc: #F2EDE8;
  --gris: #8a857f;
  --gris-clair: #b8b3ac;
  --bord: #2a2a2a;
  --ok: #6fbf73;
  --radius: 14px;
  --ombre: 0 20px 50px rgba(0,0,0,.5);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--noir);
  color: var(--blanc);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display {
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 800;
  line-height: 1.05;
}
a { color: inherit; text-decoration: none; }
.rouge { color: var(--rouge); }

/* ── Boutons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--rouge); color: #fff; border: none; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; font-size: 16px; padding: 13px 26px; border-radius: 10px;
  transition: transform .12s ease, background .2s ease;
}
.btn:hover { background: var(--rouge-clair); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; border: 1px solid var(--bord); color: var(--blanc); }
.btn-ghost:hover { background: var(--noir3); border-color: var(--gris); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }

/* ── Layout général ───────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-bottom: 1px solid var(--bord);
  background: var(--noir2); position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: 'Barlow Condensed'; font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: 1px; }
.brand .dot { width: 12px; height: 12px; background: var(--rouge); border-radius: 50%; box-shadow: 0 0 14px var(--rouge); }
.topnav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topnav a { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--gris-clair); }
.topnav a:hover { color: var(--blanc); background: var(--noir3); }
.topnav a.active { color: var(--blanc); background: var(--noir3); }
.topnav .who { color: var(--gris); font-size: 13px; padding-left: 8px; }

.layout { display: flex; min-height: calc(100vh - 65px); }
.sidebar {
  width: 260px; flex-shrink: 0; background: var(--noir2);
  border-right: 1px solid var(--bord); padding: 22px 14px; overflow-y: auto;
}
.sidebar .grp-title { font-size: 11px; letter-spacing: 1.5px; color: var(--gris); text-transform: uppercase; margin: 18px 12px 8px; font-weight: 700; }
.sidebar a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  font-size: 14.5px; color: var(--gris-clair); margin-bottom: 2px; transition: background .15s;
}
.sidebar a:hover { background: var(--noir3); color: var(--blanc); }
.sidebar a.active { background: var(--rouge); color: #fff; }
.sidebar a .ic { font-size: 18px; width: 22px; text-align: center; }
.content { flex: 1; padding: 34px 40px 80px; max-width: 1000px; overflow-x: hidden; }

/* ── En-têtes de page ─────────────────────────────────── */
.page-head { margin-bottom: 28px; }
.page-head .kicker { color: var(--rouge); font-family: 'Barlow Condensed'; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 14px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); margin-top: 4px; }
.page-head p { color: var(--gris-clair); margin-top: 8px; max-width: 640px; }

/* ── Cartes ───────────────────────────────────────────── */
.card { background: var(--noir2); border: 1px solid var(--bord); border-radius: var(--radius); padding: 24px; }
.grid { display: grid; gap: 16px; }
.grid-tools { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.tool-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: transform .12s, border-color .2s; }
.tool-card:hover { transform: translateY(-3px); border-color: var(--rouge); }
.tool-card .ic { font-size: 30px; }
.tool-card .pill { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--rouge); border: 1px solid var(--bord); padding: 2px 9px; border-radius: 20px; }
.tool-card h3 { font-size: 22px; }
.tool-card p { color: var(--gris-clair); font-size: 14px; }
.tool-card .done { color: var(--ok); font-size: 12px; font-weight: 600; }

.stat { background: var(--noir2); border: 1px solid var(--bord); border-radius: var(--radius); padding: 20px; }
.stat .n { font-family: 'Barlow Condensed'; font-weight: 800; font-size: 42px; color: var(--blanc); line-height: 1; }
.stat .l { color: var(--gris); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }
.stat.accent .n { color: var(--rouge); }

/* ── Formulaires ──────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; }
.field .req { color: var(--rouge); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--noir); border: 1px solid var(--bord); color: var(--blanc);
  border-radius: 10px; padding: 12px 14px; font-family: inherit; font-size: 15px; transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--rouge); }
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { color: var(--gris); font-size: 12.5px; margin-top: 5px; }

/* ── Bloc résultat IA ─────────────────────────────────── */
.result {
  background: var(--noir2); border: 1px solid var(--bord); border-left: 4px solid var(--rouge);
  border-radius: var(--radius); padding: 26px; margin-top: 24px;
}
.result .result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.result-body { white-space: pre-wrap; word-wrap: break-word; font-size: 15.5px; line-height: 1.7; }
.result-body h1, .result-body h2, .result-body h3 { color: var(--rouge); text-transform: none; margin: 18px 0 8px; }
.result-body strong { color: #fff; }
.result-body ul, .result-body ol { margin: 8px 0 8px 22px; }
.result-body code { background: var(--noir); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
/* ── Scores visuels (diagnostic) ──────────────────────── */
.score-global { display: flex; justify-content: center; margin: 8px 0 22px; }
.score-ring {
  width: 130px; height: 130px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(closest-side, var(--noir2) 70%, transparent 71%),
              conic-gradient(var(--col) calc(var(--col) * 1%), var(--bord) 0);
  border: 4px solid var(--col); box-shadow: 0 0 26px -6px var(--col);
}
.score-ring span { font-family: 'Barlow Condensed'; font-weight: 800; font-size: 48px; color: var(--col); line-height: 1; }
.score-ring small { color: var(--gris); font-size: 13px; }
.score-row { margin: 10px 0; }
.score-row-top { display: flex; justify-content: space-between; font-size: 14.5px; margin-bottom: 5px; }
.score-row-top strong { color: var(--blanc); }
.score-bar { height: 12px; background: var(--noir3); border-radius: 20px; overflow: hidden; }
.score-bar > div { height: 100%; border-radius: 20px; transition: width .5s; }

.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box { text-align: center; padding: 50px 20px; color: var(--gris-clair); }
.loading-box .spinner { width: 34px; height: 34px; border-width: 4px; border-top-color: var(--rouge); margin-bottom: 16px; }

/* ── Login ────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(circle at 50% 0%, #1a0f0d 0%, var(--noir) 55%); }
.auth-card { width: 100%; max-width: 420px; background: var(--noir2); border: 1px solid var(--bord); border-radius: 18px; padding: 40px 34px; box-shadow: var(--ombre); }
.auth-card .brand { justify-content: center; font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--gris); margin-bottom: 28px; font-size: 14px; }

/* ── Tableaux ─────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: 'Barlow Condensed'; text-transform: uppercase; letter-spacing: 1px; color: var(--rouge); padding: 10px 12px; border-bottom: 2px solid var(--bord); font-size: 14px; }
td { padding: 11px 12px; border-bottom: 1px solid var(--bord); }
tr:hover td { background: var(--noir3); }
.badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 9px; border-radius: 20px; }
.badge.on { background: rgba(111,191,115,.15); color: var(--ok); }
.badge.off { background: rgba(192,57,43,.18); color: var(--rouge-clair); }
.badge.admin { background: rgba(192,57,43,.18); color: var(--rouge-clair); }

/* ── Alertes ──────────────────────────────────────────── */
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.alert.err { background: rgba(192,57,43,.14); border: 1px solid rgba(192,57,43,.4); color: var(--rouge-clair); }
.alert.ok { background: rgba(111,191,115,.12); border: 1px solid rgba(111,191,115,.35); color: var(--ok); }
.alert.info { background: var(--noir3); border: 1px solid var(--bord); color: var(--gris-clair); }

/* ── Progression ──────────────────────────────────────── */
.progress { height: 10px; background: var(--noir3); border-radius: 20px; overflow: hidden; margin: 10px 0; }
.progress .bar { height: 100%; background: var(--rouge); border-radius: 20px; transition: width .4s; }
.next-action { background: linear-gradient(135deg, var(--rouge) 0%, #8e2920 100%); border-radius: var(--radius); padding: 26px; color: #fff; margin-bottom: 28px; }
.next-action .kicker { font-family: 'Barlow Condensed'; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; opacity: .85; }
.next-action h2 { font-size: 28px; margin: 6px 0 4px; }
.next-action p { opacity: .92; margin-bottom: 16px; }
.next-action .btn { background: #fff; color: var(--rouge); }
.next-action .btn:hover { background: var(--blanc); }

/* ── Accueil « Par où on commence ? » ─────────────────── */
.welcome { display: flex; align-items: center; gap: 22px; margin-bottom: 30px; flex-wrap: wrap; }
.welcome-avatar {
  width: 72px; height: 72px; flex-shrink: 0; border-radius: 50%;
  background: var(--rouge); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed'; font-weight: 800; font-size: 34px;
  box-shadow: 0 0 22px rgba(192,57,43,.5);
}

/* ── Crédits ──────────────────────────────────────────── */
.credits-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--noir3); border: 1px solid var(--rouge);
  color: var(--blanc); font-weight: 700; font-size: 13px;
  padding: 6px 13px; border-radius: 20px;
}
.credits-badge .c-dot { width: 8px; height: 8px; background: var(--rouge); border-radius: 50%; box-shadow: 0 0 8px var(--rouge); }
.cost-tag { font-size: 12px; font-weight: 700; color: var(--gris-clair); background: var(--noir3); border: 1px solid var(--bord); padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.cost-tag.big { font-size: 14px; color: var(--rouge); border-color: var(--rouge); padding: 6px 14px; }

.prefill-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--noir3); border: 1px dashed var(--rouge); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 20px; flex-wrap: wrap;
}
.prefill-bar strong { font-size: 15px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.muted { color: var(--gris); }
.section-gap { margin-top: 36px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 200px; }
.copy-feedback { color: var(--ok); font-size: 13px; font-weight: 600; }

/* ── Plans d'abonnement ───────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; max-width: 800px; margin: 0 auto; }
.plan-card { position: relative; background: var(--noir2); border: 1px solid var(--bord); border-radius: var(--radius); padding: 28px 24px; }
.plan-card.reco { border-color: var(--rouge); box-shadow: 0 0 30px -10px var(--rouge); }
.plan-reco { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--rouge); color: #fff; font-family: 'Barlow Condensed'; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; padding: 4px 14px; border-radius: 20px; }
.plan-feats { list-style: none; margin: 16px 0; }
.plan-feats li { padding: 7px 0; border-bottom: 1px solid var(--bord); font-size: 14px; }
.plan-feats li:last-child { border-bottom: none; }

/* ── Bouton large (landing, CTA mobile) ───────────────── */
.btn-lg { padding: 16px 26px; font-size: 17px; border-radius: 12px; }

/* ── Emplacement vidéo (Roxelane intègre ses vidéos) ──── */
.video-slot { background: var(--noir); border: 1px dashed var(--rouge); color: var(--gris-clair); border-radius: var(--radius); padding: 26px 18px; text-align: center; font-size: 14px; margin: 16px 0; }

/* ── Parcours du lead (3 étapes) ──────────────────────── */
.lead-steps { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 8px; }
.lead-step { display: flex; gap: 14px; align-items: flex-start; background: var(--noir2); border: 1px solid var(--bord); border-radius: var(--radius); padding: 16px 18px; }
.lead-step.current { border-color: var(--rouge); box-shadow: 0 0 0 1px var(--rouge) inset; }
.lead-step.done { opacity: .72; }
.lead-step .ls-ic { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--noir3); color: var(--gris-clair); }
.lead-step.current .ls-ic { background: var(--rouge); color: #fff; }
.lead-step.done .ls-ic { background: var(--ok); color: #fff; }
.lead-step .ls-body { flex: 1; }
.lead-step .ls-body strong { display: block; font-size: 16px; margin-bottom: 3px; }
.lead-step .ls-body p { color: var(--gris-clair); font-size: 13.5px; margin-bottom: 8px; }

/* ── Carte outil verrouillée (vitrine upsell) ─────────── */
.tool-card.locked { position: relative; opacity: .82; cursor: default; }
.tool-card.locked .lock { font-size: 18px; }
.tool-card.locked h3 { color: var(--gris-clair); }
.tool-card.locked::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(192,57,43,.03) 10px, rgba(192,57,43,.03) 20px); pointer-events: none; }

/* ── Landing publique « Crée ta plateforme gratuite » ──── */
.lp { max-width: 860px; margin: 0 auto; padding: 0 18px 60px; }
.lp-top { display: flex; justify-content: center; padding: 22px 0 8px; }
.lp-hero { text-align: center; padding: 26px 0 38px; }
.lp-kicker { display: inline-block; background: var(--noir2); border: 1px solid var(--bord); color: var(--gris-clair);
  border-radius: 30px; padding: 7px 16px; font-size: 13px; font-weight: 500; margin-bottom: 20px; }
.lp-hero h1 { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; line-height: 1.02;
  font-size: clamp(40px, 11vw, 72px); text-transform: uppercase; letter-spacing: .5px; }
.lp-sub { font-size: clamp(16px, 4.4vw, 19px); color: var(--gris-clair); max-width: 600px; margin: 18px auto 28px; line-height: 1.55; }
.lp-card { background: var(--noir2); border: 1px solid var(--bord); border-radius: var(--radius);
  padding: 24px; max-width: 440px; margin: 0 auto; box-shadow: var(--ombre); text-align: left; }
.lp-login { margin-top: 18px; color: var(--gris); font-size: 14px; }
.lp-login a { color: var(--rouge); }
.lp-why { text-align: center; padding: 30px 0 10px; }
.lp-why h2 { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase;
  font-size: clamp(26px, 7vw, 38px); letter-spacing: 1px; margin-bottom: 24px; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 28px; text-align: left; }
.lp-feat { background: var(--noir2); border: 1px solid var(--bord); border-radius: var(--radius); padding: 20px; }
.lp-feat .lp-ic { font-size: 28px; display: block; margin-bottom: 10px; }
.lp-feat strong { display: block; font-size: 17px; margin-bottom: 6px; }
.lp-feat p { color: var(--gris-clair); font-size: 14px; line-height: 1.5; }
.lp-foot { text-align: center; color: var(--gris); font-size: 13px; padding: 30px 0 0; border-top: 1px solid var(--bord); margin-top: 20px; }

/* ── Mobile ───────────────────────────────────────────── */
.menu-toggle { display: none; background: none; border: 1px solid var(--bord); color: var(--blanc); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-size: 18px; }
@media (max-width: 860px) {
  .content { padding: 24px 18px 70px; }
  .sidebar { position: fixed; left: 0; top: 65px; bottom: 0; z-index: 40; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--ombre); }
  .menu-toggle { display: inline-block; }
  .topnav .who { display: none; }
  .topbar { padding: 14px 16px; }
}
