/* =========================================================================
   Kirexo — Écrans (connexion · accueil · admin)
   S'appuie sur kirexo-ds.css (tokens, base, composants).
   ========================================================================= */

/* ---- Cadre prototype ---------------------------------------------------- */
html, body { height: 100%; }
.screens { min-height: 100vh; }
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* Sélecteur d'écran (chrome de revue, hors produit) */
.switcher {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; gap: var(--s-2); align-items: center;
  background: color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter: blur(10px);
  border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 6px;
  box-shadow: var(--shadow-3);
}
.switcher .seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; }
.switcher .seg button {
  min-height: 34px; padding: 0 var(--s-4); border: 0; background: transparent; cursor: pointer;
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); border-radius: var(--r-pill);
}
.switcher .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.switcher .divider { width: 1px; align-self: stretch; background: var(--line); margin: 2px; }
.switcher .sub { display: none; }
.switcher .sub.show { display: inline-flex; }
.switcher .tt {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 34px; padding: 0 var(--s-3);
  background: transparent; border: 0; border-radius: var(--r-pill); color: var(--ink); font-size: var(--t-sm); font-weight: 500; cursor: pointer;
}
.switcher .tt:hover { background: var(--surface-2); }
.switcher .tt .dot { width: 13px; height: 13px; border-radius: 50%; background: var(--accent); }

/* =========================================================================
   CONNEXION
   ========================================================================= */
.lg-wrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: calc(100dvh - 64px); }
/* Aside des deux pages de connexion (utilisateur ET admin) : suit le thème —
   aplat --accent-soft en clair, --surface en sombre. Ne jamais le combiner
   avec une classe de coque à fond fixe (.bo-side), qui l'écraserait en clair. */
.lg-aside {
  position: relative; padding: var(--s-9) var(--s-8);
  background: var(--accent-soft); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between;
}
[data-theme="dark"] .lg-aside { background: var(--surface); }
/* Le brand vit désormais dans le header : l'aside n'a plus que le texte + le
   pied. Ce conteneur occupe l'espace libre et centre le texte verticalement,
   le pied restant en bas (cohérent entre login user et admin). */
.lg-aside__main { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.lg-aside .wordmark { font-size: var(--t-lg); }
.lg-aside .statement {
  font-family: var(--font-serif); font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.1;
  letter-spacing: -.02em; color: var(--ink); max-width: 14ch; text-wrap: balance;
}
.lg-aside .statement em { color: var(--accent); font-style: italic; }
.lg-aside .note { font-size: var(--t-sm); color: var(--ink-2); max-width: 34ch; line-height: 1.6; }
.lg-aside .chips { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-4); }

.lg-main { display: flex; align-items: center; justify-content: center; padding: var(--s-7) var(--s-5); }
.lg-card { width: 100%; max-width: 360px; }
.lg-card h1 { font-family: var(--font-serif); font-size: var(--t-h1); margin-bottom: var(--s-2); }
.lg-card .sub { color: var(--ink-2); font-size: var(--t-base); margin-bottom: var(--s-6); }
.lg-card .note { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.6; margin-top: var(--s-3); }
/* Étape e-mail : le bouton suit directement le .field (hors .lg-form) → on lui
   redonne l'espace haut que le gap de .lg-form fournit à l'étape mot de passe. */
.lg-card .field + .btn { margin-top: var(--s-4); }
/* Récap e-mail (étape mot de passe) : input readonly habillé en simple texte —
   il sert de champ « username » aux gestionnaires de mots de passe. Le focus
   reste visible (input focusable) : on ne touche pas à :focus-visible. */
.email-recap { width: 100%; border: 0; background: transparent; padding: 0; font: inherit; color: var(--ink-2); }
.lg-form { display: flex; flex-direction: column; gap: var(--s-4); }
.lg-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.lg-row label { white-space: nowrap; }
.lg-row a { font-size: var(--t-sm); font-weight: 500; }
.lg-form .btn { width: 100%; margin-top: var(--s-2); }
/* Case « Se souvenir de moi » de la page de connexion. La zone cliquable du
   label fait office de cible (RGAA) ; la coche reprend l'accent d'instance. */
.remember-me { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-sm); color: var(--ink-2); cursor: pointer; }
.remember-me input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.lg-or { display: flex; align-items: center; gap: var(--s-3); color: var(--ink-3); font-size: var(--t-xs); margin: var(--s-5) 0; }
.lg-or::before, .lg-or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.lg-alt { text-align: center; font-size: var(--t-sm); color: var(--ink-2); }
.lg-legal { margin-top: var(--s-7); font-size: var(--t-xs); color: var(--ink-3); line-height: 1.6; }

/* Pages d'authentification secondaires (mot de passe oublié, nouveau mot de
   passe, « e-mail envoyé ») : une seule carte centrée sous le header partagé,
   même habillage que la carte de connexion mais sans l'aside motivant. */
.lg-solo { min-height: calc(100dvh - 64px); display: flex; align-items: center; justify-content: center; padding: var(--s-7) var(--s-5); }
.lg-solo .lg-card { max-width: 400px; }
.lg-back { margin-top: var(--s-6); font-size: var(--t-sm); }

@media (max-width: 820px) {
  .lg-wrap { grid-template-columns: 1fr; }
  .lg-aside { display: none; }
}

/* =========================================================================
   ACCUEIL (site public d'un auteur)
   ========================================================================= */
.hm { max-width: 760px; margin: 0 auto; padding: 0 var(--s-5); }
.hm-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-5) 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.hm-top .brand { font-family: var(--font-serif); font-size: var(--t-h3); font-weight: 600; }
.hm-actions { display: flex; gap: var(--s-2); align-items: center; }

.hm-masthead { padding: var(--s-8) 0 var(--s-6); text-align: center; border-bottom: 1px solid var(--line); }
.hm-masthead h1 { font-family: var(--font-serif); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.06; letter-spacing: -.02em; }
.hm-masthead .tagline { font-family: var(--font-serif); font-size: 1.25rem; color: var(--ink-2); margin-top: var(--s-3); font-style: italic; }
.hm-sub { display: flex; gap: var(--s-2); justify-content: center; margin-top: var(--s-5); flex-wrap: wrap; }

/* feed */
.hm-feed { padding: var(--s-6) 0 var(--s-9); }
.hm-lead { padding: var(--s-6) 0; border-bottom: 1px solid var(--line); }
.hm-lead .kicker { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.hm-lead h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; letter-spacing: -.02em; margin: var(--s-3) 0; text-wrap: balance; }
.hm-lead .stand { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.5; color: var(--ink-2); }
.hm-lead image-slot { display: block; width: 100%; aspect-ratio: 16/9; border-radius: var(--r-md); margin-bottom: var(--s-5); }

.hm-item { display: grid; grid-template-columns: 1fr auto; gap: var(--s-5); align-items: start; padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.hm-item:last-child { border-bottom: 0; }
.hm-item h3 { font-family: var(--font-serif); font-size: var(--t-h2); line-height: 1.18; margin-bottom: var(--s-2); }
.hm-item h3 a { color: var(--ink); text-decoration: none; }
.hm-item h3 a:hover { color: var(--accent); }
.hm-item .excerpt { color: var(--ink-2); font-size: var(--t-base); line-height: 1.55; max-width: 52ch; }
.hm-item .meta { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; margin-top: var(--s-3); font-size: var(--t-xs); color: var(--ink-3); }
.hm-item .thumb { width: 120px; height: 120px; border-radius: var(--r-md); overflow: hidden; flex: none; }
.hm-item .thumb image-slot { width: 100%; height: 100%; display: block; }
.chan-mini { display: inline-flex; gap: 5px; }
.chan-mini i { width: 9px; height: 9px; border-radius: 50%; display: block; }

.hm-more { display: flex; justify-content: center; padding-top: var(--s-7); }

@media (max-width: 620px) {
  .hm-item { grid-template-columns: 1fr; }
  .hm-item .thumb { width: 100%; height: 180px; order: -1; }
}

/* état vierge */
.hm-empty { max-width: 540px; margin: 0 auto; padding: var(--s-9) var(--s-5); text-align: center; }
.hm-empty .glyph {
  width: 64px; height: 64px; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin: 0 auto var(--s-5);
}
[data-theme="dark"] .hm-empty .glyph { background: var(--surface-2); }
.hm-empty .glyph svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.hm-empty h1 { font-family: var(--font-serif); font-size: var(--t-h1); margin-bottom: var(--s-3); }
.hm-empty p { color: var(--ink-2); font-size: var(--t-lg); line-height: 1.6; margin-bottom: var(--s-6); }
.hm-empty .cta { display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; }
.hm-steps {
  margin-top: var(--s-8); text-align: left; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden;
}
.hm-step { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); }
.hm-step:first-child { border-top: 0; }
.hm-step .n { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); flex: none; }
.hm-step .tx { font-size: var(--t-sm); }
.hm-step .tx b { display: block; color: var(--ink); }
.hm-step .tx span { color: var(--ink-3); }
.hm-step .done { color: var(--ok); margin-left: auto; }
.hm-step .done svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* =========================================================================
   ADMINISTRATION (coque distincte)
   ========================================================================= */
