/* =====================================================================
   Localizy SEO Generator — Habillage de l'app (style.css)
   S'appuie sur les variables de tokens.css (palette navy/lavande/corail,
   Clash Display + Work Sans). Layout deux colonnes (formulaire | aperçu).
   ===================================================================== */

* { box-sizing: border-box; }
/* L'attribut [hidden] doit TOUJOURS masquer (même sur les éléments display:flex). */
[hidden] { display: none !important; }
body { margin: 0; }

/* ============================ EN-TÊTE ============================ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: 12px 24px; background: var(--bg-1); border-bottom: 1px solid var(--border-1);
}
.brand { display: flex; align-items: center; gap: var(--space-2); }
.brand-logo { height: 30px; width: auto; cursor: pointer; transition: opacity 0.15s ease; }
.brand-logo:hover { opacity: 0.7; }
.brand-logo:focus-visible { outline: 2px solid var(--lz-red-bright); outline-offset: 4px; border-radius: 4px; }
.topbar-controls { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.client-select { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--fg-2); }
.client-select select { min-width: 170px; }

.nav { display: flex; gap: 3px; background: var(--bg-3); padding: 4px; border-radius: var(--radius-pill); border: 1px solid var(--border-1); }
.nav-link { border: 0; background: transparent; cursor: pointer; padding: 7px 16px; border-radius: var(--radius-pill); font-weight: 600; font-size: var(--text-sm); color: var(--fg-2); transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.nav-link:hover { color: var(--lz-navy); }
.nav-link.active { background: var(--bg-1); color: var(--lz-navy); box-shadow: var(--shadow-sm); }

.icon-actions { display: flex; gap: 6px; }
.icon-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-2); border: 1px solid var(--border-1); color: var(--lz-navy); border-radius: var(--radius-pill); cursor: pointer; transition: background var(--dur-base) var(--ease-out); }
.icon-btn:hover { background: var(--bg-3); }

/* Bandeau d'accueil */
.onboarding-banner { display: flex; align-items: center; justify-content: center; gap: var(--space-4); background: var(--lz-lavender-soft); color: var(--lz-navy-deep); padding: 10px 16px; font-weight: 500; }

/* ============================ LAYOUT ============================ */
.view { padding: var(--space-6) 24px var(--space-12); }
.layout { display: grid; grid-template-columns: 380px 1fr; gap: var(--space-6); align-items: start; max-width: 1320px; margin: 0 auto; }
.right-column { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }

.panel { background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-md); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.panel-title { font-size: var(--display-sm); margin: 0 0 var(--space-5); }
.form-panel { position: sticky; top: 84px; }

