/*
 * Charte de la console CN Digital (novembre 2026) : bleu nuit, fuchsia et turquoise.
 * Barre du haut et menu de gauche bleu nuit (dans les deux thèmes) ; fuchsia pour l'action principale et la rubrique
 * active ; turquoise, citron vert et ambre en couleurs d'appoint (graphiques, indicateurs, compteurs).
 * Les couleurs d'état (vert, orange, rouge) restent réservées aux voyants.
 * Polices hébergées ici (licence OFL) : Outfit (titres, chiffres, libellés), DM Sans (texte, boutons, menus).
 */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/outfit-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/static/fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --cn-nuit: #0F172A;
  --cn-nuit-2: #1E293B;
  --cn-fuchsia: #E11D74;
  --cn-fuchsia-fonce: #B0145A;
  --cn-fuchsia-clair: #FDE6F0;
  --cn-turquoise: #19D3C5;
  --cn-turquoise-clair: #DDF6FB;
  --cn-citron: #84CC16;
  --cn-citron-clair: #EEF8DA;
  --cn-ambre: #F59E0B;
  --cn-ambre-clair: #FEF1D7;
  --cn-noir: #0F172A;
  --cn-gris-clair: #F4F6FA;
  --cn-gris-texte: #334155;
  --cn-filet: #E1E6EF;
  /* Barre du haut et menu de gauche (identiques dans les deux thèmes). */
  --nav-bg: #101A3F;
  --nav-bg-2: #1B2752;
  --nav-ink: #CBD5E1;
  --nav-muted: #7C8BA3;
  --nav-strong: #FFFFFF;
  --nav-border: #1E293B;
  --cn-r-s: 8px;
  --cn-r-m: 12px;
  --cn-r-l: 16px;
  --cn-r-xl: 24px;
  --font-titres: "Outfit", "DM Sans", system-ui, sans-serif;
  --font-texte: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: var(--cn-gris-clair);
  --surface: #FFFFFF;
  --text: var(--cn-gris-texte);
  --strong: var(--cn-noir);
  --muted: #5E6B82;
  --border: var(--cn-filet);
  --accent: var(--cn-fuchsia);
  --accent-strong: var(--cn-fuchsia-fonce);
  --accent-soft: #EEF1F7; /* fond neutre (survol, pastilles) */
  --accent-tint: var(--cn-fuchsia-clair);
  --accent-2: var(--cn-turquoise);
  --accent-2-soft: var(--cn-turquoise-clair);
  /* Voyants d'état (jamais pour les boutons ni les liens). */
  --ok: #0B7285;
  --ok-soft: #DDF6FB;
  --warn: #8A5A00;
  --warn-soft: #FDF3DC;
  --warn-dot: #D98B1F;
  --error: #B42318;
  --error-soft: #FDECEA;
  /* Relecture : couleur de chaque auteur des modifications (IA, CN Digital, client). */
  --rv-ia: #174EA6; --rv-ia-soft: #E3EEFB;
  --rv-agence: #5B2A9E; --rv-agence-soft: #EFE6FB;
  --rv-client: #8A4500; --rv-client-soft: #FDEBD8;
  /* Score sémantique : zones et points (couleurs de la maquette). */
  --sem-vert: #2FB574; --sem-orange: #F5A524; --sem-rouge: #E5484D; --sem-line: #6D28D9; --sem-ink: #1E1033;
  --sem-band-vert: #DDF3E8; --sem-band-orange: #FDF2DD; --sem-band-rouge: #FBE6E7;
  --radius: var(--cn-r-l);
  --on-accent: #FFFFFF;
  --accent-hover: var(--cn-fuchsia-fonce);
  --on-accent-hover: #FFFFFF;
}

/*
 * Version sombre (bouton dans l'en-tête, choix gardé dans un cookie) : fond noir, vert vif seulement sur noir
 * (vert profond illisible sur noir), bouton principal vert vif à texte noir, survol blanc, logo pour fond sombre.
 */
:root[data-theme="dark"] {
  color-scheme: dark;
  --rv-ia: #8DB8F5; --rv-ia-soft: #16263F;
  --rv-agence: #C9A6F5; --rv-agence-soft: #2A1B40;
  --rv-client: #F5B878; --rv-client-soft: #3A2612;
  --sem-line: #A78BFA; --sem-ink: #F2EEFB;
  --sem-band-vert: #12291F; --sem-band-orange: #2E2410; --sem-band-rouge: #301617;
  --bg: #0B1120;
  --surface: #111A2E;
  --text: #CBD5E1;
  --strong: #F8FAFC;
  --muted: #94A3B8;
  --border: #1F2A40;
  --accent: #F0509A;
  --accent-strong: #F9A8D4;
  --accent-soft: #1A2438;
  --accent-tint: #2A1530;
  --accent-2: #22D3EE;
  --accent-2-soft: #0E2A33;
  --on-accent: #FFFFFF;
  --accent-hover: #FF6FB0;
  --on-accent-hover: #0F172A;
  --nav-bg: #080D1A;
  --nav-bg-2: #151F35;
  --nav-border: #151F35;
  --ok: #22D3EE;
  --ok-soft: #0E2A33;
  --warn: #F2C46D;
  --warn-soft: #33280F;
  --warn-dot: #E0A23A;
  --error: #FF8A80;
  --error-soft: #3A1A18;
  --chart-1: #22D3EE;
  --chart-2: #F0509A;
  --chart-3: #A3E635;
  --chart-4: #FBBF24;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-texte);
  font-size: 15px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4, .kpi-number, .stat-number, .trend-value, .psi-score, th { font-family: var(--font-titres); }
h1, h2, h3, h4 { color: var(--strong); font-weight: 600; letter-spacing: -0.01em; }
strong, b { color: var(--strong); }

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 20px; color: var(--strong); text-decoration: none; }
.brand img { display: block; height: 40px; width: auto; }
.brand img.logo-sparkan { height: 30px; }
.brand-label { font-family: var(--font-titres); font-weight: 500; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-left: 20px; border-left: 1px solid var(--border); line-height: 24px; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: var(--cn-r-s); color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--accent-soft); color: var(--strong); }
.nav a.active { background: var(--accent-soft); color: var(--strong); font-weight: 700; }

.who { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.who form { margin: 0; }

main { max-width: 1100px; margin: 0 auto; padding: 28px 16px 64px; }
main.narrow { max-width: 520px; }
main.wide { max-width: 1440px; }
.sites-table td[data-label="Connexions"] .conns { flex-wrap: nowrap; }
@media (max-width: 1100px) { .sites-table td[data-label="Connexions"] .conns { flex-wrap: wrap; } }

h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; }
h2 { font-size: 19px; line-height: 1.25; margin: 0 0 8px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 550; align-content: start; }
input[type="email"], input[type="password"], input[type="text"], input[type="tel"], input[type="date"], input[type="time"], input[type="datetime-local"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--cn-r-s);
  background: var(--surface);
  color: var(--strong);
  font: inherit;
}
input:focus { outline: 3px solid var(--accent); outline-offset: 1px; }

button, .button {
  display: inline-block;
  padding: 11px 20px;
  border: 0;
  border-radius: var(--cn-r-m);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--accent-hover); color: var(--on-accent-hover); }
.button.secondary { background: transparent; color: var(--strong); box-shadow: inset 0 0 0 1.5px var(--strong); }
.button.secondary:hover { background: var(--accent-soft); color: var(--strong); }
button.link { background: none; padding: 0; color: var(--accent); font-weight: 500; }
button.link:hover { background: none; text-decoration: underline; }
.inline-form { margin-top: 12px; }

.flash { padding: 12px 16px; border-radius: var(--cn-r-m); margin-bottom: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--strong); }
.flash-error { background: var(--error-soft); color: var(--error); border-color: transparent; }
.flash-success { background: var(--ok-soft); color: var(--ok); border-color: transparent; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: var(--cn-r-s); font-size: 12px; font-weight: 600; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-error { background: var(--error-soft); color: var(--error); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.steps { padding-left: 20px; display: grid; gap: 10px; }
.qr { margin: 10px 0; width: 200px; background: #FFFFFF; padding: 8px; border-radius: var(--cn-r-s); }
.qr svg { display: block; width: 100%; height: auto; }
.secret { display: block; margin-top: 4px; font-size: 14px; letter-spacing: 0.5px; word-spacing: 4px; }

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; gap: 12px; }
  .who { margin-left: 0; width: 100%; justify-content: space-between; }
  .card { padding: 16px; }

  /* Tableaux : une fiche par ligne sur téléphone. */
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  table.stack td { display: flex; gap: 12px; padding: 3px 0; border: 0; }
  table.stack td::before { content: attr(data-label); flex: 0 0 78px; color: var(--muted); font-size: 13px; }
  table.stack td.nowrap { white-space: normal; }
}

/* ---------- Jalon 2 : sites ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.head-actions form { margin: 0; }
.crumbs { margin: 0 0 8px; color: var(--muted); font-size: 14px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 550; }
.tabs a.active { color: var(--accent-strong); border-bottom-color: var(--accent); }

.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input[type="search"] { flex: 1; }
/* Champ de recherche avec croix d'effacement (ajoutée par app.js) */
.search-field { position: relative; display: block; flex: 1; min-width: 0; }
.search-field input[type="search"] { padding-right: 42px; }
.search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--cn-r-s); background: none; color: var(--muted); cursor: pointer; }
.search-clear:hover, .search-clear:focus-visible { background: var(--accent-soft); color: var(--strong); }
.search-clear[hidden] { display: none; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }

input[type="search"], input[type="url"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--cn-r-s);
  background: var(--surface);
  color: var(--strong);
  font: inherit;
}
textarea { resize: vertical; }
select:focus, textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; }

.form.wide { max-width: 860px; }
.form .card { display: grid; gap: 14px; margin-bottom: 0; }
.form .card h2 { margin: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.checks { display: grid; gap: 8px; }
.form label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent); }
.help { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.check .help { display: inline; }
.error { color: var(--error); font-size: 13px; font-weight: 500; }
.has-error input { border-color: var(--error); }
.req { color: var(--error); }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1 1 200px; min-width: 0; }
.tab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; }
.tab-check { font-size: 14px; }

.secondary-btn { background: transparent; color: var(--strong); box-shadow: inset 0 0 0 1.5px var(--strong); }
.secondary-btn:hover { background: var(--accent-soft); color: var(--strong); }
.small-btn { padding: 7px 12px; font-size: 13px; border-radius: var(--cn-r-s); }
.danger, .button.danger { background: var(--error); color: #FFFFFF; box-shadow: none; }
.danger:hover, .button.danger:hover { background: var(--error); filter: brightness(0.9); }
.danger-zone { border-color: var(--error-soft); }

.badge-neutral { background: var(--accent-soft); color: var(--text); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

td.actions { text-align: right; }
td.actions form { margin: 0; }
.url { word-break: break-all; }
.empty { text-align: center; padding: 24px 0; color: var(--muted); }

.result { max-width: 860px; }
.result h2 { margin-bottom: 4px; }
.result-ok { border-left: 4px solid var(--ok); }
.result-error { border-left: 4px solid var(--error); }
.result-summary { font-weight: 600; margin: 0 0 8px; }
.steps-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; }
.steps-list li.ok::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.steps-list li.ko::before { content: "✗ "; color: var(--error); font-weight: 700; }
.advice { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }

a.stat-link { display: block; color: inherit; text-decoration: none; }
a.stat-link:hover { border-color: var(--accent); }
.stat-number { font-size: 34px; font-weight: 700; margin: 0 0 4px; color: var(--accent-strong); }

@media (max-width: 640px) {
  td.actions { text-align: left; }
  .form-actions button { flex: 1; }
}

/* Lien externe (ouvre le site dans un nouvel onglet) */
.ext-link { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--cn-r-s); color: var(--muted); vertical-align: middle; }
.ext-link:hover { color: var(--accent-strong); background: var(--accent-soft); }
h1 .ext-link { width: 28px; height: 28px; }

/* ---------- Supervision ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; color: var(--muted); }
.kpi-number { font-size: 30px; font-weight: 700; color: var(--text); line-height: 1.1; }
.kpi-ok .kpi-number { color: var(--ok); }
.kpi-warn .kpi-number { color: var(--warn); }
.kpi-error .kpi-number { color: var(--error); }
a.kpi-link { text-decoration: none; transition: border-color 0.15s; }
a.kpi-link:hover { border-color: var(--strong); }
.kpis-sites { margin-bottom: 16px; }
.group h2 { display: flex; align-items: baseline; gap: 8px; }
table.supervision td { vertical-align: middle; }
.num { font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; font-weight: 600; margin-left: 2px; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--error); }
tr.row-down td:first-child { box-shadow: inset 3px 0 0 var(--error); }
tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn-dot); }
.alert-text { color: var(--error); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.events { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.card h3 { font-size: 15px; margin: 14px 0 8px; }
.settings-block h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-edit input[type="text"] { flex: 1; min-width: 160px; }
.inline-edit input.pos { width: 72px; flex: none; }
.add-category { margin-top: 12px; max-width: 480px; }
.align-end { align-self: end; padding-bottom: 10px; }
@media (max-width: 640px) {
  table.stack td[colspan] { display: block; }
  .align-end { padding-bottom: 0; }
}
/* Mêmes largeurs de colonnes dans toutes les catégories */
table.supervision { table-layout: fixed; }
table.supervision th:nth-child(1) { width: 30%; }
table.supervision th:nth-child(2) { width: 22%; }
table.supervision th:nth-child(3) { width: 12%; }
table.supervision th:nth-child(n+4) { width: 9%; }
table.supervision td { overflow-wrap: anywhere; }
@media (max-width: 640px) { table.supervision { table-layout: auto; } }
.settings-block td { vertical-align: middle; }

/* ---------- Tableau de bord : aperçu des sites ---------- */
a.kpi { text-decoration: none; }
a.kpi:hover { border-color: var(--accent); }
.overview { display: grid; gap: 20px; }
.overview-group h2 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--border); border-radius: var(--cn-r-m); padding: 10px 12px; background: var(--bg); display: grid; gap: 2px; min-width: 0; }
.tile-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tile-name { font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-name:hover { color: var(--accent-strong); text-decoration: underline; }
.tile .ext-link { margin-left: auto; flex: none; }
.tile-meta, .tile-seo { font-size: 13px; color: var(--muted); }
.tile-seo strong { color: var(--text); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--border); }
.tile-up .dot { background: var(--ok); }
.tile-warning { border-color: var(--warn-dot); }
.tile-warning .dot { background: var(--warn-dot); }
.tile-warning .tile-meta { color: var(--warn); }
.tile-down { border-color: var(--error); background: var(--error-soft); }
.tile-down .dot { background: var(--error); }
.tile-down .tile-meta { color: var(--error); font-weight: 600; }

/* ---------- Sites : filtres ---------- */
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.filters label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 160px; }
.filters label.grow { flex: 1; min-width: 200px; }
.filter-actions { display: flex; gap: 12px; align-items: center; padding-bottom: 2px; }
table.sites-table td { vertical-align: middle; }
@media (max-width: 640px) { .filters label { min-width: 0; flex: 1 1 140px; } }

/* Catégories triables */
.categories-table .drag-col { width: 1%; white-space: nowrap; }
.drag-handle { cursor: grab; font-size: 18px; color: var(--muted); padding: 0 6px 0 2px; user-select: none; vertical-align: middle; }
.categories-table tr[draggable="true"]:hover .drag-handle { color: inherit; }
.categories-table tr.dragging { opacity: 0.45; }
.categories-table tbody.saving { opacity: 0.6; pointer-events: none; }
.move-btn { padding: 2px 8px; font-size: 13px; line-height: 1.4; background: transparent; border: 1px solid var(--border); color: inherit; border-radius: var(--cn-r-s); cursor: pointer; }
.move-btn:disabled { opacity: 0.3; cursor: default; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pictos de connexion (API, FTP, Matomo, Search Console) */
.conns { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.conn { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: var(--cn-r-s); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.conn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.conn-on { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.conn-on::before { opacity: 1; }
.conn-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.conn-warn::before { opacity: 1; }
.tile-conns { margin-top: 8px; }
.tile-warning .tile-meta { color: var(--muted); }
.tile-security { font-size: 13px; color: var(--warn); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.plain { list-style: none; padding: 0; margin: 8px 0 0; }
ul.plain li { margin: 4px 0; }
ol.steps { margin: 6px 0 12px; padding-left: 20px; }
ol.steps li { margin: 3px 0; }

/* Onglets */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 4px 0 18px; }
.tabs a { padding: 9px 14px; border-radius: var(--cn-r-s) 8px 0 0; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; border: 1px solid transparent; border-bottom: none; margin-bottom: -1px; }
.tabs a:hover { color: inherit; }
.tabs a.active { color: inherit; background: var(--surface); border-color: var(--border); }
@media (max-width: 640px) { .tabs { flex-wrap: nowrap; overflow-x: auto; } .tabs a { white-space: nowrap; padding: 8px 10px; } }

/* Pastilles CMS */
.cms { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; padding: 3px 6px; border-radius: var(--cn-r-s); border: 1px solid var(--border); color: var(--muted); }
.cms-wordpress { color: var(--strong); border-color: var(--strong); }
.cms-communik { color: var(--strong); background: var(--accent-soft); }
.cms-shopify { color: var(--strong); background: var(--ok-soft, var(--accent-soft)); border-color: var(--ok, var(--border)); }

/* Mises à jour */
.update-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.update-row:last-of-type { border-bottom: none; }
.inline-form { display: inline; margin: 0; }
.kpis-small .kpi-number { font-size: 26px; }
.flash-info { background: var(--surface); border-left: 3px solid var(--accent); }

/* Tri des colonnes */
.th-sort { all: unset; cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; }
.th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--cn-r-s); }
.sort-arrow::after { content: "↕"; font-size: 11px; opacity: 0.35; }
th[aria-sort="ascending"] .sort-arrow::after { content: "↑"; opacity: 1; }
th[aria-sort="descending"] .sort-arrow::after { content: "↓"; opacity: 1; }

/* Actualisation et mises à jour en attente */
.refresh-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: -6px 0 12px; }
.refresh-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.refresh-actions form { margin: 0; }
ul.pending { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12px; line-height: 1.45; }
ul.pending li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

/* Onglet Sauvegardes */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head form { margin: 0; }
table.compact td, table.compact th { padding: 6px 8px; vertical-align: top; }

/* En-tête : pictos « Mon compte » et « Déconnexion » */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border-radius: var(--cn-r-s); background: none; color: var(--muted); border: 1px solid transparent; }
.icon-btn:hover, .icon-btn.active { background: var(--accent-soft); color: var(--accent-strong); }
.who .icon-btn + form { margin-left: -6px; }

