/* ─── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* L'attribut [hidden] doit toujours masquer, même sur un élément qui (re)définit
   `display` (ex. .form-group { display:flex }) — sinon les bascules JS `el.hidden`
   sont silencieusement ignorées. La règle UA `[hidden]{display:none}` est battue par
   toute règle auteur de même spécificité, d'où le !important. */
[hidden] { display: none !important; }

:root {
  /* Brand 7B1C87 */
  --pr-primary-color:    #7B1C87;
  --pr-secondary-color:  #0a3d62;
  --pr-tertiary-color:   #008090;

  --pr-primary-shadow-box: rgba(123,28,135,0.25);
  --pr-blue-shadow-box:  rgba(0,128,144,0.25);

  --pr-primary-transp:   #FAE8FF;
  --pr-secondary-transp: #d7dce3;
  --pr-tertiary-transp:  #E2F5F4;

  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --text:     #111827;

  --radius:    8px;
  --radius-lg: 12px;
  --radius-pill: 99px;

  /* Ombres douces — clé du rendu « SaaS pro » */
  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.07);
  --shadow-md: 0 4px 12px rgba(16,24,40,.08);

  /* Carte « Résumé IA » (ambre très pâle, discret) */
  --amber-bg:     #FCFBF6;
  --amber-border: #ECE7D9;
  --amber-text:   #8A6A2F;
}