.bo-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

.bo-side {
  /* Barre latérale de la coque admin (.bo-shell, maquette du DS) : fond sombre
     fixe dans les deux thèmes, signal « back-office ». Réservée à la navigation
     de la coque : la page de connexion admin n'utilise plus que .lg-aside, qui
     suit le thème (#302, DC20). */
  --s-bg: #191F27; --s-ink: #E8EBEF; --s-ink2: #98A2AE; --s-line: #2A323D; --s-hover: #222A34;
  background: var(--s-bg); color: var(--s-ink);
  display: flex; flex-direction: column; padding: var(--s-5) var(--s-4);
  position: sticky; top: 0; height: 100vh;
}
.bo-brand { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-2) var(--s-5); }
.bo-brand .glyph { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--font-serif); font-size: 18px; font-weight: 600; }
.bo-brand .nm { font-weight: 700; letter-spacing: -.01em; }
.bo-brand .tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--s-ink2); border: 1px solid var(--s-line); border-radius: var(--r-sm); padding: 2px 6px; margin-left: 2px; }

.bo-nav { display: flex; flex-direction: column; gap: 2px; margin-top: var(--s-3); }
.bo-nav .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--s-ink2); padding: var(--s-4) var(--s-3) var(--s-2); }
.bo-nav a {
  position: relative; /* ancre du repère ::before, sans effet sur le flux */
  display: flex; align-items: center; gap: var(--s-3); padding: 10px var(--s-3); border-radius: var(--r-md);
  color: var(--s-ink2); text-decoration: none; font-size: var(--t-sm); font-weight: 500; min-height: 40px;
}
.bo-nav a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: none; }
.bo-nav a:hover { background: var(--s-hover); color: var(--s-ink); }
.bo-nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.bo-nav a .count { margin-left: auto; font-size: var(--t-xs); font-weight: 700; background: var(--s-hover); color: var(--s-ink); padding: 1px 8px; border-radius: var(--r-pill); }
/* Repère d'état non coloré (WCAG 1.4.11) : barre --s-ink dans la gouttière gauche,
   adjacente au seul --s-bg (13,87:1, constant). Le fond accent seul tombe à 1,22:1
   en clair (graphite). Hors pastille : ne recouvre ni le texte ni l'anneau de focus ;
   tracée en border pour survivre à forced-colors. */
.bo-nav a[aria-current="page"]::before {
  content: ""; position: absolute;
  left: calc(-1 * var(--s-3)); top: var(--s-2); bottom: var(--s-2);
  border-left: var(--s-1) solid var(--s-ink); border-radius: var(--r-pill);
}
/* Compteur de l'item actif : pastille --s-bg + texte --s-ink (13,87:1) */
.bo-nav a[aria-current="page"] .count { background: var(--s-bg); color: var(--s-ink); }
.bo-side .bo-foot { margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--s-line); }
.bo-side .back { display: flex; align-items: center; gap: var(--s-2); color: var(--s-ink2); text-decoration: none; font-size: var(--t-sm); padding: 8px var(--s-3); border-radius: var(--r-md); }
.bo-side .back:hover { background: var(--s-hover); color: var(--s-ink); }
.bo-side .back svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.bo-user { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); margin-top: var(--s-1); }
.bo-user .av { width: 34px; height: 34px; border-radius: 50%; background: var(--s-hover); display: grid; place-items: center; font-family: var(--font-serif); font-weight: 600; color: var(--s-ink); font-size: 14px; }
.bo-user .who { line-height: 1.2; } .bo-user .who b { font-size: var(--t-sm); } .bo-user .who span { font-size: var(--t-xs); color: var(--s-ink2); }

/* main applicatif */
.bo-main { background: var(--surface-2); min-width: 0; }
.bo-bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-6); background: color-mix(in oklab, var(--surface-2) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.bo-bar h1 { font-family: var(--font-sans); font-size: var(--t-h2); font-weight: 700; letter-spacing: -.02em; }
.bo-search { margin-left: auto; position: relative; }
.bo-search input { width: 240px; padding-left: 36px; min-height: 40px; }
.bo-search svg { position: absolute; left: 11px; top: 11px; width: 18px; height: 18px; stroke: var(--ink-3); fill: none; stroke-width: 1.8; }

.bo-body { padding: var(--s-6); max-width: 1180px; }
.bo-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-4); }
.bo-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); }
.bo-stat .k { font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: var(--s-2); }
.bo-stat .k svg { width: 16px; height: 16px; stroke: var(--ink-3); fill: none; stroke-width: 1.8; }
.bo-stat .v { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; margin-top: var(--s-2); font-variant-numeric: tabular-nums; }
.bo-stat .d { font-size: var(--t-xs); margin-top: 4px; }
.bo-stat .d.up { color: var(--ok); } .bo-stat .d.flat { color: var(--ink-3); }

.bo-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--s-5); margin-top: var(--s-6); }
.bo-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.bo-panel .ph { display: flex; align-items: center; justify-content: space-between; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
.bo-panel .ph h2 { font-family: var(--font-sans); font-size: var(--t-h3); font-weight: 700; }
.bo-panel .ph a { font-size: var(--t-sm); font-weight: 600; }

.bo-table { width: 100%; }
.bo-tr { display: grid; grid-template-columns: 1fr auto auto auto; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); }
.bo-tr:hover { background: var(--surface-2); }
.bo-tr .ti { font-family: var(--font-serif); font-size: var(--t-lg); color: var(--ink); }
.bo-tr .mt { font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; }
.bo-tr .views { font-size: var(--t-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; min-width: 64px; }

.bo-mod { padding: var(--s-2) 0; }
.bo-modrow { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); }
.bo-modrow:first-child { border-top: 0; }
.bo-modrow .who { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.bo-modrow .who b { font-size: var(--t-sm); } .bo-modrow .who .h { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-3); }
.bo-modrow .tx { font-size: var(--t-sm); color: var(--ink-2); margin: 6px 0 var(--s-3); line-height: 1.45; }
.bo-modrow .ops { display: flex; gap: var(--s-2); }

.bo-chanrow { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line); font-size: var(--t-sm); }
.bo-chanrow:first-child { border-top: 0; }
.bo-chanrow .nm { color: var(--ink); font-weight: 500; }
.bo-chanrow .st { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 600; }
.bo-chanrow .st.ok { color: var(--ok); } .bo-chanrow .st.off { color: var(--warn); }
.bo-chanrow .st .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

@media (max-width: 1080px) { .bo-grid { grid-template-columns: 1fr; } .bo-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .bo-shell { grid-template-columns: 1fr; } .bo-side { display: none; } }

/* ============================================================
   LOT 4 — Dashboards (utilisateur & admin) + page Réglages
   ============================================================ */

/* Bouton large : CTA dominant du dashboard utilisateur. */
.btn-lg { padding: var(--s-4) var(--s-7); font-size: var(--t-lg); }