/* ============================ FORMULAIRES ============================ */
.form { display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.platform-block { display: flex; flex-direction: column; gap: var(--space-4); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.field label { font-size: var(--text-sm); font-weight: 500; color: var(--lz-navy); }
.field small { font-size: var(--text-xs); color: var(--fg-2); }
.req { color: var(--lz-red-bright); }

input[type='text'], input[type='url'], input[type='password'], select, textarea {
  background: var(--bg-1); border: 1.5px solid var(--border-1); color: var(--lz-navy);
  padding: 11px 14px; border-radius: var(--radius-md); font-size: var(--text-md);
  width: 100%; transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
input::placeholder, textarea::placeholder { color: var(--fg-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lz-lavender); box-shadow: 0 0 0 3px rgba(150, 153, 206, 0.25); }
textarea { resize: vertical; }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2331445E' stroke-width='1.8'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }

.input-with-btn { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: stretch; }
.input-with-btn input { flex: 1 1 100%; min-width: 0; }
.input-with-btn .btn { white-space: nowrap; align-self: flex-start; }

/* ============================ BOUTONS ============================ */
.btn {
  border: 0; border-radius: var(--radius-pill); padding: 12px 22px; font-weight: 600; font-size: var(--text-md);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); color: #fff;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: var(--text-sm); }

.btn-primary { background: var(--lz-red-bright); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #e85a5a; box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--lz-navy); color: #fff; }
.btn-secondary:hover:not(:disabled) { background: var(--lz-navy-deep); }

/* Destructif : sobre au repos, rouge plein au survol */
.btn-danger { background: transparent; color: var(--lz-red); border: 1.5px solid var(--border-2); }
.btn-danger:hover:not(:disabled) { background: var(--lz-red-bright); color: #fff; border-color: var(--lz-red-bright); }
.modal-footer .btn-danger { margin-right: auto; }

/* Ghost (outline) — design system Localizy : contour + texte corail, plein corail au survol */
.btn-ghost { background: transparent; color: var(--lz-red-bright); border: 1.5px solid var(--lz-red-bright); }
.btn-ghost:hover:not(:disabled) { background: var(--lz-red-bright); color: #fff; border-color: var(--lz-red-bright); }

/* Action discrète façon lien (corail, comme les liens du DS) */
.btn-link { background: transparent; border: 0; color: var(--lz-red-bright); padding: 4px 8px; font-size: var(--text-xs); font-weight: 700; box-shadow: none; }
.btn-link:hover { background: rgba(255, 107, 107, 0.10); transform: none; }

.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.7s linear infinite; }
.btn-ghost.is-loading::after { border-color: rgba(255, 107, 107, 0.35); border-top-color: var(--lz-red-bright); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================ SUGGESTIONS ============================ */
.suggestions { display: flex; flex-direction: column; gap: 7px; background: var(--bg-2); border: 1px solid var(--border-1); border-radius: var(--radius-md); padding: var(--space-3); }
.suggestions-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: 2px; }
.suggestions-title { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--lz-red-bright); font-weight: 600; }
.suggestion-chip { text-align: left; background: var(--bg-1); border: 1px solid var(--border-1); color: var(--lz-navy); padding: 10px 13px; border-radius: var(--radius-sm); cursor: pointer; transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.suggestion-chip:hover { border-color: var(--lz-lavender); background: rgba(150, 153, 206, 0.10); transform: translateY(-1px); }

/* ============================ DASHBOARD (quotas) ============================ */
.dashboard-panel { padding: var(--space-5); }
.dash-breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.dash-quota { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.dq-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--fg-2); font-weight: 600; }
.dq-label em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--fg-3); font-weight: 400; }
.dq-value { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; color: var(--lz-navy); line-height: 1.1; }
.dq-value.is-zero { color: var(--lz-red-bright); }
.dq-meta { font-size: var(--text-xs); color: var(--fg-2); }
.dq-bar { height: 5px; border-radius: var(--radius-pill); background: var(--lz-grey-200); overflow: hidden; }
.dq-bar > span { display: block; height: 100%; width: 0%; border-radius: var(--radius-pill); background: var(--lz-red-bright); transition: width var(--dur-slow) var(--ease-out); }
.dq-bar.low > span, .dq-bar.empty > span { background: var(--lz-red-bright); }
.dash-alert { margin-top: var(--space-4); font-size: var(--text-sm); color: var(--lz-warning); }
.dash-countdown { font-weight: 600; }

/* ============================ PRÉVISUALISATION ============================ */
.preview-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding: var(--space-12) var(--space-6); text-align: center; color: var(--fg-2); }
.empty-sticker { width: 120px; height: auto; opacity: 0.9; }

/* ============================ RAPPORT QUALITÉ ============================ */
.grounding-badge { font-size: var(--text-xs); font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid transparent; white-space: nowrap; }
.grounding-badge.on { color: #15803d; background: rgba(79, 178, 134, 0.16); border-color: rgba(79, 178, 134, 0.45); }
.grounding-badge.off { color: var(--fg-2); background: var(--bg-3); border-color: var(--border-1); }

.mini-spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(150,153,206,0.35); border-top-color: var(--lz-lavender); border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle; }

.audit-list { list-style: none; margin: 0 0 var(--space-2); padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--text-sm); }
.audit-list.strong li { color: #15803d; }
.audit-list.improve li { color: #b45309; }
.audit-verdict { font-style: italic; color: var(--fg-2); font-size: var(--text-sm); margin: 0; }

.quality-checks { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qc { display: flex; align-items: flex-start; gap: 8px; font-size: var(--text-sm); color: var(--lz-navy); }
.qc-ico { flex: none; line-height: 1.4; }
.qc-error { color: var(--lz-red-bright); }
.qc-warn { color: #b45309; }

/* Badges de score (paliers) — preview + historique */
.score-badge { font-size: var(--text-xs); font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); white-space: nowrap; }
.score-badge.excellent, .score-badge.g-vert { color: #15803d; background: rgba(79, 178, 134, 0.16); }
.score-badge.g-jaune { color: #a16207; background: rgba(234, 179, 8, 0.16); }
.score-badge.correct, .score-badge.g-orange { color: #b45309; background: rgba(244, 184, 96, 0.20); }
.score-badge.faible, .score-badge.g-rouge { color: var(--lz-red-bright); background: rgba(255, 107, 107, 0.12); }
.score-mini { display: inline-flex; align-items: center; gap: 8px; }
.score-detail { font-size: var(--text-xs); color: var(--fg-2); white-space: nowrap; }
.score-detail b { color: var(--lz-navy); font-weight: 600; }

/* ============================ MÉTA SEO ÉDITABLES ============================ */
.meta-label { font-size: var(--text-sm); font-weight: 600; color: var(--lz-navy); margin: var(--space-3) 0 4px; }
.meta-label:first-child { margin-top: 0; }
.meta-input { font-size: var(--text-sm); }
.char-count { font-size: var(--text-xs); color: var(--fg-2); margin-top: 3px; text-align: right; }
.char-count.warn { color: var(--lz-warning); }
.char-count.bad { color: var(--lz-red-bright); }

/* ============================ LIENS INTERNES ============================ */
.il-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--text-sm); }
.il-anchor { font-weight: 600; color: var(--lz-navy); }
.il-list a { color: var(--fg-2); word-break: break-all; }
.il-hint { font-size: var(--text-xs); color: var(--fg-2); margin: var(--space-2) 0 0; }

/* ============================ ANALYSE VISUELLE ============================ */
.analyze-legend { font-size: var(--text-xs); color: var(--fg-2); }
#analyzeBtn.active { background: var(--lz-red-bright); color: #fff; border-color: var(--lz-red-bright); }
mark.hl { padding: 0 2px; border-radius: 3px; color: inherit; }
mark.hl.hl-keyword { background: rgba(79, 178, 134, 0.30); }
mark.hl.hl-excluded { background: rgba(255, 107, 107, 0.32); }
.article-body a.hl-link { background: rgba(244, 184, 96, 0.40); border-radius: 3px; padding: 0 2px; }

/* ============================ ARTICLE ============================ */
.article-render h1, #renderH1 { font-family: var(--font-display); font-size: var(--display-md); color: var(--lz-navy); margin: 0 0 var(--space-5); outline: none; }
.article-body { font-size: var(--text-md); line-height: var(--leading-relaxed); color: var(--lz-navy); outline: none; }
.article-body h2 { font-family: var(--font-display); font-size: var(--display-sm); margin: var(--space-6) 0 var(--space-3); color: var(--lz-navy); }
.article-body h3 { font-size: var(--text-lg); margin: var(--space-5) 0 var(--space-2); color: var(--lz-navy); }
.article-body p { margin: 0 0 var(--space-4); }
.article-body strong { color: var(--lz-navy); font-weight: 600; }
.article-body ul, .article-body ol { margin: 0 0 var(--space-4); padding-left: var(--space-6); }
.article-body li { margin-bottom: var(--space-2); }
.article-body ul li::marker { color: var(--lz-lavender); }
.article-body .lead-definition, .article-body blockquote { border-left: 3px solid var(--lz-lavender); background: rgba(150, 153, 206, 0.10); padding: var(--space-4); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 0 0 var(--space-5); }
.article-body figure { margin: var(--space-6) 0; position: relative; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); display: block; }
.article-body figcaption { font-size: var(--text-xs); color: var(--fg-2); margin-top: var(--space-2); text-align: center; }
.img-controls { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.article-body figure:hover .img-controls { opacity: 1; }
.img-ctrl { width: 32px; height: 32px; border-radius: var(--radius-sm); border: 0; background: rgba(35, 49, 66, 0.7); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.img-ctrl:hover { background: var(--lz-navy); transform: scale(1.08); }
figure.is-loading { opacity: 0.5; pointer-events: none; }

/* ============================ HISTORIQUE ============================ */
.history-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.history-header .panel-title { margin: 0; }
.history-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.history-list { display: flex; flex-direction: column; gap: var(--space-3); }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.history-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.history-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.history-title { font-weight: 600; color: var(--lz-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { font-size: var(--text-xs); color: var(--fg-2); }
.history-right { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
/* Boutons d'action d'historique alignés à la même taille (calibrés sur « Supprimer », btn-sm).
   Hauteur fixe + line-height:1 → la bordure (box-sizing:border-box) et le glyphe ↗ du lien
   « Voir » ne modifient plus la taille de la boîte. */
.history-right .btn { padding: 0 16px; height: 38px; line-height: 1; font-size: var(--text-sm); min-width: 116px; }
.history-right .btn-secondary { border: 1.5px solid transparent; } /* même calcul de hauteur que les boutons à bordure */
.status-badge { font-size: var(--text-xs); font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill); }
.status-publie { background: rgba(79,178,134,0.14); color: #2f7d5b; }
.status-brouillon { background: rgba(244,184,96,0.18); color: #9a6a14; }
.status-non-publie { background: var(--bg-3); color: var(--fg-2); }

/* ============================ PARAMÈTRES ============================ */
.settings-panel { max-width: 640px; margin-left: auto; margin-right: auto; }
.settings-intro { color: var(--fg-2); margin: 0 0 var(--space-5); }
.settings-group { border: 1px solid var(--border-1); border-radius: var(--radius-md); padding: var(--space-5); margin: 0; }
.settings-group legend { font-weight: 600; color: var(--lz-navy); padding: 0 var(--space-2); }
.settings-field { display: flex; flex-direction: column; gap: 6px; }
.settings-field + .settings-field { margin-top: var(--space-4); }
.key-row { display: flex; gap: var(--space-2); }
.key-row .meta-input { flex: 1; }
.key-row .btn { white-space: nowrap; }
.set-hint { font-size: var(--text-xs); color: var(--fg-2); margin: 0; }
.set-status { font-size: var(--text-xs); font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 6px; }
.set-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.set-status.ok { color: #15803d; background: rgba(79, 178, 134, 0.16); border: 1px solid rgba(79, 178, 134, 0.45); }
.set-status.ko { color: var(--lz-red-bright); background: rgba(214, 40, 57, 0.08); border: 1px solid rgba(214, 40, 57, 0.30); }
.settings-actions { display: flex; justify-content: flex-end; }

/* ============================ MODALE ============================ */
.modal-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(35, 49, 66, 0.45); display: flex; align-items: center; justify-content: center; padding: var(--space-5); }
.modal { width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; background: var(--bg-1); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-1); }
.modal-header h3 { font-family: var(--font-display); margin: 0; font-size: var(--display-sm); color: var(--lz-navy); }
.modal-close { border: 0; background: transparent; font-size: 18px; color: var(--fg-2); cursor: pointer; }
.modal-close:hover { color: var(--lz-navy); }
.modal .form { padding: var(--space-6); }
.modal-footer { display: flex; gap: var(--space-2); justify-content: flex-end; padding-top: var(--space-4); border-top: 1px solid var(--border-1); margin-top: var(--space-2); }
.modal code { background: var(--bg-2); padding: 1px 5px; border-radius: var(--radius-xs); font-size: 11px; color: var(--lz-navy); }

/* ============================ OVERLAY DE CHARGEMENT ============================ */
.loading-overlay { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-5); background: rgba(245, 245, 250, 0.92); backdrop-filter: blur(2px); }
.loading-mascot { width: 96px; height: auto; animation: bob 2s var(--ease-in-out) infinite; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(150, 153, 206, 0.25); border-top-color: var(--lz-lavender); animation: spin 0.8s linear infinite; }
.loading-msg { font-family: var(--font-display); color: var(--lz-navy); font-weight: 500; font-size: var(--text-lg); max-width: 340px; text-align: center; animation: pulse 1.8s var(--ease-in-out) infinite; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ============================ TOASTS ============================ */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--bg-1); color: var(--lz-navy); border: 1px solid var(--border-1); border-left: 3px solid var(--fg-2); border-radius: var(--radius-md); padding: 12px 16px; box-shadow: var(--shadow-md); max-width: 360px; font-size: var(--text-sm); animation: slideUp var(--dur-base) var(--ease-out); }
.toast.success { border-left-color: var(--lz-success); }
.toast.error { border-left-color: var(--lz-red-bright); }
.toast.info { border-left-color: var(--lz-lavender); }
.toast.fade-out { opacity: 0; transform: translateY(8px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }

.muted { color: var(--fg-2); }

/* ============================ MODE NUIT ============================ */
[data-theme="dark"] {
  --bg-1: #2a3a4f; --bg-2: #1c2735; --bg-3: #34465c;
  --fg-1: #eef0f6; --fg-2: #aab2c2; --fg-3: #7f8a9c;
  --border-1: #3a4a60; --border-2: #4a5c75;
  --lz-navy: #eef0f6; --lz-grey-100: #34465c; --lz-grey-200: #3a4a60; --lz-grey-300: #4a5c75;
}
[data-theme="dark"] .btn-secondary { background: var(--lz-lavender); color: var(--lz-navy-deep); }
[data-theme="dark"] .btn-secondary:hover:not(:disabled) { background: var(--lz-lavender-soft); }
[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23eef0f6' stroke-width='1.8'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); }
[data-theme="dark"] .loading-overlay { background: rgba(28, 39, 53, 0.92); }
[data-theme="dark"] .modal-overlay { background: rgba(10, 16, 24, 0.6); }
[data-theme="dark"] .set-status.ok { color: #6fd4a3; }

/* ============================ RESPONSIVE ============================ */
/* Desktop : chaque colonne défile indépendamment (formulaire | article). */
@media (min-width: 1025px) {
  .view.layout {
    height: calc(100vh - 74px); /* 74px = hauteur de la topbar sticky */
    overflow: hidden;
    align-items: stretch; /* les deux colonnes occupent toute la hauteur */
  }
  .form-panel {
    position: static; /* plus de sticky : la colonne gère son propre scroll */
    overflow-y: auto;
    overscroll-behavior: contain; /* le scroll ne déborde pas sur l'autre colonne */
  }
  .right-column {
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .form-panel { position: static; }
}
@media (max-width: 640px) {
  .view { padding: var(--space-4) 14px var(--space-10); }
  .topbar { flex-direction: column; gap: var(--space-3); }
  .field-row { grid-template-columns: 1fr; }
  .dash-breakdown { grid-template-columns: 1fr; }
}

/* =====================================================================
   REFONTE COLONNE DROITE (prévisualisation) — 2026-06-06
   Article mis en avant, infos SEO en accordéons secondaires.
   ===================================================================== */

/* Conteneur de la colonne droite : blocs empilés, pleine largeur (alignés sur le bloc quotas) */
.preview-col { display: flex; flex-direction: column; gap: 12px; }
.preview-content { display: flex; flex-direction: column; gap: 12px; }

/* ---- BLOC 1 — Barre d'actions (score compact + mode + boutons) ---- */
.result-bar {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 52px; padding: 8px 16px;
  background: var(--bg-1); border: 1px solid var(--border-1);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm); flex-wrap: wrap;
}
.rb-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.score-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--lz-grey-300); flex: none; }
.rb-score { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); color: var(--lz-navy); }
.rb-verdict { font-size: var(--text-xs); color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-center { margin-left: auto; }
.rb-right { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* ---- BLOC 2 — Accordéons ---- */
.accordions { background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.acc + .acc { border-top: 1px solid var(--border-1); }
.acc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: transparent; border: 0; cursor: pointer; padding: 14px 16px;
  font-weight: 600; font-size: var(--text-sm); color: var(--lz-navy);
  transition: background var(--dur-base) var(--ease-out);
}
.acc-head:hover { background: var(--bg-2); }
.acc-chev { color: var(--fg-2); transition: transform var(--dur-base) var(--ease-out); }
.acc-head[aria-expanded="true"] .acc-chev,
.acc-subtoggle[aria-expanded="true"] .acc-chev { transform: rotate(180deg); }
/* Corps repliable animé (max-height) */
.acc-body { max-height: 0; overflow: hidden; transition: max-height 250ms var(--ease-out); }
.acc-body.open { max-height: 800px; }
.acc-inner { padding: 16px; }

/* Accordéon Analyse SEO : scores | checks en 2 colonnes */
.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.seo-scores { display: flex; flex-direction: column; gap: 10px; }
.mini-bar .mb-head { display: flex; justify-content: space-between; font-size: var(--text-xs); font-weight: 600; color: var(--fg-2); margin-bottom: 4px; }
.mb-track { height: 6px; border-radius: var(--radius-pill); background: var(--lz-grey-200); overflow: hidden; }
.mb-fill { display: block; height: 100%; width: 0%; border-radius: var(--radius-pill); transition: width 600ms var(--ease-out); }
.mb-fill.tech { background: #3b82f6; }
.mb-fill.edito { background: var(--lz-lavender); }
.quality-checks { margin: 0; }
.acc-subtoggle { margin-top: 14px; border: 0; background: transparent; cursor: pointer; color: var(--lz-navy); font-weight: 600; font-size: var(--text-xs); display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.sugg-body { max-height: 0; overflow: hidden; transition: max-height 250ms var(--ease-out); }
.sugg-body.open { max-height: 400px; margin-top: 10px; }

/* Accordéon Métadonnées : champ + compteur sur une ligne */
.meta-field { display: flex; align-items: center; gap: var(--space-2); }
.meta-field .meta-input { flex: 1; }
.meta-field .char-count { margin-top: 0; white-space: nowrap; }
.meta-input.warn { background: #FFFBEB; border-color: var(--lz-warning); }
.slug-field { display: flex; align-items: center; background: var(--bg-1); border: 1.5px solid var(--border-1); border-radius: var(--radius-md); overflow: hidden; }
.slug-field:focus-within { border-color: var(--lz-lavender); box-shadow: 0 0 0 3px rgba(150, 153, 206, 0.25); }
.slug-prefix { padding: 0 4px 0 12px; color: var(--fg-3); font-size: var(--text-sm); white-space: nowrap; }
.slug-field .meta-input { border: 0; box-shadow: none; flex: 1; padding-left: 2px; }
.slug-field .meta-input:focus { box-shadow: none; }

/* Accordéon Liens internes : liste compacte */
.il-list li { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.il-list li::before { content: '→'; color: var(--lz-lavender); }
.link-more { border: 0; background: transparent; color: var(--lz-navy); font-weight: 600; font-size: var(--text-xs); cursor: pointer; padding: 6px 0 0; }

/* ---- Légende sous le bouton Analyser (le bouton utilise btn btn-ghost du DS) ---- */
.analyze-legend { display: flex; gap: 14px; justify-content: center; font-size: var(--text-xs); color: var(--fg-2); margin-top: 4px; }
.analyze-legend span { display: inline-flex; align-items: center; gap: 5px; }
.analyze-legend .dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-green { background: var(--lz-success); }
.dot-orange { background: var(--lz-warning); }
.dot-red { background: var(--lz-red-bright); }

/* ---- BLOC 3 — Article (la star) ---- */
.article-card { background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 32px 40px; }
.article-card #renderH1 { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: #111827; margin: 0 0 20px; line-height: 1.25; outline: none; }
.article-card .article-body { font-size: 15px; line-height: 1.8; color: #4B5563; outline: none; }
.article-card .article-body h2 { font-family: var(--font-body); font-size: 18px; font-weight: 600; color: #1F2937; margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 2px solid #6C63FF; }
.article-card .article-body h3 { font-size: 16px; font-weight: 600; color: #374151; margin: 24px 0 10px; }
.article-card .article-body p { margin: 0 0 16px; }
.article-card .article-body strong { color: #111827; font-weight: 600; }
.article-card .article-body ul, .article-card .article-body ol { padding-left: 20px; margin: 0 0 16px; }
.article-card .article-body li { margin-bottom: 8px; }
.article-card .article-body ul { list-style: none; padding-left: 0; }
.article-card .article-body ul li { position: relative; padding-left: 22px; }
.article-card .article-body ul li::before { content: '■'; color: #6C63FF; position: absolute; left: 0; font-size: 12px; top: 2px; }
.article-card .article-body img { border-radius: 10px; margin: 24px 0; max-width: 100%; height: auto; }
.article-card .article-body figure { margin: 24px 0; position: relative; }
.article-card .article-body figcaption { font-style: italic; font-size: 13px; color: var(--fg-2); text-align: center; margin-top: 8px; }
.article-card .article-body .lead-definition, .article-card .article-body blockquote {
  background: #F5F3FF; border-left: 3px solid #6C63FF; border-radius: 0 8px 8px 0;
  padding: 14px 18px; margin: 20px 0; font-style: italic;
}

/* ---- FAQ en accordéon (sobre) ---- */
.article-body .faq-q {
  background: #F9FAFB; padding: 14px 18px; border-radius: 8px; cursor: pointer;
  margin: 0 0 8px; font-size: 16px; font-weight: 600; color: #1F2937;
  position: relative; padding-right: 40px; border: 0;
}
.article-body .faq-q::after { content: '▾'; position: absolute; right: 18px; top: 14px; color: var(--fg-2); transition: transform var(--dur-base) var(--ease-out); }
.article-body .faq-q.open::after { transform: rotate(180deg); }
.article-body .faq-a { max-height: 0; overflow: hidden; transition: max-height 250ms var(--ease-out); margin: 0; }
.article-body .faq-a.faq-open { max-height: 600px; margin: 0 0 8px; padding: 0 18px; }

@media (max-width: 640px) {
  .seo-grid { grid-template-columns: 1fr; }
  .article-card { padding: 24px 20px; }
  .result-bar { position: static; }
}