html { font-size: 16px; }
body { font-family: system-ui, -apple-system, sans-serif; color: var(--text); background: var(--gray-50); line-height: 1.5; }
a { color: var(--pr-primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* ─── Header ────────────────────────────────────────────────────────────────── */
.site-header { background: #fff; border-bottom: 1px solid var(--gray-200); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: .625rem; text-decoration: none; }
.logo:hover { opacity: .85; text-decoration: none; }
.logo-img   { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.logo-text  { display: flex; flex-direction: column; line-height: 1.2; }
.logo-title { font-weight: 700; font-size: 1.2rem; color: var(--pr-secondary-color); letter-spacing: -.02em; text-tranform:uppercase;}
.logo-sub   { font-size: .75rem; color: var(--gray-400); font-weight: 500; letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: .75rem; font-size: .875rem; }
.nav a { color: var(--gray-600); }
.nav a:hover { color: var(--pr-primary-color); text-decoration: none; }
.nav .btn-secondary { background: var(--pr-secondary-color); color: #fff; border-color: var(--pr-secondary-color); }
.nav .btn-secondary:hover { background: rgba(10, 61, 98, 0.75); color: #fff; text-decoration: none; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .375rem;
  padding: .45rem 1rem; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, opacity .15s;
  appearance: none; -webkit-appearance: none;
}
.btn-primary  { background: var(--pr-primary-color); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--pr-primary-color) 85%, black); text-decoration: none; }
.btn-primary[disabled] { background: var(--gray-400); border-color: var(--gray-400); color: #fff; opacity: 1; pointer-events: none; }
.btn-secondary { background: #fff; color: var(--gray-800); border-color: var(--gray-200); }
.btn-secondary:hover { background: var(--gray-50); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); color: var(--text); text-decoration: none; }
.btn-danger { background: #fff; color: var(--pr-primary-color); border-color: var(--pr-primary-color); }
.btn-danger:hover { background: var(--pr-primary-transp); text-decoration: none; }

/* ─── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: .15rem .55rem; border-radius: 99px;
  font-size: .75rem; font-weight: 600; letter-spacing: .01em;
}
.badge-critical    { background: var(--pr-primary-transp);  color: var(--pr-primary-color); }
.badge-significant { background: #FEF3C7; color: #92400E; }
.badge-minor       { background: var(--pr-tertiary-transp); color: var(--pr-tertiary-color); }
.badge-ok          { background: var(--pr-tertiary-transp); color: var(--pr-tertiary-color); }
.badge-pending     { background: var(--gray-100); color: var(--gray-600); }
.badge-ai-locked   { background: #EDE9FE; color: #5B21B6; font-style: italic; }
.badge-in-scope    { background: var(--pr-tertiary-transp); color: var(--pr-tertiary-color); }
.badge-out-scope   { background: var(--gray-100); color: var(--gray-600); }
.badge-diff        { background: #E2E8F0; color: #475569; }
.badge-listing     { background: #E0E7FF; color: #3730A3; }
.badge-rss         { background: #FFEDD5; color: #9A3412; }
.diff-summary--upsell { color: var(--gray-500); font-size: .875rem; font-style: italic; }
.diff-summary--upsell a { color: var(--gray-500); text-decoration: underline; }

/* ─── Alerts ────────────────────────────────────────────────────────────────── */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: .875rem; }
.alert-error { background: var(--pr-primary-transp); color: var(--pr-primary-color); border: 1px solid #f5c3c1; }

/* ─── Page header ───────────────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2rem 0 1.5rem; gap: 1rem;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; }
.page-subtitle { font-size: .8125rem; color: var(--gray-500); margin-top: .15rem; }
.page-header--top { align-items: flex-start; }
.page-header-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }

/* Toggle liste / grille (préférence localStorage — état actif piloté par html.view-grid) */
.view-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 2px; background: var(--gray-100); border-radius: var(--radius); }
.view-btn { display: inline-flex; align-items: center; justify-content: center; padding: .3rem .45rem; border: none; background: none; cursor: pointer; border-radius: calc(var(--radius) - 2px); color: var(--gray-400); transition: color .15s, background .15s; }
.view-btn:hover { color: var(--gray-700); }
html:not(.view-grid) .view-btn[data-view="list"],
html:not(.view-grid) .view-btn[data-view="table"],
html.view-grid .view-btn[data-view="grid"] { background: #fff; color: var(--pr-secondary-color); box-shadow: var(--shadow-sm); }

/* Barre d'outils d'en-tête — icon-buttons cohérents avec le view-toggle */
.toolbar { display: inline-flex; align-items: center; gap: .375rem; }
.toolbar-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: .4rem .5rem; border: 1px solid var(--gray-200); background: #fff; cursor: pointer; border-radius: var(--radius); color: var(--gray-500); transition: color .15s, border-color .15s, background .15s; }
.toolbar-btn:hover { color: var(--pr-secondary-color); border-color: var(--gray-300); }
.toolbar-btn.is-active { color: #fff; background: var(--pr-secondary-color); border-color: var(--pr-secondary-color); }
.toolbar-badge { position: absolute; top: -6px; right: -6px; min-width: 15px; height: 15px; padding: 0 3px; font-size: .65rem; line-height: 15px; text-align: center; color: #fff; background: var(--pr-primary-color); border-radius: 8px; }
/* Libellé inline à côté de l'icône (ex. période active du feed) : les dates
   restent lisibles sans ouvrir le popover. */
.toolbar-btn .toolbar-label { margin-left: .35rem; font-size: .8rem; font-weight: 500; color: var(--gray-700); }

/* Recherche inline du fil — le champ se déplie au clic sur la loupe */
.feed-search { display: inline-flex; align-items: center; gap: .375rem; }
.feed-search-input { width: 0; padding: 0; border: 1px solid transparent; background: #fff; border-radius: var(--radius); font: inherit; color: var(--gray-700); opacity: 0; transition: width .2s, opacity .2s, padding .2s; overflow: hidden; }
.feed-search.is-open .feed-search-input { width: 180px; padding: .4rem .6rem; border-color: var(--gray-200); opacity: 1; }
.feed-search.is-open .feed-search-input:focus { outline: none; border-color: var(--pr-secondary-color); }
@media (max-width: 640px) { .feed-search.is-open .feed-search-input { width: 130px; } }

/* Inputs date du dialog de filtre par date */
.date-input { width: 100%; padding: .5rem .6rem; border: 1px solid var(--gray-200); border-radius: var(--radius); font: inherit; color: var(--gray-700); }
.date-input:focus { outline: none; border-color: var(--pr-secondary-color); }
/* Espacement resserré pour les groupes du dialog date (au lieu du 1.5rem par défaut) */
.filter-group--tight { margin: 0.5rem; }
/* Du / Au côte à côte sur PC, empilés sur mobile */
.date-row { display: flex; gap: .75rem; margin: .5rem; align-items: end; }
.date-row .filter-group { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; }
@media (max-width: 480px) { .date-row { flex-direction: column; gap: .5rem; } }
/* Raccourcis « Sélection rapide » — pills cliquables (liens GET) */
.quick-pill { display: inline-flex; align-items: center; padding: .35rem .7rem; border: 1px solid var(--gray-200); border-radius: 999px; font-size: .8rem; color: var(--gray-700); background: #fff; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.quick-pill:hover { border-color: var(--gray-300); color: var(--pr-secondary-color); text-decoration: none; }
.quick-pill--active { color: #fff; background: var(--pr-secondary-color); border-color: var(--pr-secondary-color); }

/* Menu déroulant (bouton +) */
.dropdown { position: relative; display: inline-flex; }
.dropdown-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 20; min-width: 170px; padding: .3rem; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow-md); display: none; flex-direction: column; gap: 2px; }
.dropdown-menu.open { display: flex; }
.dropdown-item { display: block; width: 100%; text-align: left; padding: .5rem .65rem; border: none; background: none; cursor: pointer; font: inherit; color: var(--gray-700); border-radius: calc(var(--radius) - 2px); }
.dropdown-item:hover { background: var(--gray-100); color: var(--pr-secondary-color); text-decoration: none; }
.dropdown-item--disabled { color: var(--gray-400); cursor: not-allowed; }
.dropdown-item--disabled:hover { background: none; color: var(--gray-400); }

/* Dialog filtres */
.filter-group { margin: 1.5rem 0.5rem; }
.filter-group-label { display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--gray-500); margin-bottom: .4rem; }
.filter-options { display: flex; flex-wrap: wrap; gap: .35rem; }
.filter-opt { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .55rem; border: 1px solid var(--gray-200); border-radius: var(--radius); cursor: pointer; font-size: .8125rem; color: var(--gray-700); }
.filter-opt:has(input:checked) { background: var(--pr-secondary-color); color: #fff; border-color: var(--pr-secondary-color); }
.filter-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.filter-opt:hover { border-color: var(--pr-primary-color); color: var(--pr-primary-color); text-decoration: none; }

/* Sélection groupée (bulk edit) */
.url-card-wrap { position: relative; display: flex; }
.url-card-wrap > .url-card { flex: 1; width: 100%; }
.bulk-cb { position: absolute; top: 10px; left: 10px; z-index: 5; width: 18px; height: 18px; cursor: pointer; display: none; }
.url-list--selecting .bulk-cb { display: block; }
.url-list--selecting .url-card { cursor: pointer; }
.url-list--selecting .url-card-wrap:has(.bulk-cb:checked) > .url-card { border-color: var(--pr-secondary-color); box-shadow: 0 0 0 2px var(--pr-secondary-color); }

/* Barre d'actions groupées — pill sombre flottante (une ligne, groupes séparés). */
.bulk-bar {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 40;
  display: flex; align-items: center; gap: .5rem; flex-wrap: nowrap;
  max-width: calc(100% - 1.5rem); padding: .5rem .625rem;
  background: var(--pr-secondary-color); color: #fff;
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(16,24,40,.28), 0 2px 8px rgba(16,24,40,.18);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  transform: translateX(-50%);
  animation: bulk-bar-in .16s ease-out;
}
@keyframes bulk-bar-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .bulk-bar { animation: none; } }

.bulk-group { display: inline-flex; align-items: center; gap: .25rem; flex: 0 0 auto; }
.bulk-sep { flex: 0 0 auto; width: 1px; height: 1.375rem; background: rgba(255,255,255,.18); }

.bulk-selectall { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; color: #fff; cursor: pointer; white-space: nowrap; padding: 0 .25rem; }
.bulk-selectall input { accent-color: #fff; }
.bulk-count { font-size: .75rem; font-weight: 600; color: #fff; white-space: nowrap; padding: .2rem .5rem; background: rgba(255,255,255,.15); border-radius: var(--radius-pill); }

.bulk-btn {
  display: inline-flex; align-items: center; gap: .375rem; white-space: nowrap;
  padding: .4rem .625rem; font-size: .8125rem; font-weight: 500;
  color: #fff; background: transparent; border: 0; border-radius: var(--radius-pill);
  cursor: pointer; transition: background .12s ease;
}
.bulk-btn:hover { background: rgba(255,255,255,.14); }
.bulk-btn .bulk-ico { flex: 0 0 auto; opacity: .9; }
.bulk-btn--danger { color: #ffd7d7; }
.bulk-btn--danger:hover { background: var(--pr-primary-color); color: #fff; }
.bulk-btn:disabled { opacity: .4; cursor: not-allowed; background: transparent; }

.bulk-select {
  padding: .35rem .5rem; font-size: .8125rem; color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius); cursor: pointer; max-width: 12rem;
}
.bulk-select option { color: var(--text); }

.bulk-close {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; margin-left: .125rem;
  color: rgba(255,255,255,.75); background: transparent; border: 0; border-radius: 50%;
  cursor: pointer; transition: background .12s ease, color .12s ease;
}
.bulk-close:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ─── Quota bars ────────────────────────────────────────────────────────────── */
.quota-bar-group {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: .875rem 1.25rem; background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; font-size: .8125rem;
}
.quota-bar-item { display: flex; flex-direction: column; gap: .3rem; min-width: 160px; flex: 1; }
.quota-bar-label { display: flex; justify-content: space-between; color: var(--gray-600); }
.quota-hint { color: var(--gray-400); }
.quota-count { font-weight: 600; color: var(--text); }
.quota-track { height: 5px; background: var(--gray-100); border-radius: 99px; overflow: hidden; }
.quota-fill  { height: 100%; background: var(--pr-primary-color); border-radius: 99px; transition: width .3s; }
.quota-fill--fast { background: var(--pr-primary-color); }
.quota-section-label {
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
  color: var(--gray-400); text-transform: uppercase; flex-shrink: 0; align-self: center;
}
.quota-member-note { flex-basis: 100%; font-size: .8125rem; color: var(--gray-400); }
.quota-upgrade { font-size: .8125rem; color: var(--pr-primary-color); font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.quota-upgrade:hover { text-decoration: underline; }

/* ─── Folders ───────────────────────────────────────────────────────────────── */
.folder-bar { display: flex; align-items: center; gap: .375rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.folder-pill-wrap { display: inline-flex; align-items: center; }
.folder-pill {
  padding: .25rem .75rem; border-radius: 99px; font-size: .8125rem;
  border: 1px solid var(--gray-200); color: var(--gray-600); cursor: pointer; text-decoration: none;
}
.folder-pill:hover { border-color: var(--pr-primary-color); color: var(--pr-primary-color); text-decoration: none; }
.folder-pill--active { background: var(--pr-secondary-color); color: #fff; border-color: var(--pr-secondary-color); }
.folder-pill--active:hover { background: var(--pr-secondary-color); color: #fff; }
.folder-pill--muted { color: var(--gray-400); }
.folder-pill-del {
  background: none; border: none; cursor: pointer; color: var(--gray-400);
  font-size: .9rem; padding: 0 .2rem 0 .1rem; line-height: 1;
}
.folder-pill-del:hover { color: var(--pr-primary-color); }
.rss-icon-link {
  display: inline-flex; align-items: center; gap: .2rem;
  font-size: .7rem; font-weight: 600; letter-spacing: .03em;
  color: var(--gray-400); text-decoration: none;
  padding: .1rem .25rem; border-radius: 3px; transition: color .15s;
}
.rss-icon-link:hover { color: #E8620A; text-decoration: none; }
.folder-dialog {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.5rem; width: 520px; max-width: 90vw; box-shadow: 0 4px 24px rgba(0,0,0,.1);
}
.folder-dialog h3 { margin: 0 0 1rem; font-size: 1rem; color: var(--pr-secondary-color); }
.folder-dialog input { width: 100%; margin-bottom: 1rem; }
.folder-dialog-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 3rem}
.folder-dialog::backdrop { background: rgba(0,0,0,.3); }

/* ─── Popover ancré (filtres de toolbar) ─────────────────────────────────────
   Piloté par public/js/popover.js (module partagé avec Projects/Kortlex).
   Ancré sous son bouton déclencheur ; sous 600px il bascule en bottom-sheet. */
.popover {
  position: absolute; z-index: 40; display: none; min-width: 220px;
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 1.25rem;
}
.popover.open { display: block; }
.popover.filter-popover { width: 420px; max-width: calc(100vw - 16px); }
/* Le sélecteur de période est plus large (dates côte à côte + raccourcis). */
#dialog-date.filter-popover { width: 440px; }
.popover.filter-popover h3 { margin: 0 0 1rem; font-size: 1rem; color: var(--pr-secondary-color); }
.popover .filter-group:first-of-type { margin-top: .5rem; }
.popover .folder-dialog-actions { margin-top: 1.25rem; }
@media (max-width: 600px) {
  .popover.filter-popover {
    position: fixed !important;
    left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
    width: 100%; max-width: 100%;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(0,0,0,.18);
    max-height: 85vh; overflow-y: auto; z-index: 60;
  }
}

/* ─── URL list ──────────────────────────────────────────────────────────────── */
.url-list { display: flex; flex-direction: column; gap: .625rem; }

.url-card {
  display: flex; align-items: stretch; overflow: hidden;
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  color: inherit;
}
.url-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; }

/* Vignette de la page surveillée (capture n8n) */
.url-thumb {
  width: 140px; flex-shrink: 0; background: var(--gray-100);
  border-right: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
}
.url-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.url-thumb-ph { color: var(--gray-300); }
.thumb-rss { color: #E8620A; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; width: 100%; height: 100%; }
.thumb-rss svg { width: 32%; height: 32%; max-width: 36px; }
.thumb-rss-label { font-size: .65rem; font-weight: 700; letter-spacing: .05em; }

.url-card-body { flex: 1; min-width: 0; padding: .9rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.url-card-head { display: flex; align-items: center; gap: .6rem; }
.url-host { font-weight: 600; font-size: .95rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url-freq { font-size: .8125rem; color: var(--gray-400); flex-shrink: 0; margin-left: auto; }

/* Pastille de statut — écho des pastilles de la timeline */
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
/* Halo « live » réservé à l'état sain (ok) — discret, lent : message de réassurance « surveillé
   en continu ». Le warn (ambre) reste fixe pour ne pas virer à la balise d'alerte ; cassé / pause /
   quota / pending statiques aussi. Désactivé si prefers-reduced-motion. */
@keyframes status-pulse {
  0%   { box-shadow: 0 0 0 0 var(--pulse-color); }
  100% { box-shadow: 0 0 0 6px transparent; }
}
.status-dot--ok      { background: var(--pr-tertiary-color); --pulse-color: rgba(0, 128, 144, .5); animation: status-pulse 2.5s ease-out infinite; }
.status-dot--broken  { background: var(--pr-primary-color); }
.status-dot--warn    { background: #F59E0B; }
.status-dot--paused,
.status-dot--over,
.status-dot--pending { background: var(--gray-300); }
@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none; }
}

.url-text { font-size: .75rem; color: var(--gray-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url-card-badges { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }

.url-card-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.meta-text { font-size: .8125rem; color: var(--gray-600); }
.meta-summary { font-size: .8125rem; color: var(--gray-600); font-style: italic; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 600px) { .url-thumb { width: 96px; } }

/* ─── Mode grille (cartes carrées, ~3 colonnes, lecture gauche→droite) ────────── */
/* Piloté par html.view-grid (préférence localStorage). Le sélecteur html.view-grid .feed-list
   (spécificité supérieure) bat .feed-list { display:flex } quel que soit l'ordre dans le fichier. */
html.view-grid .url-list,
html.view-grid .feed-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: .75rem;
}

/* Dashboard : vignette en héros au-dessus du corps */
html.view-grid .url-list .url-card { flex-direction: column; }
html.view-grid .url-list .url-thumb {
  width: 100%; height: 130px;
  border-right: none; border-bottom: 1px solid var(--gray-200);
}
html.view-grid .url-list .url-card-meta { flex-wrap: nowrap; }
html.view-grid .url-list .meta-summary { -webkit-line-clamp: 1; }

/* Feed : vignette en héros, résumé clampé (place limitée) */
html.view-grid .feed-list .feed-card { flex-direction: column; align-items: stretch; gap: .55rem; padding: 0; overflow: hidden; }
html.view-grid .feed-list .feed-thumb { width: 100%; height: 120px; margin-top: 0; border-radius: 0; }
html.view-grid .feed-list .feed-body { padding: 0 1rem 1rem; gap: .3rem; }
html.view-grid .feed-list .feed-summary { -webkit-line-clamp: 3; }

/* ─── Mode tableau (dashboard uniquement, vue par défaut « non-grille ») ──────── */
/* Repris du tableau /radar de Kortlex — mêmes variables de thème, donc la couleur
   d'en-tête suit automatiquement --pr-primary-color. Le tableau et la grille de
   cartes coexistent dans le DOM ; la classe html.view-grid bascule la visibilité. */
.url-table-scroll { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); background: #fff; }
html:not(.view-grid) .url-list { display: none; }        /* mode tableau → masque les cartes du dashboard */
html.view-grid .url-table-scroll { display: none; }      /* mode grille → masque le tableau */

.url-table { width: 100%; border-collapse: collapse; font-size: .875rem; text-align: left; }
.url-table thead th {
  padding: 10px 12px; font-size: .78rem; font-weight: 600; color: #fff; text-align: left;
  background: var(--pr-primary-color); border: none; white-space: nowrap;
}
.url-table thead th.theader { padding: 0; cursor: pointer; user-select: none; }
.url-table thead th .th-sort { display: inline-flex; align-items: center; gap: .15rem; color: #fff; padding: 10px 12px; width: 100%; white-space: nowrap; }
.url-table thead th .th-sort:hover { text-decoration: none; }
.url-table thead th .sort-icon { font-size: .6rem; color: rgba(255,255,255,.75); }
.url-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.url-table tbody tr:last-child td { border-bottom: none; }
.url-table tbody tr:hover { background: var(--gray-50); }

/* Colonne de sélection (bulk) — masquée hors mode sélection, comme la col-compare radar. */
.url-table .col-check { width: 34px; text-align: center; }
.url-table th.col-check, .url-table td.col-check { display: none; }
.url-table.url-list--selecting th.col-check,
.url-table.url-list--selecting td.col-check { display: table-cell; }
.url-table .bulk-cb { position: static; display: inline-block; margin: 0; top: auto; left: auto; }
.url-table.url-list--selecting tr:hover { cursor: pointer; }
.url-table tr[data-id]:has(.bulk-cb:checked) { background: var(--pr-secondary-transp); }

/* Cellule « Site » : mini-vignette + host + url + dossiers. */
.ut-site { display: flex; align-items: center; gap: .6rem; color: inherit; min-width: 0; }
.ut-site:hover { text-decoration: none; }
/* Ligne entièrement cliquable (→ monitor) : gérée en JS (`/js/table-row-link.js`), pas par
   une ancre « étirée ». Un `::after { position:absolute; inset:0 }` dépendrait d'un `<tr>` en
   position:relative, que WebKit (iOS Safari) n'honore pas : l'overlay se résolvait alors contre
   le bloc conteneur initial et recouvrait TOUTE la page (la dernière ligne gagnait le hit-test
   → burger/filtres/toggle inertes). Ne pas réintroduire de stretched-link sur un `<tr>`. */
.url-table tbody tr[data-id] { cursor: pointer; }
.ut-thumb { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; background: var(--gray-100); border: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: center; color: var(--gray-300); }
.ut-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ut-thumb .thumb-rss { color: #E8620A; }
.ut-site-txt { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.ut-host { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ut-url { font-size: .75rem; color: var(--gray-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22rem; }
.ut-folders { display: flex; gap: .25rem; flex-wrap: wrap; margin-top: .1rem; }
.ut-folder { font-size: .68rem; font-weight: 600; color: var(--pr-secondary-color); background: var(--pr-secondary-transp); padding: .05rem .4rem; border-radius: var(--radius-pill); }
/* La colonne Statut affiche le label par défaut ; le bouton pause/relance apparaît en
   overlay au survol de la ligne (ou au focus clavier), à la place du label — la largeur
   de colonne ne bouge pas. */
.col-status { position: relative; z-index: 2; white-space: nowrap; }
.ut-status { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; transition: opacity .12s; }
.ut-status .status-dot { width: 8px; height: 8px; }
.ut-toggle {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0; border: 1px solid var(--gray-200); border-radius: var(--radius);
  background: #fff; color: var(--gray-500); cursor: pointer; z-index: 2;
  opacity: 0; pointer-events: none; transition: opacity .12s, color .15s, border-color .15s, background .15s;
}
/* Le bouton pause n'apparaît qu'au survol de SA colonne (ou focus clavier), pas de toute
   la ligne : le reste de la ligne reste un clic « ouvrir le monitor ». */
.col-status:hover .ut-toggle,
.col-status:focus-within .ut-toggle { opacity: 1; pointer-events: auto; }
.col-status:hover .ut-status,
.col-status:focus-within .ut-status { opacity: 0; }
.ut-toggle:hover { color: var(--pr-primary-color); border-color: var(--gray-300); background: var(--gray-50); }
.ut-toggle:disabled { cursor: not-allowed; }
/* Sans survol (tactile) : pas d'affordance hover → bouton inline toujours visible. */
@media (hover: none) {
  /* relative (pas static) : le bouton reste dans le flux de la cellule, et le JS de clic-ligne
     ignore les taps sur un <button> → tap sur le bouton = pause, pas navigation. */
  .ut-toggle { position: relative; transform: none; opacity: 1; pointer-events: auto; margin-left: .4rem; vertical-align: middle; }
  .col-status:hover .ut-status, .col-status:focus-within .ut-status { opacity: 1; }
}
.ut-time { color: var(--gray-600); white-space: nowrap; }
.ut-time--muted { color: var(--gray-400); }
.ut-open { color: var(--gray-300); display: inline-flex; }
/* Le chevron se colore au survol de la ligne (parité avec le chevron de /feed). */
.url-table tbody tr:hover .ut-open,
.ut-open:hover { color: var(--pr-primary-color); }

/* Repli progressif sur petits écrans : on cache les colonnes les moins essentielles. */
@media (max-width: 960px) { .url-table .col-next { display: none; } }
@media (max-width: 780px) { .url-table .col-last { display: none; } }
@media (max-width: 640px) { .url-table .col-freq, .url-table .col-type { display: none; } .ut-url { max-width: 12rem; } }

/* ─── Mode tableau du feed (/feed) ───────────────────────────────────────────── */
/* Même mécanique binaire que le dashboard : le tableau et les cartes (.feed-list)
   coexistent, html.view-grid bascule. La règle « grille → masque le tableau »
   (html.view-grid .url-table-scroll) est déjà globale ; il ne manque que son pendant. */
html:not(.view-grid) .feed-list { display: none; }   /* mode tableau → masque les cartes du feed */

/* Ligne entièrement cliquable : même mécanique que le dashboard (`/js/table-row-link.js`).
   Cf. le commentaire du dashboard : pas de stretched-link `::after` sur un `<tr>` (cassé
   sous WebKit/iOS, l'overlay couvrait toute la page). */
.feed-table tbody tr[data-id] { cursor: pointer; }
/* Accent gauche par importance/type, calqué sur les cartes du feed. */
.feed-table tbody td:first-child { box-shadow: inset 3px 0 0 var(--gray-300); }
.feed-row--critical    td:first-child { box-shadow: inset 3px 0 0 var(--pr-primary-color); }
.feed-row--significant td:first-child { box-shadow: inset 3px 0 0 #F59E0B; }
.feed-row--minor       td:first-child { box-shadow: inset 3px 0 0 var(--pr-tertiary-color); }
.feed-row--listing     td:first-child { box-shadow: inset 3px 0 0 #6366F1; }

/* Largeurs maîtrisées (table-layout: fixed) → le tableau tient toujours dans le
   conteneur, jamais de scroll horizontal. Type/Statut/Date en px fixes, Site et
   Changement absorbent le reste (Changement prioritaire). */
.feed-table { table-layout: fixed; }
.feed-table .col-type    { width: 128px; }
.feed-table .col-scope   { width: 138px; }
.feed-table .col-when    { width: 150px; padding-right: 12px; }
.feed-table .col-actions { width: 40px; text-align: center; }
.feed-table .col-change  { width: 38%; }
/* En layout fixe, l'ellipsis des cellules Site suit la largeur réelle de la colonne. */
.feed-table .ut-host, .feed-table .ut-url { max-width: 100%; }

/* Chevron d'ouverture : affordance décorative (la ligne entière est déjà cliquable via
   `/js/table-row-link.js`). Se colore au survol de la ligne, comme .ut-open du dashboard. */
.feed-chevron { color: var(--gray-300); }
.feed-table tbody tr:hover .feed-chevron { color: var(--pr-primary-color); }

/* Colonne « Changement » : contenu clampé sur 2 lignes, le reste coupé. */
.feed-cell-change {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal; color: var(--gray-600); line-height: 1.35;
}
.feed-table .col-scope { white-space: nowrap; }
.feed-table .col-scope .badge { margin-right: .25rem; }
.feed-table .col-when { white-space: nowrap; }

/* Repli progressif : on cache d'abord la date, puis le statut, puis le type. */
@media (max-width: 860px) { .feed-table .col-when { display: none; } }
@media (max-width: 720px) { .feed-table .col-scope { display: none; } }
@media (max-width: 600px) { .feed-table .col-type { display: none; } }

/* ─── Empty state ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 3.5rem 2rem;
  color: var(--gray-500); display: flex; flex-direction: column; align-items: center; gap: 1rem;
  background: #fff; border: 1px dashed var(--gray-300); border-radius: var(--radius-lg);
}

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
.form-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); margin:auto;
  padding: 1.75rem; max-width: 720px; display: flex; flex-direction: column; gap: 1.25rem;
}
.form-card--flush { box-shadow: none; margin: 0; border: none; padding: 0; }
.form-group { display: flex; flex-direction: column; gap: .375rem; }
.form-group label { font-size: .875rem; font-weight: 500; margin-top: .5rem; }
.form-group small { font-size: .8125rem; color: var(--gray-600); }
input[type="text"], input[type="email"], input[type="password"], select, textarea, input[type=date] {
  padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius);
  font-size: .9375rem; background: #fff; color: var(--text);
  transition: border-color .15s; font-family: inherit;
}
textarea { resize: vertical; }
.pwd-wrap { position: relative; display: flex; align-items: center; }
.pwd-wrap input[type="password"], .pwd-wrap input[type="text"] { padding-right: 2.5rem; width: 100%; }
.pwd-toggle { position: absolute; right: .6rem; background: none; border: none; padding: .25rem; cursor: pointer; color: var(--gray-400); line-height: 0; }
.pwd-toggle:hover { color: var(--gray-600); }
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--pr-primary-color);
  box-shadow: 0 0 0 3px var(--pr-primary-shadow-box);
}
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; max-width: 520px; margin: 1.5rem auto 0; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; font-weight: 400; font-size: .9375rem; cursor: pointer; }

/* Toggle « slider » — input checkbox visuellement masqué mais accessible */
.switch { display: inline-flex; align-items: center; gap: .625rem; font-size: .9375rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { position: relative; flex: none; width: 40px; height: 22px; border-radius: 22px; background: var(--gray-300); transition: background .15s; }
.switch-track::before { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--pr-primary-color); }
.switch input:checked + .switch-track::before { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--pr-primary-shadow-box); }
.form-actions { display: flex; align-items: center; gap: .75rem; padding-top: .5rem; }

/* Sélecteur de type de monitor (création) */
.type-select { display: grid; gap: .5rem; }
.type-option {
  display: grid; grid-template-columns: auto 1fr; align-items: start; column-gap: .5rem;
  margin: 0; padding: .75rem 1rem; cursor: pointer;
  border: 1px solid var(--gray-200); border-radius: var(--radius);
}
.type-option:has(input:checked) {
  border-color: var(--pr-primary-color); box-shadow: 0 0 0 2px var(--pr-primary-shadow-box);
}
.type-option input { margin-top: .15rem; }
.type-option-title { grid-column: 2; font-weight: 500; font-size: .9375rem; margin: 0; }
.type-option-hint { grid-column: 2; font-size: .8125rem; color: var(--gray-600); }
.listing-advanced { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: .5rem .9rem; }
.listing-advanced summary { cursor: pointer; font-size: .875rem; font-weight: 500; }
.listing-advanced[open] summary { margin-bottom: .5rem; }

/* Settings panel form */
textarea.intent-readonly, input.intent-readonly { background: var(--gray-50); color: var(--gray-600); cursor: default; }
textarea.intent-readonly { resize: none; }
.settings-form { display: flex; flex-direction: column; gap: 1.25rem; }
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2rem;
}
@media (max-width: 600px) { .settings-grid { grid-template-columns: 1fr; } }

/* ─── Réglages : barre d'onglets repliée (Paramètres / Notifications) ─────────── */
.settings-tabs {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 3rem;
}
.settings-tab-bar { display: flex; flex-wrap: wrap; }
.settings-tabs:has(.settings-tab-panel.is-active) .settings-tab-bar { border-bottom: 1px solid var(--gray-200); }
.settings-tab-btn {
  appearance: none; background: none; border: none; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: .5rem;
  padding: .85rem 1.25rem; font-size: .9375rem; font-weight: 500; color: var(--gray-700);
}
.settings-tab-btn svg { color: var(--gray-500); flex-shrink: 0; }
.settings-tab-btn:hover { color: var(--text); }
.settings-tab-btn.is-active,
.settings-tab-btn.is-active svg { color: var(--pr-primary-color); }
.settings-tab-panel { display: none; padding: 1.1rem 1.25rem; }
.settings-tab-panel.is-active { display: block; }

/* ─── URL detail page ───────────────────────────────────────────────────────── */
.url-title-row { display: flex; align-items: center; gap: .6rem; }
.url-title { font-size: 1.2rem; font-weight: 600; word-break: break-all; }
.url-meta { font-size: .8125rem; color: var(--gray-600); margin-top: .25rem; display: flex; flex-direction: column; gap: .2rem; }
.url-full { color: var(--gray-400); word-break: break-all; }

.section-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-title-row .section-title { margin-bottom: 0; }

/* ─── Account page ──────────────────────────────────────────────────────────── */
.account-section { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.account-row { display: flex; align-items: baseline; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--gray-100); }
.account-row:last-of-type { border-bottom: none; }
.account-label { width: 9rem; flex-shrink: 0; font-size: .875rem; color: var(--gray-600); font-weight: 500; }
.account-value { font-size: .875rem; color: var(--text); }
.account-hint { font-size: .8125rem; color: var(--gray-600); margin-top: .75rem; }
.account-note { display: block; font-size: .8125rem; color: var(--gray-400); }
.members-list { display: flex; flex-direction: column; gap: .375rem; margin-bottom: .5rem; }
.member-row { display: flex; align-items: center; gap: .75rem; padding: .4rem .5rem; background: var(--gray-50); border-radius: var(--radius); }
.member-email { flex: 1; font-size: .875rem; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.permissions-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.permissions-table th, .permissions-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--gray-100); text-align: left; }
.permissions-table th { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-400); }
.permissions-table .perm-col { width: 80px; text-align: center; }
.permissions-table input[type=checkbox] { width: 1rem; height: 1rem; cursor: pointer; }
.permissions-table input[type=checkbox]:disabled { cursor: default; opacity: .4; }
.permissions-table tfoot .perm-row-unfoldered td { border-top: 2px solid var(--gray-200); background: var(--gray-50); color: var(--gray-600); }

/* ─── Diff timeline ─────────────────────────────────────────────────────────── */
.diff-timeline { display: flex; flex-direction: column; gap: 1rem; }

/* Liste des éléments détectés (monitor 'listing') */
.item-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.item-row {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s;
  padding: .75rem 1rem; display: flex; flex-direction: column; gap: .4rem;
}
.item-row:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.item-main { display: flex; align-items: baseline; gap: .5rem; min-width: 0; flex-wrap: wrap; }
.item-title { font-size: .9375rem; font-weight: 500; word-break: break-word; }
.item-date { font-size: .8125rem; color: var(--gray-600); white-space: nowrap; flex-shrink: 0; }
.item-excerpt {
  margin: 0; font-size: .9375rem; color: var(--gray-800); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.diff-entry {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 1.1rem 1.35rem;
}
.diff-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.diff-date { font-size: .8125rem; color: var(--gray-600); }
.diff-summary { font-size: .9375rem; margin-bottom: .75rem; }

/* Onglets de l'historique d'un diff (aperçu visuel / diff texte / nouveau texte) */
.diff-tabs { margin-top: .75rem; overflow: hidden; }
.diff-tab-bar { display: flex; flex-wrap: wrap; background: var(--gray-50); }
.diff-tabs:has(.diff-tab-panel.is-active) .diff-tab-bar { border-bottom: 1px solid var(--gray-200); }
.diff-tab-btn {
  appearance: none; background: none; border: none; cursor: pointer; font-family: inherit;
  padding: .5rem .9rem; font-size: .8125rem; font-weight: 500;
  color: var(--gray-600); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.diff-tab-btn:hover { color: var(--text); }
.diff-tab-btn.is-active { color: var(--text); background: #fff; border-bottom-color: var(--pr-primary-color); }
.diff-tab-panel { display: none; padding: .75rem .9rem; }
.diff-tab-panel.is-active { display: block; }
.diff-tab-panel .diff-inline { margin-top: 0; }
.diff-tab-panel .diff-frames { margin-bottom: 0; }
.diff-inline {
  margin-top: .5rem;
  border-radius: var(--radius); padding: .75rem;
  font-size: .9375rem; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.di-eq  { color: var(--gray-700); }
.di-add { background: var(--pr-tertiary-transp); color: #005a66; border-radius: 3px; }
.di-del { background: var(--pr-primary-transp);  color: var(--pr-primary-color);
          text-decoration: line-through; border-radius: 3px; }

/* Page surveillée (carte) + bouton d'aide */
.watched-page {
  margin-bottom: 1.25rem; background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1.1rem 1.35rem;
}
.watched-shot { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto;
                border: 1px solid var(--gray-200); border-radius: var(--radius); }

/* Timeline : ligne verticale + pastilles par importance */
.diff-timeline { position: relative; padding-left: 1.75rem; }
.diff-timeline::before {
  content: ''; position: absolute; left: 6px; top: .4rem; bottom: .4rem;
  width: 2px; background: var(--gray-200); border-radius: 2px;
}
.diff-entry { position: relative; }
.diff-entry::before {
  content: ''; position: absolute; top: 1.3rem; left: -1.75rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--gray-300); box-shadow: 0 0 0 3px #fff;
}
.diff-entry--critical::before    { border-color: var(--pr-primary-color); }
.diff-entry--significant::before { border-color: #F59E0B; }
.diff-entry--minor::before       { border-color: var(--pr-tertiary-color); }

/* Carte « Résumé IA » */
.ai-summary-card {
  display: flex; gap: .6rem; align-items: flex-start;
  background: var(--amber-bg); border: 1px solid var(--amber-border);
  border-radius: var(--radius); padding: .7rem .85rem; margin-bottom: .85rem;
}
.ai-summary-icon { font-size: 1rem; line-height: 1.4; flex-shrink: 0; }
.ai-summary-body { display: flex; flex-direction: column; gap: .15rem; }
.ai-summary-label { font-size: .7rem; font-weight: 700; color: var(--amber-text); text-transform: uppercase; letter-spacing: .04em; }
.ai-summary-text { font-size: .9375rem; color: var(--gray-800); line-height: 1.5; }

/* Chips d'entités */
.entity-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .85rem; }
.chip {
  font-size: .75rem; font-weight: 500; color: var(--pr-secondary-color);
  background: var(--gray-100); border-radius: var(--radius-pill); padding: .15rem .6rem;
}

/* Encart feedback (renvoie au contact) */
.feedback-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: 3rem 0 1.5rem; padding: 1.1rem 1.35rem;
  background: var(--pr-primary-transp); border: 1px solid var(--pr-primary-color); border-radius: var(--radius-lg);
}
.feedback-title { font-size: .9375rem; font-weight: 600; color: var(--pr-primary-color); }
.feedback-text { font-size: .8125rem; color: var(--gray-700); margin-top: .15rem; }
.feedback-cta { flex-shrink: 0; }
.feedback-cta svg { color: currentColor; }

/* ─── Landing ───────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 5rem 1rem 4rem; }
.hero h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.2; letter-spacing: -.03em; color: var(--pr-secondary-color); }
.hero-sub { max-width: 520px; margin: 1.25rem auto; color: var(--gray-600); font-size: 1.05rem; }
.hero-cta { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-hint { margin-top: 7px; font-size: .75rem; color: var(--gray-400); text-align: center; }
.hero-visual { margin: 2.5rem auto 0; max-width: 860px; }
.hero-visual img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
}
/* Variante deux colonnes quand le visuel produit est présent : texte à gauche,
   screenshot à droite. Sans image, le hero centré historique reste inchangé. */
.hero--split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center; text-align: left;
}
.hero--split .hero-sub  { margin: 1.25rem 0; }
.hero--split .hero-cta  { justify-content: flex-start; }
.hero--split .hero-hint { text-align: left; }
.hero--split .hero-visual { margin: 0; max-width: none; }

.features { padding: 0 0 4rem; border-bottom: 1px solid var(--gray-200); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.feature-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.25rem; border-top: 3px solid var(--pr-primary-color);
}
.feature-icon { font-size: 1.5rem; display: block; margin-bottom: .5rem; }
.feature-card h3 { font-size: .9375rem; font-weight: 600; margin-bottom: .375rem; color: var(--pr-secondary-color); }
.feature-card p { font-size: .875rem; color: var(--gray-600); }

.pricing { padding: 4rem 0 5rem; border-bottom: 1px solid var(--gray-200); }
.pricing h2 { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: .5rem; color: var(--pr-secondary-color); }
.pricing-compare { text-align: center; font-size: .875rem; color: var(--gray-600); margin-bottom: 2rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; max-width: 560px; margin: 0 auto; }
.plans--three { max-width: 840px; }
.plan {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.75rem; position: relative; display: flex; flex-direction: column;
}
.plan-pro  { border-color: var(--pr-primary-color); }
.plan-team { }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--pr-primary-color); color: #fff; font-size: .75rem; font-weight: 700;
  padding: .2rem .75rem; border-radius: 99px;
}
.plan-badge--team { background: var(--pr-secondary-color); }
.plan h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; color: var(--pr-secondary-color); }
.plan-price { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; color: var(--pr-secondary-color); }
.plan-price span { font-size: 1rem; font-weight: 400; color: var(--gray-600); }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: .375rem; margin-bottom: 1.5rem; }
.plan li { font-size: .875rem; color: var(--gray-600); }
.plan li::before { content: '✓ '; color: var(--pr-primary-color); }
.plan li.no { color: var(--gray-400); }
.plan li.no::before { content: '✗ '; color: var(--gray-300); }
.plan-note { display: block; font-size: .75rem; color: var(--gray-400); margin-top: .2rem; }
.plan .btn { margin-top: auto; }

/* ─── How it works ──────────────────────────────────────────────────────────── */
.how-it-works {
  padding: 4rem 0;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.how-it-works h2 { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 2.5rem; color: var(--pr-secondary-color); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; max-width: 860px; margin: 0 auto; }
.step {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.5rem 1.25rem; position: relative;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--pr-primary-color); color: #fff;
  font-weight: 700; font-size: .875rem; margin-bottom: .875rem;
}
.step h3 { font-size: .9375rem; font-weight: 600; margin-bottom: .375rem; color: var(--pr-secondary-color); }
.step p  { font-size: .875rem; color: var(--gray-600); }

/* ─── Use cases ─────────────────────────────────────────────────────────────── */
.usecases { padding: 4rem 0; border-bottom: 1px solid var(--gray-200); }
.usecases h2 { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 2rem; color: var(--pr-secondary-color); }
.usecase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.usecase-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.25rem; border-left: 3px solid var(--pr-tertiary-color);
}
.usecase-icon { font-size: 1.75rem; display: block; margin-bottom: .625rem; }
.usecase-card h3 { font-size: .9375rem; font-weight: 600; margin-bottom: .375rem; color: var(--pr-secondary-color); }
.usecase-card p  { font-size: .875rem; color: var(--gray-600); }

/* ─── FAQ ───────────────────────────────────────────────────────────────────── */
.faq-section { padding: 4rem 0; }
.faq-section h2 { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 2rem; color: var(--pr-secondary-color); }
.faq-list { display: flex; flex-direction: column; max-width: 700px; margin: 0 auto; }
.faq-item { margin-bottom: 5px; }
.faq-item summary {
  cursor: pointer; list-style: none; outline: none;
  border: 1px solid rgba(0,0,0,.3); border-radius: 8px;
  padding: 10px 42px 10px 16px;
  font-size: .9375rem; font-weight: 500; color: var(--pr-secondary-color);
  transition: background-color .4s, color .4s, border-color .4s;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '>'; font-size: 1.25em;
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transition: transform .2s ease;
}
.faq-item[open] summary, .faq-item summary:hover, .faq-item summary:focus {
  background-color: var(--pr-primary-color); color: #fff; border-color: #f2f5f9;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(-90deg); }
.faq-panel { padding: .625rem 18px 0; }
.faq-panel p { padding: 0 0 .875rem; font-size: .9rem; color: var(--gray-600); line-height: 1.6; margin: 0; }

/* ─── CTA banner ────────────────────────────────────────────────────────────── */
.cta-banner {
  text-align: center;
  padding: 4rem 1.25rem;
  background: var(--pr-primary-transp);
  border-radius: var(--radius);
  margin: 0 0 3rem;
}
.cta-banner h2 { font-size: 1.75rem; font-weight: 800; color: var(--pr-secondary-color); margin-bottom: .75rem; letter-spacing: -.02em; }
.cta-banner p  { font-size: 1rem; color: var(--gray-600); margin-bottom: 1.75rem; }
.btn-lg { padding: .7rem 1.75rem; font-size: 1rem; }

.hp-field { position: absolute; opacity: 0; top: 0; left: 0; height: 0; width: 0; z-index: -1; overflow: hidden; }
.contact-section { padding: 4rem 0 3rem; }
.contact-section h2 { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: .5rem; color: var(--pr-secondary-color); }
.contact-sub { text-align: center; color: var(--gray-600); font-size: 1rem; margin-bottom: 0; }
.hint { font-size: .8125rem; color: var(--gray-600); font-weight: 400; }
.required { color: var(--pr-primary-color); font-weight: 700; margin-left: .15rem; }
.contact-legal { font-size: .8rem; color: var(--gray-600); line-height: 1.5; margin-top: .25rem; }
.contact-legal a { color: var(--gray-600); text-decoration: underline; }

/* ─── Auth pages ────────────────────────────────────────────────────────────── */
.auth-page { display: flex; justify-content: center; padding: 3rem 1rem; }
.auth-card {
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: 1.25rem;
  background: #fff; padding: 2rem; border-radius: 8px;
  border-left: 4px solid var(--pr-primary-color);
  box-shadow: 0 0 9px 1px rgba(193, 210, 232, 0.7);
}
.auth-card h1 { font-size: 1.5rem; font-weight: 700; color: var(--pr-secondary-color); }
.auth-separator { text-align: center; color: var(--gray-400); font-size: .875rem; position: relative; }
.auth-separator::before, .auth-separator::after {
  content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--gray-200);
}
.auth-separator::before { left: 0; }
.auth-separator::after  { right: 0; }
.auth-switch { font-size: .875rem; color: var(--gray-600); text-align: center; }
.alert-info { background: var(--pr-tertiary-transp); color: var(--pr-tertiary-color); border: 1px solid #b2e0e4; }

/* Monitor en pause */
.url-card--paused { opacity: .6; }

/* Monitor hors quota */
.url-card--over-quota { opacity: .55; border-left: 3px solid var(--pr-primary-color); }
.badge-over-quota { background: var(--pr-primary-transp); color: var(--pr-primary-color); }

/* Monitor cassé (santé du scrape) — on ne grise pas : on attire l'attention */
.url-card--broken { border-left: 3px solid var(--pr-primary-color); }
.badge-broken { background: var(--pr-primary-transp); color: var(--pr-primary-color); }
.badge-warn   { background: #FEF3C7; color: #92400E; }

/* Filet gauche de sévérité du dernier changement — écho exact du feed */
.url-card--critical    { border-left: 3px solid var(--pr-primary-color); }
.url-card--significant { border-left: 3px solid #F59E0B; }
.url-card--minor       { border-left: 3px solid var(--pr-tertiary-color); }
.url-card--listing     { border-left: 3px solid #6366F1; }

/* Dossier désactivé (plan dégradé) */
.folder-pill--disabled {
  padding: .25rem .75rem; border-radius: 99px; font-size: .8125rem;
  border: 1px solid var(--gray-200); color: var(--gray-400);
  cursor: not-allowed; opacity: .6;
}

/* Alerte warning */
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #F59E0B; border-radius: var(--radius); padding: .75rem 1rem; font-size: .9rem; }

/* Diff iframes */
.diff-frames { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .5rem; margin-bottom:2rem;}
.diff-frame-wrap { display: flex; flex-direction: column; gap: .375rem; }
.diff-frame-label { font-size: .75rem; font-weight: 600; }
.diff-del-label { color: var(--pr-primary-color); }
.diff-add-label { color: var(--pr-tertiary-color); }
.diff-shot {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--gray-200); border-radius: var(--radius); background: #fff;
}

/* ─── Landing footer ────────────────────────────────────────────────────────── */
.landing-footer {
  border-top: 1px solid var(--gray-200);
  background: #fff;
  padding: 1.75rem 0;
  margin-top: 2rem;
}
.landing-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-brand { font-size: .8125rem; color: var(--gray-400); font-weight: 500; }
.footer-nav { display: flex; align-items: center; gap: 1.25rem; }
.footer-nav a { font-size: .8125rem; color: var(--gray-400); }
.footer-nav a:hover { color: var(--text); text-decoration: none; }

/* ─── Error page ────────────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 5rem 1rem; }
.error-page h1 { font-size: 5rem; font-weight: 800; color: var(--pr-secondary-transp); }
.error-page p { font-size: 1rem; color: var(--gray-600); margin-bottom: 1.5rem; }

/* ─── Auth buttons (toujours pleine largeur dans la card) ───────────────────── */
.auth-card .btn { width: 100%; }

/* ─── Language switcher ─────────────────────────────────────────────────────── */
.lang-switcher { display: flex; align-items: center; gap: .25rem; margin-left: .25rem; }
.lang-btn { font-size: .75rem; font-weight: 600; color: var(--gray-400); text-decoration: none; padding: .1rem .25rem; border-radius: 3px; }
.lang-btn:hover { color: var(--text); }
.lang-btn--active { color: var(--pr-primary-color); }
.lang-sep { font-size: .75rem; color: var(--gray-300); }

/* ─── Nav mobile : hamburger + drawer ───────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--gray-100); }
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gray-600);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 99;
}
.nav-overlay.is-open { display: block; }

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 240px;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, .12);
  z-index: 100;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
}
.nav-drawer.is-open { transform: translateX(0); }

.nav-drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--gray-400);
  padding: .25rem;
  margin-bottom: 1.25rem;
}
.nav-drawer-close:hover { color: var(--text); }

.nav-drawer nav {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.nav-drawer nav a { font-size: .9375rem; color: var(--gray-600); }
.nav-drawer nav a:hover { color: var(--text); text-decoration: none; }
.nav-drawer nav .btn { width: 100%; justify-content: center; }
.nav-drawer nav form { margin: 0; }

.nav-drawer-lang {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}


/* ─── Changes feed ──────────────────────────────────────────────────────────── */
.feed-list { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }

.feed-card {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem 1rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.feed-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
}
/* Filet de sévérité à gauche — écho des pastilles de la timeline */
.feed-card--critical    { border-left: 3px solid var(--pr-primary-color); }
.feed-card--significant { border-left: 3px solid #F59E0B; }
.feed-card--minor       { border-left: 3px solid var(--pr-tertiary-color); }
.feed-card--none        { border-left: 3px solid var(--gray-300); }
.feed-card--listing     { border-left: 3px solid #6366F1; }

/* Vignette : capture du check qui a produit le diff — petite (40px), simple ancrage visuel */
.feed-thumb {
  width: 40px; height: 40px; flex-shrink: 0; margin-top: .1rem;
  border-radius: 6px; overflow: hidden; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center; color: var(--gray-300);
}
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

.feed-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.feed-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.feed-host {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-url {
  font-size: .75rem;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-date {
  font-size: .8125rem;
  color: var(--gray-400);
  white-space: nowrap;
  flex-shrink: 0;
}
.feed-card-bottom {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.feed-summary {
  font-size: .875rem;
  color: var(--gray-700);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Pagination ────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 .5rem;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 6px;
  font-size: 1.375rem;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  background: var(--pr-primary-color);
  transition: opacity .15s;
}
.pagination-btn:hover { opacity: .85; }
.pagination-btn--disabled {
  opacity: .3;
  cursor: default;
  pointer-events: none;
}
.pagination-info {
  font-size: .875rem;
  color: var(--gray-500);
  min-width: 6rem;
  text-align: center;
}

/* ─── Legal pages ───────────────────────────────────────────────────────────── */
.legal-page {
  padding: 3rem 1.25rem 4rem;
  max-width: 900px;
}
.legal-page h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--pr-secondary-color);
}
.legal-updated {
  font-size: .875rem;
  color: var(--gray-500);
  margin-bottom: 2.5rem;
}
.legal-page h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 .75rem;
  color: var(--gray-900);
}
.legal-page h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 .5rem;
  color: var(--gray-700);
}
.legal-page p,
.legal-page li {
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--gray-700);
  margin-bottom: .75rem;
}
.legal-page ul {
  padding-left: 1.5rem;
  margin-bottom: .75rem;
}
.legal-page a { color: var(--pr-primary-color); }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  margin: 1rem 0 1.5rem;
}
.legal-table th,
.legal-table td {
  border: 1px solid var(--gray-200);
  padding: .5rem .75rem;
  text-align: left;
  vertical-align: top;
}
.legal-table th {
  background: var(--gray-100);
  font-weight: 600;
  color: var(--gray-700);
}
@media (max-width: 640px) {
  .legal-table { display: block; overflow-x: auto; }
}

/* ─── Responsive tablette (≤ 900px) ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .usecase-grid { grid-template-columns: repeat(2, 1fr); }
  .plans--three { max-width: 560px; }

  /* Hero deux colonnes → empilé, texte recentré, image dessous */
  .hero--split { grid-template-columns: 1fr; gap: 0; text-align: center; }
  .hero--split .hero-sub  { margin: 1.25rem auto; }
  .hero--split .hero-cta  { justify-content: center; }
  .hero--split .hero-hint { text-align: center; }
  .hero--split .hero-visual { margin: 2rem auto 0; max-width: 560px; }
}

/* ─── Responsive (≤ 640px) ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 2.5rem 1rem 2rem; }
  .hero h1 { font-size: 1.625rem; }
  .hero-sub { font-size: .9375rem; }

  .page-header { flex-direction: column; gap: .75rem; padding: 1.5rem 0 1rem; }
  .page-header-actions { flex-wrap: wrap; }

  .diff-frames { grid-template-columns: 1fr; }

  .how-it-works { margin: 0 -1.25rem; padding-left: 1.25rem; padding-right: 1.25rem; }
  .steps { grid-template-columns: 1fr; }
  .usecase-grid { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; }
  .cta-banner h2 { font-size: 1.375rem; }
  .faq-item summary { font-size: .875rem; }

  .landing-footer-inner { flex-direction: column; gap: .75rem; }
}

/* ─── Admin ─────────────────────────────────────────────────────────────────── */
.admin-section { margin-bottom: 2rem; }
.admin-section-title {
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--gray-400);
  margin-bottom: .875rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--gray-200);
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .75rem;
}
.kpi-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 1.125rem 1rem;
}
.kpi-card--critical    { border-left: 3px solid var(--pr-primary-color); }
.kpi-card--significant { border-left: 3px solid #D97706; }
.kpi-card--minor       { border-left: 3px solid var(--pr-tertiary-color); }
.kpi-value {
  font-size: 1.875rem; font-weight: 700; line-height: 1;
  color: var(--pr-secondary-color); letter-spacing: -.02em;
}
.kpi-label { font-size: .8125rem; color: var(--gray-600); margin-top: .375rem; }
.kpi-sub   { font-size: .75rem; color: var(--gray-400); margin-top: .2rem; }
.admin-chart-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 1.25rem 1rem;
}
@media (max-width: 600px) { .admin-grid { grid-template-columns: repeat(2, 1fr); } }

/* ─── Utilities (extraites des styles inline) ───────────────────────────────── */
/* Marges — échelle : 2=.5 · 3=.75 · 4=1 · 5=1.25 · 6=1.5 · 8=2 (rem) */
.mt-2 { margin-top: .5rem; }   .mb-2 { margin-bottom: .5rem; }
.mt-3 { margin-top: .75rem; }  .mb-3 { margin-bottom: .75rem; }
.mt-4 { margin-top: 1rem; }    .mb-4 { margin-bottom: 1rem; }
.mt-5 { margin-top: 1.25rem; } .mb-5 { margin-bottom: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }  .mb-6 { margin-bottom: 1.5rem; }
.mt-8 { margin-top: 2rem; }    .mb-8 { margin-bottom: 2rem; }
.mb-0 { margin-bottom: 0; }
.m-0  { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.d-inline { display: inline; }
.text-center { text-align: center; }

.mw-420 { max-width: 420px; }
.mw-480 { max-width: 480px; }
.mw-560 { max-width: 560px; }

/* Texte discret / hints */
.text-muted { color: var(--gray-600); }
.fs-xs   { font-size: .75rem; }
.hint-400 { font-size: .875rem; color: var(--gray-400); }
.hint-500 { font-size: .875rem; color: var(--gray-500); }
.hint-600 { font-size: .875rem; color: var(--gray-600); }
.txt-400 { color: var(--gray-400); }
.txt-600 { color: var(--gray-600); }
.mono { font-family: monospace; }

/* Conteneurs de page */
.container--narrow { max-width: 760px; }
.container--center { max-width: 520px; text-align: center; padding-top: 3rem; }

/* Boutons */
.btn--block { width: 100%; justify-content: center; }
.btn--xs { padding: .2rem .6rem; font-size: .8125rem; }

/* ─── Composants (extraits des styles inline) ───────────────────────────────── */
.settings-heading { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--pr-secondary-color); }
.section-title--sub { font-size: .9375rem; margin-top: 1.25rem; }
.plans--full { max-width: 100%; margin: 0 0 2rem; }
.addon-note { font-size: .9375rem; color: var(--gray-600); margin-bottom: .5rem; }
.input-readonly { background: var(--gray-50); color: var(--gray-500); }
.input-disabled { opacity: .6; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.actions-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.spacer-6 { display: block; height: 6px; }
.select-narrow { max-width: 8rem; }
.label-optional { font-weight: 400; color: var(--gray-400); }
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 1.5rem 0; }

/* Success page */
.success-title { font-size: 1.5rem; font-weight: 700; color: var(--pr-secondary-color); margin-bottom: .75rem; }

/* ─── Admin (audit + stats) ─────────────────────────────────────────────────── */
.admin-main { padding-top: 2rem; padding-bottom: 3rem; }
.admin-title { font-size: 1.375rem; }
.admin-audit-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.filter-field { display: flex; flex-direction: column; gap: .25rem; }
.table-scroll { overflow-x: auto; }
.admin-audit-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-audit-table th { text-align: left; padding: .5rem; border-bottom: 1px solid var(--gray-300); }
.admin-audit-table td { padding: .5rem; border-bottom: 1px solid var(--gray-100); }
.cell-mono { font-family: monospace; font-size: .78rem; }
.cell-nowrap { white-space: nowrap; }
.meta-summary { cursor: pointer; display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-pre { white-space: pre-wrap; word-break: break-word; margin: .5rem 0 0; background: var(--gray-50); padding: .5rem; border-radius: 4px; }
.pager { display: flex; gap: .5rem; align-items: center; justify-content: center; }

/* ─── Subscribe / billing (ex-blocs <style> inline) ─────────────────────────── */
#subscribe-form .form-card { max-width: none; }
.plan-selectable { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.plan-selectable input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.plan-selectable.selected { border-color: var(--pr-primary-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pr-primary-color) 20%, transparent); }
.plan-pro { border-color: var(--gray-200); }
.subscribe-total { font-size: 1.125rem; font-weight: 700; color: var(--pr-secondary-color); margin: 2.5rem 0 .5rem; }
.subscribe-total span { font-weight: 400; font-size: .9375rem; color: var(--gray-600); }
.addon-row { display: flex; align-items: center; gap: 1rem; }
.addon-row input[type="number"] { width: 5rem; }
.addon-price { font-size: .875rem; color: var(--gray-600); white-space: nowrap; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.invoice-table th, .invoice-table td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--gray-100); }
.invoice-table th { font-weight: 600; color: var(--gray-600); font-size: .8125rem; }
.mw-520 { max-width: 520px; }

/* ─── Sélecteur visuel (picker) ──────────────────────────────────────────────
   Layout 2 colonnes de /monitors/new : formulaire à gauche, aperçu cliquable à
   droite (sticky, il suit la saisie). Sous 1000 px on repasse en une colonne,
   l'aperçu sous le formulaire. */
/* Seule page où la largeur d'écran sert vraiment à quelque chose : la capture fait 1280 px
   et s'affiche à l'échelle de sa colonne. Sous le `.container` commun (1100 px), l'aperçu
   plafonnait à ~43 % — et à ~82 % même formulaire replié. Le reste du site reste à 1100. */
.container--picker { max-width: 1720px; }
/* Le formulaire n'a aucun besoin de grandir avec l'écran, l'aperçu si : première colonne
   bornée, seconde plafonnée à la largeur NATIVE de la capture (au-delà, on n'agrandirait
   qu'un flou). Tout le reste va à l'aperçu. */
.picker-layout { display: grid; grid-template-columns: minmax(20rem, 26rem) minmax(0, 1280px); gap: 1.5rem; align-items: start; justify-content: center; }
/* Colonne de gauche : le <form> empile plusieurs cartes (réglages, notifications) puis les
   actions — c'est lui le rail de la grille, pas la carte. */
.form-column { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.picker-layout .form-card { max-width: none; margin: 0; }
.form-column .section-title { margin-bottom: 0; }
/* Type « flux RSS » : pas de picker (l'URL du flux suffit) → on retrouve le formulaire
   seul, centré et à sa largeur d'origine plutôt qu'une colonne étroite à gauche. */
.picker-layout--solo { grid-template-columns: minmax(0, 1fr); }
.picker-layout--solo .form-column { max-width: 720px; margin: auto; width: 100%; }
.picker-panel {
  position: sticky; top: 1rem; align-self: start;
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 1.25rem;
  display: flex; flex-direction: column; gap: .625rem;
}
/* Champ URL + commandes d'aperçu sur une même ligne. Le champ absorbe la place restante ;
   les boutons ne se compriment pas (`flex: none`) et passent à la ligne si nécessaire. */
.url-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.url-row > input { flex: 1 1 16rem; min-width: 0; }
.url-row-actions { display: flex; gap: .5rem; flex: none; }
.url-row-actions .btn { white-space: nowrap; }

.picker-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.picker-title { font-size: 1rem; margin: 0; }
.picker-hint { font-size: .8125rem; color: var(--gray-600); margin: 0; }
.picker-targets { display: flex; align-items: center; flex-wrap: wrap; gap: .375rem; }
.picker-targets-label { font-size: .8125rem; color: var(--gray-600); margin-right: .25rem; }
.picker-target {
  padding: 4px 10px; font-size: .8125rem; cursor: pointer;
  background: var(--gray-50); color: var(--gray-700);
  border: 1px solid var(--gray-200); border-radius: 999px;
}
.picker-target:hover { background: var(--gray-100); }
.picker-target.is-active { background: var(--pr-primary-transp); border-color: var(--pr-primary-color); color: var(--pr-primary-color); font-weight: 600; }
.picker-progress { height: 4px; background: var(--gray-100); border-radius: 999px; overflow: hidden; }
.picker-progress-bar { height: 100%; width: 0; background: var(--pr-primary-color); transition: width .3s ease; }
.picker-status { font-size: .8125rem; color: var(--gray-600); margin: 0; min-height: 1.2em; word-break: break-word; }
.picker-status--error { color: #b91c1c; }
/* Hauteur bornée : une capture pleine page ne doit pas étirer la mise en page. */
.picker-stage { max-height: 70vh; overflow: auto; border-radius: var(--radius); background: var(--gray-50); }
.picker-stage:empty { display: none; }
/* Plafonné à la largeur native de la capture : la surbrillance est positionnée en % DANS
   ce conteneur, il doit donc coller exactement à l'image. */
.picker-canvas { position: relative; display: block; line-height: 0; max-width: 1280px; margin: 0 auto; }
.picker-img { display: block; width: 100%; height: auto; }
/* Un seul rectangle, déplacé au survol (l'élément visé est calculé en JS depuis les
   coordonnées de la souris) : `pointer-events: none` pour ne jamais masquer le curseur. */
.picker-canvas { cursor: crosshair; }
.picker-highlight {
  position: absolute; pointer-events: none;
  border: 2px solid var(--pr-primary-color); background: var(--pr-primary-shadow-box);
  border-radius: 2px;
}

@media (max-width: 1000px) {
  .picker-layout { grid-template-columns: 1fr; }
  .picker-panel { position: static; }
  /* Déjà une seule colonne : replier n'apporte rien et masquerait le formulaire pour rien. */
}