/* --- Dashboard utilisateur (/u) --- */
.ud { max-width: 720px; margin: 0 auto; padding: var(--s-7) 0; }
.ud-head { text-align: center; }
.ud-kicker { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.ud-head h1 { font-family: var(--font-serif); margin: var(--s-2) 0; }
.ud-lead { color: var(--ink-2); }
.ud-cta { display: flex; justify-content: center; margin: var(--s-7) 0; }
.ud-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.ud-stat { display: flex; flex-direction: column; gap: var(--s-2); }
.ud-stat .k { font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; }
.ud-stat .v { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ud-empty { color: var(--ink-3); }
.ud-switch { margin-top: var(--s-7); text-align: center; }
@media (max-width: 720px) { .ud-stats { grid-template-columns: 1fr; } }

/* --- Espace admin : conteneur aligné sur /u (.ud-home) --- */
/* Mêmes largeur et marges pour tous les écrans admin (dashboard, réglages,
   détail) : corrige le contenu collé aux bords. */
.bo-space__main { max-width: 1120px; margin: 0 auto; padding: clamp(var(--s-6), 5vw, var(--s-9)) clamp(var(--s-4), 4vw, var(--s-7)); }

/* --- Dashboard admin (/admin) : cockpit de modération & conformité --- */
.bo-dash__head { margin-bottom: var(--s-6); }
.bo-dash__head h1 { font-family: var(--font-sans); font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; margin-top: var(--s-2); }
.bo-dash__sub { color: var(--ink-2); margin-top: var(--s-2); max-width: 60ch; }
.bo-dash__empty { color: var(--ink-3); padding: var(--s-5) 0; }
.bo-dash__list { margin-top: var(--s-7); }
.bo-dash__list-title { font-family: var(--font-sans); font-size: var(--t-h3); font-weight: 700; margin-bottom: var(--s-4); display: flex; align-items: baseline; gap: var(--s-2); }
.bo-dash__count { font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* KPI cliquables = filtres du tableau. Chaque carte est un vrai lien ; la carte
   active (filtre courant) est mise en évidence, « À analyser » garde un indice
   d'accent (nombre) tant qu'il reste des publiés non analysés. */
.bo-stat--link { display: block; text-decoration: none; color: inherit; cursor: pointer; transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease; }
.bo-stat--link:hover { border-color: var(--accent); }
.bo-stat--link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Priorité « à analyser » : nombre en accent (indice discret, pas un état sélectionné). */
.bo-stat--accent .v { color: var(--accent); }
/* Filtre actif : carte sélectionnée (bordure + fond accent). */
.bo-stat.is-active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.bo-stat.is-active .k { color: var(--accent); }
.bo-stat.is-active .v { color: var(--accent); }

/* Bouton retour explicite (Réglages) : icône flèche + libellé, aligné à gauche. */
.bo-back { margin-bottom: var(--s-5); }
.bo-articles { border: 1px solid var(--line); border-radius: var(--r-lg); border-collapse: separate; overflow: hidden; }
.bo-articles th { text-align: left; font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.bo-articles td { padding: var(--s-4); border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--ink); vertical-align: top; }
.bo-articles__excerpt { color: var(--ink-2); max-width: 32rem; }

/* --- Page Réglages (/admin/reglages) --- */
.bo-settings { max-width: 640px; }
.bo-settings__lead { color: var(--ink-2); margin-top: var(--s-2); }
.bo-settings__form { margin-top: var(--s-6); }
.bo-accents { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
.bo-accents legend { font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; padding: 0 var(--s-2); }
.bo-accent { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.bo-accent:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 28%, transparent); }
/* La pastille prend la couleur de l'accent porté par le label (data-accent). */
.bo-accent__dot { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); flex: none; }
.bo-accent__label { font-size: var(--t-sm); color: var(--ink); }
/* Thème sombre : chaque label porte data-accent mais pas data-theme, donc la
   projection [data-theme="dark"][data-accent] (sur <html>) ne l'atteint pas.
   On rebascule sa famille d'accent sur la variante --da-* du label (0,3,0 > 0,1,0). */
[data-theme="dark"] .bo-accent[data-accent] {
  --accent: var(--da-accent); --accent-hover: var(--da-accent-hover); --accent-ink: var(--da-accent-ink);
  --accent-soft: var(--da-accent-soft); --accent-line: var(--da-accent-line);
}
.bo-settings__actions { margin-top: var(--s-5); }

/* ============================================================
   Header partagé (accueil + espaces user/admin) + sélecteur de thème
   ============================================================ */

/* Chrome d'entête : marque à gauche, actions à droite.
   Hauteur fixe 64px : sert de référence au calc des pages de login. */
.header { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 64px; box-sizing: border-box; padding: var(--s-3) var(--s-6); border-bottom: 1px solid var(--line); background: var(--surface); }
/* Le brand reprend l'allure .wordmark du DS (glyphe accent + texte sans-serif). */
.header__brand { color: var(--ink); text-decoration: none; }
.header__brand:hover, .header__brand:hover .header__brand-text { color: var(--accent); }
/* Pastille « Admin » = .tag du DS ; seul ajustement : fond --surface pour
   ressortir sur le header admin (lui-même en --surface-2). */
.header__tag { background: var(--surface); }
.header__actions { display: flex; align-items: center; gap: var(--s-4); }
.header__switch, .header__logout { margin: 0; }
.header--admin { background: var(--surface-2); }
@media (max-width: 640px) {
  .header { padding: var(--s-3) var(--s-4); gap: var(--s-3); }
}

/* Sélecteur de thème tri-état (clair / sombre / système). Câblé par theme.js ;
   aria-pressed="true" marque le mode actif. Boutons alignés sur .btn-sm (34px). */
.theme-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 2px; background: var(--surface-2); border: 1px solid var(--field-border); border-radius: var(--r-pill); }
.theme-toggle__btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; background: transparent; border-radius: var(--r-pill); color: var(--ink-3); cursor: pointer; }
.theme-toggle__btn svg { width: 17px; height: 17px; }
.theme-toggle__btn:hover { color: var(--ink); }
/* État pressé : anneau --field-border (≥ 3:1), le seul fond --surface sur --surface-2 ne suffit pas */
.theme-toggle__btn[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 1px var(--field-border), var(--shadow-1); }

/* === TICKET #45 — ÉDITION D'ARTICLE === */
/* Éditeur pleine hauteur façon WriteFreely : barre haute fixe, canevas central,
   pied fixe aligné sur la largeur du champ. Hauteur = fenêtre moins le header. */
/* Scopé au conteneur externe (`.js-article-editor`) : le `.ProseMirror` de milkdown
   porte aussi la classe générique `editor` — sans ce scope, il héritait du fond
   `--paper` et de la hauteur du conteneur (fond incohérent au scroll en mode sombre). */
/* Largeur calibrée pour ~66 caractères par ligne (idéal Bringhurst), mesurée en
   Newsreader 19px : 66 × 9,75px ≈ 644px de texte + gouttières (88px g. + 48px d.). */
.editor.js-article-editor { --editor-width: 48.75rem; display: flex; flex-direction: column; height: calc(100dvh - 64px); background: var(--paper); }
.editor-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--line); background: var(--paper); }
.editor-top .left { display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-sm); color: var(--ink-2); }
.editor-tools { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.editor-tools form { margin: 0; }

/* ---- Destinations de publication : bandeau SOUS le canevas (rattaché à l'article),
   aligné sur la largeur d'écriture comme le pied. Une carte par plugin (toggle +
   aperçu réunis), pensée pour l'empilement quand d'autres canaux (RSS, Api,
   Mastodon) arriveront. Masqué entièrement si aucune destination active. ---- */
.editor-destinations { width: 100%; max-width: var(--editor-width); margin: 0 auto; padding: var(--s-4) var(--s-5); background: var(--paper); border-top: 1px solid var(--line-2); }
.editor-destinations fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.editor-destinations legend { padding: 0; font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }

.dest { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-2) var(--s-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }

.dest-toggle { display: inline-flex; align-items: center; gap: var(--s-2); margin: 0; cursor: pointer; }
/* Checkbox natif masqué visuellement mais focusable : accessibilité clavier préservée,
   role="switch" annonce on/off ; l'apparence est portée par .dest-switch. */
.dest-toggle input[type="checkbox"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dest-switch { flex: none; position: relative; width: 2.25rem; height: 1.25rem; border-radius: 999px; background: var(--field-border); transition: background 0.15s ease; } /* piste éteinte ≥ 3:1 (WCAG 1.4.11) */
.dest-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.25rem - 4px); height: calc(1.25rem - 4px); border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s ease; }
.dest-toggle input:checked + .dest-switch { background: var(--accent); }
.dest-toggle input:checked + .dest-switch::after { transform: translateX(1rem); }
.dest-toggle input:focus-visible + .dest-switch { outline: 2px solid var(--accent); outline-offset: 2px; }