/* Réglages : menu vertical à gauche, une section à la fois */
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.settings-nav a { padding: 8px 12px; border-radius: var(--cn-r-s); color: var(--muted); text-decoration: none; font-size: 15px; }
.settings-nav a:hover { background: var(--accent-soft); color: var(--text); }
.settings-nav a.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.settings-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.settings-group { display: flex; flex-direction: column; gap: 2px; }
.settings-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: var(--cn-r-s); cursor: pointer; list-style: none; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.settings-group > summary::-webkit-details-marker { display: none; }
.settings-group > summary::before { content: "▸"; font-size: 11px; margin-right: 6px; transition: transform .15s; }
.settings-group[open] > summary::before { transform: rotate(90deg); }
.settings-group > summary:hover { background: var(--accent-soft); color: var(--text); }
.settings-group > summary { justify-content: flex-start; }
.settings-group > summary .dot { margin-left: auto; }
.settings-group[open] > summary .dot { visibility: hidden; }
.settings-group > a { margin-left: 10px; }
.settings-nav .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: transparent; }
.settings-nav .dot-ok { background: var(--ok); }
.settings-nav .dot-warn { background: var(--warn-dot); }
.settings-nav .dot-error { background: var(--error); }
.settings-nav .dot-off { background: var(--border); }
code.secret-once { font-size: 18px; padding: 6px 10px; user-select: all; }
.settings-content > .settings-block:first-child, .settings-content > :first-child { margin-top: 0; }
[data-settings-tabs].js-tabs .settings-block[hidden] { display: none; }
@media (max-width: 800px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .settings-group { flex-basis: 100%; }
  .settings-group > a { display: inline-flex; }
}
[data-settings-tabs].js-tabs .settings-block, .settings-content > .card:first-child, .settings-content > .page-head:first-child { margin-top: 0; }

/* Espace utilisé (sauvegardes) */
.storage-bar { margin: 10px 0 14px; max-width: 520px; }
.storage-text { font-size: 14px; margin-bottom: 6px; }
.storage-track { height: 8px; border-radius: var(--cn-r-s); background: var(--accent-soft); overflow: hidden; }
.storage-track span { display: block; height: 100%; background: var(--ok); border-radius: var(--cn-r-s); }
.storage-warn .storage-track span { background: var(--warn-dot); }
.storage-bad .storage-track span { background: var(--error); }

/* Légende des indicateurs */
details.legend { margin-top: 16px; }
details.legend summary { cursor: pointer; font-weight: 600; color: var(--accent-strong); }
details.legend dl { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 8px 16px; margin: 14px 0 0; font-size: 14px; }
details.legend dt { font-weight: 600; }
details.legend dd { margin: 0; color: var(--muted); }
@media (max-width: 640px) { details.legend dl { grid-template-columns: 1fr; } details.legend dd { margin-bottom: 6px; } }

/* Tendances */
:root { --chart-1: var(--cn-turquoise); --chart-2: var(--cn-fuchsia); --chart-3: var(--cn-citron); --chart-4: var(--cn-ambre); }
.trend-selectors { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 6px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--cn-r-s); border: 1px solid var(--border); background: var(--surface); color: var(--muted); text-decoration: none; font-size: 14px; }
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); font-weight: 600; }
.chip-source { font-size: 11px; opacity: .7; }
.spark { display: block; overflow: visible; }
.spark-line { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.spark-up .spark-line { stroke: var(--ok); } .spark-up .spark-area { fill: var(--ok); opacity: .1; }
.spark-down .spark-line { stroke: var(--error); } .spark-down .spark-area { fill: var(--error); opacity: .08; }
.delta.flat { color: var(--muted); }
.trend-group { margin-top: 14px; }
.trend-group-title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }
.trend-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.trend-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); background: var(--surface); }
.trend-tile:hover { border-color: var(--accent); }
.trend-tile.active { border: 2px solid var(--accent); background: var(--accent-soft); padding: 11px 13px; }
.trend-label { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.trend-value { font-size: 22px; font-weight: 700; }
.trend-tile.active .trend-value { color: var(--accent-strong); }
.trend-hint { font-size: 11px; color: var(--muted); }
.chart-panel { margin-top: 18px; }
.chart-panel h3 { margin: 0 0 8px; font-size: 16px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 12px; }
.chart .line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: .1; }
.chart .dot { fill: transparent; stroke: transparent; }
.chart .dot:hover { stroke-width: 2; }
.serie-1 .line, .serie-1 .dot:hover { stroke: var(--chart-1); } .serie-1 .area, .serie-1 .dot:hover { fill: var(--chart-1); }
.serie-2 .line, .serie-2 .dot:hover { stroke: var(--chart-2); } .serie-2 .dot:hover { fill: var(--chart-2); }
.serie-3 .line, .serie-3 .dot:hover { stroke: var(--chart-3); } .serie-3 .dot:hover { fill: var(--chart-3); }
.serie-4 .line, .serie-4 .dot:hover { stroke: var(--chart-4); } .serie-4 .dot:hover { fill: var(--chart-4); }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 6px; }
.legend-item i { display: inline-block; width: 14px; height: 3px; border-radius: var(--cn-r-s); margin-right: 6px; vertical-align: middle; }
.legend-item.serie-1 i { background: var(--chart-1); } .legend-item.serie-2 i { background: var(--chart-2); } .legend-item.serie-3 i { background: var(--chart-3); } .legend-item.serie-4 i { background: var(--chart-4); }
.chart-empty { padding: 40px 0; text-align: center; color: var(--muted); }
.ip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.delta, .num { white-space: nowrap; }
.sites-table td { white-space: nowrap; }
.sites-table td[data-label="Site"] { white-space: normal; }

/* Barre d'espace : largeur par paliers de 5 % (la politique de sécurité interdit les styles en ligne) */
.storage-track span.pct-0 { width: 0%; }
.storage-track span.pct-5 { width: 5%; }
.storage-track span.pct-10 { width: 10%; }
.storage-track span.pct-15 { width: 15%; }
.storage-track span.pct-20 { width: 20%; }
.storage-track span.pct-25 { width: 25%; }
.storage-track span.pct-30 { width: 30%; }
.storage-track span.pct-35 { width: 35%; }
.storage-track span.pct-40 { width: 40%; }
.storage-track span.pct-45 { width: 45%; }
.storage-track span.pct-50 { width: 50%; }
.storage-track span.pct-55 { width: 55%; }
.storage-track span.pct-60 { width: 60%; }
.storage-track span.pct-65 { width: 65%; }
.storage-track span.pct-70 { width: 70%; }
.storage-track span.pct-75 { width: 75%; }
.storage-track span.pct-80 { width: 80%; }
.storage-track span.pct-85 { width: 85%; }
.storage-track span.pct-90 { width: 90%; }
.storage-track span.pct-95 { width: 95%; }
.storage-track span.pct-100 { width: 100%; }
.backup-error { display: inline-block; max-width: 260px; white-space: normal; line-height: 1.3; margin-top: 4px; }
.tool-links { display: inline-flex; gap: 6px; white-space: nowrap; }
.tool-link { text-decoration: none; }

/* Sauvegarde de la base de la console (Réglages › Sauvegardes) */
.db-backup ul { margin: 8px 0; }
.text-error { color: var(--error); }

/* Réglages › Sauvegardes : inventaire du stockage, tableau par site, calendrier des nuits */
.db-backup { margin: 0; padding: 0; border: 0; }
.db-backup h2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#sauvegardes-console h2, #sauvegardes h2, #sauvegardes-sites h2 { margin-top: 0; }
.inventory { margin: 14px 0; }
.inventory-table th.num, .inventory-table td.num, .sites-backups th.num, .sites-backups td.num { text-align: right; }
.inventory-table tr.total td { border-bottom: 0; }
details.settings-details { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 12px; }
details.settings-details summary { cursor: pointer; font-weight: 600; color: var(--accent-strong); }
details.settings-details[open] summary { margin-bottom: 12px; }
.nights-block { margin: 16px 0 8px; }
.nights-row { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 12px; align-items: center; padding: 3px 0; }
.nights-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.nights { display: grid; grid-template-columns: repeat(30, minmax(6px, 1fr)); gap: 3px; max-width: 540px; }
.nights-dates { display: flex; justify-content: space-between; max-width: 540px; }
.night { display: inline-block; height: 14px; min-width: 6px; border-radius: var(--cn-r-s); background: var(--border); }
.night-ok { background: var(--ok); }
.night-error { background: var(--error); }
.night-none { background: var(--border); }
.nights-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.nights-key .night { width: 12px; height: 12px; margin-left: 8px; }
.nights-key .night:first-child { margin-left: 0; }
.form-inline-settings { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
@media (max-width: 640px) {
  .nights-row { grid-template-columns: 1fr; gap: 4px; }
  .nights-head .nights-label { display: none; }
}

/* Hébergement : comptes O2switch, Cloudflare */
.hosting-table tr.lune-row td:first-child { padding-left: 22px; }
ul.checks { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 6px; font-size: 14px; }
ul.checks li { padding-left: 24px; position: relative; }
ul.checks li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
ul.checks li.ok::before { content: "✓"; color: var(--ok); }
ul.checks li.ko::before { content: "✗"; color: var(--error); }
ul.checks li.warn::before { content: "!"; color: var(--warn-dot); }
ul.checks li.todo::before { content: "?"; color: var(--muted); }
.cf-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 16px; }
.cf-action { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; }
.cf-action .check { margin: 0; }
.ns-list { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 4px; }
.ns-list code { font-size: 15px; }

/* Double authentification : choix de la méthode */
.mfa-choices { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.mfa-choices a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--cn-r-m); color: inherit; text-decoration: none; }
.mfa-choices a:hover, .mfa-choices a:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.mfa-choices li.current a { border-color: var(--accent); }
.row-form { margin: 0; }
.mfa-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
button.link.text-error { color: var(--error); }

/* Liens rapides vers les outils extérieurs (nouvelle fenêtre) */
.head-links { margin-top: 8px; }
.tool-links { flex-wrap: wrap; }
.conn-link { text-decoration: none; cursor: pointer; }
.conn-link:hover, .conn-link:focus-visible { border-color: currentColor; text-decoration: none; }
.section-head .tool-links { margin-left: auto; }
table .tool-links { gap: 4px; }
table .tool-link { padding: 3px 8px; font-size: 12px; }

textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; width: 100%; word-break: break-all; }

/* Cloudflare : action principale mise en avant, outils manuels repliés */
.cf-main { border: 1px solid var(--accent); border-radius: var(--cn-r-m); padding: 14px 16px; margin: 16px 0; }
.cf-main h3 { margin-top: 0; }
.cf-advanced { margin-top: 12px; }
.cf-advanced > summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.cf-advanced .cf-actions { margin-top: 10px; }

/* Identité des sites */
.swatches { display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.swatch { vertical-align: middle; flex: none; }
.palette { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.palette li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pre-line { white-space: pre-line; }
.upload-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Réglages › MCP */
.code-block { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--cn-r-s); padding: 10px 12px; overflow-x: auto; font-size: 13px; margin: 8px 0; white-space: pre; }
.code-block code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.card.card-warn { border-left: 4px solid var(--warn-dot); }

/* Nouveau site */
.wizard-steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 0; margin: 0 0 20px; counter-reset: step; }
.wizard-steps li { position: relative; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--muted); }
/* Trait qui relie les étapes : plein jusqu'à l'étape en cours. */
.wizard-steps li::before { content: ""; position: absolute; top: 50%; left: -50%; right: 50%; height: 2px; background: var(--border); z-index: 0; }
.wizard-steps li:first-child::before { display: none; }
.wizard-steps li.done::before, .wizard-steps li.current::before { background: var(--accent); }
.wizard-steps .step-pill { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--cn-r-s); background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none; white-space: nowrap; }
.wizard-steps li.todo .step-pill { color: var(--muted); border-style: dashed; }
.wizard-steps li.todo .step-pill > span { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.wizard-steps li .step-pill > span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--border); color: var(--text); font-weight: 700; font-size: 12px; }
.wizard-steps li.done > a { color: var(--text); }
.wizard-steps li.done .step-pill > span { background: var(--strong); color: var(--surface); }
.wizard-steps li.current > a { border-color: var(--accent); color: var(--text); font-weight: 600; }
.wizard-steps li.current .step-pill > span { background: var(--accent); color: var(--surface); }
.wizard-steps li.viewing > a { background: var(--accent); border-color: var(--accent); color: var(--surface); box-shadow: 0 0 0 4px var(--cn-filet); }
.wizard-steps li.viewing .step-pill > span { background: var(--surface); color: var(--accent); }
.wizard-steps li > a:hover { border-color: var(--accent); }
@media (max-width: 900px) {
  .wizard-steps { display: flex; flex-wrap: wrap; gap: 8px; }
  .wizard-steps li::before { display: none; }
}
.step-body > .card:first-child { margin-top: 0; }
.step-nav { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 8px; flex-wrap: wrap; }
.step-past a { font-weight: 600; margin-left: 6px; }
.docs-block { margin: 18px 0; padding: 16px; border: 1px dashed var(--border); border-radius: var(--radius); }
.docs-block h3 { margin-top: 0; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 210px)); gap: 12px; margin: 12px 0; }
.doc-card { margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.doc-card.doc-logo { border-color: var(--ok); }
.doc-card img { width: 100%; max-width: 200px; height: 100px; object-fit: contain; background: var(--cn-gris-clair) repeating-conic-gradient(var(--cn-filet) 0 25%, transparent 0 50%) 0 0 / 16px 16px; border-radius: var(--cn-r-s); padding: 6px; box-sizing: border-box; }
.doc-icon { display: grid; place-items: center; height: 110px; border-radius: var(--cn-r-s); background: var(--accent-soft); font-weight: 700; text-decoration: none; color: var(--accent-strong); }
.doc-card figcaption { font-size: 13px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.upload-form { align-items: end; }
.card.card-current { border: 1px solid var(--border); }
.inline-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; border: 0; padding: 0; margin: 4px 0; }
.inline-checks legend { font-weight: 550; margin-bottom: 4px; }
.logo-proposals { display: flex; flex-wrap: wrap; gap: 12px; }
.logo-proposals figure { margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--cn-r-m); background: #FFFFFF; }
.prompt-block { white-space: pre-wrap; max-height: 480px; overflow: auto; }

.ask-claude { border: 1px dashed var(--accent); border-radius: var(--radius); padding: 10px 14px; margin: 10px 0; background: var(--accent-soft); }
.ask-claude .code-block { margin: 6px 0 0; white-space: pre-wrap; }

/* Étape Rédacteurs : propositions */
.author-proposals { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 16px; }
.author-proposal { margin: 0; }
.author-proposal h4 { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.author-proposal blockquote { margin: 8px 0; padding-left: 10px; border-left: 3px solid var(--accent-soft); }

/* Demandes pour Claude : texte modifiable et bouton Copier */
.ask-claude .ask-text { width: 100%; font-family: var(--mono, ui-monospace, monospace); font-size: 13px; line-height: 1.5; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--cn-r-s); padding: 10px 12px; resize: vertical; }
.ask-claude p { margin: 0 0 8px; }
.ai-brief { margin: 8px 0 16px; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius); }
.plan-edit { margin-top: 18px; }
.plan-edit > summary { cursor: pointer; font-weight: 600; }
.doc-card .doc-file { color: var(--muted); word-break: break-all; }
/* Création automatique du site : journal des étapes */
.launch-steps { list-style: none; padding: 0; margin: 10px 0 16px; display: grid; gap: 6px; }
.launch-steps li { display: block; padding: 8px 10px 8px 40px; position: relative; border: 1px solid var(--border); border-radius: var(--cn-r-s); }
.launch-icon { position: absolute; left: 10px; top: 8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--border); color: var(--text); }
.launch-done .launch-icon { background: var(--ok); color: var(--surface); }
.launch-running { border-color: var(--accent); }
.launch-running .launch-icon { background: var(--accent); color: var(--surface); }
.launch-error { border-color: var(--error); }
.launch-error .launch-icon { background: var(--error); color: var(--surface); }
.launch-skipped, .launch-todo { opacity: .7; }

