/* =====================================================================
   BlogPilot : interface (sobre, dense, lisible : esprit Linear / Stripe)
   ===================================================================== */
:root {
    --brand: #0051d8;
    --brand-soft: color-mix(in srgb, var(--brand) 10%, white);
    --brand-ink: color-mix(in srgb, var(--brand) 80%, black);
    --bg: #f7f7f9;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --border: #e6e7eb;
    --border-strong: #d4d6dc;
    --text: #16181d;
    --text-2: #4b5160;
    --muted: #7b8191;
    --green: #15803d;  --green-bg: #ecfdf3;
    --red: #b42318;    --red-bg: #fef3f2;
    --amber: #b54708;  --amber-bg: #fffaeb;
    --blue: #175cd3;   --blue-bg: #eff8ff;
    --gray: #4b5160;   --gray-bg: #f2f4f7;
    --radius: 10px;
    --radius-sm: 7px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, .22);
    --sidebar-w: 248px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.011em; }
p { margin: 0 0 .75em; }
img { max-width: 100%; }
.icon { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- Boutons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
    font: 500 13.5px/1 var(--font); border: 1px solid transparent; cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s, opacity .15s;
    white-space: nowrap; text-decoration: none !important;
}
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--gray-bg); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #912018; }
.btn-danger-soft { background: var(--red-bg); color: var(--red); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.btn.is-loading::before {
    content: ""; width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--gray-bg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Formulaires */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span, .label { font-weight: 500; font-size: 13px; color: var(--text); }
.field-row { display: flex; justify-content: space-between; align-items: center; }
.field-row a { font-weight: 400; font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number],
input[type=time], input[type=search], input[type=date], select, textarea {
    width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
    font: 14px var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[readonly] { background: var(--surface-2); color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.field-error { color: var(--red); font-size: 12.5px; margin: 0; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.input-group { display: flex; gap: 8px; }
.input-group > input { flex: 1; }

/* Interrupteur */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: var(--border-strong); transition: background .15s; position: relative; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------------------------------------------------------------- Alertes */
.flash-stack { display: grid; gap: 10px; margin-bottom: 20px; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid; font-size: 13.5px; }
.alert > span { flex: 1; }
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--green-bg); border-color: #abefc6; color: #085d3a; }
.alert-error { background: var(--red-bg); border-color: #fecdca; color: #912018; }
.alert-warning { background: var(--amber-bg); border-color: #fedf89; color: #93370d; }
.alert-info { background: var(--blue-bg); border-color: #b2ddff; color: #194185; }
.alert-close { border: 0; background: transparent; color: inherit; opacity: .6; cursor: pointer; padding: 0; display: grid; }
.alert-close:hover { opacity: 1; }

/* ---------------------------------------------------------------- Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gray { background: var(--gray-bg); color: var(--gray); }

/* ---------------------------------------------------------------- Authentification */
.auth-body { min-height: 100vh; background: radial-gradient(1200px 500px at 50% -10%, var(--brand-soft), transparent 70%), var(--bg); }
.auth-shell { width: 100%; max-width: 440px; margin: 0 auto; padding: 48px 16px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; font-size: 17px; color: var(--text); margin-bottom: 28px; text-decoration: none !important; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card > .muted { margin-bottom: 22px; }
.auth-foot { text-align: center; color: var(--muted); margin: 20px 0 0; font-size: 13.5px; }
.auth-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.error-code { font-size: 44px; font-weight: 700; color: var(--brand); letter-spacing: -0.03em; margin-bottom: 4px; }
.brand-mark { height: 28px; width: auto; display: inline-block; flex: none; }

/* ---------------------------------------------------------------- Coque applicative */
.app { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
    background: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; transition: transform .2s ease;
}
.sidebar-head { padding: 18px 16px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none !important; }
.area-tag { font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 16px 10px 6px; }
.nav-link {
    display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; margin-bottom: 1px;
    border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; text-decoration: none !important;
}
.nav-link:hover { background: var(--gray-bg); color: var(--text); }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand-ink); }
.nav-link.is-active .icon { color: var(--brand); }
.nav-button { width: 100%; border: 0; background: transparent; font: inherit; font-weight: 500; cursor: pointer; }
.sidebar-foot { border-top: 1px solid var(--border); padding: 12px 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; min-width: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; flex-shrink: 0; }
.user-meta { display: grid; min-width: 0; }
.user-meta strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); }
.topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
    min-height: 64px; padding: 12px 32px; background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 18px; font-weight: 600; }
.topbar-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-toggle { display: none; }
.content { padding: 28px 32px 48px; max-width: 1280px; }
.sidebar-overlay { display: none; }

/* ---------------------------------------------------------------- Cartes */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card + .card, .stack > * + * { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h2 { font-size: 15px; font-weight: 600; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

/* Statistiques */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat-accent { color: var(--brand); }
.progress { height: 6px; background: var(--gray-bg); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- Tableaux */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }
.cell-title { font-weight: 500; color: var(--text); }
.cell-sub { font-size: 12.5px; color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; min-width: 140px; }
.pagination { display: flex; gap: 6px; justify-content: flex-end; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); }

/* Activité */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; background: var(--blue); }
.feed-dot.warning { background: var(--amber); } .feed-dot.error { background: var(--red); } .feed-dot.success { background: var(--green); }
.feed-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.feed-time { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* États vides */
.empty { text-align: center; padding: 44px 20px; }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 12px; display: grid; place-items: center; background: var(--gray-bg); color: var(--muted); }
.empty h3 { font-size: 15px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 380px; margin: 0 auto 16px; }

/* Checklist de démarrage */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.check-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border-strong); color: transparent; flex-shrink: 0; }
.checklist li.done .check-dot { background: var(--green); border-color: var(--green); color: #fff; }
.checklist li.done .check-label { color: var(--muted); text-decoration: line-through; }
.check-label { flex: 1; }

/* ---------------------------------------------------------------- Offres */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.plan.is-featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.plan.is-current { background: var(--surface-2); }
.plan-tag { position: absolute; top: -11px; left: 22px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.plan-name { font-weight: 600; font-size: 15px; }
.plan-price { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.plan-price small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--text-2); flex: 1; }
.plan li { display: flex; gap: 8px; align-items: center; }
.plan li .icon { color: var(--green); }

/* ---------------------------------------------------------------- Modale */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 24, 40, .45); }
.modal-card { position: relative; width: 100%; max-width: 420px; background: var(--surface); border-radius: 12px; padding: 24px; box-shadow: var(--shadow-lg); }
.modal-card h3 { font-size: 16px; margin-bottom: 8px; }
.modal-card p { color: var(--text-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* Contenu d'article (aperçu) */
.prose { max-width: 760px; line-height: 1.7; font-size: 15px; }
.prose h2 { font-size: 20px; margin: 1.6em 0 .6em; }
.prose h3 { font-size: 16px; margin: 1.3em 0 .5em; }
.prose figure { margin: 1.5em 0; }
.prose img { border-radius: 8px; }
.code-block { background: #0f1117; color: #e6e8ee; border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; font: 12.5px/1.6 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }

/* ---------------------------------------------------------------- Accueil public */
.landing { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.landing-nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; gap: 12px; }
.landing-nav .links { display: flex; gap: 8px; }
.hero { text-align: center; padding: 64px 0 48px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.03em; max-width: 760px; margin: 0 auto 16px; }
.hero p { font-size: 17px; color: var(--text-2); max-width: 600px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 64px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.feature .fi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.feature h3 { font-size: 15px; margin-bottom: 6px; }
.feature p { color: var(--text-2); margin: 0; }
.section-title { text-align: center; font-size: 26px; letter-spacing: -0.02em; margin-bottom: 24px; }
.landing-foot { text-align: center; color: var(--muted); padding: 48px 0 32px; font-size: 13px; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1100px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .app.sidebar-open .sidebar { transform: none; }
    .app.sidebar-open .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(16, 24, 40, .35); }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-grid; }
    .topbar { padding: 10px 16px; }
    .content { padding: 20px 16px 40px; }
    .features { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat { padding: 14px; }
    .stat-value { font-size: 22px; }
    .grid-2 { grid-template-columns: 1fr; }
    .auth-card { padding: 24px 20px; }
    .topbar-actions .btn span { display: none; }
    .card-head, .card-body { padding-left: 16px; padding-right: 16px; }
    .table th, .table td { padding-left: 12px; padding-right: 12px; }
    .toolbar input[type=search], .toolbar select { max-width: none; flex: 1 1 140px; }
}

/* Mini histogramme (tableau de bord admin) */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.bar span { width: 100%; max-width: 28px; background: var(--brand); border-radius: 4px 4px 0 0; opacity: .85; }
.bar:hover span { opacity: 1; }
.bar small { font-size: 10.5px; color: var(--muted); }

/* Connexion WordPress / sections repliables */
.connected { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.connected-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--green-bg); color: var(--green); flex-shrink: 0; }
details.advanced > summary { cursor: pointer; list-style: none; border-bottom: 0; }
details.advanced > summary::-webkit-details-marker { display: none; }
details.advanced > summary h2::before { content: "›"; display: inline-block; margin-right: 8px; color: var(--muted); transition: transform .15s; }
details.advanced[open] > summary { border-bottom: 1px solid var(--border); }
details.advanced[open] > summary h2::before { transform: rotate(90deg); }
summary { outline-offset: 2px; }

/* ---------------------------------------------------------------- Assistant de démarrage */
.wizard-top { display: flex; justify-content: space-between; align-items: center; max-width: 720px; margin: 0 auto; padding: 20px 16px 0; }
.wizard { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }
.wizard-steps { display: flex; gap: 6px; margin-bottom: 24px; }
.wizard-steps a, .wizard-steps span { flex: 1; text-decoration: none !important; }
.wizard-step-bar { display: block; height: 4px; border-radius: 999px; background: var(--border); }
.wizard-step-label { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
.wizard-steps .is-done .wizard-step-bar { background: var(--green); }
.wizard-steps .is-current .wizard-step-bar { background: var(--brand); }
.wizard-steps .is-current .wizard-step-label { color: var(--text); }
.wizard-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 32px; box-shadow: var(--shadow); }
.wizard-card h1 { font-size: 22px; margin-bottom: 6px; }
.wizard-card > .lead { color: var(--text-2); margin-bottom: 24px; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice-box { display: block; border: 1.5px solid var(--border-strong); border-radius: 10px; padding: 14px; height: 100%; transition: border-color .15s, background .15s; }
.choice-box strong { display: block; font-size: 14px; }
.choice-box small { color: var(--muted); }
.choice input:checked + .choice-box { border-color: var(--brand); background: var(--brand-soft); }
.choice input:focus-visible + .choice-box { outline: 2px solid var(--brand); outline-offset: 2px; }
.done-hero { text-align: center; }
.done-hero .auth-icon { background: var(--green-bg); color: var(--green); }
.setup-banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, white); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.setup-banner > div { flex: 1; min-width: 200px; }
.setup-banner .progress { background: #fff; }
@media (max-width: 560px) {
    .wizard-card { padding: 22px 18px; }
    .wizard-step-label { display: none; }
}
.stats.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .stats.stats-3 { grid-template-columns: 1fr; } }
.user-chip-link { color: inherit; text-decoration: none !important; border-radius: var(--radius-sm); }
.user-chip-link:hover { background: var(--gray-bg); }

/* Bandeau extension BlogPilot + instructions */
.topbar-notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 32px; background: var(--blue-bg); border-bottom: 1px solid #b2ddff; color: #194185; font-size: 13.5px; }
.topbar-notice > span { flex: 1; min-width: 220px; }
.topbar-notice form { display: inline; }
.plugin-install { display: grid; gap: 14px; justify-items: start; margin-top: 8px; }
.steps-list { margin: 0; padding-left: 20px; color: var(--text-2); line-height: 1.9; }
@media (max-width: 860px) { .topbar-notice { padding: 10px 16px; } }

/* ---------------------------------------------------------------- Idées de sujets */
.ideas { list-style: none; margin: 0; padding: 0; position: relative; }
.idea { display: flex; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.idea:last-child { border-bottom: 0; }
.idea-check { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); flex-shrink: 0; color: var(--muted); }
.idea-body { flex: 1; min-width: 0; }
.idea-body p { margin: 2px 0 6px; }
.idea-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kw { font-size: 12px; font-weight: 500; background: var(--gray-bg); color: var(--text-2); padding: 2px 8px; border-radius: 6px; }
.idea.is-added { opacity: .6; }
.idea.is-locked .idea-body { filter: blur(5px); user-select: none; pointer-events: none; }
.unlock { text-align: center; padding: 22px 20px; border-top: 1px solid var(--border); background: linear-gradient(var(--surface), var(--brand-soft)); }
.unlock p { margin: 4px 0 12px; }
.research-progress { display: grid; gap: 8px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.rp-step { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.rp-step .spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); flex-shrink: 0; }
.rp-step.is-active { color: var(--text); font-weight: 500; }
.rp-step.is-active .spinner { border-color: var(--brand); border-right-color: transparent; animation: spin .7s linear infinite; }
.rp-step.is-done { color: var(--green); }
.rp-step.is-done .spinner { border-color: var(--green); background: var(--green); }
.idea-cta { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.idea-cta:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Actions en haut de page (Sujets, Idées de sujets) */
.top-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.hero-cta { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 24px; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #00a3fd)); color: #fff; text-decoration: none !important; box-shadow: var(--shadow); }
.hero-cta:hover { filter: brightness(1.05); }
.hero-cta-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.hero-cta-text strong { display: block; font-size: 18px; margin-bottom: 4px; }
.hero-cta-text span { opacity: .9; }
.hero-cta .btn { align-self: flex-start; background: #fff; color: var(--brand-ink); }
.research-form { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .top-actions, .research-form { grid-template-columns: 1fr; } }

/* Page Sujets : bandeau d'analyse + ajout compact */
.cta-strip { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--brand) 25%, white);
    background: linear-gradient(90deg, var(--brand-soft), #fff); color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s; }
.cta-strip:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cta-strip-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: #fff; flex-shrink: 0; }
.cta-strip-text { flex: 1; min-width: 0; }
.cta-strip-text strong { display: block; font-size: 16px; }
.cta-strip-text span { color: var(--text-2); font-size: 13.5px; }
.add-topics { display: flex; gap: 16px; align-items: flex-end; }
.add-topics textarea { min-height: 64px; }
.add-topics-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; padding-bottom: 2px; }
@media (max-width: 700px) {
    .cta-strip { flex-wrap: wrap; }
    .cta-strip .btn { width: 100%; }
    .add-topics { flex-direction: column; align-items: stretch; }
}

/* Bande « abonnement » en haut de l'espace client */
.topbar-notice.is-warning { background: var(--amber-bg); border-bottom-color: #fedf89; color: #93370d; }

/* =====================================================================
   Page d'accueil publique (lp-*)
   ===================================================================== */
.lp { background: #fff; }
.lp-wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 9px; }
.lp-eyebrow { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--brand); background: var(--brand-soft); padding: 5px 11px; border-radius: 999px; margin-bottom: 16px; }

/* Navigation */
.lp-nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.lp-nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.lp-links { display: flex; gap: 22px; margin-left: 12px; flex: 1; }
.lp-links a { color: var(--text-2); font-weight: 500; text-decoration: none; }
.lp-links a:hover { color: var(--text); }
.lp-nav-cta { display: flex; gap: 8px; }

/* Hero */
.lp-hero { padding: 72px 0 64px; background: radial-gradient(900px 420px at 85% 10%, var(--brand-soft), transparent 70%), radial-gradient(700px 360px at 0% 100%, #f0f9ff, transparent 70%); }
.lp-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.lp-hero h1 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.08; letter-spacing: -0.035em; margin-bottom: 18px; }
.lp-lead { font-size: 18px; color: var(--text-2); line-height: 1.6; margin-bottom: 28px; max-width: 560px; }
.lp-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.lp-ticks { list-style: none; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; color: var(--text-2); font-size: 14px; }
.lp-ticks li { display: flex; align-items: center; gap: 6px; }
.lp-ticks .icon, .lp-list .icon { color: var(--green); }

/* Aperçu produit */
.lp-mock { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(16, 24, 40, .25), 0 0 0 1px rgba(16, 24, 40, .02); overflow: hidden; transform: rotate(.6deg); }
.lp-mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.lp-mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.lp-mock-bar em { margin-left: 10px; font-style: normal; font-size: 12px; color: var(--muted); }
.lp-mock-body { padding: 6px 0; }
.lp-mock-row { display: grid; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--border); justify-items: start; }
.lp-mock-row:last-child { border-bottom: 0; }
.lp-mock-row strong { font-size: 14px; }
.lp-mock-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Bande problème / solution */
.lp-band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); padding: 28px 0; }
.lp-band-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.lp-band-grid strong { display: block; font-size: 16px; margin-bottom: 2px; }
.lp-band-grid span { color: var(--text-2); }
.lp-arrow { font-size: 26px; color: var(--brand); }

/* Sections */
.lp-section { padding: 88px 0; }
.lp-alt { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.lp-head h2 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.025em; margin-bottom: 12px; }
.lp-head p { color: var(--text-2); font-size: 16.5px; margin: 0; }

/* Étapes */
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.lp-steps li { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px 22px; box-shadow: var(--shadow-sm); }
.lp-step-n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 16px; }
.lp-steps h3 { font-size: 16px; margin-bottom: 8px; }
.lp-steps p { color: var(--text-2); margin: 0; font-size: 14px; }

/* Fonctionnalités détaillées */
.lp-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-bottom: 72px; }
.lp-feature-rev > :first-child { order: 2; }
.lp-feature h3 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 10px; }
.lp-feature > div > p { color: var(--text-2); font-size: 16px; }
.lp-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.lp-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.lp-list .icon { margin-top: 3px; }
.lp-visual { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 8px; box-shadow: 0 20px 40px -20px rgba(16, 24, 40, .2); position: relative; }
.lp-visual-note { display: block; text-align: right; color: var(--muted); font-size: 11.5px; padding: 6px 10px 2px; }
.lp-idea { display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid var(--border); }
.lp-idea:nth-last-child(2) { border-bottom: 0; }
.lp-idea input { margin-top: 3px; accent-color: var(--brand); }
.lp-idea strong { display: block; font-size: 14px; margin-bottom: 6px; }
.lp-idea span { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.lp-article { padding: 22px; display: grid; gap: 9px; }
.lp-article-img { height: 120px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #b2d4ff, var(--brand)); margin-bottom: 6px; }
.lp-article strong { font-size: 17px; line-height: 1.3; }
.lp-line { display: block; height: 8px; border-radius: 4px; background: var(--gray-bg); }
.lp-h2 { font-weight: 600; font-size: 14px; margin-top: 6px; }
.lp-wa { justify-self: center; margin-top: 10px; background: #25D366; color: #fff; font-weight: 700; font-size: 13px; padding: 9px 18px; border-radius: 8px; }

/* Cartes */
.lp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: var(--shadow-sm); }
.lp-card-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.lp-card h3 { font-size: 16px; margin-bottom: 6px; }
.lp-card p { color: var(--text-2); margin: 0; font-size: 14px; }

/* Pour qui */
.lp-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 860px; margin: 0 auto; }
.lp-tags span { padding: 10px 16px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-weight: 500; color: var(--text-2); }

/* Tarifs */
.lp-plans { max-width: 980px; margin: 0 auto; }
.lp-plans .plan { padding: 28px; border-radius: 16px; background: #fff; }
.lp-plans .plan-price { font-size: 36px; margin: 6px 0 4px; }
.lp-note { text-align: center; color: var(--text-2); margin: 28px 0 0; }

/* FAQ */
.lp-faq-wrap { max-width: 800px; }
.lp-faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.lp-faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 600; font-size: 16px; position: relative; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 22px; font-weight: 400; color: var(--muted); transition: transform .15s; }
.lp-faq details[open] summary::after { transform: rotate(45deg); }
.lp-faq details p { color: var(--text-2); margin: 0 0 18px; line-height: 1.65; }

/* Appel final */
.lp-final { padding: 80px 0; text-align: center; color: #fff; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 65%, #00a3fd)); }
.lp-final h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.025em; max-width: 760px; margin: 0 auto 12px; }
.lp-final p { opacity: .9; font-size: 17px; margin-bottom: 26px; }
.lp-btn-white { background: #fff; color: var(--brand-ink); }
.lp-btn-white:hover { background: #f5f5ff; }
.lp-final-note { display: block; margin-top: 14px; font-size: 13.5px; opacity: .85; }

/* Pied de page */
.lp-footer { padding: 48px 0 24px; border-top: 1px solid var(--border); }
.lp-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.lp-footer-grid > div { display: grid; gap: 8px; align-content: start; }
.lp-footer-grid a { color: var(--text-2); text-decoration: none; }
.lp-footer-grid a:hover { color: var(--text); }
.lp-copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }

@media (max-width: 960px) {
    .lp-links { display: none; }
    .lp-nav-cta { margin-left: auto; }
    .lp-hero-grid, .lp-feature { grid-template-columns: 1fr; gap: 36px; }
    .lp-feature-rev > :first-child { order: 0; }
    .lp-steps { grid-template-columns: 1fr 1fr; }
    .lp-cards { grid-template-columns: 1fr 1fr; }
    .lp-band-grid { grid-template-columns: 1fr; text-align: center; }
    .lp-arrow { transform: rotate(90deg); }
}
@media (max-width: 600px) {
    .lp-hero { padding: 44px 0; }
    .lp-section { padding: 60px 0; }
    .lp-steps, .lp-cards, .lp-footer-grid { grid-template-columns: 1fr; }
    .lp-hero-cta .btn { width: 100%; }
    .lp-nav-cta .btn-ghost { display: none; }
    .lp-mock { transform: none; }
}

/* Paiement : PayPal + autre moyen (WhatsApp) */
.btn-paypal { background: #ffc439; color: #111827; border-color: #f2b51f; font-weight: 500; }
.btn-paypal:hover { background: #f5b82e; color: #111827; }
.btn-paypal strong { font-weight: 800; font-style: italic; color: #003087; margin-left: 2px; }
.btn-whatsapp { background: #25d366; color: #fff; border-color: #1fb457; white-space: nowrap; }
.btn-whatsapp:hover { background: #1fb457; color: #fff; }
.pay-alt { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2, #f8f9fc); }
.text-center { text-align: center; }
.trial-offer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-radius: 12px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, white); }
.trial-offer > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 280px; }
.trial-offer span { color: var(--text-muted, #475467); font-size: 14px; }