.dest-label { font-weight: 600; color: var(--ink); }
.dest-lock { font-size: var(--t-sm); }

/* Aperçu : actif uniquement quand la destination est activée (sinon grisé, inerte). */
.dest-preview { margin-left: auto; white-space: nowrap; font-size: var(--t-sm); color: var(--accent); text-decoration: none; }
.dest-preview:hover, .dest-preview:focus-visible { text-decoration: underline; }
.dest-preview.is-disabled { margin-left: auto; color: var(--ink-3); cursor: not-allowed; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
    .dest-switch, .dest-switch::after { transition: none; }
}

/* Canevas : fond légèrement distinct (--surface-2) pour détacher le champ, qui est
   centré sur la largeur de lecture. Le scroll vit sur le champ, pas sur le canevas. */
.editor-canvas { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; background: var(--surface-2); padding: var(--s-5); }

/* ---- Titraille inline : bloc-titre dans la colonne de lecture, posé au-dessus du
   corps Milkdown et fondu avec sa carte (même largeur, même surface, coins hauts
   arrondis). Le padding gauche reprend celui du .ProseMirror pour aligner le titre
   sur la colonne de texte. ---- */
.editor-titraille {
    width: 100%; max-width: var(--editor-width); margin: 0 auto;
    background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: var(--shadow-1);
    /* padding-bottom NON nul : le dernier champ (chapô) ne doit pas toucher le
       corps Milkdown qui suit — sinon l'outline de focus (offset 4px + 2px) déborde
       sous la titraille et le corps opaque en recouvre le bas (cadre coupé), et le
       placeholder du corps colle au chapô. La surface reste continue (même token). */
    padding: var(--s-6) var(--s-7) var(--s-4) calc(var(--s-8) + var(--s-5));
    display: flex; flex-direction: column; gap: var(--s-2);
}
/* Fond avec titraille : le corps perd ses coins hauts pour ne faire qu'une page. */
.editor-canvas:has(.editor-titraille) .article-editor {
    border-top-left-radius: 0; border-top-right-radius: 0;
}

/* Base commune des champs de titraille : contrôles natifs sans chrome de formulaire. */
.editor-titraille input, .editor-titraille textarea {
    border: 0; background: transparent; width: 100%; color: var(--ink);
    padding: var(--s-1) 0; resize: none; font-family: var(--font-serif);
}
.editor-titraille ::placeholder { color: var(--ink-3); }
.editor-titraille input:focus-visible, .editor-titraille textarea:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r-sm);
}

/* Identité typographique de la titraille (distincte du corps — cf. site-article-*). */
.editor-kicker {
    font-family: var(--font-sans); font-size: var(--t-sm); font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.editor-title {
    font-size: var(--reading-h1); font-weight: 700; line-height: 1.1;
    letter-spacing: -.02em;
}
.editor-subtitle {
    font-size: var(--reading-h3); font-weight: 400; color: var(--ink-2);
}
.editor-standfirst {
    font-size: 1.1em; font-weight: 500; line-height: 1.45; color: var(--ink);
}

/* ---- Champs FANTÔMES (kicker / subtitle / standfirst) : au repos, s'ils sont
   VIDES (placeholder affiché), ils se replient et disparaissent (ni ligne ni
   cadre), tout en restant focusables au clavier. Le titre, lui, n'est jamais
   fantôme. Révélation = CSS pur (survol / focus de la zone), OU dès qu'ils sont
   remplis (ne matchent plus :placeholder-shown). ---- */
.editor-kicker:placeholder-shown,
.editor-subtitle:placeholder-shown,
.editor-standfirst:placeholder-shown {
    max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; overflow: hidden;
    transition: max-height 140ms ease, opacity 140ms ease;
}
.editor-titraille:hover .editor-kicker:placeholder-shown,
.editor-titraille:hover .editor-subtitle:placeholder-shown,
.editor-titraille:hover .editor-standfirst:placeholder-shown,
.editor-titraille:focus-within .editor-kicker:placeholder-shown,
.editor-titraille:focus-within .editor-subtitle:placeholder-shown,
.editor-titraille:focus-within .editor-standfirst:placeholder-shown {
    max-height: 6em; opacity: 1;
}

/* Dégradé sans-JS : sans la classe .js sur <html>, on garde tous les champs
   visibles (pas de repli), pour qu'ils restent découvrables et éditables. */
html:not(.js) .editor-kicker:placeholder-shown,
html:not(.js) .editor-subtitle:placeholder-shown,
html:not(.js) .editor-standfirst:placeholder-shown {
    max-height: none; opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .editor-kicker:placeholder-shown,
    .editor-subtitle:placeholder-shown,
    .editor-standfirst:placeholder-shown { transition: none; }
}

/* ---- Inspecteur : disclosure natif ancré à droite (mêmes primitives que
   .editor-menu). Panneau en surface DS. ---- */
.editor-inspector { position: relative; }
.editor-inspector > summary { list-style: none; cursor: pointer; }
.editor-inspector > summary::-webkit-details-marker { display: none; }
.editor-inspector__panel {
    position: absolute; right: 0; top: calc(100% + var(--s-2)); z-index: 20;
    min-width: 300px; display: flex; flex-direction: column; gap: var(--s-4);
    padding: var(--s-4); background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-md); box-shadow: var(--shadow-2);
}
.editor-inspector__help { font-size: var(--t-xs); color: var(--ink-3); margin-top: 4px; }

/* Le champ (et l'aperçu) : carte --surface mise en avant, c'est LUI qui défile.
   Interligne 1.5 (plancher WCAG 1.4.12) ; césure auto (suit l'attr lang de la page)
   avec garde-fou sur les mots courts ; chiffres elzéviriens (Newsreader `onum`) plus
   doux dans le texte courant ; caret accentué (repère de focus). */
.article-editor, .editor-preview { flex: 1; min-height: 0; width: 100%; max-width: var(--editor-width); overflow-y: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); font-family: var(--font-serif); font-size: var(--reading); line-height: 1.5; color: var(--ink); hyphens: auto; hyphenate-limit-chars: 6 3 3; font-variant-numeric: oldstyle-nums; caret-color: var(--accent); }
.article-editor ::selection, .editor-preview ::selection { background: var(--accent-soft); }

/* Variante « encadrée » : l'éditeur posé dans un FORMULAIRE EN FLUX, et non dans le
   conteneur de hauteur définie de l'écran d'article. Les valeurs de base (`flex: 1`,
   `min-height: 0`, 40vh de padding bas, ombre sans bordure) supposent un parent qui
   donne la hauteur ; sans lui le bloc n'en a aucune, ne se distingue pas du fond, et
   son padding repousse la barre d'actions hors de l'écran.
   La contrainte vit ici, à côté du composant, plutôt que dans la feuille de l'écran
   qui l'emploie : c'est une variante de son API, pas une correction depuis l'extérieur. */
.article-editor--boxed {
    flex: none;
    min-height: 20rem;
    max-height: 60vh;
    max-width: 100%;
    border: 1px solid var(--field-border);
    border-radius: var(--r-md);
    box-shadow: none;
}

.article-editor--boxed .ProseMirror { padding: var(--s-4) var(--s-5); }

/* Sans JavaScript, ce conteneur reste VIDE (Stimulus le remplit) : le laisser visible
   afficherait un cadre de 20rem sous le vrai champ « Contenu » — un second champ
   d'apparence cassée, qui repousserait les actions hors de l'écran. C'est exactement
   le défaut que la variante corrige, réintroduit sur le chemin de repli. */