/* Lignes épinglées (Domaines, Sites) */
.pin-col, .pin-cell { width: 34px; padding-left: 6px !important; padding-right: 0 !important; }
.pin-cell form { margin: 0; }
.pin-btn { background: none; border: 0; padding: 4px; color: var(--muted); opacity: .35; cursor: pointer; border-radius: var(--cn-r-s); line-height: 0; }
.pin-btn:hover, .pin-btn:focus-visible { opacity: 1; background: var(--accent-soft); }
.pin-btn.pinned { color: var(--accent); opacity: 1; }
tr.row-pinned > td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.tile-index { margin: 4px 0; font-size: 12px; }
.index-light { white-space: nowrap; }

/* PageSpeed : notes et Core Web Vitals */
.badge.score { min-width: 2.4em; text-align: center; font-variant-numeric: tabular-nums; }
.psi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.psi-card { border: 1px solid var(--border); border-radius: var(--cn-r-m); padding: 14px 16px; }
.psi-card h3 { margin-top: 0; }
.psi-card h4 { margin: 14px 0 6px; font-size: 14px; }
.psi-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.psi-scores > div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.psi-score .badge.score { font-size: 20px; padding: 10px 0; width: 56px; height: 56px; line-height: 36px; border-radius: 50%; }
.psi-facts { grid-template-columns: max-content 1fr; }
@media (max-width: 480px) { .psi-scores { grid-template-columns: repeat(2, 1fr); } }

/* Charte : une seule ombre, au survol d'une carte cliquable. */
a.kpi:hover, a.stat-link:hover, .trend-tile:hover, .mfa-choices a:hover { box-shadow: 0 8px 24px rgba(10, 10, 10, 0.08); }
@media (prefers-reduced-motion: no-preference) { button, .button, a.kpi, .trend-tile { transition: background-color .2s, box-shadow .2s, color .2s; } }
.kpi-number, .stat-number { font-weight: 600; color: var(--strong); letter-spacing: -0.01em; }
.stat-number { color: var(--strong); }
.tabs a.active { color: var(--strong); }
.settings-group > summary { font-family: var(--font-titres); font-weight: 500; letter-spacing: .12em; }
.login-logo { display: block; width: 120px; height: auto; margin: 8px auto 24px; }
@media (max-width: 640px) { .brand img { height: 32px; } .brand-label { display: none; } }
/* Pastilles et petits textes dans un titre : police du texte, sans resserrement. */
h1 .badge, h2 .badge, h1 .muted, h2 .muted, h1 small, h2 small, .badge { font-family: var(--font-texte); letter-spacing: 0; }
h1 .muted, h2 .muted { font-weight: 500; }

/* Logos : version pour fond clair ou pour fond sombre selon le thème. */
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
:root[data-theme="dark"] .login-card { background: var(--cn-noir); }
:root[data-theme="dark"] .qr, :root[data-theme="dark"] .logo-proposals figure { background: #FFFFFF; }
/* Bouton clair / sombre de l'en-tête. */
.theme-toggle { color: var(--muted); }
.theme-toggle .icon-moon { display: inline; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-end .who { margin-left: 0; }
/* Menu burger mobile */
.burger { display: none; background: none; border: 0; padding: 6px; border-radius: var(--cn-r-s); color: var(--text); cursor: pointer; line-height: 0; }
.burger:hover, .burger:focus-visible { background: var(--accent-soft); color: var(--strong); }
@media (max-width: 640px) {
  .burger { display: inline-flex; order: 0; }
  .topbar { flex-wrap: wrap; }
  .brand { order: 1; }
  .topbar-end { order: 2; margin-left: auto; width: auto; }
  .nav { order: 3; width: 100%; display: none; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 1px solid var(--border); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; border-radius: var(--cn-r-s); }
}
:root[data-theme="dark"] .danger, :root[data-theme="dark"] .button.danger { color: var(--cn-noir); }
/* Suppression (corbeille) : discrète, rouge au survol. */
.icon-btn.icon-danger:hover, .icon-btn.icon-danger:focus-visible { color: var(--error); background: var(--error-soft); }
.icon-btn:disabled { opacity: .4; cursor: default; }

/* Analyse SEO des contenus : filtres par problème */
.issue-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.issue-filters .badge { text-decoration: none; }
.issue-filters .badge-active { outline: 2px solid currentColor; outline-offset: 1px; }
.view-switch { margin: 8px 0 12px; }
.view-switch-active { font-weight: 600; }
.content-group { margin: 16px 0; }
.content-group > summary { cursor: pointer; padding: 8px 0; font-size: 1.05rem; }
.depth { display: inline-block; }
.depth-1 { padding-left: 18px; }
.depth-2 { padding-left: 36px; }
.depth-3 { padding-left: 54px; }
.depth::before { content: "↳ "; color: var(--muted, #888); }

/* Analytics : cartes à onglets et barres proportionnelles */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; margin: 16px 0; }
.stat-grid .card { margin: 0; }
.stat-card-title { margin-bottom: 8px; }
.stat-card-accent { border-color: var(--accent, #7c3aed); }
.stat-tabs { display: none; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.stat-tabs button { background: transparent; color: var(--muted); box-shadow: none; border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 500; }
.stat-tabs button.active { background: var(--accent-soft, rgba(0,0,0,.06)); color: var(--strong, inherit); }
.tabs-ready .stat-tabs { display: flex; }
.tabs-ready .stat-panel { display: none; }
.tabs-ready .stat-panel.active { display: block; }
.tabs-ready .stat-panel-title { display: none; }
.stat-panel-title { font-size: 14px; margin: 12px 0 6px; }
.stat-list { list-style: none; margin: 0; padding: 0; }
.stat-row { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; margin-bottom: 4px; border-radius: 8px; overflow: hidden; }
.stat-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 8px; z-index: 0; }
.stat-label, .stat-value { position: relative; z-index: 1; }
.stat-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.stat-value { white-space: nowrap; font-variant-numeric: tabular-nums; }
.trend-up { color: var(--ok, #15803d); }
.trend-down { color: var(--error, #b91c1c); }
.bar-5 { width: 5%; }
.bar-10 { width: 10%; }
.bar-15 { width: 15%; }
.bar-20 { width: 20%; }
.bar-25 { width: 25%; }
.bar-30 { width: 30%; }
.bar-35 { width: 35%; }
.bar-40 { width: 40%; }
.bar-45 { width: 45%; }
.bar-50 { width: 50%; }
.bar-55 { width: 55%; }
.bar-60 { width: 60%; }
.bar-65 { width: 65%; }
.bar-70 { width: 70%; }
.bar-75 { width: 75%; }
.bar-80 { width: 80%; }
.bar-85 { width: 85%; }
.bar-90 { width: 90%; }
.bar-95 { width: 95%; }
.bar-100 { width: 100%; }

/* Page Domaines : ajout d'un site depuis un domaine libre */
table .tool-links.domain-add { flex-wrap: nowrap; }

/* Onglet Suivi : notes, à faire, à mesurer, journal des actions SEO */
.notes-list, .todo-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.note { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.note p { margin: 0 0 4px; }
.note-pinned { border-color: var(--accent); background: var(--accent-soft); }
.todo-list > li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.todo-list > li:last-child { border-bottom: 0; }
.todo-list > li > div { flex: 1; min-width: 0; }
.measure-result { margin-top: 8px; }
.measure-table { margin-top: 8px; }
.action-pages { margin: 4px 0; padding-left: 18px; word-break: break-all; }
.followup-table td p { margin: 4px 0; }
.action-edit { margin-top: 6px; }
.action-edit > summary, .add-action > summary { cursor: pointer; }
.add-action { margin: 8px 0 14px; }
.add-action > summary { display: inline-block; list-style: none; }
.add-action > summary::-webkit-details-marker { display: none; }
.add-action[open] > summary { margin-bottom: 10px; }
@media (max-width: 640px) { .todo-list > li { flex-direction: column; } }
.reminders-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.reminder { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.reminder > div { flex: 1; min-width: 0; }
.reminder-when { font-weight: 600; }
.reminder-late { border-color: var(--error); }
.reminder-done { opacity: .7; }
.reminder-form .reminder-cols { grid-template-columns: 180px 130px 1fr; }
.reminder-form > button { justify-self: start; }
@media (max-width: 640px) { .reminder { flex-direction: column; } .reminder-form .reminder-cols { grid-template-columns: 1fr; } }
/* Vente de liens */
.sales-table td.break, .break { word-break: break-all; }
.sales-table .action-edit form { word-break: normal; }

/* Banque d'images */
.image-grid { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.image-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.image-card img { display: block; width: 100%; height: 150px; object-fit: cover; background: var(--accent-soft); }
.image-card a:hover img, .image-card a:focus-visible img { opacity: .9; }
.image-meta { padding: 6px 10px 8px; }
.image-detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 16px; align-items: start; }
.image-preview { margin: 0; padding: 8px; }
.image-preview img { display: block; width: 100%; height: auto; border-radius: var(--cn-r-s); }
.chips-static { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.chips-static .chip { font-size: 12px; }
.chip-en { opacity: .85; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.pager-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 6px; border: 1px solid var(--border); border-radius: var(--cn-r-s); font-size: 13px; color: var(--accent); text-decoration: none; }
.pager-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.pager-current { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: var(--cn-r-s); font-size: 13px; font-weight: 600; background: var(--accent); color: #fff; }
.pager-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 32px; color: var(--muted); font-size: 13px; }
.card-sm { margin-bottom: 16px; }
@media (max-width: 860px) { .image-detail { grid-template-columns: 1fr; } }
.image-title { font-size: 22px; margin: 0 0 12px; word-break: break-word; }

/* Licences iStock : tableau des factures, téléchargement à droite. */
table.licences-table td { vertical-align: middle; }
table.licences-table th.num, table.licences-table td.num { text-align: right; white-space: nowrap; }
table.licences-table th.actions, table.licences-table td.actions { text-align: right; white-space: nowrap; }
table.licences-table th, table.licences-table td { padding-left: 8px; padding-right: 8px; }
table.licences-table td.actions { width: 1%; }
table.licences-table td.actions .icon-btn + .icon-btn { margin-left: 4px; }
.icon-btn.icon-primary { color: var(--accent); border-color: var(--border); }
.icon-btn.icon-primary:hover { background: var(--accent); color: #fff; }

/* Banques gratuites : photographe à gauche, « Ajouter » à droite. */
.stock-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stock-meta .inline-form { margin: 0; }
.stock-meta .badge { white-space: nowrap; }
.dup-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.dup-card p { margin: 0; flex: 1 1 420px; }
.meta-lines { display: grid; gap: 2px; min-width: 0; }
.meta-top { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; }
.meta-res { white-space: nowrap; }

/* En-tête : trois pictogrammes (thème, réglages, compte) ; menu du compte déroulant. */
.topbar-end { gap: 6px; }
.account-menu { position: relative; }
.account-menu > summary { list-style: none; cursor: pointer; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu[open] > summary { background: var(--accent-soft); color: var(--accent-strong); }
.account-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, .12); padding: 8px; display: flex; flex-direction: column; }
.account-pop .account-who { margin: 4px 10px 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); line-height: 1.35; }
.account-pop a, .account-pop .account-logout { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--cn-r-s); color: inherit; text-decoration: none; font-size: 14px; background: none; border: 0; width: 100%; text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.account-pop a:hover, .account-pop .account-logout:hover { background: var(--accent-soft); }
.account-pop form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--border); }
.account-pop .account-logout svg { width: 16px; height: 16px; }
/* Boutons sous un tableau, dans une carte : même espacement que sous un formulaire. */
.card > form.form-actions, .card > .form-actions { margin-top: 16px; }

/* Sous chaque photo : pictogrammes télécharger et ajouter à Ma banque. */
.photo-actions { display: inline-flex; gap: 4px; flex: none; }
.photo-actions .inline-form { margin: 0; }
.icon-btn.icon-done { color: var(--accent); background: var(--accent-soft); }

/* Aperçu : capture du site à gauche, dernier test d'accès à droite, même hauteur. */
.overview-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.overview-top > .card { margin: 0; }
@media (max-width: 960px) { .overview-top { grid-template-columns: 1fr; } }
.site-preview { display: flex; flex-direction: column; }
.site-preview .preview-frame { position: relative; display: block; margin: 6px 0 8px; height: 190px; overflow: hidden; border-radius: var(--cn-r-s); border: 1px solid var(--border); background: var(--accent-soft); }
.site-preview .preview-desktop { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.site-preview .preview-mobile { position: absolute; right: 10px; top: 10px; height: calc(100% - 20px); width: auto; max-width: 24%; object-fit: cover; object-position: top center; border-radius: 8px; border: 2px solid var(--surface); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.site-preview p.small { margin: 0; }

/* Onglets des sites : quatorze onglets sur une ligne. */
.tabs.tabs-sites { gap: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tabs.tabs-sites::-webkit-scrollbar { display: none; }
.tabs.tabs-sites a { padding: 9px 10px; white-space: nowrap; flex: none; }

/* Contenus rédigés : relevés J+7/30/90 et vignettes des images. */
.contents-table td { vertical-align: middle; }
.contents-table th.num, .contents-table td.num { text-align: right; white-space: nowrap; }
.contents-table td.actions { text-align: right; width: 1%; }
.milestones { display: flex; flex-direction: column; gap: 2px; font-size: 12px; white-space: nowrap; }
.milestone b { font-weight: 600; margin-right: 4px; }
.content-images { display: inline-flex; gap: 4px; align-items: center; }
.content-images img { display: block; width: 40px; height: 27px; object-fit: cover; border-radius: 4px; }
.import-list li { padding: 4px 0; border-bottom: 1px solid var(--border); }
.contents-table .badge { white-space: nowrap; }

/* ---------- Achat de liens : formulaire en blocs, lignes du tableau, liens de partage ---------- */
.card-inset { background: var(--bg); border: 1px solid var(--border); box-shadow: none; padding: 18px; margin: 12px 0 16px; }
.card-inset h3 { margin: 0 0 12px; }
.fieldset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.fs { border: 1px solid var(--border); border-radius: var(--cn-r-m); background: var(--surface); padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.fs legend { font-family: var(--font-titres); font-weight: 600; color: var(--strong); padding: 0 6px; font-size: 14px; }
.fs label { display: grid; gap: 4px; font-weight: 550; min-width: 0; }
.fs label[hidden] { display: none; }
.fs input, .fs select, .fs textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.fs .check input { width: 16px; }
.fs .check .help { display: block; }
.fs-note { margin: 0; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fs-article .article-input { font-family: var(--font-texte); line-height: 1.55; min-height: 260px; }
.text-warn { color: var(--warn); }
.row-muted td { opacity: .6; }
.row-active td { background: var(--warn-soft); }
.row-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.share-block { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 14px; }
.share-block h3 { margin: 0 0 4px; font-size: 16px; }
.share-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.share-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.share-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.share-create { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.share-create select { width: auto; }
@media (max-width: 640px) { .cols-2 { grid-template-columns: 1fr; } }

/* ---------- Réglages › Plateformes ---------- */
.platforms-table input[type="text"], .platforms-table input[type="number"], .platforms-table select { width: 100%; min-width: 0; }
.platforms-table td { vertical-align: middle; }
.platforms-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.input-xs { max-width: 70px; }
.input-sm { max-width: 110px; }
td.center, th.center { text-align: center; }

/* ---------- Page publique de partage des articles ---------- */
.share-page { max-width: 820px; margin: 0 auto; }
.share-page > h1 { margin-bottom: 4px; }
.share-toc { margin: 16px 0 20px; }
.share-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.share-article { margin-bottom: 20px; }
.share-article > h2 { margin-top: 0; }
.share-facts { margin: 8px 0 14px; }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.article-body { line-height: 1.65; color: var(--text); border-top: 1px solid var(--border); padding-top: 14px; }
.article-body h2 { font-size: 20px; margin: 22px 0 8px; }
.article-body h3 { font-size: 17px; margin: 18px 0 6px; }
.article-body p { margin: 0 0 12px; }
.article-body ul, .article-body ol { margin: 0 0 12px; padding-left: 22px; }
.article-body a { color: var(--accent-strong); text-decoration: underline; }

/* ---------- Onglet SEO : aperçu Haloscan ---------- */
.seo-overview { --seo-positions: #E11D74; --seo-pages: #06B6D4; --seo-top3: #9D174D; --seo-top10: #E11D74; --seo-top50: #F59E0B; --seo-top100: #94A3B8; }
:root[data-theme="dark"] .seo-overview { --seo-positions: #F0509A; --seo-pages: #22D3EE; --seo-top3: #F9A8D4; --seo-top10: #F0509A; --seo-top50: #FBBF24; --seo-top100: #64748B; }
.seo-kpis { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: 6px; }
.seo-kpi { gap: 2px; }
a.seo-kpi:hover { border-color: var(--accent); }
.seo-kpi .delta { font-size: 12px; margin-top: 2px; }
.seo-charts-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.seo-charts-head h3 { margin: 0; }
.seo-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; }
.seo-charts .chart-panel { margin-top: 10px; }
.chart .seo-positions .line { stroke: var(--seo-positions); }
.chart .seo-pages .line { stroke: var(--seo-pages); }
.chart .seo-positions .dot:hover { stroke: var(--seo-positions); fill: var(--seo-positions); }
.chart .seo-pages .dot:hover { stroke: var(--seo-pages); fill: var(--seo-pages); }
.chart .axis-left { fill: var(--seo-positions); }
.chart .axis-right { fill: var(--seo-pages); }
.chart .stack-area { opacity: .28; }
.chart .seo-top3 .line, .chart .seo-top3 .dot:hover { stroke: var(--seo-top3); } .chart .seo-top3 .stack-area, .chart .seo-top3 .dot:hover { fill: var(--seo-top3); }
.chart .seo-top10 .line, .chart .seo-top10 .dot:hover { stroke: var(--seo-top10); } .chart .seo-top10 .stack-area, .chart .seo-top10 .dot:hover { fill: var(--seo-top10); }
.chart .seo-top50 .line, .chart .seo-top50 .dot:hover { stroke: var(--seo-top50); } .chart .seo-top50 .stack-area, .chart .seo-top50 .dot:hover { fill: var(--seo-top50); }
.chart .seo-top100 .line, .chart .seo-top100 .dot:hover { stroke: var(--seo-top100); } .chart .seo-top100 .stack-area, .chart .seo-top100 .dot:hover { fill: var(--seo-top100); }
.legend-item.seo-positions i { background: var(--seo-positions); } .legend-item.seo-pages i { background: var(--seo-pages); }
.legend-item.seo-top3 i { background: var(--seo-top3); } .legend-item.seo-top10 i { background: var(--seo-top10); }
.legend-item.seo-top50 i { background: var(--seo-top50); } .legend-item.seo-top100 i { background: var(--seo-top100); }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; margin-top: 22px; align-items: start; }
.seo-table .url-cell { max-width: 0; width: 55%; }
.seo-table .url-cell a, .seo-table .url-cell strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-charts .chart .axis { font-size: 13px; }
.seo-block { border: 1px solid var(--border); border-radius: var(--cn-r-m); padding: 14px 16px; min-width: 0; }
.seo-block h3 { margin: 0 0 10px; font-size: 16px; }
.seo-block-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.seo-block-head h3 { margin: 0; }
.seo-table td.num, .seo-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.pos-top3 { background: var(--ok-soft); color: var(--ok); }
.pos-top10 { background: color-mix(in srgb, var(--seo-positions, #4F6BD8) 16%, transparent); color: var(--seo-positions, #4F6BD8); }
.pos-other { background: var(--accent-soft); color: var(--muted); }
.mini-bar { position: relative; display: inline-block; width: 60px; height: 8px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; vertical-align: middle; }
.mini-bar .stat-bar { border-radius: 4px; background: var(--seo-top10, var(--accent)); }
@media (max-width: 640px) { .seo-charts, .seo-grid { grid-template-columns: 1fr; } }

/* Onglet Analytics : en-tête du détail de la période (sous « Évolution de la fréquentation »). */
.analytics-period { margin: 22px 0 10px; }
.analytics-period h2 { margin: 0 0 6px; }
.analytics-period .view-switch { margin: 0 0 4px; }
.bots-live .stat-grid { margin-top: 12px; }
.bots-live td.num, .bots-live th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Réglages › Console : idées en cartes, journal des versions */
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 8px 0 14px; }
.idea-card { border: 1px solid var(--border); border-radius: var(--cn-r-s); padding: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.idea-card p { margin: 0; }
.idea-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.idea-edit > summary { cursor: pointer; list-style: none; margin-top: 4px; }
.idea-edit[open] > summary { margin-bottom: 10px; }
.changelog-entry { border-top: 1px solid var(--border); padding: 10px 0; }
.changelog-entry > summary { cursor: pointer; }
.changelog-entry ul { margin: 8px 0 0; padding-left: 20px; }
.changelog-entry li { margin: 3px 0; }
.changelog-version { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent-strong); }

/* Éditeur d'articles (editor.js) : même cadre que les champs, barre d'outils réduite au SEO, contrôles en direct */
.field { display: grid; gap: 4px; min-width: 0; }
.field-label { font-weight: 550; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.field-label a { font-weight: 500; }
.ed { border: 1px solid var(--border); border-radius: var(--cn-r-s); background: var(--surface); min-width: 0; }
.ed:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ed-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; border-radius: var(--cn-r-s) var(--cn-r-s) 0 0; }
.ed-btn { min-width: 34px; height: 32px; padding: 0 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font-size: 14px; font-weight: 600; box-shadow: none; cursor: pointer; }
.ed-btn:hover { background: var(--accent-soft); }
.ed-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.ed-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.ed-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ed-bold { font-weight: 800; }
.ed-italic { font-style: italic; font-family: Georgia, serif; }
.ed-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.ed-link { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border); background: var(--bg); }
.ed-link[hidden] { display: none; }
.ed-link input { flex: 1 1 240px; min-width: 0; }
.ed-surface { max-height: 70vh; overflow-y: auto; }
.ed-content { min-height: 320px; padding: 14px 18px; outline: none; white-space: pre-wrap; word-wrap: break-word; }
.ed-content > :first-child { margin-top: 0; }
.ed-content p.is-editor-empty:first-child::before { content: attr(data-placeholder); color: var(--muted); float: left; height: 0; pointer-events: none; }
.ed-content a { color: var(--accent-strong); text-decoration: underline; }
.ed-checks { list-style: none; margin: 0; padding: 8px 12px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.ed-check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.ed-check::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.ed-check.ok::before { background: var(--ok); }
.ed-check.warn { color: var(--warn); }
.ed-check.warn::before { background: var(--warn); }
/* Historique des versions */
.version-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.version-list a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.version-list a:hover, .version-list a.active { background: var(--accent-soft); }
.version-list small { color: var(--muted); grid-column: 1 / -1; }
.version-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .version-layout { grid-template-columns: 1fr; } }
.diff-text { line-height: 1.7; }
.diff-text ins { background: var(--ok-soft); color: var(--ok); text-decoration: none; border-radius: 3px; padding: 0 2px; }
.diff-text del { background: var(--error-soft); color: var(--error); border-radius: 3px; padding: 0 2px; }
.ed-content.article-body { border-top: 0; }
.text-ok { color: var(--ok); }
/* Éditeur : choix d'une image */
.ed-image { display: grid; gap: 8px; padding: 10px; border-bottom: 1px solid var(--border); background: var(--bg); }
.ed-image[hidden], .ed-image-search[hidden] { display: none; }
.ed-image-search, .ed-image-form { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-image-search input, .ed-image-form input { flex: 1 1 220px; min-width: 0; }
.ed-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; font-size: 13px; color: var(--muted); }
.ed-thumb { padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--surface); overflow: hidden; aspect-ratio: 3 / 2; cursor: pointer; box-shadow: none; }
.ed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-thumb.on { border-color: var(--accent); }
.ed-thumb.used { opacity: .45; }
.ed-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ed-image-note { margin: 0; }
.ed-content img, .article-body img { display: block; max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
.ed-content img.ProseMirror-selectednode { outline: 3px solid var(--accent); }
.ed-image-search select { width: auto; flex: 0 0 auto; }
.ed-image-msg { grid-column: 1 / -1; margin: 4px 0; }
.diff-br { display: block; height: 10px; }
/* Image à la une (articles) */
.featured-image { display: grid; gap: 8px; }
.featured-preview:empty { display: none; }
.featured-preview { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.featured-preview img { width: 180px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.featured-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.featured-actions [hidden] { display: none; }
.featured-image .ed-image { border: 1px solid var(--border); border-radius: var(--cn-r-s); }
.share-featured { margin: 0 0 14px; }
.share-featured img { max-width: 100%; height: auto; border-radius: 8px; display: block; }
/* Édition des contenus (textes à leur place) */
.texts-list { display: grid; gap: 10px; }
.text-item { display: grid; gap: 4px; }
.content-editor .field { margin-top: 4px; }
/* Fenêtre de médias (choix d'une image), façon médiathèque WordPress */
.media-modal { width: min(1180px, calc(100vw - 32px)); height: min(820px, calc(100vh - 32px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--border); border-radius: var(--cn-r-m, 16px); background: var(--surface); color: var(--text); display: none; }
.media-modal[open] { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); }
.media-modal::backdrop { background: rgba(10, 12, 10, .55); }
.media-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.media-head h2 { margin: 0; font-size: 18px; }
.media-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 0; }
.media-tabs[hidden], .media-search[hidden] { display: none; }
.media-search { padding: 10px 18px; }
.media-search input { width: 100%; }
.media-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; border-top: 1px solid var(--border); }
.media-grid { overflow-y: auto; padding: 14px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: max-content; gap: 10px; align-content: start; }
.media-thumb { position: relative; display: block; width: 100%; height: auto; min-height: 0; padding: 0; border: 3px solid transparent; border-radius: 8px; overflow: hidden; aspect-ratio: 3 / 2; background: var(--bg); cursor: pointer; box-shadow: none; transition: transform .15s, box-shadow .15s; }
.media-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb:hover { transform: scale(1.04); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); z-index: 1; }
.media-more { grid-column: 1 / -1; justify-self: center; margin: 6px 0 12px; }
.media-preview.hover img { outline: 2px dashed var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .media-thumb { transition: none; } .media-thumb:hover { transform: none; } }
.media-thumb.on { border-color: var(--accent); }
.media-thumb.used { opacity: .4; }
.media-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.media-msg { grid-column: 1 / -1; color: var(--muted); margin: 8px 0; }
.media-side { border-left: 1px solid var(--border); padding: 14px 16px; overflow-y: auto; display: grid; gap: 10px; align-content: start; background: var(--bg); }
.media-side label { display: grid; gap: 4px; font-weight: 550; }
.media-preview img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; display: block; }
.media-preview p { margin: 6px 0 0; }
.media-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .media-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .media-side { border-left: 0; border-top: 1px solid var(--border); max-height: 45vh; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
.public-link { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .public-link input { flex: 1 1 260px; min-width: 0; font-size: 13px; }
.content-images img.featured { outline: 2px solid var(--accent); outline-offset: 1px; }
.featured-alt { display: grid; gap: 6px; flex: 1 1 280px; min-width: 0; }
.featured-alt label { display: grid; gap: 4px; font-weight: 550; }
.ai-btn { justify-self: start; }
.ed-alt { align-items: center; }
.ed-alt-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.media-side .ai-btn { margin-top: -4px; }
.alt-editor { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .alt-editor input { flex: 1 1 280px; min-width: 0; }
/* Blog : score SEO + GEO */
.score-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 3px 8px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; }
.score-parts { display: block; margin-top: 2px; }
.score-details summary, .kw-edit summary { cursor: pointer; color: var(--accent-strong); margin-top: 4px; }
.score-criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 8px; }
.score-criteria h4 { margin: 0 0 6px; font-size: 14px; }
.score-criteria ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.crit-points { display: inline-block; min-width: 46px; font-weight: 600; }
.crit-ok .crit-points { color: var(--ok); }
.crit-mid .crit-points { color: var(--warn); }
.crit-ko .crit-points { color: var(--error); }
.score-todo { margin: 0; padding-left: 16px; font-size: 13px; }
.form-tight { gap: 6px; margin-top: 6px; }
.input-num { width: 80px; }

/* Score SEO + GEO : total en grand, SEO et GEO plus petits à droite */
.score-box { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.score-total { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 32px; padding: 0 9px; border-radius: 999px; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.score-split { display: inline-flex; flex-direction: column; line-height: 1.25; font-size: 11px; color: var(--muted); white-space: nowrap; }
.score-split strong { color: var(--strong); font-variant-numeric: tabular-nums; }
.score-box-lg .score-total { min-width: 52px; height: 42px; font-size: 21px; }
.score-box-lg .score-split { font-size: 13px; }
.score-box-xl .score-total { min-width: 84px; height: 66px; font-size: 36px; border-radius: 22px; }
.score-box-xl .score-split { font-size: 15px; gap: 2px; }
.score-hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; margin: 12px 0 16px; }
.score-hero-main { display: flex; flex-direction: column; gap: 6px; }
.score-hero .kpis { flex: 1; min-width: 260px; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.section-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.score-help summary { cursor: pointer; color: var(--accent-strong); }
.score-types td { vertical-align: middle; }
.score-priorities { display: grid; gap: 8px; padding-left: 20px; }
.score-priorities li { display: flex; gap: 10px; align-items: center; }
ul.score-priorities { padding-left: 0; }
.score-type-list { display: grid; gap: 8px; flex: 1; min-width: 260px; }
.score-head { display: flex; align-items: center; }
.score-settings input { width: 70px; }

/* Fichiers du site (robots.txt, llms.txt, .htaccess) */
.site-file h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.file-checks { display: grid; gap: 4px; margin: 8px 0; }
.code-area { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; width: 100%; white-space: pre; }
.file-proposal { border-left: 3px solid var(--accent); padding: 8px 12px; margin: 8px 0 12px; background: var(--accent-soft); border-radius: 8px; }
.file-proposal ul { margin: 4px 0 8px 18px; }
.file-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; max-height: 480px; overflow: auto; }
.config-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.config-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: inherit; text-decoration: none; }
.config-tile:hover { border-color: var(--accent); }
.config-tile-title { font-weight: 600; }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.subtabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); color: inherit; text-decoration: none; font-size: 14px; }
.subtabs a.active { background: var(--strong, #1e1b2e); color: var(--bg, #fff); border-color: transparent; }
.matomo-client { margin-top: 6px; }

/* ---------- Fonctionnalités (Réglages › Fonctionnalités et mode présentation) ---------- */
.features-page { display: flex; flex-direction: column; gap: 22px; }
.features-hero { display: flex; gap: 20px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; padding: 28px; border-radius: var(--cn-r-xl); background: var(--surface); border: 1px solid var(--border); }
.features-hero h2 { font-family: var(--font-titres); font-size: 34px; line-height: 1.1; font-weight: 700; color: var(--strong); margin: 4px 0 10px; letter-spacing: -0.01em; }
.features-kicker { margin: 0; font-family: var(--font-titres); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.features-lede { margin: 0; max-width: 70ch; font-size: 16px; }
.features-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.features-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0; }
.features-stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--cn-r-l); padding: 14px 16px; }
.features-stats dt { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.features-stats dd { margin: 2px 0 0; font-family: var(--font-titres); font-size: 32px; font-weight: 700; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.features-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.features-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--strong); text-decoration: none; font-size: 13px; font-weight: 600; }
.features-nav a:hover { border-color: var(--accent); color: var(--accent); }
.features-nav svg { width: 16px; height: 16px; color: var(--accent); }
.feature-domain { scroll-margin-top: 80px; }
.feature-domain-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.feature-domain-head h3 { font-family: var(--font-titres); font-size: 22px; font-weight: 700; color: var(--strong); margin: 0; }
.feature-domain-head p { margin: 2px 0 0; color: var(--muted); }
.feature-domain-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--cn-r-m); background: var(--strong); color: var(--surface); }
:root[data-theme="dark"] .feature-domain-icon { background: var(--accent); color: var(--cn-noir); }
.feature-count { margin-left: auto; font-family: var(--font-titres); font-weight: 700; color: var(--muted); font-size: 14px; border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.feature-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--cn-r-l); background: var(--surface); border: 1px solid var(--border); break-inside: avoid; }
.feature-card h4 { margin: 0; font-family: var(--font-titres); font-size: 17px; font-weight: 650; color: var(--strong); line-height: 1.25; }
.feature-badges { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: -2px 0 0; }
.feature-auto { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.feature-pitch { margin: 0; color: var(--text); }
.feature-points { margin: 0; padding-left: 18px; font-size: 13.5px; }
.feature-points li { margin: 2px 0; }
.feature-points li::marker { color: var(--accent); }
.feature-meta { margin: auto 0 0; padding-top: 8px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.feature-domain-soon .feature-card { border-style: dashed; background: transparent; }

/* Mode présentation : page seule, sans menus, prête à imprimer. */
body.features-presentation { background: var(--bg); }
.features-sheet { max-width: 1120px; margin: 0 auto; padding: 24px 16px 40px; }
.features-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.features-brand { margin-bottom: 14px; }
.features-brand img { height: 32px; width: auto; }
.features-footer { margin-top: 28px; text-align: center; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) {
  .features-hero { padding: 20px; }
  .features-hero h2 { font-size: 26px; }
  .features-stats dd { font-size: 26px; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  body.features-presentation { background: #FFFFFF; font-size: 12px; }
  .features-toolbar, .features-nav { display: none !important; }
  .features-sheet { max-width: none; padding: 0; }
  .features-hero, .features-stats > div, .feature-card { border-color: #DDDDDA; }
  .feature-domain { break-inside: auto; }
  .feature-domain-head { break-after: avoid; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .feature-card { padding: 12px; }
  .features-hero h2 { font-size: 26px; }
  .features-stats dd { font-size: 24px; }
}
/* Intercalaires (Optimisation) : onglets de classeur qui passent les uns derrière les autres ; l'onglet ouvert,
   blanc et plus haut, se fond dans la carte .folder-panel placée juste dessous. */
.folder-tabs { display: flex; align-items: flex-end; padding-left: 16px; position: relative; z-index: 1; margin-bottom: -1px; scroll-margin-top: 80px; }
.folder-tabs a { position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 6px -10px 0 0; padding: 10px 20px 11px; border: 1px solid var(--border); border-bottom: none; border-radius: 14px 14px 0 0; background: color-mix(in srgb, var(--surface) 55%, var(--bg)); color: var(--muted); text-decoration: none; font-family: var(--font-titres); font-weight: 600; font-size: 15px; white-space: nowrap; box-shadow: inset 0 -6px 8px -8px rgba(0, 0, 0, 0.18), 2px 0 4px -2px rgba(0, 0, 0, 0.12); }
.folder-tabs a:nth-child(1) { z-index: 8; }
.folder-tabs a:nth-child(2) { z-index: 7; }
.folder-tabs a:nth-child(3) { z-index: 6; }
.folder-tabs a:nth-child(4) { z-index: 5; }
.folder-tabs a:nth-child(5) { z-index: 4; }
.folder-tabs a:nth-child(6) { z-index: 3; }
.folder-tabs a:nth-child(n + 7) { z-index: 2; }
.folder-tabs a:hover { color: var(--strong); background: color-mix(in srgb, var(--surface) 80%, var(--bg)); }
.folder-tabs a.active { z-index: 9; margin-top: 0; padding: 13px 22px 14px; background: var(--surface); color: var(--strong); box-shadow: 2px 0 6px -3px rgba(0, 0, 0, 0.15), -2px 0 6px -3px rgba(0, 0, 0, 0.15); }
.folder-tabs a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--surface); }
.folder-count { padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.folder-tabs a.active .folder-count { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.folder-panel { position: relative; }
@media (max-width: 720px) {
  /* Une seule rangée qui défile : l'onglet ouvert reste collé à sa carte. */
  .folder-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 8px 1px; margin-bottom: -2px; }
  .folder-tabs::-webkit-scrollbar { display: none; }
  .folder-tabs a { margin-right: -6px; padding: 8px 14px 9px; font-size: 14px; }
  .folder-tabs a.active { padding: 10px 16px 11px; }
}

/* ---------- Onglet Santé (Search Console) ---------- */
.health-kpis { margin: 4px 0 14px; }
.health-kpis .kpi > span:last-child { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.ok-text { color: var(--ok); }
.error-text { color: var(--error); }
.health-details { margin-top: 12px; }
.health-details > summary { cursor: pointer; font-weight: 600; }
.health-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.health-links li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.health-links a { font-weight: 600; }
/* Courbe Santé : impressions en violet, comme dans la Search Console (clics : couleur principale). */
:root { --chart-impr: #6E4FC4; }
:root[data-theme="dark"] { --chart-impr: #A58BF0; }
.serie-impr .line, .serie-impr .dot:hover { stroke: var(--chart-impr); } .serie-impr .dot:hover { fill: var(--chart-impr); }
.legend-item.serie-impr i { background: var(--chart-impr); }

/* ---------- Formulaires et emails (onglet Sécurité) ---------- */
.warn-text { color: var(--warn); }
.forms-table td { vertical-align: top; }
.forms-test-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.forms-frequency label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.forms-frequency select { padding: 4px 8px; font-size: 13px; }
.forms-mail { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.forms-mail h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; font-size: 16px; }
.forms-mail-facts li { margin: 3px 0; }

/* ---------- Infobulles (picto + détail en surimpression, src/views/peek.js) ---------- */
.peek { position: relative; display: inline-block; vertical-align: middle; }
.peek-btn { width: 30px; height: 30px; padding: 0; border-radius: var(--cn-r-s); border: 1px solid var(--border); background: var(--surface); color: var(--strong); display: inline-grid; place-items: center; cursor: pointer; }
.peek-btn svg { width: 16px; height: 16px; }
.peek-btn-text { width: auto; height: auto; padding: 2px 8px; font: inherit; font-size: 13px; }
.peek-btn:hover, .peek-btn:focus-visible, .peek:focus-within .peek-btn { border-color: var(--accent); color: var(--accent); background: var(--surface); outline: none; }
.peek-pop { display: none; position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; width: min(420px, calc(100vw - 32px)); text-align: left; font-weight: 400; white-space: normal;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--cn-r-m); box-shadow: 0 12px 32px rgba(10, 10, 10, 0.16); padding: 14px 16px; font-size: 13px; line-height: 1.45; }
.peek-wide .peek-pop { width: min(640px, calc(100vw - 32px)); }
/* Pont invisible entre le picto et la bulle : la souris peut y entrer sans la fermer. */
.peek-pop::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.peek-pop.peek-above::before { top: auto; bottom: -10px; }
.peek:hover .peek-pop, .peek:focus-within .peek-pop { display: block; }
.peek-pop.peek-fixed { position: fixed; }
.peek-pop h4 { margin: 0 0 6px; font-family: var(--font-titres); font-size: 15px; color: var(--strong); }
.peek-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .peek-cols { grid-template-columns: 1fr; } }
.peek-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.peek-bar { display: block; width: 100%; height: 6px; margin: 2px 0 10px; border: 0; border-radius: 99px; background: var(--accent-soft); overflow: hidden; appearance: none; -webkit-appearance: none; }
.peek-bar::-webkit-progress-bar { background: var(--accent-soft); border-radius: 99px; }
.peek-bar::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
.peek-bar::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
.peek-pop .score-criteria ul li { display: grid; grid-template-columns: 46px 1fr; gap: 4px; }
.serp-preview { display: grid; gap: 10px; }
.serp-url { color: var(--ok); }
.serp-title { color: #1a0dab; font-size: 17px; line-height: 1.3; }
:root[data-theme="dark"] .serp-title { color: #8ab4f8; }
.serp-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.title-line { display: flex; gap: 6px; align-items: flex-start; }
.title-line > a, .title-line > span:first-child { flex: 1; min-width: 0; }
.peek-group { display: inline-flex; gap: 4px; flex: none; }

/* Filtres de l'onglet Optimisation : une seule ligne, champs compacts, bouton à droite. */
.score-filters { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(170px, 1.6fr) minmax(130px, 1fr) minmax(180px, 1.6fr) auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.score-filters label, .score-filters label.grow { min-width: 0; gap: 2px; font-size: 12px; }
.score-filters select, .score-filters input[type="search"] { padding: 6px 10px; font-size: 14px; min-height: 0; height: 36px; border-radius: var(--cn-r-s); }
.score-filters .filter-actions { padding-bottom: 0; gap: 8px; }
.score-filters .filter-actions button { padding: 6px 16px; height: 36px; font-size: 14px; }
@media (max-width: 900px) { .score-filters { grid-template-columns: 1fr 1fr; } .score-filters .filter-actions { grid-column: 1 / -1; } }

.sem-terms { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

.type-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; margin-right: 12px; }

/* Infobulle déclenchée par un vrai bouton d'action (même aspect que les boutons secondaires). */
.peek-btn.peek-btn-action { width: auto; height: auto; padding: 6px 14px; border: 2px solid var(--strong); border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700; color: var(--strong); }

/* Pastille « Sémantique » sous le mot-clé visé : analyse complète réussie (vert plein), en échec, en cours, à lancer. */
.sem-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.sem-chip svg { flex: none; }
.sem-ok { background: var(--ok); color: var(--surface); }
.sem-fail { background: var(--error-soft); color: var(--error); border-color: var(--error); }
.sem-reason { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--error); max-width: 280px; overflow-wrap: anywhere; }
.sem-run { background: var(--warn-soft); color: var(--warn); }
.sem-none { background: transparent; color: var(--muted); border: 1px dashed var(--border); font-weight: 500; }

/* Réglages › Clients : formulaires sur une ligne, sites rattachés. */
.form-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.form-inline label { display: grid; gap: 4px; min-width: 180px; }
.form-inline .form-actions { margin: 0; }
.client-site { border-top: 1px solid var(--border); padding-block: 14px; }
.client-site:first-of-type { border-top: 0; }
.client-site h3 { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }

/* ---------- Espace client (lecture seule) ---------- */
.client-preview-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; margin-bottom: 16px; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-dot); }
.client-hero { padding: 16px; }
.client-kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 0; }
.client-kpi { gap: 6px; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.client-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.client-columns > .card { min-width: 0; margin: 0; }
.client-columns + .card { margin-top: 16px; }
.client-actions, .client-followup { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.client-actions li, .client-followup-item { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: start; }
.client-followup-item { padding-block: 12px; border-top: 1px solid var(--border); }
.client-followup-item:first-child { border-top: 0; padding-top: 0; }
.client-followup-item > div { min-width: 0; }
.client-action-date { font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 2px; }
.client-actions-planned .client-action-date { color: var(--muted); }
.client-sub { margin: 18px 0 10px; font-size: 15px; }
.watch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.watch-tile { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--cn-r-m); border: 1px solid var(--border); border-left: 4px solid var(--border); background: var(--surface); }
.watch-tile.watch-ok { border-left-color: var(--ok); }
.watch-tile.watch-warn { border-left-color: var(--warn-dot); }
.watch-tile.watch-error { border-left-color: var(--error); }
.watch-tile .badge { align-self: flex-start; }
.watch-title { font-weight: 600; color: var(--strong); }
.client-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.client-site-card { display: flex; flex-direction: column; gap: 8px; margin: 0; color: inherit; text-decoration: none; transition: border-color 0.15s; }
.client-site-card:hover, .client-site-card:focus-visible { border-color: var(--accent); }
.client-site-name { font-family: var(--font-titres); font-size: 20px; font-weight: 600; color: var(--strong); }
.client-site-state { display: flex; flex-wrap: wrap; gap: 6px; }
.client-site-open { margin-top: auto; font-weight: 600; color: var(--accent); }
@media (max-width: 560px) {
  .client-actions li, .client-followup-item { grid-template-columns: 1fr; gap: 2px; }
}

/* Optimisation › menu « Actions » et file de Claude. */
.col-check { width: 36px; text-align: center; }
.col-check input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 0 8px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--cn-r-m); background: var(--surface-2, var(--surface)); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.bulk-count { font-weight: 600; min-width: 140px; }
.bulk-select select { min-width: 280px; }
.task-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.task-chip { font-size: 0.72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.task-chip.task-propose { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-dot); }
.task-chip.task-valide { background: var(--ok-soft, var(--surface)); color: var(--ok); border-color: var(--ok); }
.task-panel { border-left: 4px solid var(--accent); }
.proposal-text { font-weight: 600; }
.task-waiting { margin-top: 12px; }
@media (max-width: 560px) {
  .col-check { width: auto; text-align: left; }
  .bulk-select select { min-width: 0; width: 100%; }
}

/* Légende d'un onglet : intertitres de rubrique. */
.legend dt.legend-group { grid-column: 1 / -1; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.legend dt.legend-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.check-all-line { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 8px 0; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* Liste de l'Optimisation : plus d'ascenseur horizontal. SEO / GEO sous le score, pictos sous leur texte. */
.score-table { table-layout: auto; width: 100%; }
.score-table th, .score-table td { padding-left: 8px; padding-right: 8px; }
.score-table .score-box { flex-direction: column; align-items: flex-start; gap: 3px; }
.score-table .score-split { flex-direction: column; gap: 0; padding-left: 4px; }
.score-table .title-line { flex-direction: column; gap: 4px; }
.score-table .title-line > span:first-child { flex: none; }
.score-table td.num .peek { display: flex; justify-content: flex-end; margin-top: 4px; }
.score-table td[data-label="Mot-clé visé"] { min-width: 150px; }
.score-table td[data-label="À faire"] { min-width: 170px; }
.score-table td[data-label="Contenu"] { min-width: 150px; }

/* Réglages › Clients › Qonto : résultats de recherche, import, facturation. */
.qonto-results { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 0; }
.qonto-results li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.qonto-results li:first-child { border-top: 0; }
.qonto-results li > div { min-width: 0; }
.qonto-import { display: grid; gap: 6px; max-height: 480px; overflow-y: auto; }
.kpi.kpi-error .kpi-number { color: var(--error); }
tr.row-late td { background: var(--error-soft); }
.client-col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.client-col > .card { margin: 0; }
.client-columns { align-items: start; }
.client-actions-cols { display: block; columns: 2 340px; column-gap: 32px; }
.client-actions-cols li { break-inside: avoid; margin-bottom: 14px; }
.account-pop .account-preview { display: block; padding: 8px 12px; cursor: not-allowed; }

/* Factures et devis : mêmes colonnes d'un tableau à l'autre. */
.doc-table { table-layout: fixed; width: 100%; }
.doc-table th:nth-child(1) { width: 26%; }
.doc-table th:nth-child(2), .doc-table th:nth-child(3) { width: 17%; }
.doc-table th:nth-child(4) { width: 16%; }
.doc-table th:nth-child(4), .doc-table td:nth-child(4) { text-align: right; padding-right: 32px; }
@media (max-width: 760px) { .doc-table { table-layout: auto; } .doc-table th, .doc-table td:nth-child(4) { width: auto; text-align: left; padding-right: 0; } }
/* Terme attendu : nombre d'emplois dans une bulle, cible des concurrents à part, plus discrète. */
.badge.term { display: inline-flex; align-items: center; gap: 5px; }
.term-n { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; line-height: 18px; }
.term-range { font-weight: 500; font-size: 11px; opacity: .8; font-variant-numeric: tabular-nums; }
/* Réglages › Consignes de rédaction */
.stack-form { display: grid; gap: 16px; }
.mono-area { width: 100%; font-family: var(--font-texte); font-size: 13px; line-height: 1.5; }

/* Relecture d'un contenu optimisé : parcours, couches, éditeur, modifications en couleurs. */
.rv-steps { display: flex; flex-wrap: wrap; gap: 0; list-style: none; padding: 0; margin: 16px 0; }
.rv-steps li { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); margin-left: -1px; background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); }
.rv-steps li:first-child { border-radius: 999px 0 0 999px; margin-left: 0; }
.rv-steps li:last-child { border-radius: 0 999px 999px 0; }
.rv-steps .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--bg); }
.rv-steps .done { color: var(--ok); }
.rv-steps .done .n { background: var(--ok-soft); }
.rv-steps .cur { color: var(--strong); border-color: var(--strong); position: relative; z-index: 1; }
.rv-steps .cur .n { background: var(--strong); color: var(--surface); }
.rv-message { border-left: 3px solid var(--rv-client); background: var(--rv-client-soft); padding: 10px 14px; border-radius: var(--cn-r-s); margin: 0 0 14px; }
.rv-message p { margin: 4px 0 0; }
.rv-waiting { font-weight: 600; color: var(--warn); }
.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .rv-grid { grid-template-columns: minmax(0, 1fr); } }
.rv-main { min-width: 0; }
.rv-col { display: grid; gap: 16px; min-width: 0; }
.rv-layers { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.rv-layer { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--strong); font-size: 13px; font-weight: 600; cursor: pointer; }
.rv-layer.on { background: var(--strong); color: var(--surface); border-color: var(--strong); }
.rv-toggle { margin-left: auto; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.rv-tools { display: flex; gap: 4px; flex-wrap: wrap; border: 1px solid var(--border); border-bottom: 0; border-radius: var(--cn-r-m) var(--cn-r-m) 0 0; padding: 6px; background: var(--bg); }
.rv-tools button { padding: 4px 9px; border-radius: 6px; font-size: 13px; font-weight: 600; background: var(--surface); color: var(--strong); border: 1px solid var(--border); cursor: pointer; }
.rv-editor { border: 1px solid var(--border); border-radius: var(--cn-r-m); padding: 18px 22px; line-height: 1.65; font-size: 15px; color: var(--strong); min-height: 320px; overflow-x: auto; }
.rv-tools:not([hidden]) + .rv-editor { border-radius: 0 0 var(--cn-r-m) var(--cn-r-m); }
.rv-editor.editable { outline: none; box-shadow: inset 0 0 0 1px transparent; }
.rv-editor.editable:focus { border-color: var(--strong); }
.rv-editor h2 { font-family: var(--font-titres); font-size: 20px; margin: 18px 0 6px; }
.rv-editor h3 { font-family: var(--font-titres); font-size: 17px; margin: 14px 0 4px; }
.rv-editor table { border-collapse: collapse; margin: 10px 0; }
.rv-editor th, .rv-editor td { border: 1px solid var(--border); padding: 6px 10px; }
.rv-editor img { max-width: 100%; height: auto; }
.rv-ins { text-decoration: underline; text-underline-offset: 3px; border-radius: 2px; }
.rv-ins.rv-ia { background: var(--rv-ia-soft); color: var(--rv-ia); }
.rv-ins.rv-agence { background: var(--rv-agence-soft); color: var(--rv-agence); }
.rv-ins.rv-client { background: var(--rv-client-soft); color: var(--rv-client); }
.rv-del { text-decoration: line-through; opacity: .75; }
.rv-del.rv-ia { color: var(--rv-ia); }
.rv-del.rv-agence { color: var(--rv-agence); }
.rv-del.rv-client { color: var(--rv-client); }
.rv-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.rv-legend b { font-weight: 600; padding: 1px 6px; }
.rv-side { display: grid; gap: 14px; min-width: 0; }
.rv-card h3 { font-family: var(--font-titres); font-size: 15px; margin: 0 0 8px; color: var(--strong); }
.rv-card h3 + * { margin-top: 0; }
.rv-scores { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.rv-score { font-size: 22px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.rv-score.rv-after { background: var(--ok-soft); color: var(--ok); }
.rv-check { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; font-size: 13px; }
.rv-check li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.rv-check li.no::before { content: "○ "; color: var(--muted); }
.rv-terms { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.rv-actions { display: grid; gap: 8px; margin-top: 10px; }
.rv-banner { border-left: 4px solid var(--rv-client); }
@media (max-width: 760px) {
  .rv-steps { gap: 6px; }
  .rv-steps li, .rv-steps li:first-child, .rv-steps li:last-child { border-radius: 999px; margin-left: 0; }
}
/* Production : nouveaux contenus à rédiger ; relecture : brief. */
.writing-block { margin-top: 18px; display: grid; gap: 10px; }
.writing-new summary { display: inline-flex; list-style: none; cursor: pointer; }
.writing-new summary::-webkit-details-marker { display: none; }
.writing-new[open] summary { margin-bottom: 12px; }
.rv-brief { margin: 0 0 14px; }
.rv-brief summary { cursor: pointer; font-weight: 600; }

/* Score sémantique : graphique des termes. */
.sem-chart { position: relative; margin: 10px 0 14px; min-width: 0; }
.sem-svg { width: 100%; height: auto; display: block; font-family: var(--font-texte); }
.sem-title { font-family: var(--font-titres); font-size: 20px; font-weight: 700; fill: var(--sem-ink); }
.sem-sub { font-size: 13px; fill: var(--muted); }
.sem-score { font-family: var(--font-titres); font-size: 44px; font-weight: 700; }
.sem-score.sem-vert { fill: var(--sem-vert); } .sem-score.sem-orange { fill: var(--sem-orange); } .sem-score.sem-rouge { fill: var(--sem-rouge); }
.sem-band-vert { fill: var(--sem-band-vert); } .sem-band-orange { fill: var(--sem-band-orange); } .sem-band-rouge { fill: var(--sem-band-rouge); }
.sem-zone { font-size: 13px; fill: var(--muted); }
.sem-line { fill: none; stroke: var(--sem-line); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.sem-dot { stroke: var(--surface); stroke-width: 3; }
.sem-dot.sem-vert { fill: var(--sem-vert); } .sem-dot.sem-orange { fill: var(--sem-orange); } .sem-dot.sem-rouge { fill: var(--sem-rouge); }
.sem-point { cursor: pointer; outline: none; }
.sem-point:focus .sem-dot, .sem-point:hover .sem-dot { stroke: var(--sem-line); }
.sem-ratio { font-size: 13px; fill: var(--sem-ink); }
.sem-label { font-size: 13px; fill: var(--text); }
.sem-tip { position: absolute; z-index: 5; width: 220px; display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--cn-r-s); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(0,0,0,.12); font-size: 12px; pointer-events: none; }
.sem-tip strong { font-size: 13px; color: var(--strong); }
::highlight(sem-term) { background: #FDE68A; color: #1E1033; }

/* Détail du score : critères en deux colonnes équilibrées, graphique sémantique en pleine largeur. */
.peek-flow { display: block; columns: 2 250px; column-gap: 24px; }
.peek-flow .crit-group { display: block; }
.peek-flow h4 { break-after: avoid; }
.peek-flow .peek-bar { break-after: avoid; }
.peek-flow li { break-inside: avoid; }
.peek-flow .crit-group + .crit-group h4 { margin-top: 18px; }
.peek-foot .sem-chart, .peek-foot .sem-terms { flex: 1 1 100%; width: 100%; }
.peek-flow ul { display: block; }
.peek-flow ul li { margin-bottom: 4px; }
a.task-chip.task-review { text-decoration: none; border: 1px solid var(--accent); color: var(--accent-strong); }
a.task-chip.task-review:hover { background: var(--accent-soft); }

/* Score sémantique : anneau, retouches, graphique compact, termes reliés aux points, infobulle avec jauge. */
.semx { position: relative; display: grid; gap: 10px; flex: 1 1 100%; width: 100%; min-width: 0; margin: 4px 0 2px; }
.semx-head { display: flex; align-items: center; gap: 14px; }
.semx-head h3 { margin: 0; font-family: var(--font-titres); font-size: 16px; color: var(--strong); }
.semx-head p { margin: 2px 0 0; }
.semx-ring { --p: 0; --c: var(--sem-vert); --soft: var(--sem-band-vert); flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--soft) 0); }
.semx-ring.semx-orange { --c: var(--sem-orange); --soft: var(--sem-band-orange); }
.semx-ring.semx-rouge { --c: var(--sem-rouge); --soft: var(--sem-band-rouge); }
.semx-ring b { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--font-titres); font-size: 18px; font-weight: 700; color: var(--strong); font-variant-numeric: tabular-nums; }
.semx-todo { padding: 8px 12px; border-radius: var(--cn-r-m); background: var(--sem-band-orange); border: 1px solid color-mix(in srgb, var(--sem-orange) 35%, transparent); font-size: 13px; }
.semx-todo strong { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--warn); margin-bottom: 2px; }
.semx-gain { display: inline-block; margin: 2px 12px 0 0; color: var(--strong); }
.semx-gain em { font-style: normal; font-weight: 700; }
.semx-gain em.plus { color: var(--ok); } .semx-gain em.moins { color: var(--error); }
.semx-svg { width: 100%; height: auto; display: block; border-radius: var(--cn-r-s); overflow: hidden; }
.semx-cible { font-size: 11px; fill: var(--muted); }
.semx-svg .sem-dot { transition: opacity .15s, stroke .15s; cursor: pointer; outline: none; }
.semx-svg .sem-dot.semx-dim { opacity: .25; }
.semx-svg .sem-dot.semx-on { stroke: var(--sem-line); stroke-width: 3; }
.semx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.semx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 7px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--strong); font: 600 12.5px var(--font-texte); cursor: pointer; }
.semx .semx-chip:hover, .semx .semx-chip:focus-visible, .semx .semx-chip.semx-hl { background: var(--surface); color: var(--strong); border-color: var(--sem-line); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sem-line) 18%, transparent); }
.semx-dot { width: 9px; height: 9px; border-radius: 50%; }
.semx-dot.sem-vert { background: var(--sem-vert); } .semx-dot.sem-orange { background: var(--sem-orange); } .semx-dot.sem-rouge { background: var(--sem-rouge); }
.semx-n { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.semx-tip { position: absolute; z-index: 6; width: 220px; display: grid; gap: 2px; padding: 9px 11px; border-radius: var(--cn-r-s); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.14); font-size: 12px; pointer-events: none; }
.semx-tip[hidden] { display: none; }
.semx-tip strong { font-size: 13px; color: var(--strong); }
.semx-gauge { position: relative; height: 8px; margin: 6px 0 4px; border-radius: 99px; background: linear-gradient(90deg, var(--sem-band-rouge) 0 25%, var(--sem-band-orange) 25% 40%, var(--sem-band-vert) 40% 60%, var(--sem-band-orange) 60% 80%, var(--sem-band-rouge) 80%); }
.semx-gauge i { position: absolute; top: -3px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.semx-gauge i.sem-vert { background: var(--sem-vert); } .semx-gauge i.sem-orange { background: var(--sem-orange); } .semx-gauge i.sem-rouge { background: var(--sem-rouge); }
.semx-advice.ok-text { color: var(--ok); }
.semx-foot { flex: 1 1 auto; }

/* Relecture : mot-clé en évidence, infobulles du cahier des charges, pages de référence, partage, commentaires. */
.rv-keyword { display: grid; gap: 2px; margin: 0 0 14px; padding: 10px 14px; border-radius: var(--cn-r-m); background: var(--rv-agence-soft); border: 1px solid color-mix(in srgb, var(--rv-agence) 25%, transparent); }
.rv-keyword span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--rv-agence); font-weight: 700; }
.rv-keyword strong { font-family: var(--font-titres); font-size: 19px; line-height: 1.25; color: var(--strong); overflow-wrap: anywhere; }
.rv-kw-chip { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: var(--rv-agence-soft); color: var(--rv-agence); font-size: 13px; }
.rv-kw-chip strong { color: var(--strong); }
.rv-check li { display: flex; align-items: flex-start; gap: 4px; }
.rv-check li > span:first-child { flex: 1; min-width: 0; }
.rv-info { position: relative; flex: none; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-top: 1px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); font: italic 700 11px/1 Georgia, serif; cursor: help; }
.rv-info:hover, .rv-info:focus-visible { border-color: var(--rv-agence); color: var(--rv-agence); outline: none; }
.rv-tip { position: absolute; z-index: 20; right: -6px; top: calc(100% + 8px); width: min(300px, 80vw); padding: 10px 12px; border-radius: var(--cn-r-s); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.14); font: normal 400 12.5px/1.45 var(--font-texte); color: var(--text); text-align: left; visibility: hidden; pointer-events: none; }
.rv-tip strong { color: var(--strong); }
.rv-info:hover .rv-tip, .rv-info:focus .rv-tip { visibility: visible; }
.rv-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.rv-sources li { display: flex; gap: 8px; align-items: flex-start; }
.rv-sources a { display: grid; min-width: 0; text-decoration: none; color: var(--strong); }
.rv-sources a > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-sources a:hover > span:first-child { text-decoration: underline; }
.rv-rank { flex: none; min-width: 22px; padding: 1px 0; border-radius: 6px; background: var(--accent-soft); color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.semx-under { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-top: 8px; font-size: 13px; }
.semx-under > span { flex: 1 1 100%; }
.rv-share { display: grid; gap: 4px; margin-bottom: 12px; }
.rv-share input { width: 100%; font-size: 12px; }
.rv-share-actions { display: flex; gap: 10px; align-items: center; }
.rv-share-new { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.rv-share-new .field { margin: 0; }
.rv-comments { margin: 0; }
.rv-comment-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.rv-comment-list li { padding: 10px 12px; border-radius: var(--cn-r-s); background: var(--accent-soft); }
.rv-comment-list p { margin: 0; }
.rv-comment-list p + p { margin-top: 4px; }
.rv-comment-form { display: grid; gap: 8px; max-width: 560px; }
.rv-comment-form button { justify-self: start; }
.rv-shared-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 14px; border-radius: var(--cn-r-m); background: var(--rv-agence-soft); color: var(--rv-agence); font-size: 13px; }
.rv-shared-bar strong { color: var(--strong); }
.rv-comment-list p .inline-form { display: inline; margin-left: 6px; }

/* Mini boutons d'un contenu non indexé : copier l'adresse, inspection dans la Search Console. */
.mini-tools { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 4px; }
.mini-icon { display: inline-flex; align-items: center; gap: 3px; height: 24px; min-width: 24px; padding: 0 5px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: 700 10.5px var(--font-texte); letter-spacing: .02em; text-decoration: none; cursor: pointer; }
.mini-icon:hover, .mini-icon:focus-visible { color: var(--strong); border-color: var(--strong); }
.mini-icon.copied { color: var(--ok); border-color: var(--ok); }
.gsc-index-form { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; margin: 4px 0 14px; }
.gsc-index-form .field { flex: 1 1 320px; margin: 0; }
.gsc-index-form p { flex: 1 1 100%; margin: 0; }

/* Tableau de bord : prochaines échéances des noms de domaine, en pastilles. */
.dash-domains { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 14px; }
.dash-domains-title { margin-right: 4px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.dash-domains-title:hover { color: var(--strong); }
.dom-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--strong); font-size: 12.5px; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.dom-chip:hover { border-color: var(--strong); }
.dom-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .45; }
.dom-chip b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.dom-chip.dom-late i { background: var(--error); opacity: 1; } .dom-chip.dom-late b { color: var(--error); }
.dom-chip.dom-soon i { background: var(--warn); opacity: 1; } .dom-chip.dom-soon b { color: var(--warn); }
.dom-chip.dom-auto i { background: var(--ok); opacity: .7; }
.dom-renew { color: var(--ok); font-size: 12px; }

/* Espace client : nombre de contenus à valider dans le menu, adresse du connecteur à copier. */
.nav-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: var(--surface); font-size: 11px; font-weight: 700; }
.copy-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; max-width: 560px; }
.copy-row input { flex: 1; min-width: 0; }
.steps-list { display: grid; gap: 10px; padding-left: 22px; list-style: decimal; }
.steps-list li { padding-left: 4px; }
.mcp-guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.mcp-guides .card { margin: 0; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.mcp-howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 8px 28px; }
.mcp-howto h3 { margin: 4px 0 8px; font-size: 15px; }
.mcp-examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mcp-examples li { padding: 8px 12px; border-radius: var(--cn-r-s); background: var(--accent-soft); font-size: 14px; }
.mcp-examples li span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.mcp-note { margin: 14px 0 6px; padding: 12px 14px; border-radius: var(--cn-r-m); border: 1px solid var(--border); border-left: 4px solid var(--warn); background: var(--surface); }
.mcp-note p { margin: 4px 0 0; font-size: 14px; }

/* ---------- Clients › Demandes ---------- */
.lead-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1200px) { .lead-board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .lead-board { grid-template-columns: 1fr; } }
.lead-col { background: var(--bg); border: 1px solid var(--border); border-radius: var(--cn-r-l); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 150px; min-width: 0; }
.lead-col h3 { margin: 0 0 2px; font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 6px; color: var(--muted); font-family: var(--font-texte); }
.lead-col h3 span { color: var(--strong); }
.stage-perdue { opacity: 0.85; }
.lead-empty { margin: 0; text-align: center; }
.lead-card { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--cn-r-m); color: var(--text); text-decoration: none; font-size: 13px; transition: border-color 0.15s, transform 0.15s; }
.lead-card:hover { border-color: var(--strong); transform: translateY(-1px); }
.lead-card strong { color: var(--strong); font-size: 14px; }
.lead-card .badge { align-self: flex-start; margin-top: 3px; }
.lead-card.brand-creanico { border-left-color: var(--error); }
.lead-card.brand-cn-digital { border-left-color: var(--strong); }
.lead-steps { list-style: none; padding: 0; margin: 4px 0 16px; display: flex; flex-wrap: wrap; gap: 4px; counter-reset: step; }
.lead-steps li { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--surface); }
.lead-steps li.done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.lead-steps li.now { background: var(--strong); color: var(--surface); border-color: transparent; font-weight: 600; }
.lead-steps li.lost { background: var(--error-soft); color: var(--error); border-color: transparent; font-weight: 600; }
.lead-detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .lead-detail { grid-template-columns: 1fr; } }
.lead-main, .lead-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lead-mail, .lead-audit { white-space: pre-wrap; font-size: 14px; line-height: 1.6; border: 1px solid var(--border); border-radius: var(--cn-r-m); padding: 14px 16px; background: var(--bg); overflow-wrap: anywhere; }
.lead-mail-actions { margin-top: 12px; }
.lead-stage-form { flex-wrap: wrap; }
.lead-stage-form input[type="text"] { width: 210px; }
.lead-events { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.lead-events li { border-left: 2px solid var(--border); padding-left: 10px; }
.lead-answers summary { cursor: pointer; margin-top: 10px; font-weight: 600; }
.kv-stack { grid-template-columns: 1fr !important; }
.kv-stack dt { margin-top: 6px; }
.copy-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-line code { overflow-wrap: anywhere; }
dl.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 10px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; color: var(--strong); }
.stack { display: grid; gap: 12px; }
.stack label { display: grid; gap: 4px; }
.lead-requeue { margin-top: 12px; }