html:not(.js) .article-editor--boxed { display: none; }
/* L'aperçu n'est pas éditable : le padding reste sur la carte. */
.editor-preview { padding: var(--s-6) var(--s-7) var(--s-6) var(--s-8); }
/* Hôte Milkdown épuré : le contenteditable interne EST l'unique champ (étape 7),
   sans cadre ni anneau — le caret signale le focus (toolbar : :focus-visible conservé). */
/* ATTENTION layout : la carte est le scroller — ses enfants doivent pouvoir GRANDIR
   avec le document. Un `flex` sur la carte figerait .milkdown/.ProseMirror à la hauteur
   VISIBLE (contenu en overflow) : le padding-bottom sortirait du scroll (plus de
   « scroll beyond end », machine à écrire impossible en fin de document). */
.article-editor .milkdown, .article-editor .ProseMirror { outline: none; }
.article-editor .milkdown { position: relative; min-height: 100%; display: flex; flex-direction: column; }
/* Le padding est porté par l'ÉDITABLE (pas la carte) : ainsi .ProseMirror remplit toute
   la carte — pas de « zone morte » blanche hors éditable où un drop dupliquerait le bloc
   (comportement de la démo Crepe : l'éditable occupe tout le cadre). */
/* Padding bas généreux (« scroll beyond end » façon iA Writer) : la dernière ligne
   n'est jamais collée au bord bas de l'écran pendant l'écriture. `position: relative`
   ancre le placeholder ::before (document vide). */
.article-editor .ProseMirror { position: relative; flex: 1; padding: var(--s-6) var(--s-7) 40vh calc(var(--s-8) + var(--s-5)); }

/* Placeholder sur document vide (un seul paragraphe sans texte) : hors flux pour ne
   pas décaler le caret ; le texte vient de `data-placeholder` (posé par le contrôleur
   depuis le template — traduisible). La classe `.is-empty` est pilotée par le contrôleur
   depuis le MODÈLE ProseMirror (voir editor_controller#refreshPlaceholder) : un sélecteur
   CSS structurel matchait à tort une ligne finissant par une espace (Firefox insère un
   `<br>` de fin de ligne, et `:only-child` ignore les nœuds texte). */
.article-editor .ProseMirror::before { content: attr(data-placeholder); position: absolute; top: var(--s-6); left: calc(var(--s-8) + var(--s-5)); color: var(--ink-3); pointer-events: none; display: none; }
.article-editor .ProseMirror.is-empty::before { display: block; }

/* --- Rythme vertical du contenu (édition + aperçu) -----------------------
   Patron « flow »/owl : UN espace entre blocs adjacents, en une seule
   direction (`margin-top`) → pas de margin-collapse ni de double-marge.
   Valeurs en `em` (proportionnelles à la taille), dérivées de l'interligne.
   Règle mentale : « ENTRE » les blocs = margin-top (owl) ; « DEDANS » un bloc
   (citation) = padding. Un seul bouton, `--flow`, règle toute la densité. */
/* `--flow-heading` est résolu en em DU TITRE : 1.75em × h2 28px ≈ 49px avant,
   pour ~24px après → ratio ≈ 2:1 (le titre appartient à ce qui le suit). */
.article-editor .ProseMirror, .editor-preview { --flow: 1.25em; --flow-heading: 1.75em; --flow-tight: 0.35em; }

/* Reset : aucun bloc n'a de marge propre — on possède tout le rythme. Couvre TOUT
   ce que commonmark + gfm peuvent produire (h4-h6 via ####, pre via ```, table gfm),
   sinon les marges UA du navigateur cassent le rythme précisément sur ces blocs. */
.article-editor .ProseMirror :where(p, h1, h2, h3, h4, h5, h6, ul, ol, li, blockquote, hr, pre, table, figure),
.editor-preview :where(p, h1, h2, h3, h4, h5, h6, ul, ol, li, blockquote, hr, pre, table, figure) { margin: 0; }

/* Espace entre blocs (1er niveau + intérieur des citations). */
.article-editor .ProseMirror > * + *, .article-editor .ProseMirror blockquote > * + *,
.editor-preview > * + *, .editor-preview blockquote > * + * { margin-top: var(--flow); }

/* Items de liste (et contenu d'item) : plus serrés — ils forment un groupe. */
.article-editor .ProseMirror li + li, .article-editor .ProseMirror li > * + *,
.editor-preview li + li, .editor-preview li > * + * { margin-top: var(--flow-tight); }

/* Plus d'air AVANT un titre qu'après (Gestalt : le titre appartient à ce qui SUIT). */
.article-editor .ProseMirror > * + :is(h1, h2, h3, h4, h5, h6),
.editor-preview > * + :is(h1, h2, h3, h4, h5, h6) { margin-top: var(--flow-heading); }

/* Tailles de titres : tokens DS (échelle modulaire ×1.2 sur --reading), `balance`
   équilibre les titres sur deux lignes ; `pretty` chasse les mots orphelins en fin
   de paragraphe (veuves/orphelines — dégradation silencieuse hors Chromium récent). */
.article-editor .ProseMirror :is(h1, h2, h3, h4, h5, h6), .editor-preview :is(h1, h2, h3, h4, h5, h6) { text-wrap: balance; }
.article-editor .ProseMirror :is(p, li, blockquote), .editor-preview :is(p, li, blockquote) { text-wrap: pretty; }
.article-editor .ProseMirror h1, .editor-preview h1 { font-size: var(--reading-h1); }
.article-editor .ProseMirror h2, .editor-preview h2 { font-size: var(--reading-h2); }
.article-editor .ProseMirror h3, .editor-preview h3 { font-size: var(--reading-h3); }

/* Habillage listes / citation (structure, pas rythme). */
.article-editor .ProseMirror ul, .editor-preview ul { list-style: disc; padding-inline-start: 1.4em; }
.article-editor .ProseMirror ol, .editor-preview ol { list-style: decimal; padding-inline-start: 1.6em; }
/* Citation : retrait + barre d'accent + encre atténuée suffisent — pas d'italique
   en continu (fatigant sur une citation longue, cf. Butterick). */
.article-editor .ProseMirror blockquote, .editor-preview blockquote { padding: var(--s-3) var(--s-4); border-left: 3px solid var(--accent); color: var(--ink-2); }

/* Blocs de code (```) et tableaux (gfm) : sobres, dans le rythme. */
.article-editor .ProseMirror pre, .editor-preview pre { padding: var(--s-3) var(--s-4); background: var(--surface-2); border-radius: var(--r-sm); overflow-x: auto; font-family: var(--font-mono); font-size: .85em; line-height: 1.5; }
.article-editor .ProseMirror pre code, .editor-preview pre code { background: none; padding: 0; font-size: 1em; }
.article-editor .ProseMirror table, .editor-preview table { border-collapse: collapse; font-family: var(--font-sans); font-size: .85em; }
.article-editor .ProseMirror :is(th, td), .editor-preview :is(th, td) { padding: var(--s-2) var(--s-3); border: 1px solid var(--line); text-align: left; }

/* Pied aligné sur la largeur du champ (montre où se trouve la zone de saisie). */
.editor-foot { width: 100%; max-width: var(--editor-width); margin: 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: var(--s-4); padding: var(--s-3) var(--s-5); border-top: 1px dashed var(--line-2); background: var(--paper); font-size: var(--t-sm); }

/* Statuts non couverts par le DS de base. */
.status.unpublished { background: var(--surface-2); color: var(--ink-2); }
.status.trashed { background: var(--warn-soft); color: var(--warn); }