/* ---------- Abonnements SEO ---------- */
.flash-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sub-timeline { margin: 6px 0 4px; }
.sub-bar { display: block; height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.sub-fill { display: block; height: 100%; background: var(--ok); border-radius: 999px; width: 0; }
.sub-fill.pct-0 { width: 0%; }
.sub-fill.pct-5 { width: 5%; }
.sub-fill.pct-10 { width: 10%; }
.sub-fill.pct-15 { width: 15%; }
.sub-fill.pct-20 { width: 20%; }
.sub-fill.pct-25 { width: 25%; }
.sub-fill.pct-30 { width: 30%; }
.sub-fill.pct-35 { width: 35%; }
.sub-fill.pct-40 { width: 40%; }
.sub-fill.pct-45 { width: 45%; }
.sub-fill.pct-50 { width: 50%; }
.sub-fill.pct-55 { width: 55%; }
.sub-fill.pct-60 { width: 60%; }
.sub-fill.pct-65 { width: 65%; }
.sub-fill.pct-70 { width: 70%; }
.sub-fill.pct-75 { width: 75%; }
.sub-fill.pct-80 { width: 80%; }
.sub-fill.pct-85 { width: 85%; }
.sub-fill.pct-90 { width: 90%; }
.sub-fill.pct-95 { width: 95%; }
.sub-fill.pct-100 { width: 100%; }
.sub-timeline-labels { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.sub-kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 760px) { .sub-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sub-kv > div { background: var(--bg); border-radius: var(--cn-r-m); padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sub-kv strong { font-size: 20px; color: var(--strong); }
.sub-actions { margin-top: 14px; }
.sub-invoices { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.sub-stop { border: 1px solid var(--border); border-radius: var(--cn-r-l); padding: 14px; background: var(--bg); display: grid; gap: 10px; }
.sub-stop p { margin: 0; }
.sub-stop button, .sub-stop form button { justify-self: start; }

/* ---------- File IA ---------- */
.q-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .q-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .q-board { grid-template-columns: 1fr; } }
.q-hint { margin: 0; }
.q-list { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.q-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--cn-r-m); font-size: 13px; }
.q-item[draggable="true"] { cursor: grab; }
.q-item.q-dragging { opacity: 0.6; outline: 2px dashed var(--accent); outline-offset: 2px; }
.q-item.k-lead { border-left-color: var(--rv-agence); }
.q-item.k-content { border-left-color: var(--rv-ia); }
.q-item.k-meta { border-left-color: var(--warn-dot); }
.q-item.k-kw { border-left-color: var(--ok); }
.q-rank { font-weight: 700; color: var(--muted); font-size: 12px; padding-top: 2px; }
.q-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.q-title { color: var(--strong); font-weight: 600; font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.q-title:hover { text-decoration: underline; }
.q-tools { display: flex; gap: 4px; margin: 6px 0 0; flex-wrap: wrap; }
.q-btn { width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 12px; box-shadow: none; cursor: pointer; }
.q-btn:hover { color: var(--strong); border-color: var(--strong); background: var(--surface); }
.chip { display: inline-block; align-self: flex-start; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.c-lead { background: var(--rv-agence-soft); color: var(--rv-agence); }
.c-content { background: var(--rv-ia-soft); color: var(--rv-ia); }
.c-meta { background: var(--warn-soft); color: var(--warn); }
.c-kw { background: var(--ok-soft); color: var(--ok); }
.q-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.q-filters select { width: 220px; max-width: 100%; }
.q-members summary { cursor: pointer; color: var(--accent); margin-top: 4px; }
.q-members ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.q-members li { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.q-members li span { overflow-wrap: anywhere; min-width: 0; }
.q-members form { display: flex; gap: 4px; margin: 0; }
.q-ask { margin-bottom: 12px; }
.q-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--cn-r-m); margin: 0; }
.q-stage { align-self: flex-start; margin-top: 2px; }
.q-rank input[type="checkbox"] { margin: 2px 0 0; }

/* Choix en ligne (texte à gauche, bouton à droite) : confirmation « Optimiser le contenu » */
.choice-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); }
.choice-row:first-child { border-top: 0; }
.choice-row > div { min-width: 0; }
.choice-row p { margin: 4px 0 0; }
@media (max-width: 640px) { .choice-row { flex-direction: column; align-items: stretch; } }
.rv-waiting.rv-nosem { font-weight: 400; }

/* Parcours d'optimisation */
.wf-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.wf-choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface); }
.wf-choice small { display: block; color: var(--muted); margin-top: 4px; }
.tag-pill { font-size: 11px; border-radius: 999px; padding: 2px 8px; background: var(--bg); border: 1px solid var(--border); white-space: nowrap; }
.tag-pill.you { background: var(--warn-soft, #fef3c7); border-color: var(--warn-dot); }
.input-narrow { width: 5em; display: inline-block; }
.wf-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 12px 0; }
.wf-step { border: 1px solid var(--border); border-radius: 14px; padding: 10px; background: var(--surface); font-size: 13px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wf-step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--bg); border: 1px solid var(--border); }
.wf-step.done .n { background: var(--ok); color: #fff; border-color: var(--ok); }
.wf-step.cur { box-shadow: inset 0 0 0 2px var(--warn-dot); }
.wf-step .who { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.wf-step .who.you { color: var(--warn); font-weight: 700; }
.wf-step .big { font-size: 20px; font-weight: 700; color: var(--strong); }
.wf-step progress { width: 100%; height: 8px; accent-color: var(--ok); }
.wf-dots { display: inline-flex; gap: 4px; }
.wf-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--border); display: inline-block; vertical-align: middle; }
.wf-dot.d { background: var(--ok); }
.wf-dot.w { background: var(--warn-dot); }
.wf-dot.c { background: var(--cn-turquoise); }
.wf-dot.e { background: var(--error); }
.wf-dot.s { background: transparent; box-shadow: inset 0 0 0 1.5px var(--border); }
.wf-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.actions-cell { white-space: nowrap; }
.actions-cell .inline-form { display: inline-block; margin-right: 6px; }
.wf-form { display: grid; gap: 16px; }
.wf-opt { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.wf-opt input[type="radio"], .wf-opt input[type="checkbox"], .wf-choice input[type="checkbox"] { width: auto; margin: 0; flex: none; }
.wf-choice input[type="checkbox"] { margin-top: 3px; }
.wf-opt select { width: auto; max-width: 100%; }
.wf-opt .input-narrow { width: 5em; }
.wf-progress { width: 120px; height: 8px; accent-color: var(--ok); vertical-align: middle; }
.wf-questions li { padding: 8px 0; border-top: 1px solid var(--border); }
/* Prestation demandée par le prospect (formulaire d'origine), sur la carte d'une demande */
.lead-card .lead-kind { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--strong); }

/* Sites non connectés */
.cms-externe { color: #5b21b6; background: #ede9fe; border-color: #c4b5fd; }
.badge-ext { background: #ede9fe; color: #5b21b6; }
:root[data-theme="dark"] .badge-ext, :root[data-theme="dark"] .cms-externe { background: #2e1065; color: #ddd6fe; border-color: #5b21b6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge-ext, :root:not([data-theme="light"]) .cms-externe { background: #2e1065; color: #ddd6fe; border-color: #5b21b6; } }
.tabs .tab-off { padding: 9px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--muted); opacity: 0.45; cursor: not-allowed; }
.ext-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.ext-list { margin: 0; padding-left: 18px; line-height: 1.7; }
.connect-menu { position: relative; display: inline-block; }
.connect-menu summary { list-style: none; cursor: pointer; }
.connect-menu summary::-webkit-details-marker { display: none; }
.connect-choices { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--cn-r-m); padding: 6px; }
.connect-choices a { padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.connect-choices a:hover { background: var(--accent-soft); }
.delivery-form input[type="url"] { width: 14em; display: inline-block; margin-right: 6px; }

/* Historique et réputation (onglet SEO) */
.site-history h3 { margin: 18px 0 8px; font-size: 16px; }
.hist-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.hist-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hist-box h3 { margin: 0; font-size: 15px; }
.hist-box p { margin: 0; }
.hist-years { margin-top: 6px; }
.hist-years .hist-bar { fill: var(--ok); opacity: .75; }
.hist-years .hist-gap { fill: var(--border); }
.hist-countries { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.hist-countries li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
table.hist-titles td:first-child { width: 80px; }
table.hist-titles td:last-child { width: 100px; text-align: right; white-space: nowrap; }
.hist-ratio { font-size: 18px; font-weight: 600; color: var(--muted); }
.hist-ratio.warn-text { color: var(--warn); }

/* HTTPS et adresse unique (onglet Sécurité, liste des sites) */
.conn-err { background: var(--error-soft); color: var(--error); border-color: transparent; }
.conn-err::before { opacity: 1; }
.https-check h3 { margin: 18px 0 8px; font-size: 16px; }
.https-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px; margin-top: 12px; }
@media (max-width: 800px) { .https-grid { grid-template-columns: minmax(0, 1fr); } }
.https-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.https-table td, .https-table th { font-size: 14px; }
.https-history { width: 100%; max-width: 480px; height: auto; display: block; }
.https-history .hx-ok { fill: var(--ok); opacity: .75; }
.https-history .hx-warn { fill: var(--warn); opacity: .85; }
.https-history .hx-error { fill: var(--error); opacity: .85; }

/* =====================================================================================================
 * Charpente (novembre 2026) : barre du haut bleu nuit (rubriques), menu de gauche bleu nuit (sous-parties de la
 * rubrique : fiche d'un site, liste des sites, réglages). Le contenu garde sa largeur de lecture à droite.
 * ===================================================================================================== */
.topbar { position: sticky; top: 0; z-index: 30; min-height: 64px; padding: 0 20px; gap: 18px; flex-wrap: nowrap; background: var(--nav-bg); border-bottom: 1px solid var(--nav-border); color: var(--nav-ink); }
.brand { gap: 14px; }
.brand img.logo-console { height: 32px; width: auto; display: block; }
.brand-label { color: var(--nav-muted); border-left-color: var(--nav-bg-2); padding-left: 14px; }
.topbar .nav { gap: 2px; flex-wrap: nowrap; min-width: 0; }
.topbar .nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; color: var(--nav-ink); white-space: nowrap; font-weight: 500; }
.topbar .nav a svg { flex: none; opacity: .85; }
.topbar .nav a:hover { background: var(--nav-bg-2); color: var(--nav-strong); }
.topbar .nav a.active { background: var(--cn-fuchsia); color: #FFFFFF; font-weight: 600; }
.topbar .nav a.active svg { opacity: 1; }
.topbar .nav-count { background: var(--cn-turquoise); color: var(--cn-nuit); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }
.topbar .nav a.active .nav-count { background: #FFFFFF; color: var(--cn-fuchsia-fonce); }
.topbar .icon-btn { color: var(--nav-ink); }
.topbar .icon-btn:hover, .topbar .icon-btn.active { background: var(--nav-bg-2); color: var(--nav-strong); }
.topbar-end { gap: 8px; }
.top-search svg { flex: none; }
.top-search { display: flex; align-items: center; gap: 8px; background: var(--nav-bg-2); color: var(--nav-muted); border-radius: 10px; padding: 0 12px; height: 38px; width: 210px; }
.top-search input { background: transparent; border: 0; color: var(--nav-strong); font: inherit; font-size: 14px; width: 100%; padding: 0; min-height: 0; box-shadow: none; outline: none; }
.top-search input::placeholder { color: var(--nav-muted); }
.top-search:focus-within { outline: 2px solid var(--cn-turquoise); outline-offset: 0; }
.burger { color: var(--nav-ink); }
.nav-client a { color: var(--nav-ink); }
/* Les noms des rubriques restent toujours visibles : on retire d'abord la recherche dépliée, puis les pictos, puis « Console ». */
@media (max-width: 1560px) { .top-search { width: 38px; padding: 0 11px; } .top-search input { display: none; } .top-search:focus-within { width: 210px; } .top-search:focus-within input { display: block; } }
@media (max-width: 1400px) { .topbar .nav a svg { display: none; } .topbar .nav a { padding: 8px 11px; } }
@media (max-width: 1180px) { .brand-label { display: none; } .topbar { gap: 12px; } .topbar .nav a { padding: 7px 9px; font-size: 14px; } }
@media (min-width: 641px) and (max-width: 1060px) { .topbar .nav { overflow-x: auto; scrollbar-width: none; } }

/* Menu de gauche */
main:has(> .side-layout) { max-width: none; margin: 0; padding: 0; display: grid; grid-template-columns: 252px minmax(0, 1fr); align-items: start; }
main:has(> .side-layout) > h1 { display: none; }
main:has(> .side-layout) > .flash { grid-column: 2; margin: 24px 36px 0; }
main:has(> .side-layout) > .side-layout { display: contents; }
.side-nav { grid-column: 1; grid-row: 1 / span 20; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; background: var(--nav-bg); color: var(--nav-ink); padding: 16px 12px 32px; display: flex; flex-direction: column; gap: 2px; border: 0; border-radius: 0; scrollbar-width: thin; scrollbar-color: var(--nav-bg-2) transparent; }
.side-content { grid-column: 2; min-width: 0; padding: 28px 36px 64px; width: 100%; }
.side-head { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 10px; border-radius: 12px; background: var(--nav-bg-2); color: var(--nav-strong); text-decoration: none; }
.side-head strong { color: var(--nav-strong); display: block; line-height: 1.25; }
.side-head small { color: var(--nav-muted); font-size: 12px; display: block; line-height: 1.3; overflow-wrap: anywhere; }
a.side-head:hover { background: #26344D; color: var(--nav-strong); }
.side-avatar { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-titres); font-weight: 700; font-size: 14px; color: #FFFFFF; background: linear-gradient(135deg, #3B1255 0%, var(--cn-fuchsia) 100%); }
.side-avatar-all { background: linear-gradient(135deg, #3B1255 0%, var(--cn-fuchsia) 100%); }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-title { margin: 14px 10px 4px; font-family: var(--font-titres); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--nav-muted); }
.side-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--nav-ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.side-link svg { flex: none; opacity: .8; }
.side-link:hover { background: var(--nav-bg-2); color: var(--nav-strong); }
.side-link.active { background: var(--nav-bg-2); color: var(--nav-strong); font-weight: 600; box-shadow: inset 0 0 0 1px #2B3A55; }
.side-link.active svg { color: var(--cn-fuchsia); opacity: 1; }
.side-off { opacity: .4; cursor: default; }
.side-off:hover { background: none; color: var(--nav-ink); }
.side-count { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; background: var(--cn-ambre); color: var(--cn-nuit); }
.side-new { margin-bottom: 4px; color: var(--nav-strong); background: var(--cn-fuchsia); justify-content: flex-start; }
.side-new:hover { background: var(--cn-fuchsia-fonce); }
.side-new svg { opacity: 1; }

/* Réglages : mêmes couleurs que le menu de gauche (groupes dépliables) */
.settings-nav.side-nav { padding-top: 16px; }
.settings-nav .settings-group > summary { color: var(--nav-muted); font-size: 11px; letter-spacing: .12em; padding: 8px 10px; margin-top: 6px; }
.settings-nav .settings-group > summary:hover { background: var(--nav-bg-2); color: var(--nav-strong); }
.settings-nav a { color: var(--nav-ink); font-size: 15px; padding: 7px 10px; border-radius: 10px; }
.settings-nav a:hover { background: var(--nav-bg-2); color: var(--nav-strong); }
.settings-nav a.active { background: var(--nav-bg-2); color: var(--nav-strong); box-shadow: inset 0 0 0 1px #2B3A55; }
.settings-nav .dot-off { background: #334155; }
.settings-layout .settings-content > :first-child { margin-top: 0; }

@media (max-width: 900px) {
  main:has(> .side-layout) { display: block; }
  main:has(> .side-layout) > .flash { margin: 16px; }
  .side-nav { position: static; height: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 4px; padding: 10px 12px; }
  .side-head, .side-title { display: none; }
  .side-group { flex-direction: row; gap: 4px; }
  .side-link { white-space: nowrap; padding: 6px 10px; font-size: 14px; }
  .settings-nav .settings-group { flex-direction: row; }
  .side-content { padding: 18px 16px 48px; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; padding: 8px 12px; min-height: 56px; }
  .topbar .nav { flex-direction: column; border-top-color: var(--nav-bg-2); padding-bottom: 8px; }
  .topbar .nav a span:not(.nav-count) { display: inline; }
  .side-nav { top: 56px; }
}

/* =====================================================================================================
 * Bibliothèque de composants (src/views/ui.js) : toute nouvelle page s'en sert ; classes « ui- ».
 * Démonstration : Réglages › IA et console › Composants.
 * ===================================================================================================== */
:root { --ui-r: 16px; --ui-r-s: 10px; --ui-gap: 18px; }
.ui-inline { display: inline; margin: 0; }
.ui-muted { color: var(--muted); }

/* Boutons */
.ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--ui-r-s); border: 1px solid transparent; font: 600 14px/1 var(--font-texte); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s, border-color .15s; }
.ui-btn-primary { background: var(--accent); color: var(--on-accent); }
.ui-btn-primary:hover { background: var(--accent-hover); color: #FFFFFF; }
.ui-btn-secondary { background: var(--surface); color: var(--strong); border-color: var(--border); }
.ui-btn-secondary:hover { border-color: var(--strong); color: var(--strong); }
.ui-btn-ghost { background: transparent; color: var(--text); }
.ui-btn-ghost:hover { background: var(--accent-soft); color: var(--strong); }
.ui-btn-danger { background: var(--surface); color: var(--error); border-color: var(--border); }
.ui-btn-danger:hover { background: var(--error-soft); border-color: var(--error); }
.ui-btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.ui-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Étiquettes */
.ui-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.ui-badge-ok { background: var(--ok-soft); color: var(--ok); }
.ui-badge-warn { background: var(--warn-soft); color: var(--warn); }
.ui-badge-error { background: var(--error-soft); color: var(--error); }
.ui-badge-info { background: var(--accent-2-soft); color: var(--ok); }
.ui-badge-neutral { background: var(--accent-soft); color: var(--muted); }
.ui-badge-accent { background: var(--accent-tint); color: var(--accent-strong); }
.ui-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ui-tag { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.ui-tag-fuchsia { background: var(--accent-tint); color: var(--accent-strong); }
.ui-tag-turquoise { background: var(--accent-2-soft); color: var(--ok); }
.ui-tag-citron { background: var(--cn-citron-clair); color: #3F6212; }
.ui-tag-ambre { background: var(--cn-ambre-clair); color: #92400E; }
:root[data-theme="dark"] .ui-tag-citron { background: #1D2A0E; color: #BEF264; }
:root[data-theme="dark"] .ui-tag-ambre { background: #33240A; color: #FCD34D; }
.ui-delta { font-size: 12px; font-weight: 700; white-space: nowrap; }
.ui-delta-good { color: var(--ok); }
.ui-delta-bad { color: var(--error); }
.ui-delta-flat { color: var(--muted); }

/* En-tête de page */
.ui-page-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--ui-gap); }
.ui-crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.ui-crumbs a { color: var(--muted); text-decoration: none; }
.ui-crumbs a:hover { color: var(--accent); }
.ui-page-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ui-page-title h1 { margin: 0; font-size: 28px; line-height: 1.2; }
.ui-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* Cartes et grilles */
.ui-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ui-r); padding: 18px 20px; margin-bottom: var(--ui-gap); min-width: 0; }
.ui-grid > * { margin-bottom: 0; }
.ui-grid > .ui-card { height: 100%; }
.ui-card-flush { padding: 0; }
.ui-card-flush .ui-card-head { padding: 18px 20px 0; }
.ui-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ui-card-head h2 { margin: 0; font-size: 17px; }
.ui-grid { display: grid; gap: var(--ui-gap); margin-bottom: var(--ui-gap); }
.ui-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ui-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ui-grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .ui-grid-2, .ui-grid-3, .ui-grid-main { grid-template-columns: minmax(0, 1fr); } }

/* Bandeau */
.ui-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 24px; border-radius: 18px; margin-bottom: var(--ui-gap); color: #FFFFFF; background: linear-gradient(120deg, #0F172A 0%, #3B1255 55%, #E11D74 100%); }
.ui-hero h2 { margin: 0; color: #FFFFFF; font-size: 19px; }
.ui-hero p { margin: 4px 0 0; color: #F1E4EE; }
.ui-hero .ui-btn-primary, .ui-hero .ui-btn-secondary { background: #FFFFFF; color: var(--cn-fuchsia-fonce); border-color: #FFFFFF; }

/* Indicateurs */
.ui-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--ui-gap); margin-bottom: var(--ui-gap); }
.ui-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--ui-r); color: var(--text); text-decoration: none; min-width: 0; }
a.ui-kpi:hover { border-color: var(--accent); }
.ui-kpi-icon { width: 36px; height: 36px; border-radius: var(--ui-r-s); display: grid; place-items: center; }
.ui-kpi-label { font-size: 13px; color: var(--muted); }
.ui-kpi-value { font-family: var(--font-titres); font-size: 26px; font-weight: 600; line-height: 1.1; color: var(--strong); }
.ui-kpi-hint { font-size: 12px; color: var(--muted); }
.ui-accent-fuchsia { background: var(--accent-tint); color: var(--cn-fuchsia); }
.ui-accent-turquoise { background: var(--accent-2-soft); color: var(--cn-turquoise); }
.ui-accent-citron { background: var(--cn-citron-clair); color: #65A30D; }
.ui-accent-ambre { background: var(--cn-ambre-clair); color: #D97706; }
:root[data-theme="dark"] .ui-accent-citron { background: #1D2A0E; color: #A3E635; }
:root[data-theme="dark"] .ui-accent-ambre { background: #33240A; color: #FBBF24; }

/* Progression */
.ui-meter { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ui-meter-label { color: var(--muted); min-width: 0; }
.ui-meter-value { font-weight: 700; color: var(--strong); min-width: 2em; text-align: right; }
.ui-progress { flex: 1; height: 8px; min-width: 80px; border: 0; border-radius: 99px; overflow: hidden; background: var(--accent-soft); appearance: none; }
.ui-progress::-webkit-progress-bar { background: var(--accent-soft); border-radius: 99px; }
.ui-progress::-webkit-progress-value { border-radius: 99px; }
.ui-progress-ok::-webkit-progress-value { background: var(--cn-turquoise); } .ui-progress-ok::-moz-progress-bar { background: var(--cn-turquoise); }
.ui-progress-warn::-webkit-progress-value { background: var(--cn-ambre); } .ui-progress-warn::-moz-progress-bar { background: var(--cn-ambre); }
.ui-progress-error::-webkit-progress-value { background: var(--error); } .ui-progress-error::-moz-progress-bar { background: var(--error); }
.ui-progress-accent::-webkit-progress-value { background: var(--cn-fuchsia); } .ui-progress-accent::-moz-progress-bar { background: var(--cn-fuchsia); }

/* Graphique */
.ui-chart { margin: 0; }
.ui-chart svg { width: 100%; height: auto; display: block; }
.ui-bar-0 { fill: var(--chart-1); }
.ui-bar-1 { fill: var(--chart-2); }
.ui-axis { fill: var(--muted); font-size: 11px; font-family: var(--font-texte); }
.ui-legend { display: flex; gap: 16px; justify-content: flex-end; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ui-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.ui-swatch-0 { background: var(--chart-1); }
.ui-swatch-1 { background: var(--chart-2); }

/* Tableau */
.ui-table-wrap { overflow-x: auto; }
.ui-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ui-table th { text-align: left; font: 600 12px var(--font-texte); color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ui-table td { padding: 11px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ui-table tbody tr:last-child td { border-bottom: 0; }
.ui-table tbody tr:hover td { background: var(--accent-soft); }
.ui-num { text-align: right; font-variant-numeric: tabular-nums; }
.ui-card-flush .ui-table th:first-child, .ui-card-flush .ui-table td:first-child { padding-left: 20px; }
.ui-card-flush .ui-table th:last-child, .ui-card-flush .ui-table td:last-child { padding-right: 20px; }

/* À faire, fiche */
.ui-todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ui-todo li > a, .ui-todo li > i + span, .ui-todo li { color: inherit; text-decoration: none; }
.ui-todo li { display: block; }
.ui-todo li > a, .ui-todo li:not(:has(> a)) { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.ui-todo li > a:hover { background: var(--accent-soft); }
.ui-todo strong { display: block; }
.ui-todo small { color: var(--muted); }
.ui-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.ui-dot.ui-accent-fuchsia { background: var(--cn-fuchsia); } .ui-dot.ui-accent-turquoise { background: var(--cn-turquoise); }
.ui-dot.ui-accent-citron { background: var(--cn-citron); } .ui-dot.ui-accent-ambre { background: var(--cn-ambre); }
.ui-kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 14px; }
.ui-kv dt { color: var(--muted); }
.ui-kv dd { margin: 0; color: var(--strong); overflow-wrap: anywhere; }

/* Messages */
.ui-alert { padding: 12px 16px; border-radius: 12px; margin-bottom: var(--ui-gap); font-size: 14px; }
.ui-alert-ok { background: var(--ok-soft); color: var(--ok); }
.ui-alert-warn { background: var(--warn-soft); color: var(--warn); }
.ui-alert-error { background: var(--error-soft); color: var(--error); }
.ui-alert-info, .ui-alert-neutral { background: var(--accent-2-soft); color: var(--strong); }
.ui-alert-accent { background: var(--accent-tint); color: var(--accent-strong); }
.ui-alert strong { color: inherit; }
.ui-empty { text-align: center; padding: 28px 16px; color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; }
.ui-empty strong { display: block; color: var(--strong); margin-bottom: 4px; }
.ui-empty p { margin: 0 0 12px; }
.ui-empty p:last-child { margin-bottom: 0; }

/* Segments, filtres, champs */
.ui-segments { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--accent-soft); margin-bottom: var(--ui-gap); flex-wrap: wrap; }
.ui-segments a { padding: 7px 14px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.ui-segments a:hover { color: var(--strong); }
.ui-segments a.active { background: var(--surface); color: var(--strong); box-shadow: 0 1px 2px rgb(15 23 42 / 8%); }
.ui-segments em { font-style: normal; font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 99px; background: var(--accent-tint); color: var(--accent-strong); }
.ui-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: var(--ui-gap); }
.ui-field { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.ui-field-grow { flex: 1 1 260px; }
.ui-field-label { font-size: 13px; font-weight: 600; color: var(--strong); }
.ui-help { color: var(--muted); font-size: 12px; }
/* Démonstration de la bibliothèque (Réglages › Composants) */
.ui-demo { margin-bottom: 16px; }
.ui-demo-name { margin: 0 0 8px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ui-demo-name code { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--accent-tint); color: var(--accent-strong); }
.ui-demo:empty, .ui-demo > p:only-child { margin-bottom: 0; }
/* Le menu de gauche descend jusqu'en bas de la page, même quand le contenu est long. */
main:has(> .side-layout) { background: linear-gradient(to right, var(--nav-bg) 252px, transparent 252px); min-height: calc(100vh - 64px); }
@media (max-width: 900px) { main:has(> .side-layout) { background: none; } }

/* Épuré (novembre 2026) : mêmes formes partout, filets fins, pas de contour noir ni de barre de couleur sur le côté. */
button, .button { border-radius: var(--ui-r-s); font-weight: 600; padding: 10px 16px; }
.secondary-btn, .button.secondary { background: var(--surface); color: var(--strong); box-shadow: inset 0 0 0 1px var(--border); }
.secondary-btn:hover, .button.secondary:hover { background: var(--surface); color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent); }
.small-btn { border-radius: 8px; }
.card { border-radius: var(--ui-r); border-color: var(--border); padding: 20px 22px; }
.card.card-warn { border-left: 1px solid var(--border); }
.flash, .flash-info { border-radius: 12px; border: 0; border-left: 0; }
.flash-info { background: var(--accent-2-soft); color: var(--strong); }
.kpi { border-radius: var(--ui-r); padding: 16px 18px; }
.page-head { margin-bottom: 20px; }
.page-head h1, .side-content > h1 { font-size: 28px; }
input[type="email"], input[type="password"], input[type="text"], input[type="tel"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="search"], input[type="number"], input[type="url"], select, textarea { border-radius: var(--ui-r-s); border-color: var(--border); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
/* Vignettes (ui.tile) */
.ui-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ui-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--bg); min-width: 0; }
.ui-tile-head { display: flex; align-items: center; gap: 8px; }
.ui-tile-title { font-weight: 600; color: var(--strong); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ui-tile-title:hover { color: var(--accent); }
.ui-tile-ext { margin-left: auto; color: var(--muted); text-decoration: none; font-size: 13px; }
.ui-tile-ext:hover { color: var(--accent); }
.ui-tile-line { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ui-tile-line strong { color: var(--strong); }
.ui-tile-foot { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ui-state { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--border); }
.ui-state-ok { background: var(--cn-turquoise); }
.ui-state-warn { background: var(--cn-ambre); }
.ui-state-error { background: var(--error); }
.ui-section-title { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 10px; font-size: 15px; }
.ui-section-title:first-child { margin-top: 0; }
.ui-section-title span { color: var(--muted); font-size: 13px; font-weight: 500; }
/* Liste des problèmes à traiter (ui.issueList) */
.ui-alert:has(.ui-issues) > strong { display: block; margin-bottom: 8px; }
.ui-issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ui-issues li { display: grid; grid-template-columns: minmax(0, 220px) 170px minmax(0, 1fr) max-content; gap: 12px; align-items: baseline; padding: 8px 12px; border-radius: 10px; background: var(--surface); color: var(--text); }
.ui-issue-site { font-weight: 700; color: var(--strong); text-decoration: none; }
.ui-issue-site:hover { color: var(--accent); }
.ui-issue-kind { justify-self: start; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 1px 9px; background: var(--error-soft); color: var(--error); white-space: nowrap; }
.ui-issue-text { overflow-wrap: anywhere; }
.ui-issue-link { font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.ui-issue-link:hover { text-decoration: underline; }
@media (max-width: 800px) { .ui-issues li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.ui-alert-text { display: inline; }
.ui-alert:has(.ui-issues) .ui-alert-text { display: block; }

/* Flat design partout (25/11/2026) : aplats de couleur, aucun dégradé, aucune ombre portée, aucun relief au survol. */
.side-avatar, .side-avatar-all { background: var(--cn-fuchsia); }
.ui-hero { background: var(--cn-nuit); color: #FFFFFF; }
.ui-hero p { color: var(--nav-ink); }
.ui-hero .ui-btn-primary, .ui-hero .ui-btn-secondary { background: var(--cn-fuchsia); color: #FFFFFF; border-color: var(--cn-fuchsia); }
.ui-hero .ui-btn-primary:hover, .ui-hero .ui-btn-secondary:hover { background: var(--cn-fuchsia-fonce); border-color: var(--cn-fuchsia-fonce); }
a.kpi:hover, a.stat-link:hover, .trend-tile:hover, .mfa-choices a:hover { box-shadow: none; border-color: var(--accent); }
.media-thumb:hover { transform: none; box-shadow: none; border-color: var(--accent); }
.folder-tabs a.active { box-shadow: none; }
.account-pop, .sem-tip, .semx-tip, .rv-tip { box-shadow: none; }
tr.row-down td:first-child, tr.row-warn td:first-child { box-shadow: none; }
.wizard-steps li.viewing > a { box-shadow: none; }
.side-link.active, .settings-nav a.active { box-shadow: none; background: var(--nav-bg-2); }
.ui-segments a.active { box-shadow: none; }
.ui-kpi, .ui-card, .ui-tile, .card, .kpi { box-shadow: none; }
.peek-pop { box-shadow: none; }
/* Liste « À faire » compacte : une ligne par élément, détail à droite (ui.todoList compact) */
.ui-todo-compact { gap: 0; }
.ui-todo-compact li > a, .ui-todo-compact li:not(:has(> a)) { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 0; background: transparent; border-bottom: 1px solid var(--border); }
.ui-todo-compact li:last-child > a, .ui-todo-compact li:last-child:not(:has(> a)) { border-bottom: 0; }
.ui-todo-compact li > a:hover { background: var(--accent-soft); }
.ui-todo-compact .ui-dot { margin-top: 0; }
.ui-todo-compact li span { display: contents; }
.ui-todo-compact strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; font-size: 14px; line-height: 1.4; }
.ui-todo-compact small { font-size: 13px; white-space: nowrap; text-align: right; }
@media (max-width: 800px) { .ui-todo-compact li > a, .ui-todo-compact li:not(:has(> a)) { grid-template-columns: 10px minmax(0, 1fr); } .ui-todo-compact small { grid-column: 2; text-align: left; white-space: normal; } }
/* Ancres (menu « Sur cette page ») : le titre de la partie reste visible sous la barre du haut. */
html { scroll-padding-top: 84px; }
/* Fenêtre de confirmation en surimpression (ui.modal et data-confirm) */
.ui-modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgb(15 23 42 / 55%); }
.ui-modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); color: var(--text); border-radius: var(--ui-r); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.ui-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ui-modal-head h2 { margin: 0; font-size: 20px; }
.ui-modal-close { color: var(--muted); text-decoration: none; font-size: 16px; line-height: 1; padding: 4px; }
.ui-modal-close:hover { color: var(--strong); }
.ui-modal-sub { margin: -6px 0 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.ui-modal-body { margin: 0; }
.ui-modal-body p { margin: 0 0 12px; }
.ui-modal-form { display: flex; flex-direction: column; gap: 12px; }
.ui-modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ui-btn-danger-solid { background: var(--error); color: #FFFFFF; }
.ui-btn-danger-solid:hover { background: #991B1B; color: #FFFFFF; }
body:has(.ui-modal-backdrop) { overflow: hidden; }

/* =====================================================================================================
 * Pages de connexion (connexion, double authentification, mot de passe oublié) : panneau bleu nuit + formulaire.
 * ===================================================================================================== */
main.auth-main { max-width: none; margin: 0; padding: 0; }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-panel { background: var(--nav-bg); color: var(--nav-ink); padding: 56px clamp(24px, 5vw, 72px) 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-logo { height: 36px; width: auto; align-self: flex-start; }
.auth-pitch { display: flex; flex-direction: column; gap: 28px; max-width: 540px; }
.auth-pitch h2 { color: #FFFFFF; font-size: clamp(28px, 3vw, 38px); line-height: 1.15; font-weight: 600; margin: 0; }
.auth-pitch h2 em { font-style: normal; color: #FF2E93; }
.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.auth-points li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.auth-points strong { display: block; color: #FFFFFF; font-size: 16px; }
.auth-points span { font-size: 14px; color: #94A3B8; }
.auth-n { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 700; font-family: var(--font-titres); }
.auth-n1, .auth-n3 { background: var(--cn-turquoise); color: var(--nav-bg); }
.auth-n2 { background: var(--cn-fuchsia); color: #FFFFFF; }
.auth-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.auth-kpis div { background: var(--nav-bg-2); border-radius: 12px; padding: 14px 16px; }
.auth-kpis b { display: block; font-family: var(--font-titres); font-size: 24px; color: #FFFFFF; }
.auth-kpis small { color: #94A3B8; font-size: 12px; }
.auth-trust { margin: 0; font-size: 13px; line-height: 20px; color: var(--nav-muted); }
.auth-side { background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px 96px; position: relative; }
.auth-form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
.auth-form h1 { font-size: 30px; margin: 0; }
.auth-sub { margin: -6px 0 4px; color: var(--muted); }
.auth-sub a, .auth-row a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-sub a:hover, .auth-row a:hover { text-decoration: underline; }
.auth-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.auth-row a { font-size: 14px; }
.auth-fields { display: flex; flex-direction: column; gap: 16px; }
.auth-fields input { width: 100%; padding: 13px 14px; }
.auth-submit, .auth-passkey { width: 100%; min-height: 48px; font-size: 15px; }
.auth-status { margin: -8px 0 0; font-size: 13px; color: var(--muted); min-height: 0; }
.auth-status:empty { display: none; }
.auth-sep { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--muted); font-size: 13px; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-mfa .form { display: flex; flex-direction: column; gap: 14px; }
.auth-mfa button[type="submit"], .auth-mfa [data-passkey-login] { width: 100%; min-height: 48px; }
.auth-foot { position: absolute; bottom: 40px; left: 24px; right: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; font-size: 13px; line-height: 20px; }
.auth-foot a { color: var(--muted); text-decoration: none; }
.auth-foot a:hover { color: var(--accent); }
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-panel { padding: 24px 20px; gap: 16px; }
  .auth-points, .auth-kpis, .auth-trust { display: none; }
  .auth-pitch h2 { font-size: 22px; }
  .auth-side { padding: 28px 16px 110px; justify-content: flex-start; }
  .auth-foot { bottom: 24px; }
}

/* Pages légales publiques */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; display: flex; flex-direction: column; gap: 32px; min-height: 100vh; }
.legal-head img { display: block; height: 32px; width: auto; }
.legal-body { flex: 1; }
.legal-body h1 { margin: 0 0 24px; }
.legal-body h2 { font-size: 20px; margin: 28px 0 8px; }
.legal-body p { line-height: 1.65; margin: 0 0 14px; }
.legal-foot { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 13px; border-top: 1px solid var(--border); padding-top: 20px; }
.legal-foot a { color: var(--muted); text-decoration: none; }
.legal-foot a:hover { color: var(--accent); }
.legal-form { display: flex; flex-direction: column; gap: 16px; }
.legal-form textarea { width: 100%; font: inherit; line-height: 1.5; }