/* Barre de mise en forme : boutons compacts, cibles ≥ 44px, focus clavier conservé. */
.article-toolbar { display: flex; gap: var(--s-1); flex-wrap: wrap; }
.article-toolbar button { min-height: 44px; min-width: 44px; padding: 0 var(--s-3); border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font-size: var(--t-sm); cursor: pointer; }
.article-toolbar button svg { width: 18px; height: 18px; vertical-align: middle; }
.article-toolbar button:hover { background: var(--surface-2); color: var(--ink); }
.article-toolbar button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* Barre-bulle de formatage inline (plugin-tooltip) sur sélection — habillée au DS. */
.editor-bubble { position: absolute; top: 0; left: 0; z-index: 30; display: flex; gap: var(--s-1); padding: var(--s-1); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
/* Le provider (plugin-tooltip) bascule data-show ; à nous de masquer au repos. */
.editor-bubble[data-show="false"] { display: none; }
.editor-bubble button { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 44px; padding: 0 var(--s-2); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font-size: var(--t-sm); cursor: pointer; }
.editor-bubble button svg { display: block; width: 18px; height: 18px; }
/* Popin de saisie d'URL (remplace window.prompt), positionnée sous la sélection. */
.editor-link-popin { position: fixed; z-index: 40; display: flex; gap: var(--s-1); padding: var(--s-1); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); font-family: var(--font-sans); }
.editor-link-popin[data-show="false"] { display: none; }
.editor-link-popin input { min-width: 240px; height: 36px; padding: 0 var(--s-2); border: 1px solid var(--field-border); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); font-size: var(--t-sm); }
.editor-link-popin button { height: 36px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); font-size: var(--t-sm); cursor: pointer; }
.editor-bubble button:hover { background: var(--surface-2); color: var(--ink); }

/* Code inline et filet horizontal (édition + aperçu). */
.article-editor .ProseMirror code, .editor-preview code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: var(--r-sm); }
.article-editor .ProseMirror hr, .editor-preview hr { border: 0; border-top: 1px solid var(--line); }

/* Poignée de bloc façon Obsidian (plugin-block) : ⠿ glisser-réordonner + « + » insérer.
   Contrôle contextuel souris ; l'équivalent clavier reste la toolbar du haut (≥44px). */
.editor-handle { position: absolute; top: 0; left: 0; z-index: 25; display: flex; align-items: center; gap: 2px; transition: top 90ms linear, left 90ms linear; }
/* Masquée sans retirer ses dimensions : floating-ui (plugin-block) doit pouvoir la
   mesurer même cachée, sinon le TOUT PREMIER affichage la place au centre du texte
   (getBoundingClientRect = 0×0 sur un display:none). */
.editor-handle[data-show="false"] { visibility: hidden; pointer-events: none; }

/* Mode « frappe » (data-typing, posé au keydown / levé au vrai mousemove) : tout ce
   qui n'est pas le texte s'efface — poignée et pointeur souris masqués, chrome estompé
   (barres de l'éditeur ET header du site, ciblé via :has car hors du conteneur).
   Fondu asymétrique : effacement lent (450ms, posé sur l'état estompé), retour rapide
   (150ms, posé sur l'état de base) — on ne fait pas attendre un clic sur « Publier ».
   Garde-fou clavier (:focus-within) : la zone atteinte au Tab reste pleinement lisible
   (Tab est une touche, donc pose data-typing). */
.editor.js-article-editor[data-typing] .editor-handle { visibility: hidden; pointer-events: none; }
.editor.js-article-editor[data-typing] .ProseMirror { cursor: none; }
.editor-top, .editor-foot, .editor-destinations, body:has(.editor.js-article-editor) .header { transition: opacity 150ms ease; }
.editor.js-article-editor[data-typing] .editor-top:not(:focus-within),
.editor.js-article-editor[data-typing] .editor-foot,
.editor.js-article-editor[data-typing] .editor-destinations:not(:focus-within),
body:has(.editor.js-article-editor[data-typing]) .header:not(:focus-within) { opacity: .3; transition: opacity 450ms ease; }
/* Boutons icônes façon démo Crepe : carré arrondi, icône SVG centrée, fond au survol. */
.editor-handle__add, .editor-handle__grip { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-3); }
.editor-handle__add svg, .editor-handle__grip svg { display: block; width: 20px; height: 20px; }
.editor-handle__add { cursor: pointer; }
.editor-handle__grip { cursor: grab; }
.editor-handle__add:hover, .editor-handle__grip:hover { background: var(--surface-2); color: var(--ink); }
.editor-handle__grip:active { cursor: grabbing; }
/* Ligne d'insertion (entre les blocs) affichée pendant le glisser-déposer.
   Élément rendu et positionné par plugin-cursor (classe `milkdown-drop-indicator`,
   config `color:false`) ; on ne fournit que la couleur d'accent et le z-index. */
.milkdown-drop-indicator { z-index: 26; background: var(--accent); border-radius: 1px; }
/* Menu d'insertion ouvert par le « + » (formats de bloc autorisés). */
.editor-insert-menu { position: absolute; top: 100%; left: 0; z-index: 30; min-width: 190px; display: flex; flex-direction: column; padding: var(--s-1); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); font-family: var(--font-sans); }
.editor-insert-menu button { display: flex; align-items: center; gap: var(--s-3); min-height: 40px; padding: var(--s-2) var(--s-3); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); font-size: var(--t-sm); text-align: left; cursor: pointer; }
.editor-insert-menu button:hover { background: var(--surface-2); }
.editor-insert-menu__icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: none; color: var(--ink-2); font-size: var(--t-xs); }

/* Menu « … » d'actions secondaires (disclosure natif, sans JS). */
.editor-menu { position: relative; }
.editor-menu > summary { list-style: none; cursor: pointer; }
.editor-menu > summary::-webkit-details-marker { display: none; }
.editor-menu__panel { position: absolute; right: 0; top: calc(100% + var(--s-2)); z-index: 20; min-width: 240px; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.editor-menu__panel form { margin: 0; }

/* Zone autosave (aria-live) : discrète. */
.article-status { font-size: var(--t-xs); color: var(--ink-3); margin: 0; }
/* Formulaire de dépublication (dans le menu) : champ URL puis bouton, empilés. */
.article-unpublish { display: flex; flex-direction: column; gap: var(--s-2); align-items: stretch; }
.article-unpublish .field { min-width: 220px; }

/* === TICKET #45 — ÉCRANS ADMIN === */
/* Réglages — section clé API Claude (sous le picker d'accent). */
.bo-settings__head { margin-bottom: var(--s-6); }
.bo-settings__api { margin-top: var(--s-7); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.bo-settings__api h2 { font-family: var(--font-sans); font-size: var(--t-h3); font-weight: 700; margin-bottom: var(--s-2); }
/* Wrapper d'un champ de formulaire (label + widget). L'input reçoit .input du form theme DS. */
.bo-field { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-4); }
.bo-field label { font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
/* Article admin — détail (largeur de lecture). */
.bo-article-show { max-width: 760px; }
.bo-article-show__head { margin-bottom: var(--s-5); padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.bo-article-show__head h1 { font-family: var(--font-serif); font-size: var(--t-h1); }
.bo-article-show__meta { margin-top: var(--s-2); font-size: var(--t-sm); color: var(--ink-2); }
.bo-article-show__body { font-family: var(--font-serif); font-size: var(--t-lg); line-height: 1.7; color: var(--ink); margin-top: var(--s-5); }
/* Panneau analyse IA (sous l'article). */
.bo-article-show__analysis { margin-top: var(--s-7); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.bo-article-show__analysis h2 { font-family: var(--font-sans); font-size: var(--t-h3); font-weight: 700; margin-bottom: var(--s-4); }
.bo-analysis__form { margin-bottom: var(--s-4); }
.bo-article-show__hint { margin-top: var(--s-3); font-size: var(--t-sm); color: var(--ink-2); }
.bo-analysis__report { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); margin-top: var(--s-5); }
.bo-analysis__report h3 { margin: var(--s-5) 0 var(--s-2); font-size: var(--t-h3); }
.bo-analysis__report h3:first-child { margin-top: 0; }
.bo-analysis__disclaimer { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); color: var(--ink-2); font-size: var(--t-sm); font-style: italic; }
.bo-analysis__summary { color: var(--ink); line-height: 1.6; }
.bo-analysis__themes { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; }
.bo-analysis__themes li { display: inline-flex; font-size: var(--t-xs); font-weight: 500; padding: 6px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.bo-analysis__grid { width: 100%; border: 1px solid var(--line); border-radius: var(--r-lg); border-collapse: separate; overflow: hidden; }
.bo-analysis__grid th { text-align: left; font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.bo-analysis__grid td, .bo-analysis__grid tbody th { padding: var(--s-4); border-top: 1px solid var(--line); font-size: var(--t-sm); vertical-align: top; }
.bo-analysis__date { margin-top: var(--s-4); font-size: var(--t-xs); color: var(--ink-3); }
/* Badges de niveau de risque — valeurs issues de RiskLevel (aucun/faible/a_verifier/eleve).
   aucun = neutre volontaire (rien à signaler) ; le vert --ok est réservé à faible. */
.bo-risk { display: inline-flex; align-items: center; font-size: var(--t-xs); font-weight: 600; line-height: 1; padding: 5px 10px; border-radius: var(--r-sm); }
.bo-risk--aucun { background: var(--surface-2); color: var(--ink-2); }
.bo-risk--faible { background: var(--ok-soft); color: var(--ok); }
.bo-risk--a_verifier { background: var(--warn-soft); color: var(--warn); }
.bo-risk--eleve { background: var(--danger-soft); color: var(--danger); }

/* === Étape 8 — lot 2 : menu utilisateur === */
/* Pattern disclosure : un trigger montre/masque un panneau ancré sous lui.
   Couleurs exclusivement via variables DS ; :focus-visible jamais retiré (RGAA). */
.user-menu { position: relative; }
/* Trigger : hérite de .btn.btn-secondary.btn-sm ; aligne prénom + caret.
   min-height 44px : le déclencheur du menu est nommément ciblé par
   design-system §1 (cible tactile RGAA), au-delà du .btn-sm compact (34px). */
.user-menu__trigger { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; }
.user-menu__caret { transition: transform 120ms ease; }
/* Caret retourné quand le panneau est ouvert. */
.user-menu__trigger[aria-expanded="true"] .user-menu__caret { transform: rotate(180deg); }
/* Panneau ancré à droite sous le trigger. L'attribut [hidden] gère l'affichage —
   ne pas le surcharger d'un display qui casserait [hidden]. Aligné sur le
   z-index de .editor-menu__panel (20). */
.user-menu__panel { position: absolute; right: 0; top: calc(100% + var(--s-2)); z-index: 20; min-width: 240px; display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.user-menu__section { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-1) var(--s-2); }
.user-menu__label { font-size: var(--t-xs); color: var(--ink-2); }
/* Entrées (liens et boutons de formulaire) pleine largeur, alignées à gauche. */
.user-menu__item { margin: 0; }
.user-menu__action { display: block; width: 100%; box-sizing: border-box; text-align: left; padding: var(--s-2); border: 0; background: transparent; color: var(--ink); font: inherit; text-decoration: none; border-radius: var(--r-md); cursor: pointer; }
.user-menu__action:hover { background: var(--surface-2); }
/* Déconnexion : dernière position, teinte danger (design-system §2). */
.user-menu__action--danger { color: var(--danger); }
.user-menu__action--danger:hover { background: var(--danger-soft); }
.user-menu__sep { border: 0; border-top: 1px solid var(--line); margin: var(--s-2) 0; }
@media (max-width: 640px) {
  /* Le panneau reste dans le viewport ; le prénom se masque sur le trigger. */
  .user-menu__panel { max-width: calc(100vw - var(--s-6)); }
  .user-menu__name { display: none; }
}
/* === /Étape 8 — lot 2 === */

/* === Étape 8 — lot 5 : écrans admin === */
/* Couleurs exclusivement via variables DS ; préfixe bo- (back-office). */

/* Fil d'Ariane (retour hiérarchique admin, design-system §5) : séparateurs
   décoratifs via ::before, maillon courant non cliquable. */
.bo-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-4); font-size: var(--t-sm); }
.bo-breadcrumb a { color: var(--ink-2); text-decoration: none; }
.bo-breadcrumb a:hover, .bo-breadcrumb a:focus-visible { color: var(--ink); text-decoration: underline; }
.bo-breadcrumb a + a::before, .bo-breadcrumb a + span::before { content: "/"; margin-right: var(--s-2); color: var(--ink-3); }
.bo-breadcrumb [aria-current="page"] { color: var(--ink-3); }

/* Badge de statut d'analyse (liste admin). Même gabarit que .bo-risk : texte
   visible + puce décorative (jamais la couleur seule — RGAA). */
.bo-tag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 600; line-height: 1; padding: 4px 10px; border-radius: var(--r-pill); }
.bo-tag__dot { width: 8px; height: 8px; border-radius: 50%; }
.bo-tag--ok { background: var(--ok-soft); color: var(--ok); }
.bo-tag--ok .bo-tag__dot { background: var(--ok); }
.bo-tag--muted { background: var(--surface-2); color: var(--ink-3); }
.bo-tag--muted .bo-tag__dot { background: var(--ink-3); }

/* Ligne cliquable accessible (design-system §7) : le lien titre reste le seul
   élément focusable ; son ::after couvre toute la ligne pour la cliquabilité
   souris. Pas de role=link ni de handler JS sur le <tr>. */
.bo-articles tbody tr { position: relative; }
.bo-articles tbody tr:hover, .bo-articles tbody tr:focus-within { background: var(--surface-2); }
.bo-articles td a.bo-row-link { position: static; color: var(--ink); text-decoration: none; font-weight: 600; }
.bo-articles td a.bo-row-link:hover, .bo-articles td a.bo-row-link:focus-visible { color: var(--accent); }
.bo-articles td a.bo-row-link::after { content: ""; position: absolute; inset: 0; }

/* Corps d'article en mode aperçu (HTML markdown assaini) : marges de flux entre
   éléments, sans dépendre du reset global. Aligné sur le rythme de .editor-preview. */
.bo-prose > * + * { margin-top: 1em; }
.bo-prose :where(h2, h3, h4) { margin-top: 1.5em; line-height: 1.25; }
.bo-prose :where(ul, ol) { padding-left: var(--s-6); }
.bo-prose li + li { margin-top: 0.35em; }
.bo-prose blockquote { padding-left: var(--s-4); border-left: 3px solid var(--line); color: var(--ink-2); }
/* === /Étape 8 — lot 5 === */

/* === Étape 9 — lot 12 : réglages plugins (admin + user) === */
.bo-plugins { display: flex; flex-direction: column; gap: var(--s-5); }
.bo-breadcrumb { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-xs); color: var(--ink-2); }
.bo-breadcrumb a { color: var(--ink-2); text-decoration: none; }
.bo-breadcrumb a:hover { color: var(--accent); }
.bo-plugin-list { display: flex; flex-direction: column; gap: var(--s-3); list-style: none; }
.bo-plugin-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.bo-plugin-label { font-weight: 600; }
/* Badge compteur (texte + fond neutre, jamais couleur seule — RGAA). */
.bo-count { margin-left: auto; display: inline-flex; align-items: center; font-size: var(--t-xs); color: var(--ink-2); background: var(--surface-2, var(--line)); border-radius: var(--r-sm, 6px); padding: 2px 8px; font-variant-numeric: tabular-nums; }
.bo-alert, .ud-alert { padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); background: var(--accent-soft); color: var(--ink); }

/* Pastille de canal (couleur DS via data-ch, connue : web/rss/ap).
   Défaut posé SANS sélecteur d'attribut : `.ud-plugin-label[data-ch]` pèserait 0-2-0
   et l'emporterait sur les `[data-ch="…"]` ci-dessous (0-1-0), figeant toutes les
   pastilles de l'espace utilisateur en gris. L'admin y échappait par hasard, `.bo-chan`
   pesant lui aussi 0-1-0. */
.bo-chan, .ud-plugin-label { --dot: var(--line); }
[data-ch="web"] { --dot: var(--ch-web); }
[data-ch="rss"] { --dot: var(--ch-rss); }
[data-ch="ap"] { --dot: var(--ch-ap); }
/* Cercle strict : pas de padding (une ancienne règle `.bo-chan` d'un écran canaux
   non implémenté l'ovalisait via un padding vertical — retirée). */
.bo-chan { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); flex: none; padding: 0; }

/* Réglages user. */
.ud-settings { display: flex; flex-direction: column; gap: var(--s-6); max-width: 880px; margin: 0 auto; padding: clamp(var(--s-6), 5vw, var(--s-9)) clamp(var(--s-4), 4vw, var(--s-7)); }
.ud-settings-head { margin-bottom: var(--s-2); }
.ud-settings-head h1 { font-family: var(--font-serif); font-size: var(--t-h1); margin: 0; }
/* Le DS remet `p { margin: 0 }` : sans cette gouttière, le sous-titre est collé au
   titre, là où l'écran admin équivalent (`.bo-dash__sub`) est aéré. On ne pose QUE la
   gouttière : la couleur reste celle de l'utilitaire `.faint` posée dans le template,
   qu'une déclaration ici écraserait en silence. */
.ud-settings-head p { margin-top: var(--s-2); max-width: 60ch; }
/* Page « aperçu web indisponible » : message centré autonome. */
.ud-unavailable { max-width: 540px; margin: clamp(var(--s-7), 10vw, var(--s-9)) auto; padding: 0 var(--s-5); text-align: center; display: flex; flex-direction: column; gap: var(--s-4); align-items: center; }
.ud-unavailable h1 { font-family: var(--font-serif); font-size: var(--t-h2); margin: 0; }
.ud-unavailable p { color: var(--ink-2); margin: 0; }
.ud-plugin-list { display: flex; flex-direction: column; gap: var(--s-3); list-style: none; }
.ud-plugin-card { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ud-plugin-label { font-weight: 600; display: inline-flex; align-items: center; gap: var(--s-2); }
/* `flex: none` : sans lui le pseudo-élément est compressible et la pastille sort
   ovalisée dès que la ligne manque de place — le défaut corrigé au lot 40 sur
   `.bo-chan` (admin), jamais répercuté ici. */
.ud-plugin-label[data-ch]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); flex: none; }

/* Composant de bascule (partagé admin/user). */
.plugin-toggle { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-left: auto; }
.plugin-state { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-xs); color: var(--ink-2); }
.plugin-state-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--line)); }
.plugin-lock { font-size: var(--t-xs); color: var(--ink-2); margin: 0; }
.plugin-error { font-size: var(--t-xs); color: var(--danger); margin: 0; }
/* === /Étape 9 — lot 12 === */

/* === Ticket 245 — finition comptes === */
/* Écrans de gestion des comptes et des invitations (admin). Variables du DS
   uniquement, jamais d'opacité, :focus-visible toujours conservé. */
.bo-invitations, .bo-users { min-width: 0; }
.bo-invitations__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); }

/* Fil d'Ariane en liste ordonnée (DS §5) : séparateurs décoratifs via ::before. */
.bo-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.bo-breadcrumb li + li::before { content: "/"; margin-right: var(--s-2); color: var(--ink-3); }

/* Tableaux : seul le conteneur défile horizontalement, jamais le body ; il est
   focalisable (région nommée) pour rester atteignable au clavier. */
/* position: relative : bloc conteneur des .sr-only (position: absolute) des cellules,
   sinon ils échappent au défilement et élargissent la page. */
.bo-table-wrap { position: relative; overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.bo-table-wrap:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bo-table-wrap > table { width: 100%; border-collapse: collapse; }
.bo-users__table th, .bo-invitations__table th { text-align: left; font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.bo-users__table td, .bo-invitations__table td { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--ink); vertical-align: middle; }
.bo-users__table tbody tr:first-child td, .bo-invitations__table tbody tr:first-child td { border-top: 0; }
.bo-users__table .bo-tag, .bo-invitations__table .bo-tag { white-space: nowrap; }

/* Groupe d'actions (ligne ou formulaire), au-dessus d'un éventuel overlay
   .bo-row-link (DS §7) ; cibles ≥ 44 px (le .btn-sm du DS en fait 34). */
.bo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); position: relative; z-index: 1; }
.bo-actions .btn { min-height: 44px; display: inline-flex; align-items: center; }

/* Action rendue mais inopérante (aria-disabled, focalisable) + sa raison. */
/* Libellé en --ink-2 (6,8:1 clair, 7,2:1 sombre) sur un vrai bouton focalisable :
   l'état est porté par le pointillé et le curseur, pas par une encre affaiblie. */
.bo-action[aria-disabled="true"] { cursor: not-allowed; color: var(--ink-2); border-color: var(--line-2); border-style: dashed; background: transparent; min-height: 44px; }
.bo-action__reason { display: block; font-size: var(--t-xs); color: var(--ink-2); max-width: 28ch; }

/* Motifs de modération : seconde ligne sous le compte, jamais une colonne. */
.bo-note-row td { background: var(--surface-2); color: var(--ink-2); font-size: var(--t-sm); border-top: 0; padding-top: var(--s-2); white-space: normal; }
.bo-note__meta { margin: 0; font-size: var(--t-xs); color: var(--ink-2); }
.bo-note { margin: var(--s-1) 0 0; max-width: 70ch; overflow-wrap: anywhere; } /* retours à la ligne portés par nl2br */

/* <details> natif (encart des supprimés, historique des motifs), sans JS. */
.bo-disclosure { margin-top: var(--s-3); }
.bo-disclosure > summary { min-height: 44px; display: flex; align-items: center; gap: var(--s-2); cursor: pointer; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.bo-disclosure > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bo-disclosure__list { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.bo-users-deleted { margin-top: var(--s-7); padding: var(--s-2) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.bo-users-deleted .bo-table-wrap { margin: var(--s-3) 0 var(--s-2); }

/* Formulaires (invitation, désactivation, suppression, purge). */
.bo-invitations__form, .bo-users__form { display: flex; flex-direction: column; gap: var(--s-5); max-width: 40rem; }
.bo-invitations__roles { display: flex; flex-direction: column; gap: var(--s-2); border: 0; padding: 0; margin: 0; }
.bo-invitations__roles legend { font-size: var(--t-sm); font-weight: 600; color: var(--ink); margin-bottom: var(--s-2); }
.bo-invitations__role { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; font-size: var(--t-sm); color: var(--ink); cursor: pointer; }
.bo-effects { margin: 0 0 var(--s-5); padding-left: var(--s-5); color: var(--ink-2); font-size: var(--t-sm); display: flex; flex-direction: column; gap: var(--s-2); }
.bo-notice { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }

/* Inventaire quantitatif avant suppression : libellé / valeur en grille. */
.bo-inventory { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-2) var(--s-5); margin: 0 0 var(--s-6); padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); font-size: var(--t-sm); }
.bo-inventory dt { font-weight: 600; color: var(--ink-2); }
.bo-inventory dd { margin: 0; color: var(--ink); }
.bo-inventory__list { margin: 0; padding-left: var(--s-5); }

/* Encadrés d'avertissement : suppression logique (danger) puis définitive
   (renforcée). */
.bo-callout--danger { margin: 0 0 var(--s-5); max-width: 70ch; border: 1px solid var(--danger); background: var(--danger-soft); color: var(--ink); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); font-size: var(--t-sm); }
.bo-callout--danger p { margin: 0; }
.bo-callout--danger p + p { margin-top: var(--s-2); }
.bo-callout--purge { border-width: 2px; }
.bo-callout__title { margin: 0 0 var(--s-2); font-family: var(--font-sans); font-size: var(--t-base); font-weight: 700; color: var(--danger); }

/* Suppression définitive : variante PLEINE, distincte du .btn-danger (contour)
   de la suppression logique, avec une icône propre. Contraste mesuré : 7,1:1
   en clair, 6,97:1 en sombre (--paper sur --danger). */
.bo-btn-purge { background: var(--danger); color: var(--paper); border-color: var(--danger); font-weight: 600; gap: var(--s-2); }
.bo-btn-purge:hover { background: color-mix(in oklab, var(--danger) 85%, var(--ink)); }
.bo-btn-purge:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bo-btn-purge__icon { flex: none; }

/* Menu utilisateur, progressive enhancement : sans JS, le déclencheur (inerte)
   disparaît et le panneau s'affiche dans le flux ; avec JS, pas de flash avant
   le câblage et [hidden] l'emporte sur display: flex. */
html:not(.js) .user-menu__trigger { display: none; }
html:not(.js) .user-menu__panel { position: static; box-shadow: none; min-width: 0; }
.js [data-user-menu]:not([data-wired]) .user-menu__panel { display: none; }
.js .user-menu__panel[hidden] { display: none; }
/* === /Ticket 245 === */

