/* ════════════════════════════════════════════════
 * dashboard.css — extrait de dashboard.html (2026-06-10)
 * Cycle 2 : découpage des gros fichiers
 * ════════════════════════════════════════════════ */

  /* ── BASE ───────────────────────────────────────────────────── */
  :root { color-scheme: light dark; }
  html { font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
  body { margin:0; min-height:100vh; background:#fafafa; color:#0a0a0a; }
  html.dark body { background:#0a0a0a; color:#fafafa; }

  /* Disable transitions on theme change so toggle is crisp */
  html.theme-transitioning *, html.theme-transitioning *::before, html.theme-transitioning *::after {
    transition: none !important;
  }

  /* ── FOCUS RINGS (always visible) ───────────────────────────── */
  *:focus { outline: none; }
  *:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
  }
  html.dark *:focus-visible { outline-color:#fbbf24; }

  /* ── SCROLLBARS ─────────────────────────────────────────────── */
  ::-webkit-scrollbar { width:10px; height:10px; }
  ::-webkit-scrollbar-track { background:transparent; }
  ::-webkit-scrollbar-thumb { background:#d4d4d8; border-radius:8px; border:2px solid transparent; background-clip:content-box; }
  html.dark ::-webkit-scrollbar-thumb { background:#3f3f46; background-clip:content-box; }
  ::-webkit-scrollbar-thumb:hover { background:#a1a1aa; background-clip:content-box; }


/* ── FOCUS RINGS ────────────────────────────────────────────── */

/* Reset navigateur + outline custom global */
*:focus {
  outline: none;
}
*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-color, #f59e0b),
              0 0 0 4px var(--focus-color-alpha, rgba(245, 158, 11, 0.2));
  border-radius: inherit;
}

/* Contextes de couleur focus par type de composant */

/* Boutons danger / destructeurs */
.btn-danger:focus-visible,
[data-focus="danger"]:focus-visible {
  --focus-color: #ef4444;
  --focus-color-alpha: rgba(239, 68, 68, 0.2);
}

/* Boutons success / confirmer */
.btn-success:focus-visible,
[data-focus="success"]:focus-visible {
  --focus-color: #22c55e;
  --focus-color-alpha: rgba(34, 197, 94, 0.2);
}

/* Champs de texte / textarea / select */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  --focus-color: #f59e0b;
  --focus-color-alpha: rgba(245, 158, 11, 0.25);
}

/* Links dans le contenu article */
.article-preview a:focus-visible {
  --focus-color: #dc2626;
  --focus-color-alpha: rgba(220, 38, 38, 0.2);
  border-radius: 2px;
}

/* Dark mode : légèrement plus lumineux */
html.dark *:focus-visible {
  box-shadow: 0 0 0 2px var(--focus-color, #fbbf24),
              0 0 0 4px var(--focus-color-alpha, rgba(251, 191, 36, 0.25));
}

/* Exceptions */
[tabindex="-1"]:focus-visible {
  box-shadow: none;
}

/* CSS variables for focus colors */
:root {
  --focus-color: #f59e0b;
  --focus-color-alpha: rgba(245, 158, 11, 0.2);
}
html.dark {
  --focus-color: #fbbf24;
  --focus-color-alpha: rgba(251, 191, 36, 0.25);
}
html.theme-beast-black {
  --focus-color: #ff3366;
  --focus-color-alpha: rgba(255, 51, 102, 0.25);
}

  /* ── SKIP LINK (enrichi) ─────────────────────────────────────── */
  .skip-link {
    position: absolute;
    top: -100px;
    left: 8px;
    z-index: 9999;
    background: #f59e0b;
    color: #0a0a0a;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: top 150ms ease-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  .skip-link:focus {
    top: 8px;
    outline: none;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px #f59e0b, 0 4px 12px rgba(0,0,0,0.3);
  }
  html.dark .skip-link {
    background: #fbbf24;
    color: #0a0a0a;
  }

  /* ── ARTICLE PREVIEW (serif rendering) ──────────────────────── */
  .article-preview { font-family:'Lora', Georgia, serif; line-height:1.7; font-size:18px; }
  .article-preview h1, .article-preview h2, .article-preview h3 { font-weight:600; line-height:1.25; margin:1.4em 0 0.6em; }
  .article-preview h1 { font-size:2.1em; }
  .article-preview h2 { font-size:1.55em; padding-bottom:0.2em; border-bottom:1px solid currentColor; border-color:rgba(120,120,130,0.25); }
  .article-preview h3 { font-size:1.2em; }
  .article-preview p  { margin:0 0 1.05em; }
  .article-preview strong { font-weight:700; }
  .article-preview em { font-style:italic; }
  .article-preview ul, .article-preview ol { margin:0 0 1.05em 1.5em; }
  .article-preview blockquote { border-left:3px solid #dc2626; padding:0.4em 1em; margin:1em 0; opacity:0.92; font-style:italic; }
  .article-preview a { color:#dc2626; text-decoration:underline; text-underline-offset:3px; }
  html.dark .article-preview a { color:#fbbf24; }

/* ── SOURCES SECTION — STYLE CARNET ──────────────────────────── */
.sources-carnet {
  margin-top: 2em;
  padding: 1.25rem 1.25rem 1.25rem 0;
  background: rgba(245, 158, 11, 0.04);
  border-radius: 6px;
  border-left: 2px solid rgba(245, 158, 11, 0.30);
}
.sources-carnet h2 {
  font-family: 'Lora', 'Crimson Text', Georgia, serif;
  font-style: italic;
  font-size: 1.1em;
  font-weight: 600;
  color: rgba(245, 158, 11, 0.85);
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-top: 0;
  margin-bottom: 0.75em;
  letter-spacing: 0.01em;
}
html.dark .sources-carnet h2 {
  color: rgba(251, 191, 36, 0.90);
}
.sources-carnet p {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5em;
}
.sources-carnet p::before {
  content: '▸';
  position: absolute;
  left: 0.25rem;
  top: 0;
  color: rgba(245, 158, 11, 0.70);
  font-style: normal;
  font-size: 0.85em;
  line-height: 1.7;
}
html.dark .sources-carnet p::before {
  color: rgba(251, 191, 36, 0.65);
}
.sources-carnet a {
  font-family: 'Lora', 'Crimson Text', Georgia, serif;
  font-style: italic;
  color: rgba(180, 110, 0, 0.90);
  text-decoration: none;
  background-image: linear-gradient(rgba(245, 158, 11, 0.70), rgba(245, 158, 11, 0.70));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 300ms ease-out, color 200ms ease;
  padding-bottom: 1px;
}
html.dark .sources-carnet a {
  color: rgba(251, 191, 36, 0.85);
  background-image: linear-gradient(rgba(251, 191, 36, 0.70), rgba(251, 191, 36, 0.70));
}
.sources-carnet a:hover {
  background-size: 100% 1px;
  color: rgba(180, 110, 0, 1);
}
html.dark .sources-carnet a:hover {
  color: rgba(251, 191, 36, 1);
}
.sources-carnet a:focus-visible {
  outline: none;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.80), 0 0 0 4px rgba(245, 158, 11, 0.20);
  background-size: 100% 1px;
}

  /* ── LIVE LOG ───────────────────────────────────────────────── */
  .live-log { font-family:'JetBrains Mono', ui-monospace, monospace; font-size:12px; line-height:1.55; }
  .live-log .line { padding:2px 0; white-space:pre-wrap; word-break:break-word; }

  /* ── MOTION ─────────────────────────────────────────────────── */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration:0.001ms !important; animation-iteration-count:1 !important;
      transition-duration:0.001ms !important; scroll-behavior:auto !important;
    }
  }

  /* ── UTIL ───────────────────────────────────────────────────── */
  [x-cloak] { display:none !important; }
  /* Scrollbar-none utility for horizontal tab lists on mobile */
  .scrollbar-none { scrollbar-width: none; -ms-overflow-style: none; }
  .scrollbar-none::-webkit-scrollbar { display: none; }
  /* Mobile responsive utility: ensure article preview images don't overflow */
  .article-preview img { max-width: 100%; height: auto; }
  .article-preview pre, .article-preview code { overflow-x: auto; max-width: 100%; }
  /* Ensure tables in article body scroll */
  .article-preview table { display: block; overflow-x: auto; max-width: 100%; }
  .truncate-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

  /* Pulse dot for live indicator */
  @keyframes pulse-dot { 0%,100%{opacity:1; transform:scale(1);} 50%{opacity:.55; transform:scale(.85);} }
  .pulse-dot { animation: pulse-dot 1.6s ease-in-out infinite; }

/* ── SESSION ANIMATIONS ──────────────────────────────────── */

/* Dot qui pulse (sessions running) */
@keyframes pulse-dot-green {
  0%, 100% { opacity: 1; transform: scale(1);   box-shadow: 0 0 0 0 rgba(34,197,94, 0.5); }
  50%       { opacity: 0.8; transform: scale(1.15); box-shadow: 0 0 0 5px rgba(34,197,94, 0); }
}
.session-dot-running {
  animation: pulse-dot-green 1.4s ease-in-out infinite;
}

/* Dot rouge pour sessions failed */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-4px) rotate(-3deg); }
  30%       { transform: translateX(4px) rotate(3deg); }
  45%       { transform: translateX(-3px); }
  60%       { transform: translateX(3px); }
  75%       { transform: translateX(-2px); }
  90%       { transform: translateX(2px); }
}
.session-dot-failed {
  background-color: #ef4444;
  animation: shake 0.6s ease-in-out 1 both;
}

/* Checkmark bounce pour sessions completed */
@keyframes bounce-in {
  0%   { opacity: 0; transform: scale(0.4); }
  50%  { opacity: 1; transform: scale(1.2); }
  70%  { transform: scale(0.9); }
  85%  { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}
.session-check-completed {
  animation: bounce-in 400ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Anneau qui tourne autour de la card (sessions running) */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Background qui respire (sessions running) */
@keyframes breathe {
  0%, 100% { background-color: rgba(34, 197, 94, 0.04); }
  50%       { background-color: rgba(34, 197, 94, 0.10); }
}


/* ── RESPONSIVE MOBILE OVERRIDES (Beast Mode Responsive v1) ── */

/* Ensure sidebar nav items auto-close on mobile tap
   (handled by Alpine goto() which sets sidebarOpen=false) */

/* Toast full-width on mobile — handled via Tailwind classes */

/* Article modal: ensure content doesn't overflow on mobile */
@media (max-width: 639px) {
  /* Tab bar in article modal: smaller text on mobile */
  .tab-list-relative button[role="tab"] {
    font-size: 11px;
    padding-left: 10px;
    padding-right: 10px;
  }
  /* Reduce article header padding on mobile */
  .tab-list-relative {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  /* Queue form: full-width inputs on mobile */
  form input[type="text"],
  form input[type="url"],
  form select {
    min-height: 44px;
  }
  /* Sync target buttons row: allow wrapping on tiny screens */
  .sync-btn-row {
    flex-wrap: wrap;
  }
}

/* Minimum touch target enforcement for small interactive elements */
@media (max-width: 767px) {
  /* Nav items in sidebar */
  nav[aria-label="Navigation principale"] .nav-item-btn {
    min-height: 44px;
  }
  /* Quick filter chip buttons */
  .flex-wrap button[class*="rounded-full"] {
    min-height: 36px;
  }
}

  /* Loading skeleton */
  @keyframes shimmer { 0%{background-position:-400px 0;} 100%{background-position:400px 0;} }
  .skel { background:linear-gradient(90deg,#e4e4e7 0%,#f4f4f5 50%,#e4e4e7 100%); background-size:800px 100%; animation:shimmer 1.4s linear infinite; border-radius:6px; }
  html.dark .skel { background:linear-gradient(90deg,#1f1f23 0%,#27272a 50%,#1f1f23 100%); background-size:800px 100%; }

  /* Toast container */
/* ── TOASTS V2 ──────────────────────────────────────────────── */

/* Container : slide-in depuis la droite avec spring */
@keyframes toastSlideIn {
  0%   { transform: translateX(110%); opacity: 0; }
  60%  { transform: translateX(-6px);  opacity: 1; }
  80%  { transform: translateX(3px);  }
  100% { transform: translateX(0);    opacity: 1; }
}

@keyframes toastSlideOut {
  0%   { transform: translateX(0);    opacity: 1; max-height: 120px; margin-bottom: 0; }
  100% { transform: translateX(110%); opacity: 0; max-height: 0;   margin-bottom: -8px; }
}

/* Progress bar décomptante */
@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

.toast-v2 {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  max-width: 360px;
  width: 100%;
  padding: 12px 14px 16px;
  border-radius: 10px;
  border-left: 3px solid transparent;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.06);
  font-size: 13.5px;
  line-height: 1.4;
  cursor: pointer;
  overflow: hidden;
  animation: toastSlideIn 500ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transition: box-shadow 0.15s ease;
}
html.dark .toast-v2 {
  background: #18181b;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.2);
}
.toast-v2:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.16), 0 2px 6px rgba(0,0,0,0.08);
}
.toast-v2.toast-leaving {
  animation: toastSlideOut 280ms ease-in forwards;
  pointer-events: none;
}

/* Couleurs de bordure et d'icône par type */
.toast-v2[data-type="success"] { border-left-color: #10b981; }
.toast-v2[data-type="error"]   { border-left-color: #ef4444; }
.toast-v2[data-type="warn"]    { border-left-color: #f59e0b; }
.toast-v2[data-type="info"]    { border-left-color: #0ea5e9; }

/* Icône */
.toast-v2__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.toast-v2[data-type="success"] .toast-v2__icon { color: #10b981; }
.toast-v2[data-type="error"]   .toast-v2__icon { color: #ef4444; }
.toast-v2[data-type="warn"]    .toast-v2__icon { color: #f59e0b; }
.toast-v2[data-type="info"]    .toast-v2__icon { color: #0ea5e9; }

/* Texte */
.toast-v2__body {
  flex: 1;
  min-width: 0;
  color: #0a0a0a;
}
html.dark .toast-v2__body { color: #fafafa; }

/* Bouton × */
.toast-v2__close {
  flex-shrink: 0;
  opacity: 0.45;
  font-size: 16px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 0 4px;
  color: inherit;
  transition: opacity 0.12s;
  margin-top: -2px;
}
.toast-v2__close:hover { opacity: 0.85; }

/* Progress bar absolue en bas */
.toast-v2__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 0 10px;
  animation: toastProgress linear both;
  animation-play-state: running;
  transform-origin: left center;
}
.toast-v2:hover .toast-v2__progress {
  animation-play-state: paused;
}
.toast-v2[data-type="success"] .toast-v2__progress { background: #10b981; }
.toast-v2[data-type="error"]   .toast-v2__progress { background: #ef4444; }
.toast-v2[data-type="warn"]    .toast-v2__progress { background: #f59e0b; }
.toast-v2[data-type="info"]    .toast-v2__progress { background: #0ea5e9; }

  /* Kbd keys */
  kbd.k {
    display:inline-flex; align-items:center; justify-content:center;
    min-width:1.5em; padding:0 0.4em; height:1.5em;
    font-family:'JetBrains Mono', ui-monospace, monospace; font-size:11px;
    background:#fff; color:#0a0a0a; border:1px solid #d4d4d8;
    border-bottom-width:2px; border-radius:4px;
  }
  html.dark kbd.k { background:#27272a; color:#fafafa; border-color:#3f3f46; }

/* ── SCORE RING ─────────────────────────────────────────────── */

/* Remplissage progressif au mount */
@keyframes scoreRingFill {
  from { stroke-dashoffset: var(--ring-circumference); }
  to   { stroke-dashoffset: var(--ring-offset); }
}

/* Pulse halo pour score ≥ 150 */
@keyframes scoreRingPulse {
  0%, 100% { filter: drop-shadow(0 0 4px currentColor); opacity: 1; }
  50%       { filter: drop-shadow(0 0 10px currentColor); opacity: 0.85; }
}

.score-ring-svg {
  display: block;
}

/* Arc animé */
.score-ring-arc {
  animation: scoreRingFill 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: center;
  transform: rotate(-90deg);
}

/* Pulse sur le groupe entier quand score ≥ 150 */
.score-ring--elite .score-ring-arc {
  animation:
    scoreRingFill 800ms cubic-bezier(0.22, 1, 0.36, 1) both,
    scoreRingPulse 3s ease-in-out 0.9s infinite;
  color: #10b981;
}

/* Variante tailles */
.score-ring--sm  { width: 32px;  height: 32px; }
.score-ring--md  { width: 56px;  height: 56px; }
.score-ring--lg  { width: 96px;  height: 96px; }

/* ── SKELETON SCREENS ───────────────────────────────────────── */

/* Composants atomiques */
.skeleton-card {
  background: linear-gradient(90deg, #e4e4e7 0%, #f4f4f5 50%, #e4e4e7 100%);
  background-size: 800px 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 10px;
}
html.dark .skeleton-card {
  background: linear-gradient(90deg, #27272a 0%, #3f3f46 50%, #27272a 100%);
  background-size: 800px 100%;
}

.skeleton-line-sm {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #e4e4e7 0%, #f4f4f5 50%, #e4e4e7 100%);
  background-size: 800px 100%;
  animation: shimmer 1.4s linear infinite;
}
html.dark .skeleton-line-sm {
  background: linear-gradient(90deg, #27272a 0%, #3f3f46 50%, #27272a 100%);
  background-size: 800px 100%;
}

.skeleton-line-md {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #e4e4e7 0%, #f4f4f5 50%, #e4e4e7 100%);
  background-size: 800px 100%;
  animation: shimmer 1.4s linear infinite;
}
html.dark .skeleton-line-md {
  background: linear-gradient(90deg, #27272a 0%, #3f3f46 50%, #27272a 100%);
  background-size: 800px 100%;
}

.skeleton-image {
  border-radius: 8px;
  background: linear-gradient(90deg, #e4e4e7 0%, #f4f4f5 50%, #e4e4e7 100%);
  background-size: 800px 100%;
  animation: shimmer 1.4s linear infinite;
}
html.dark .skeleton-image {
  background: linear-gradient(90deg, #27272a 0%, #3f3f46 50%, #27272a 100%);
  background-size: 800px 100%;
}

/* Stagger léger entre items successifs */
.skeleton-item:nth-child(2) .skeleton-card,
.skeleton-item:nth-child(2) .skeleton-line-sm,
.skeleton-item:nth-child(2) .skeleton-line-md,
.skeleton-item:nth-child(2) .skeleton-image { animation-delay: 0.1s; }

.skeleton-item:nth-child(3) .skeleton-card,
.skeleton-item:nth-child(3) .skeleton-line-sm,
.skeleton-item:nth-child(3) .skeleton-line-md,
.skeleton-item:nth-child(3) .skeleton-image { animation-delay: 0.2s; }

.skeleton-item:nth-child(4) .skeleton-card,
.skeleton-item:nth-child(4) .skeleton-line-sm,
.skeleton-item:nth-child(4) .skeleton-line-md,
.skeleton-item:nth-child(4) .skeleton-image { animation-delay: 0.3s; }

.skeleton-item:nth-child(5) .skeleton-card,
.skeleton-item:nth-child(5) .skeleton-line-sm,
.skeleton-item:nth-child(5) .skeleton-line-md,
.skeleton-item:nth-child(5) .skeleton-image { animation-delay: 0.4s; }

/* ── CMD+K PALETTE (#7) ─────────────────────────────────────── */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(60px, 12vh, 120px);
}
html.dark .cmdk-overlay {
  background: rgba(0, 0, 0, 0.72);
}

.cmdk-panel {
  width: 100%;
  max-width: 672px;
  background: rgba(15, 15, 16, 0.97);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  box-shadow: 0 32px 64px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(480px, 75vh);
  animation: cmdk-in 0.18s cubic-bezier(0.2, 0, 0, 1) both;
}
html:not(.dark) .cmdk-panel {
  background: rgba(250, 250, 250, 0.97);
  border-color: rgba(0,0,0,0.09);
  box-shadow: 0 32px 64px rgba(0,0,0,0.18), 0 8px 24px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.04);
}

@keyframes cmdk-in {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* Input zone */
.cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
html:not(.dark) .cmdk-input-wrap {
  border-bottom-color: rgba(0,0,0,0.07);
}
.cmdk-input-wrap svg {
  color: #71717a;
  flex-shrink: 0;
}
.cmdk-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: #fafafa;
  caret-color: #dc2626;
}
html:not(.dark) .cmdk-input {
  color: #0a0a0a;
}
.cmdk-input::placeholder {
  color: #52525b;
}

/* Results list */
.cmdk-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
}
.cmdk-list::-webkit-scrollbar { width: 4px; }
.cmdk-list::-webkit-scrollbar-track { background: transparent; }
.cmdk-list::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 4px; }

/* Section header */
.cmdk-section-header {
  padding: 8px 14px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #52525b;
  user-select: none;
}
html:not(.dark) .cmdk-section-header {
  color: #a1a1aa;
}

/* Command item */
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.06s ease;
  outline: none;
  user-select: none;
  min-height: 36px;
}
.cmdk-item.is-active,
.cmdk-item:hover {
  background: rgba(255,255,255,0.07);
}
html:not(.dark) .cmdk-item.is-active,
html:not(.dark) .cmdk-item:hover {
  background: rgba(0,0,0,0.05);
}
.cmdk-item-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  flex-shrink: 0;
  font-size: 12px;
}
html:not(.dark) .cmdk-item-icon {
  background: rgba(0,0,0,0.06);
}
.cmdk-item-label {
  flex: 1;
  font-size: 13px;
  font-weight: 450;
  color: #d4d4d8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html:not(.dark) .cmdk-item-label {
  color: #27272a;
}
.cmdk-item-kbd {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  color: #52525b;
  background: rgba(255,255,255,0.06);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
html:not(.dark) .cmdk-item-kbd {
  color: #a1a1aa;
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
}
.cmdk-item-meta {
  font-size: 11px;
  color: #52525b;
  flex-shrink: 0;
}

/* Footer */
.cmdk-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
html:not(.dark) .cmdk-footer {
  border-top-color: rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.015);
}
.cmdk-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #52525b;
}
.cmdk-hint kbd {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px;
  color: #71717a;
  background: rgba(255,255,255,0.06);
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.08);
}
html:not(.dark) .cmdk-hint kbd {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
}

/* Empty state */
.cmdk-empty {
  padding: 28px 14px;
  text-align: center;
  font-size: 13px;
  color: #52525b;
}

/* ── MODAL FADE-IN TRANSITION ──────────────────────────────── */
@keyframes modal-fade-in {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to   { opacity: 1; backdrop-filter: blur(12px); }
}

/* Appliqué sur l'overlay de chaque modal */
.modal-overlay {
  animation: modal-fade-in 200ms ease-out both;
}

/* Z-index stack officiel Beast Mode V15 */
/* z-20  : Header sticky                */
/* z-30  : Mobile sidebar backdrop      */
/* z-40  : Create drawer                */
/* z-50  : Article modal, Preset, Shortcuts, Image picker (base) */
/* z-60  : Image picker (elevé), Confirm modal                   */
/* z-100 : Login modal (always on top)                           */

/* ── BEAST BLACK THEME ──────────────────────────────────────── */
:root {
  /* Couleurs Beast Black */
  --bm-bg-deep:    #000000;
  --bm-bg-card:    #0a0a0a;
  --bm-bg-card-2:  #111111;
  --bm-bg-border:  #1a1a1a;
  --bm-text:       #fafafa;
  --bm-text-muted: #71717a;

  /* Accents néon Beast Mode V15 */
  --bm-rage:       #ff3366;
  --bm-dignity:    #ffaa00;
  --bm-gravity:    #6366f1;
  --bm-intimacy:   #ec4899;

  /* Glows */
  --bm-glow-rage:    rgba(255,  51, 102, 0.12);
  --bm-glow-dignity: rgba(255, 170,   0, 0.10);
  --bm-glow-gravity: rgba( 99, 102, 241, 0.10);
  --bm-glow-intimacy:rgba(236,  72, 153, 0.10);
}

/* Beast Black : fond profond, texte clair, cards légèrement élevées */
html.theme-beast-black body {
  background: var(--bm-bg-deep);
  color: var(--bm-text);
}

/* Cards / panels */
html.theme-beast-black .dark\:bg-ink-900,
html.theme-beast-black .dark\:bg-ink-950 {
  background-color: var(--bm-bg-card) !important;
}

/* Bordures */
html.theme-beast-black .dark\:border-ink-800,
html.theme-beast-black .dark\:border-ink-700 {
  border-color: var(--bm-bg-border) !important;
}

/* Texte secondaire */
html.theme-beast-black .dark\:text-ink-300,
html.theme-beast-black .dark\:text-ink-400 {
  color: var(--bm-text-muted) !important;
}

/* Glow sur les cards */
html.theme-beast-black .bg-white,
html.theme-beast-black .dark\:bg-ink-900 {
  box-shadow: 0 0 20px var(--bm-glow-dignity), inset 0 0 0 1px var(--bm-bg-border);
}

/* Accent principal → Dignity (or) */
html.theme-beast-black .bg-accent {
  background-color: var(--bm-dignity) !important;
  color: #000 !important;
}
html.theme-beast-black .text-accent,
html.theme-beast-black .dark\:text-accent {
  color: var(--bm-dignity) !important;
}
html.theme-beast-black .border-accent {
  border-color: var(--bm-dignity) !important;
}

/* Liens dans l'article preview */
html.theme-beast-black .article-preview a {
  color: var(--bm-dignity);
}

/* Live log background */
html.theme-beast-black .bg-ink-950 {
  background-color: var(--bm-bg-deep) !important;
}

/* Header sticky */
html.theme-beast-black .dark\:bg-ink-0\/95 {
  background-color: rgba(0, 0, 0, 0.92) !important;
  backdrop-filter: blur(8px);
}

/* Sidebar */
html.theme-beast-black .dark\:bg-ink-0 {
  background-color: var(--bm-bg-deep) !important;
}

/* Kbd keys */
html.theme-beast-black kbd.k {
  background: var(--bm-bg-card-2);
  color: var(--bm-dignity);
  border-color: var(--bm-bg-border);
}

/* Pulse-dot SSE indicator en Beast Black */
html.theme-beast-black .bg-emerald-500 {
  background-color: var(--bm-dignity) !important;
}

/* Progress bars */
html.theme-beast-black .bg-accent {
  background: linear-gradient(90deg, var(--bm-rage), var(--bm-dignity)) !important;
}

/* Skel loading */
html.theme-beast-black .skel {
  background: linear-gradient(90deg, #0a0a0a 0%, #151515 50%, #0a0a0a 100%) !important;
}

/* Score/badge highlights */
html.theme-beast-black [class*="bg-emerald"] {
  background-color: rgba(34, 197, 94, 0.12) !important;
  color: #4ade80 !important;
}
html.theme-beast-black [class*="text-emerald"] {
  color: #4ade80 !important;
}

/* Focus rings en Beast Black — Rage accent (rouge) */
html.theme-beast-black *:focus-visible {
  box-shadow: 0 0 0 2px var(--bm-rage),
              0 0 0 4px rgba(255, 51, 102, 0.25) !important;
}

/* Scrollbar stylée Beast Black */
html.theme-beast-black ::-webkit-scrollbar { width: 6px; height: 6px; }
html.theme-beast-black ::-webkit-scrollbar-track { background: var(--bm-bg-deep); }
html.theme-beast-black ::-webkit-scrollbar-thumb {
  background: var(--bm-bg-border);
  border-radius: 3px;
}
html.theme-beast-black ::-webkit-scrollbar-thumb:hover {
  background: #2a2a2a;
}

/* Glow spécial sur le logo Beast Mode */
html.theme-beast-black .bg-accent.flex.items-center.justify-center {
  background: var(--bm-rage) !important;
  box-shadow: 0 0 20px var(--bm-glow-rage);
}

/* ── TYPOGRAPHY BEAST MODE V21 ──────────────────────────────── */

/* ── 1. Body — Inter avec ligatures avancées ────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-feature-settings: 'ss01' 1, 'cv11' 1, 'kern' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── 2. Article preview — Lora (remplace Crimson Text) ──────── */
/* (Écrase la règle .article-preview existante) */
.article-preview {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  color: inherit;
}
.article-preview h1,
.article-preview h2,
.article-preview h3,
.article-preview h4 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 1.5em 0 0.6em;
}
.article-preview p { margin: 0 0 1.2em; }
.article-preview strong { font-weight: 600; }
.article-preview em { font-style: italic; }
.article-preview blockquote {
  font-style: italic;
  border-left: 3px solid currentColor;
  opacity: 0.7;
  padding-left: 1em;
  margin-left: 0;
}

/* ── 3. Titres globaux — tracking-tight automatique ─────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-feature-settings: 'ss01' 1, 'cv11' 1;
  letter-spacing: -0.025em;
}

/* Titres très grands : tracking encore plus resserré */
h1, .text-2xl, .text-3xl, .text-4xl {
  letter-spacing: -0.035em;
}

/* ── 4. Classes utilitaires ─────────────────────────────────── */

/* .font-display — Lora pour titres éditoriaux, pull quotes */
.font-display {
  font-family: 'Lora', Georgia, serif;
  font-feature-settings: 'kern' 1;
  letter-spacing: -0.02em;
}

/* .font-mono-tight — JetBrains Mono pour scores, chiffres, code */
.font-mono-tight {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  font-feature-settings: 'tnum' 1, 'zero' 1, 'ss01' 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* .tabular-nums — raccourci pratique pour scores et chiffres */
.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}


/* ── STATS BAR (#4) ─────────────────────────────────────────── */
.stats-bar {
  position: sticky;
  top: 56px;
  z-index: 19;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: opacity 0.3s ease;
}
html.dark .stats-bar {
  border-bottom-color: rgba(255,255,255,0.04);
}

/* Sparkline container */
.stats-sparkline {
  flex-shrink: 0;
  cursor: pointer;
}
.stats-sparkline svg {
  display: block;
}
.stats-sparkline .spark-bar {
  transition: opacity 0.15s ease;
}
.stats-sparkline .spark-bar:hover {
  opacity: 0.9 !important;
}

/* Stats bar shimmer quand loading */
.stats-bar-loading .stats-value {
  animation: stats-pulse 1.5s ease-in-out infinite;
}
@keyframes stats-pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

/* Séparateur vertical entre stats */
.stats-sep {
  width: 1px;
  height: 16px;
  background: currentColor;
  opacity: 0.12;
  flex-shrink: 0;
}

/* Badge sync count */
.stats-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.6;
}


/* ── TAB TRANSITIONS (#8) ───────────────────────────────────── */

.tab-panels-container {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.tab-panel-slide {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  will-change: transform, opacity;
}

.tab-panel-slide[data-state="active"] {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity   200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.tab-panel-slide[data-state="enter-from-right"] {
  transform: translateX(32px);
  opacity: 0;
  pointer-events: none;
}
.tab-panel-slide[data-state="enter-from-left"] {
  transform: translateX(-32px);
  opacity: 0;
  pointer-events: none;
}
.tab-panel-slide[data-state="exit-to-left"] {
  transform: translateX(-32px);
  opacity: 0;
  pointer-events: none;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity   200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.tab-panel-slide[data-state="exit-to-right"] {
  transform: translateX(32px);
  opacity: 0;
  pointer-events: none;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity   200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.tab-panel-slide[data-state="hidden"] {
  transform: translateX(0);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: #dc2626;
  border-radius: 2px 2px 0 0;
  transition: left 220ms cubic-bezier(0.4, 0, 0.2, 1),
              width 220ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.tab-list-relative {
  position: relative;
}

@media (prefers-reduced-motion: reduce) {
  .tab-panel-slide[data-state="active"],
  .tab-panel-slide[data-state="exit-to-left"],
  .tab-panel-slide[data-state="exit-to-right"] {
    transition: opacity 100ms ease;
  }
  .tab-panel-slide[data-state="enter-from-right"],
  .tab-panel-slide[data-state="enter-from-left"] {
    transform: translateX(0) !important;
  }
  .tab-indicator {
    transition: none;
  }
}


/* ── GENRE BADGES (#9) ──────────────────────────────────────── */

.genre-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: 0.01em;
}

.genre-analyse { color: #7c3aed; background-color: #f5f3ff; box-shadow: inset 0 0 0 1px #7c3aed33; }
html.dark .genre-analyse { color: #c4b5fd; background-color: #2e1065; box-shadow: inset 0 0 0 1px #7c3aed55; }

.genre-chronique { color: #b45309; background-color: #fffbeb; box-shadow: inset 0 0 0 1px #b4530933; }
html.dark .genre-chronique { color: #fcd34d; background-color: #451a03; box-shadow: inset 0 0 0 1px #b4530955; }

.genre-editorial { color: #dc2626; background-color: #fef2f2; box-shadow: inset 0 0 0 1px #dc262633; }
html.dark .genre-editorial { color: #fca5a5; background-color: #450a0a; box-shadow: inset 0 0 0 1px #dc262655; }

.genre-enquete { color: #0e7490; background-color: #ecfeff; box-shadow: inset 0 0 0 1px #0e749033; }
html.dark .genre-enquete { color: #67e8f9; background-color: #083344; box-shadow: inset 0 0 0 1px #0e749055; }

.genre-opinion { color: #4338ca; background-color: #eef2ff; box-shadow: inset 0 0 0 1px #4338ca33; }
html.dark .genre-opinion { color: #a5b4fc; background-color: #1e1b4b; box-shadow: inset 0 0 0 1px #4338ca55; }

.genre-billet { color: #be185d; background-color: #fdf2f8; box-shadow: inset 0 0 0 1px #be185d33; }
html.dark .genre-billet { color: #f9a8d4; background-color: #500724; box-shadow: inset 0 0 0 1px #be185d55; }

.genre-recit { color: #059669; background-color: #ecfdf5; box-shadow: inset 0 0 0 1px #05966933; }
html.dark .genre-recit { color: #6ee7b7; background-color: #022c22; box-shadow: inset 0 0 0 1px #05966955; }

.genre-portrait { color: #0284c7; background-color: #f0f9ff; box-shadow: inset 0 0 0 1px #0284c733; }
html.dark .genre-portrait { color: #7dd3fc; background-color: #082f49; box-shadow: inset 0 0 0 1px #0284c755; }

.genre-reportage { color: #ea580c; background-color: #fff7ed; box-shadow: inset 0 0 0 1px #ea580c33; }
html.dark .genre-reportage { color: #fdba74; background-color: #431407; box-shadow: inset 0 0 0 1px #ea580c55; }

.genre-lettre-ouverte { color: #e11d48; background-color: #fff1f2; box-shadow: inset 0 0 0 1px #e11d4833; }
html.dark .genre-lettre-ouverte { color: #fda4af; background-color: #4c0519; box-shadow: inset 0 0 0 1px #e11d4855; }

.genre-fact-check { color: #0f766e; background-color: #f0fdfa; box-shadow: inset 0 0 0 1px #0f766e33; }
html.dark .genre-fact-check { color: #5eead4; background-color: #042f2e; box-shadow: inset 0 0 0 1px #0f766e55; }

.genre-temoignage { color: #9333ea; background-color: #faf5ff; box-shadow: inset 0 0 0 1px #9333ea33; }
html.dark .genre-temoignage { color: #d8b4fe; background-color: #3b0764; box-shadow: inset 0 0 0 1px #9333ea55; }

.genre-essai { color: #475569; background-color: #f8fafc; box-shadow: inset 0 0 0 1px #47556933; }
html.dark .genre-essai { color: #94a3b8; background-color: #0f172a; box-shadow: inset 0 0 0 1px #47556955; }

.genre-commentaire { color: #525252; background-color: #fafafa; box-shadow: inset 0 0 0 1px #52525233; }
html.dark .genre-commentaire { color: #a3a3a3; background-color: #171717; box-shadow: inset 0 0 0 1px #52525255; }

.genre-dose { color: #b91c1c; background-color: #fef2f2; box-shadow: inset 0 0 0 1px #b91c1c44; font-weight: 600; }
html.dark .genre-dose { color: #ef4444; background-color: #450a0a; box-shadow: inset 0 0 0 1px #b91c1c66; font-weight: 600; }

.genre-unknown { color: #71717a; background-color: #f4f4f5; box-shadow: inset 0 0 0 1px #71717a33; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; }
html.dark .genre-unknown { color: #a1a1aa; background-color: #18181b; box-shadow: inset 0 0 0 1px #71717a33; }


/* ── CUSTOM CURSORS (#13) ──────────────────────────────────── */

.cursor-danger {
  cursor: not-allowed;
  position: relative;
}

.cursor-danger::after {
  content: '✕';
  position: fixed;
  pointer-events: none;
  font-size: 11px;
  font-weight: 700;
  color: #dc2626;
  background: #fff1f2;
  border: 1.5px solid #dc2626;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 1px;
  opacity: 0;
  transform: scale(0.6) translate(8px, -20px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 9998;
  right: -6px;
  top: -10px;
}
.cursor-danger:hover::after,
.cursor-danger:focus-visible::after {
  opacity: 1;
  transform: scale(1) translate(8px, -20px);
}
html.dark .cursor-danger::after {
  background: #3f0f0f;
  color: #fca5a5;
  border-color: #ef4444;
}

.cursor-grab-list {
  cursor: grab;
  touch-action: none;
}
.cursor-grab-list:active {
  cursor: grabbing;
}

.cursor-confetti {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg transform='translate(16,16)'%3E%3Ccircle r='3' fill='%23fbbf24'/%3E%3Cline x1='0' y1='-8' x2='0' y2='-5' stroke='%23fbbf24' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='0' y1='5' x2='0' y2='8' stroke='%23dc2626' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='-8' y1='0' x2='-5' y2='0' stroke='%23a855f7' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='5' y1='0' x2='8' y2='0' stroke='%23db2777' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='-5.7' y1='-5.7' x2='-3.5' y2='-3.5' stroke='%23fbbf24' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='3.5' y1='3.5' x2='5.7' y2='5.7' stroke='%23dc2626' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='5.7' y1='-5.7' x2='3.5' y2='-3.5' stroke='%23a855f7' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='-3.5' y1='3.5' x2='-5.7' y2='5.7' stroke='%23db2777' stroke-width='1.5' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E") 16 16, pointer;
}

@keyframes confetti-cursor-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); }
}
.cursor-confetti {
  animation: confetti-cursor-pulse 1.2s ease-in-out infinite;
}


/* ── ARTICLE HERO IMAGE (#19) — hero-image / articleHero ────── */
.modal-hero { position: relative; width: 100%; flex-shrink: 0; overflow: hidden; }
.modal-hero--image { height: 200px; }
.modal-hero--compact { height: 80px; }
.modal-hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  transform: scale(1.03);
}
.modal-hero__gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,8,10,0.15) 0%, rgba(8,8,10,0.30) 40%, rgba(8,8,10,0.82) 75%, #08080a 100%);
}
html:not(.dark) .modal-hero__gradient {
  background: linear-gradient(to bottom, rgba(250,250,250,0) 0%, rgba(250,250,250,0) 35%, rgba(15,15,16,0.65) 70%, rgba(15,15,16,0.95) 100%);
}
.modal-hero__title {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px 20px 16px;
  font-size: clamp(14px, 2.5vw, 19px); font-weight: 700; line-height: 1.25;
  color: #ffffff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7));
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.modal-hero--compact .modal-hero__title {
  top: 0; display: flex; align-items: center; font-size: 13px; -webkit-line-clamp: 1; padding: 0 20px;
}
@keyframes hero-slide-down { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
.modal-hero { animation: hero-slide-down 0.3s ease forwards; }
.hero-genre-REPORTAGE  { background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%); }
.hero-genre-ANALYSE    { background: linear-gradient(135deg, #3b1f5e 0%, #7c3aed 100%); }
.hero-genre-DECRYPTAGE { background: linear-gradient(135deg, #1f3a2e 0%, #059669 100%); }
.hero-genre-CHRONIQUE  { background: linear-gradient(135deg, #4a1f1f 0%, #dc2626 100%); }
.hero-genre-ENQUETE    { background: linear-gradient(135deg, #2d1f00 0%, #d97706 100%); }
.hero-genre-PORTRAIT   { background: linear-gradient(135deg, #3a1f3a 0%, #db2777 100%); }
.hero-genre-EDITORIAL  { background: linear-gradient(135deg, #0f1f3a 0%, #0284c7 100%); }
.hero-genre-OPINION    { background: linear-gradient(135deg, #1f2d1f 0%, #65a30d 100%); }
.hero-genre-default    { background: linear-gradient(135deg, #18181b 0%, #3f3f46 100%); }

/* ── TAG PILLS (#20) ────────────────────────────────────────── */
.tag-pills-container { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px 3px 6px; border-radius: 9999px;
  font-size: 11px; font-weight: 500; line-height: 1.2;
  border: 1px solid transparent; cursor: default; user-select: none;
  transition: box-shadow 0.15s ease, transform 0.12s ease;
  position: relative; white-space: nowrap; max-width: 160px;
}
.tag-pill:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.tag-pill__drag { cursor: grab; opacity: 0; transition: opacity 0.15s ease; color: currentColor; font-size: 12px; line-height: 1; flex-shrink: 0; }
.tag-pill__drag:active { cursor: grabbing; }
.tag-pill:hover .tag-pill__drag { opacity: 0.55; }
.tag-pill__emoji { font-size: 12px; line-height: 1; flex-shrink: 0; }
.tag-pill__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-pill__remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: transparent; border: none; cursor: pointer; padding: 0; margin-left: 2px;
  color: currentColor; opacity: 0;
  transition: opacity 0.15s ease, background 0.12s ease;
  flex-shrink: 0; font-size: 10px; line-height: 1;
}
.tag-pill:hover .tag-pill__remove { opacity: 0.7; }
.tag-pill__remove:hover { opacity: 1 !important; background: rgba(0,0,0,0.15); }
html.dark .tag-pill__remove:hover { background: rgba(255,255,255,0.2); }
.tag-pill.dragging { opacity: 0.45; transform: scale(0.95); box-shadow: none; }
.tag-pill.drag-over { box-shadow: 0 0 0 2px rgba(251,191,36,0.7); transform: scale(1.04); }
@keyframes tag-pop { 0% { transform: scale(0.5); opacity: 0; } 65% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.tag-pill--entering { animation: tag-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes tag-collapse {
  0% { transform: scale(1); opacity: 1; max-width: 200px; padding-left: 6px; padding-right: 8px; margin: 0; }
  40% { transform: scale(0.85); opacity: 0.3; }
  100% { transform: scale(0.5); opacity: 0; max-width: 0; padding-left: 0; padding-right: 0; margin: 0; border-width: 0; }
}
.tag-pill--leaving { animation: tag-collapse 0.28s ease forwards; pointer-events: none; overflow: hidden; }
.tag-add-input {
  border: 1px dashed; border-radius: 9999px; font-size: 11px; padding: 3px 10px;
  outline: none; background: transparent; min-width: 90px; width: 90px;
  transition: width 0.15s ease, border-color 0.15s ease;
}
.tag-add-input:focus { width: 140px; }
.tag-suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 60;
  background: #fff; border: 1px solid #e4e4e7; border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1); min-width: 160px; max-height: 180px; overflow-y: auto;
}
html.dark .tag-suggestions { background: #18181b; border-color: #27272a; }
.tag-suggestion-item { padding: 6px 12px; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.tag-suggestion-item:hover { background: #f4f4f5; }
html.dark .tag-suggestion-item:hover { background: #27272a; }
.tag-pill--no-color { background: #f4f4f5; color: #3f3f46; border-color: #e4e4e7; }
html.dark .tag-pill--no-color { background: #27272a; color: #a1a1aa; border-color: #3f3f46; }

/* ── EMOTION MINI-GRAPH (#10) ───────────────────────────────── */
.emotion-graph-wrap { display: inline-flex; align-items: center; flex-shrink: 0; height: 16px; width: 60px; }
.emotion-graph-wrap svg { display: block; }
.emotion-skel { width: 60px; height: 8px; margin: auto 0; border-radius: 4px; }
@keyframes emotion-fadein { from { opacity:0; } to { opacity:1; } }
.emotion-graph-wrap svg { animation: emotion-fadein 0.3s ease; }

/* ── CONFETTI (#12) ─────────────────────────────────────────── */
#confetti-container {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999; overflow: hidden;
}
.confetti-particle {
  position: absolute; top: -24px; width: 10px; height: 10px; border-radius: 2px;
  opacity: 1; will-change: transform, opacity;
  animation: confetti-fall var(--duration, 2s) var(--delay, 0s) cubic-bezier(0.23, 0.91, 0.55, 0.99) forwards;
}
@keyframes confetti-fall {
  0% { transform: translateX(var(--drift-start, 0px)) translateY(0) rotate(0deg); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateX(var(--drift-end, 40px)) translateY(100vh) rotate(var(--spin, 540deg)); opacity: 0; }
}
@keyframes confetti-badge-pop {
  0% { transform: scale(1); } 40% { transform: scale(1.35); } 70% { transform: scale(0.92); } 100% { transform: scale(1); }
}
.score-175-pop { animation: confetti-badge-pop 0.5s ease; }

/* ── SCORE GLOW EFFECTS ─────────────────────────────────────── */

/* Pulse box-shadow doré pour score ≥ 150 */
@keyframes glowPulse {
  0%, 100% {
    box-shadow:
      0 0 0 0   rgba(251, 191, 36, 0),
      0 0 8px 2px rgba(251, 191, 36, 0.18),
      inset 0 0 0 1px rgba(251, 191, 36, 0.15);
  }
  50% {
    box-shadow:
      0 0 0 3px  rgba(251, 191, 36, 0.10),
      0 0 18px 4px rgba(251, 191, 36, 0.28),
      inset 0 0 0 1px rgba(251, 191, 36, 0.30);
  }
}

/* Pulse box-shadow OR intense pour score 175/175 */
@keyframes glowPulsePerfect {
  0%, 100% {
    box-shadow:
      0 0 0 0   rgba(251, 191, 36, 0),
      0 0 12px 4px rgba(251, 191, 36, 0.30),
      0 0 0 1px rgba(251, 191, 36, 0.40);
  }
  50% {
    box-shadow:
      0 0 0 5px  rgba(251, 191, 36, 0.14),
      0 0 32px 8px rgba(251, 191, 36, 0.50),
      0 0 0 1px rgba(251, 191, 36, 0.60);
  }
}

/* ── .score-elite — score ≥ 150 ──────────────────────────────── */
.score-elite {
  border: 1px solid rgba(251, 191, 36, 0.30) !important;
  background: linear-gradient(
    135deg,
    rgba(254, 243, 199, 0.20) 0%,
    rgba(253, 230, 138, 0.10) 100%
  ) !important;
  animation: glowPulse 3s ease-in-out infinite;
  border-radius: 10px;
  transition: border-color 0.3s, background 0.3s;
}
html.dark .score-elite {
  border-color: rgba(251, 191, 36, 0.20) !important;
  background: linear-gradient(
    135deg,
    rgba(120, 53, 15, 0.18) 0%,
    rgba(180, 83, 9, 0.10) 100%
  ) !important;
}

/* ── .score-perfect — score 175/175 ─────────────────────────── */
.score-perfect {
  border: 1px solid rgba(251, 191, 36, 0.60) !important;
  background: linear-gradient(
    135deg,
    rgba(254, 243, 199, 0.38) 0%,
    rgba(252, 211, 77, 0.18) 100%
  ) !important;
  animation: glowPulsePerfect 2.5s ease-in-out infinite;
  border-radius: 10px;
  transition: border-color 0.3s, background 0.3s;
}
html.dark .score-perfect {
  border-color: rgba(251, 191, 36, 0.50) !important;
  background: linear-gradient(
    135deg,
    rgba(120, 53, 15, 0.35) 0%,
    rgba(180, 83, 9, 0.20) 100%
  ) !important;
}

/* Variante ring-only */
.score-elite-ring {
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.35));
  animation: glowPulse 3s ease-in-out infinite;
}
.score-perfect-ring {
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.55));
  animation: glowPulsePerfect 2.5s ease-in-out infinite;
}

/* ── SIDEBAR — MOBILE DRAWER ONLY (#16 FIX 2026-05-29) ───────── */

@media (max-width: 767px) {

  /* Sur mobile : sidebar = drawer, pas de rail mini.
     Garde sa largeur Tailwind (w-60 = 240px) mais sort de l'écran
     via le -translate-x-full appliqué par Alpine quand sidebarOpen=false */
  nav[aria-label="Navigation principale"] {
    width: 240px !important;
    min-width: 240px;
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* L'expansion via .sidebar-expanded n'a plus de sens sur mobile (déjà drawer) */
  nav[aria-label="Navigation principale"].sidebar-expanded {
    width: 240px !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    z-index: 41;
  }

  /* Labels des items : cachés en mode rail */
  nav[aria-label="Navigation principale"] .sidebar-label {
    display: none;
    white-space: nowrap;
  }
  nav[aria-label="Navigation principale"].sidebar-expanded .sidebar-label {
    display: inline;
  }

  /* Header logo text */
  nav[aria-label="Navigation principale"] .sidebar-logo-text {
    display: none;
  }
  nav[aria-label="Navigation principale"].sidebar-expanded .sidebar-logo-text {
    display: block;
  }

  /* Header logo: centré en mode rail */
  nav[aria-label="Navigation principale"] .sidebar-header-inner {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
  nav[aria-label="Navigation principale"].sidebar-expanded .sidebar-header-inner {
    justify-content: flex-start;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Nav items: centrer l’icône en rail */
  nav[aria-label="Navigation principale"] .nav-item-btn {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
  nav[aria-label="Navigation principale"].sidebar-expanded .nav-item-btn {
    justify-content: flex-start;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Footer du sidebar caché en rail */
  nav[aria-label="Navigation principale"] .sidebar-footer {
    display: none;
  }
  nav[aria-label="Navigation principale"].sidebar-expanded .sidebar-footer {
    display: flex;
  }

  /* MOBILE DRAWER MODE : aucun margin sur le main content (#16 FIX 2026-05-29) */
  .md\:ml-60 {
    margin-left: 0 !important;
  }

  /* Tooltip au hover (desktop-style) */
  .rail-tooltip {
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: #0a0a0a;
    color: #fafafa;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  .rail-tooltip::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: #0a0a0a;
    border-radius: 1px;
  }
  html.dark .rail-tooltip { background: #fafafa; color: #0a0a0a; }
  html.dark .rail-tooltip::before { background: #fafafa; }

  /* Affichage tooltip au hover de l’item */
  .nav-item-btn:hover .rail-tooltip,
  .nav-item-btn:focus-visible .rail-tooltip {
    opacity: 1;
  }

  /* Overlay backdrop lors de l’expansion — UNIQUEMENT si .block classe Alpine active */
  .sidebar-rail-backdrop.block {
    display: block !important;
  }
  .sidebar-rail-backdrop.hidden {
    display: none !important;
    pointer-events: none;
  }

  /* MOBILE DRAWER : forcer affichage normal labels + logo (override #16) */
  nav[aria-label="Navigation principale"] .sidebar-label {
    display: inline !important;
  }
  nav[aria-label="Navigation principale"] .sidebar-logo-text {
    display: block !important;
  }
  nav[aria-label="Navigation principale"] .sidebar-header-inner {
    justify-content: flex-start !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

}

@media (min-width: 768px) {
  /* S’assure que le backdrop ne s’affiche pas sur desktop */
  .sidebar-rail-backdrop {
    display: none !important;
  }
}

/* Transition largeur sidebar pour fermeture fluide */
nav[aria-label="Navigation principale"] {
  transition: width 0.26s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
}

  /* ── BULK SELECTION HIGHLIGHT ───────────────────────────────── */
  li:has(input[type="checkbox"]:checked) > button {
    background-color: rgba(220, 38, 38, 0.04) !important;
    outline: 1px solid rgba(220, 38, 38, 0.15);
    outline-offset: -1px;
  }
  html.dark li:has(input[type="checkbox"]:checked) > button {
    background-color: rgba(220, 38, 38, 0.07) !important;
  }

  /* ── INLINE EDIT CURSOR ─────────────────────────────────────── */
  .cursor-text { cursor: text; }

  /* ── SCORE COLOUR CLASSES (C6) ─────────────────────────────── */
  .score-badge-red    { background: #fef2f2; color: #dc2626; }
  .score-badge-amber  { background: #fffbeb; color: #b45309; }
  .score-badge-blue   { background: #eff6ff; color: #2563eb; }
  .score-badge-green  { background: #f0fdf4; color: #16a34a; }
  html.dark .score-badge-red    { background: #450a0a; color: #fca5a5; }
  html.dark .score-badge-amber  { background: #451a03; color: #fcd34d; }
  html.dark .score-badge-blue   { background: #1e3a8a; color: #93c5fd; }
  html.dark .score-badge-green  { background: #052e16; color: #86efac; }

  /* ── STUCK ARTICLE PULSE (A3) ───────────────────────────────── */
  @keyframes stuck-pulse {
    0%, 100% { border-color: rgba(251, 146, 60, 0.45); }
    50%       { border-color: rgba(251, 146, 60, 1); }
  }
  .stuck-pulse { animation: stuck-pulse 2.5s ease-in-out infinite; }

  /* ── GROUP HOVER for quick row actions (A9,A18) ─────────────── */
  li button .hidden.group-hover\:flex {
    /* Tailwind group-hover handled by JS class — fallback */
    display: none;
  }
  li button:hover .hidden {
    display: flex;
  }

  /* ── DASHBOARD V14 — SHELL & SURFACES ───────────────────────── */
  .app-shell-bg {
    background:
      radial-gradient(ellipse 120% 80% at 100% -20%, rgba(220, 38, 38, 0.07), transparent 55%),
      radial-gradient(ellipse 90% 60% at 0% 100%, rgba(251, 191, 36, 0.06), transparent 50%),
      #fafafa;
  }
  html.dark .app-shell-bg,
  html.theme-beast-black .app-shell-bg {
    background:
      radial-gradient(ellipse 120% 80% at 100% -20%, rgba(220, 38, 38, 0.12), transparent 55%),
      radial-gradient(ellipse 90% 60% at 0% 100%, rgba(251, 191, 36, 0.05), transparent 50%),
      #0a0a0a;
  }

  .dash-surface {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(228, 228, 231, 0.9);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  html.dark .dash-surface,
  html.theme-beast-black .dash-surface {
    background: rgba(15, 15, 16, 0.82);
    border-color: rgba(63, 63, 70, 0.85);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.35);
  }

  .app-topbar {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: rgba(228, 228, 231, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  html.dark .app-topbar,
  html.theme-beast-black .app-topbar {
    background: rgba(10, 10, 10, 0.88);
    border-bottom-color: rgba(39, 39, 42, 0.9);
  }

  nav[aria-label="Navigation principale"] {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  html.dark nav[aria-label="Navigation principale"],
  html.theme-beast-black nav[aria-label="Navigation principale"] {
    background: rgba(8, 8, 10, 0.96);
  }

  .nav-item-btn.nav-item-active {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.12) 0%, rgba(220, 38, 38, 0.04) 100%);
    color: #0a0a0a;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #dc2626;
  }
  html.dark .nav-item-btn.nav-item-active,
  html.theme-beast-black .nav-item-btn.nav-item-active {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.14) 0%, rgba(251, 191, 36, 0.04) 100%);
    color: #fafafa;
    box-shadow: inset 3px 0 0 #fbbf24;
  }

  .header-view-chip {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #71717a;
  }
  html.dark .header-view-chip { color: #a1a1aa; }

  /* Mobile bottom navigation */
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid rgba(228, 228, 231, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08);
  }
  html.dark .mobile-bottom-nav,
  html.theme-beast-black .mobile-bottom-nav {
    background: rgba(10, 10, 10, 0.94);
    border-top-color: rgba(39, 39, 42, 0.95);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  }

  .mobile-nav-btn {
    min-height: 52px;
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 600;
    color: #71717a;
    transition: color 0.15s ease, background 0.15s ease;
  }
  .mobile-nav-btn svg { width: 20px; height: 20px; }
  .mobile-nav-btn.is-active { color: #dc2626; }
  html.dark .mobile-nav-btn.is-active,
  html.theme-beast-black .mobile-nav-btn.is-active { color: #fbbf24; }

  .mobile-nav-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 18px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
  }

  .mobile-live-sheet {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
  }
  .mobile-live-sheet.is-open { pointer-events: auto; }
  .mobile-live-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.22s ease;
  }
  .mobile-live-sheet.is-open .mobile-live-sheet__backdrop { opacity: 1; }
  .mobile-live-sheet__panel {
    position: relative;
    max-height: min(78vh, 640px);
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px 16px 0 0;
    overflow: hidden;
  }
  .mobile-live-sheet.is-open .mobile-live-sheet__panel { transform: translateY(0); }

  @media (min-width: 768px) {
    .mobile-bottom-nav,
    .mobile-live-sheet { display: none !important; }
  }

  @media (max-width: 767px) {
    .main-with-mobile-nav { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
    .mobile-fab-live {
      bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)) !important;
    }
  }

/* ═══════════════════════════════════════════════════════════════
   BEAST MODE V15 — ACCESSIBLE PREMIUM DASHBOARD REFRESH
   Objectif: interface belle, simple, lisible par quelqu'un de 70 ans.
   Non destructif: override CSS seulement, fonctions Alpine conservées.
═══════════════════════════════════════════════════════════════ */
:root {
  --bm-bg: #f6f3ee;
  --bm-panel: rgba(255,255,255,0.88);
  --bm-panel-strong: #ffffff;
  --bm-text: #121212;
  --bm-muted: #5b5f68;
  --bm-border: rgba(20,20,20,0.12);
  --bm-accent: #b91c1c;
  --bm-accent-2: #7c3aed;
  --bm-gold: #d97706;
  --bm-radius: 22px;
  --bm-shadow: 0 18px 50px rgba(15, 15, 15, 0.10);
  --bm-shadow-soft: 0 8px 28px rgba(15, 15, 15, 0.08);
}
html.dark,
html.theme-beast-black {
  --bm-bg: #07080b;
  --bm-panel: rgba(17,19,25,0.86);
  --bm-panel-strong: #111319;
  --bm-text: #f7f8f8;
  --bm-muted: #c7ced8;
  --bm-border: rgba(255,255,255,0.12);
  --bm-accent: #ef4444;
  --bm-accent-2: #8b7cff;
  --bm-gold: #fbbf24;
  --bm-shadow: 0 22px 70px rgba(0,0,0,0.38);
  --bm-shadow-soft: 0 10px 32px rgba(0,0,0,0.26);
}
body.app-shell-bg {
  background:
    radial-gradient(circle at 18% 0%, rgba(185,28,28,0.16), transparent 36%),
    radial-gradient(circle at 92% 8%, rgba(124,58,237,0.13), transparent 34%),
    linear-gradient(135deg, var(--bm-bg), color-mix(in srgb, var(--bm-bg) 86%, #000 14%));
  color: var(--bm-text);
  font-size: 17px;
}
html.dark body.app-shell-bg,
html.theme-beast-black body.app-shell-bg {
  background:
    radial-gradient(circle at 12% -5%, rgba(239,68,68,0.17), transparent 32%),
    radial-gradient(circle at 86% 2%, rgba(139,124,255,0.17), transparent 34%),
    linear-gradient(145deg, #05060a 0%, #0a0b10 45%, #08070a 100%);
}

/* Layout plus calme: sidebar large, moins de bruit, centre lisible */
nav[aria-label="Navigation principale"] {
  width: 292px !important;
  background: color-mix(in srgb, var(--bm-panel-strong) 92%, transparent) !important;
  border-right: 1px solid var(--bm-border) !important;
  box-shadow: var(--bm-shadow-soft);
  backdrop-filter: blur(18px) saturate(1.18);
}
.md\:ml-60 { margin-left: 292px !important; }
@media (max-width: 767px) {
  nav[aria-label="Navigation principale"] { width: min(92vw, 340px) !important; }
  .md\:ml-60 { margin-left: 0 !important; }
}
.sidebar-header-inner {
  padding: 1.35rem 1.25rem !important;
  min-height: 94px;
}
.sidebar-header-inner .w-8.h-8 {
  width: 52px !important;
  height: 52px !important;
  border-radius: 18px !important;
  font-size: 24px !important;
  background: linear-gradient(135deg, var(--bm-accent), #f97316) !important;
  box-shadow: 0 14px 34px rgba(185,28,28,0.28);
}
.sidebar-logo-text .text-sm {
  font-size: 21px !important;
  line-height: 1.05 !important;
  letter-spacing: -0.04em;
}
.sidebar-logo-text .text-\[10px\] {
  font-size: 13px !important;
  color: var(--bm-muted) !important;
}

.nav-item-btn {
  min-height: 64px;
  border-radius: 18px !important;
  padding: 0.9rem 1rem !important;
  gap: 0.85rem !important;
  font-size: 18px !important;
  font-weight: 760 !important;
  letter-spacing: -0.025em;
  border: 1px solid transparent;
}
.nav-item-btn svg { width: 24px !important; height: 24px !important; stroke-width: 2.25; }
/* Live pipeline déplacé dans la sidebar gauche : équilibre flex pour garder le footer visible */
nav[aria-label="Navigation principale"] > ul.flex-1 { flex: 0 1 auto; overflow-y: auto; }
.sidebar-live { max-height: 46vh; }
.sidebar-live__scroll { min-height: 0; overflow-y: auto; }
/* Mobile uniquement : en mode rail réduit (non survolé) on masque le contenu live, sur desktop il reste toujours visible */
@media (max-width: 767px) {
  nav[aria-label="Navigation principale"]:not(.sidebar-expanded) .sidebar-live__body { display: none; }
  nav[aria-label="Navigation principale"]:not(.sidebar-expanded) .sidebar-live__toggle .sidebar-label { display: none; }
}
.nav-item-btn:hover {
  transform: translateY(-1px);
  background: rgba(185,28,28,0.08) !important;
  border-color: rgba(185,28,28,0.20);
}
.nav-item-active {
  background: linear-gradient(135deg, rgba(185,28,28,0.16), rgba(124,58,237,0.12)) !important;
  border-color: rgba(185,28,28,0.32) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), var(--bm-shadow-soft);
  color: var(--bm-text) !important;
}
html.dark .nav-item-active,
html.theme-beast-black .nav-item-active {
  background: linear-gradient(135deg, rgba(239,68,68,0.24), rgba(139,124,255,0.18)) !important;
  color: #fff !important;
}

.app-topbar {
  min-height: 72px;
  background: color-mix(in srgb, var(--bm-panel) 92%, transparent) !important;
  border-bottom: 1px solid var(--bm-border) !important;
  backdrop-filter: blur(18px) saturate(1.2);
}
.app-topbar > .flex { min-height: 72px !important; height: auto !important; padding-block: 0.7rem !important; }
.header-view-chip { color: var(--bm-accent); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }

#main-content {
  padding: clamp(18px, 2.5vw, 34px) !important;
  max-width: 1520px;
}
#main-content > section,
#main-content > div[x-show*="newsletter"] {
  animation: bmViewIn 220ms ease-out;
}
@keyframes bmViewIn { from { opacity: .72; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Cartes et panneaux: plus gros, plus lisibles */
.dash-surface,
#main-content .bg-white,
#main-content .dark\:bg-ink-900,
#main-content .dark\:bg-ink-950 {
  background: var(--bm-panel) !important;
  border: 1px solid var(--bm-border) !important;
  border-radius: var(--bm-radius) !important;
  box-shadow: var(--bm-shadow-soft);
  backdrop-filter: blur(12px) saturate(1.12);
}
#main-content h2 {
  font-size: clamp(34px, 4vw, 50px) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.055em !important;
  font-weight: 840 !important;
}
#main-content h3 {
  font-size: 22px !important;
  line-height: 1.15 !important;
  letter-spacing: -0.035em;
  font-weight: 780 !important;
}
#main-content p,
#main-content label,
#main-content li,
#main-content .text-sm {
  font-size: 17px;
  line-height: 1.5;
}
#main-content .text-xs,
#main-content .text-\[11px\],
#main-content .text-\[10px\] {
  font-size: 14px !important;
  line-height: 1.45 !important;
}

/* Formulaires senior-friendly */
input[type="text"], input[type="url"], input[type="search"], input[type="email"], input[type="password"], textarea, select {
  min-height: 50px;
  border-radius: 14px !important;
  font-size: 17px !important;
  padding: 0.75rem 0.95rem !important;
  border-color: var(--bm-border) !important;
}
button, a[role="button"] { touch-action: manipulation; }
#main-content button,
.app-topbar button {
  min-height: 48px;
  border-radius: 14px !important;
  font-size: 16px;
  font-weight: 750;
}
#main-content button.bg-accent,
.app-topbar button.bg-accent {
  background: linear-gradient(135deg, var(--bm-accent), #f97316) !important;
  box-shadow: 0 14px 30px rgba(185,28,28,0.24);
}

/* Queue: formulaire principal volontairement confortable */
#view-queue-title + p { font-size: 19px !important; color: var(--bm-muted) !important; }
section[x-show="view==='queue'"] form {
  gap: 1rem !important;
}
section[x-show="view==='queue'"] form label {
  font-size: 14px !important;
  letter-spacing: 0.06em;
  color: var(--bm-muted) !important;
}
section[x-show="view==='queue'"] form button[type="submit"] {
  min-height: 56px;
  padding-inline: 1.4rem !important;
  font-size: 18px !important;
}

/* Mobile bottom nav: grosses zones tactiles */
.mobile-bottom-nav {
  background: color-mix(in srgb, var(--bm-panel-strong) 94%, transparent) !important;
  border-top: 1px solid var(--bm-border) !important;
  backdrop-filter: blur(18px) saturate(1.15);
}
.mobile-nav-btn {
  min-height: 72px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
.mobile-nav-btn svg { width: 24px !important; height: 24px !important; }
.mobile-nav-btn.is-active { color: var(--bm-accent) !important; }

/* Cockpit accessible */
.bm-cockpit {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  padding: clamp(20px, 3vw, 34px);
  border-radius: 28px;
  border: 1px solid var(--bm-border);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(255,255,255,0.45)),
    radial-gradient(circle at 0% 0%, rgba(185,28,28,0.16), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(124,58,237,0.14), transparent 36%);
  box-shadow: var(--bm-shadow);
  overflow: hidden;
}
html.dark .bm-cockpit,
html.theme-beast-black .bm-cockpit {
  background:
    linear-gradient(135deg, rgba(24,27,36,0.94), rgba(13,15,21,0.86)),
    radial-gradient(circle at 0% 0%, rgba(239,68,68,0.20), transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(139,124,255,0.18), transparent 40%);
}
.bm-kicker {
  margin: 0 0 0.35rem;
  color: var(--bm-accent);
  font-size: 14px !important;
  font-weight: 850;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.bm-cockpit h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.065em;
  font-weight: 880;
}
.bm-cockpit p:not(.bm-kicker) {
  margin: 0.65rem 0 0;
  color: var(--bm-muted);
  font-size: clamp(18px, 2vw, 22px) !important;
  line-height: 1.35;
}
.bm-cockpit__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  min-width: 250px;
}
.bm-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 58px !important;
  padding: 0.85rem 1.05rem;
  border-radius: 18px !important;
  border: 1px solid var(--bm-border);
  background: rgba(255,255,255,0.62);
  color: var(--bm-text);
  font-size: 17px !important;
  font-weight: 820 !important;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}
html.dark .bm-action,
html.theme-beast-black .bm-action { background: rgba(255,255,255,0.06); }
.bm-action--primary {
  background: linear-gradient(135deg, var(--bm-accent), #f97316) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 18px 38px rgba(185,28,28,0.28);
}
@media (max-width: 1040px) {
  .bm-cockpit { grid-template-columns: 1fr; }
  .bm-cockpit__actions { grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; }
}
@media (max-width: 640px) {
  .bm-cockpit__actions { grid-template-columns: 1fr; }
}

/* Modal article V15: même niveau d'accessibilité que le dashboard */
.bm-article-modal {
  max-width: min(1180px, calc(100vw - 28px)) !important;
  border-radius: 28px !important;
  border: 1px solid var(--bm-border) !important;
  background: var(--bm-panel-strong) !important;
  box-shadow: 0 28px 90px rgba(0,0,0,0.34) !important;
}
html.dark .bm-article-modal,
html.theme-beast-black .bm-article-modal {
  background:
    linear-gradient(145deg, rgba(20,22,30,0.98), rgba(8,9,14,0.98)) !important;
}
.bm-article-modal__header {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.74)),
    radial-gradient(circle at 0 0, rgba(185,28,28,0.12), transparent 42%) !important;
  border-color: var(--bm-border) !important;
}
html.dark .bm-article-modal__header,
html.theme-beast-black .bm-article-modal__header {
  background:
    linear-gradient(135deg, rgba(24,27,36,0.96), rgba(12,14,20,0.94)),
    radial-gradient(circle at 0 0, rgba(239,68,68,0.16), transparent 42%) !important;
}
.bm-article-modal__header > div:first-child {
  padding: 1rem 1.25rem 0.65rem !important;
  gap: 0.75rem !important;
}
.bm-article-modal__header .genre-badge,
.bm-article-modal__header span[class*="font-mono"],
.bm-article-modal__header span[class*="Needs"] {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 760 !important;
  padding: 0.35rem 0.65rem !important;
}
#modal-title {
  font-size: clamp(20px, 2vw, 30px) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.045em !important;
  font-weight: 840 !important;
  white-space: normal !important;
  overflow: visible !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--bm-text);
}
.bm-article-modal__header button {
  min-height: 48px !important;
  min-width: 48px !important;
  border-radius: 16px !important;
  font-size: 15px !important;
}

/* Tabs: grosses cibles, lisibles, clavier-friendly */
.bm-article-modal .tab-list-relative {
  gap: 0.55rem !important;
  padding: 0.7rem 1rem !important;
  background: color-mix(in srgb, var(--bm-panel) 92%, transparent) !important;
  border-color: var(--bm-border) !important;
  scroll-padding-inline: 1rem;
}
.bm-modal-tab {
  min-height: 54px !important;
  border: 1px solid var(--bm-border) !important;
  border-radius: 16px !important;
  padding: 0.8rem 1rem !important;
  font-size: 17px !important;
  font-weight: 820 !important;
  letter-spacing: -0.025em;
  background: rgba(255,255,255,0.54) !important;
  color: var(--bm-muted) !important;
}
html.dark .bm-modal-tab,
html.theme-beast-black .bm-modal-tab { background: rgba(255,255,255,0.055) !important; }
.bm-modal-tab[aria-selected="true"] {
  color: #fff !important;
  background: linear-gradient(135deg, var(--bm-accent), #f97316) !important;
  border-color: transparent !important;
  box-shadow: 0 14px 30px rgba(185,28,28,0.25);
}
.bm-modal-tab:focus-visible {
  outline: 3px solid var(--bm-gold) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(251,191,36,0.18) !important;
}
.bm-article-modal .tab-indicator { display: none !important; }

/* Panels et contenu: plus respirable */
.bm-article-modal .tab-panels-container {
  background:
    radial-gradient(circle at 100% 0%, rgba(124,58,237,0.05), transparent 30%),
    color-mix(in srgb, var(--bm-panel-strong) 92%, #000 8%);
}
.bm-article-modal .tab-panel-slide {
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.bm-article-modal .tab-panel-slide > .p-5,
.bm-article-modal .tab-panel-slide > .sm\:p-8,
.bm-article-modal .tab-panel-slide > .p-4,
.bm-article-modal .tab-panel-slide > .sm\:p-6 {
  padding: clamp(20px, 3vw, 36px) !important;
}
.bm-article-modal .article-preview {
  max-width: 860px !important;
  font-size: clamp(19px, 1.45vw, 22px) !important;
  line-height: 1.82 !important;
}
.bm-article-modal .article-preview h1 { font-size: clamp(34px, 4vw, 52px) !important; }
.bm-article-modal .article-preview h2 { font-size: clamp(28px, 3vw, 40px) !important; }
.bm-article-modal .article-preview h3 { font-size: clamp(22px, 2vw, 30px) !important; }
.bm-article-modal input,
.bm-article-modal textarea,
.bm-article-modal select {
  min-height: 52px !important;
  font-size: 17px !important;
  border-radius: 15px !important;
}
.bm-article-modal textarea { line-height: 1.55 !important; }
.bm-article-modal .tab-panel-slide button {
  min-height: 48px;
  border-radius: 14px !important;
  font-size: 16px;
  font-weight: 750;
}
.bm-control-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.bm-control-row > button,
.bm-control-row > select,
.bm-control-row > input,
.bm-control-row > a[role="button"] {
  min-height: 52px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.2 !important;
  white-space: nowrap;
}
.bm-control-row > select {
  min-width: 12rem;
  padding-inline: 0.85rem !important;
}
.bm-control-row > input {
  flex: 1 1 18rem;
}
.bm-control-row > button {
  padding-inline: 1rem !important;
}
.bm-create-drawer input,
.bm-create-drawer select,
.bm-create-drawer button {
  min-height: 52px !important;
}
.bm-create-drawer {
  width: min(1120px, calc(100vw - 28px)) !important;
  max-width: none !important;
  max-height: min(92dvh, 860px);
  display: flex;
  flex-direction: column;
}
.bm-create-drawer button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.2 !important;
}
.bm-create-drawer form {
  overflow-y: auto;
  min-height: 0;
}
.bm-create-drawer footer button {
  min-width: 150px;
}
.bm-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
  gap: 1rem;
}
.bm-create-main,
.bm-create-side {
  min-width: 0;
}
.bm-create-side {
  border-left: 1px solid var(--bm-border);
  padding-left: 1rem;
}
.bm-create-section-title {
  color: var(--bm-muted);
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bm-lang-chip {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: color-mix(in srgb, var(--bm-accent) 14%, var(--bm-panel));
  color: var(--bm-text);
  border: 1px solid color-mix(in srgb, var(--bm-accent) 28%, var(--bm-border));
}
.bm-publication-panel {
  width: 100% !important;
  max-width: none !important;
}
.bm-publication-section {
  border: 1px solid var(--bm-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bm-panel) 90%, transparent);
  padding: clamp(16px, 2vw, 22px);
}
.bm-publication-section h3 {
  font-size: 18px !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  margin: 0;
}
.bm-publication-kicker {
  color: var(--bm-muted);
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bm-publication-readiness {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.bm-publication-readiness > div {
  min-height: 74px;
  border-radius: 14px;
  border: 1px solid var(--bm-border);
  background: color-mix(in srgb, var(--bm-panel-strong) 88%, transparent);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bm-preset-trigger {
  min-height: 48px !important;
  border-radius: 16px !important;
  border: 1px solid var(--bm-border) !important;
  background: color-mix(in srgb, var(--bm-panel) 88%, transparent) !important;
  color: var(--bm-text) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}
.bm-preset-modal {
  width: min(940px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  border-radius: 28px !important;
  border: 1px solid var(--bm-border) !important;
  background: var(--bm-panel-strong) !important;
  box-shadow: 0 28px 90px rgba(0,0,0,0.34) !important;
}
html.dark .bm-preset-modal,
html.theme-beast-black .bm-preset-modal {
  background: linear-gradient(145deg, rgba(20,22,30,0.98), rgba(8,9,14,0.98)) !important;
}
.bm-preset-modal__header {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.74)),
    radial-gradient(circle at 0 0, rgba(185,28,28,0.12), transparent 42%) !important;
  border-color: var(--bm-border) !important;
}
html.dark .bm-preset-modal__header,
html.theme-beast-black .bm-preset-modal__header {
  background:
    linear-gradient(135deg, rgba(24,27,36,0.96), rgba(12,14,20,0.94)),
    radial-gradient(circle at 0 0, rgba(239,68,68,0.16), transparent 42%) !important;
}
.bm-preset-summary {
  border: 1px solid var(--bm-border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--bm-panel) 90%, transparent);
  padding: 1rem;
}
.bm-preset-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.bm-preset-option {
  min-height: 132px !important;
  border-radius: 18px !important;
  border: 1px solid var(--bm-border);
  background: color-mix(in srgb, var(--bm-panel) 88%, transparent);
  display: flex !important;
  flex-direction: column;
  justify-content: space-between !important;
  align-items: stretch !important;
  text-align: left !important;
  padding: 1rem !important;
}
.bm-preset-option[aria-current="true"] {
  border-color: rgba(16,185,129,0.55);
  background: linear-gradient(135deg, rgba(16,185,129,0.16), rgba(251,191,36,0.08));
  box-shadow: 0 16px 34px rgba(16,185,129,0.12);
}
.bm-preset-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-inline: 0.65rem;
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 640px) {
  .bm-article-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 96vh !important;
    max-height: 96vh !important;
    border-radius: 26px 26px 0 0 !important;
  }
  .bm-article-modal .tab-list-relative {
    padding: 0.65rem !important;
  }
  .bm-modal-tab {
    min-height: 56px !important;
    font-size: 16px !important;
    padding-inline: 0.9rem !important;
  }
  .bm-control-row > button,
  .bm-control-row > select,
  .bm-control-row > input {
    width: 100%;
  }
  .bm-create-drawer footer button {
    width: 100%;
  }
  .bm-create-drawer {
    width: 100vw !important;
    max-height: 96dvh;
    border-radius: 26px 26px 0 0 !important;
  }
  .bm-create-layout {
    grid-template-columns: 1fr;
  }
  .bm-create-side {
    border-left: 0;
    border-top: 1px solid var(--bm-border);
    padding-left: 0;
    padding-top: 1rem;
  }
  .bm-publication-readiness {
    grid-template-columns: 1fr;
  }
  .bm-preset-list {
    grid-template-columns: 1fr;
  }
  .bm-preset-modal {
    width: 100vw;
    max-width: 100vw;
    max-height: 96vh;
    border-radius: 26px 26px 0 0 !important;
  }
}

/* Finitions V15.1 — panneaux secondaires, theme switch, diagnostic */
.bm-right-panel {
  top: 76px !important;
  right: 14px !important;
  bottom: 18px !important;
  width: 368px !important;
  border-radius: 24px !important;
  border: 1px solid var(--bm-border) !important;
  background: var(--bm-panel-strong) !important;
  box-shadow: 0 22px 70px rgba(0,0,0,0.24) !important;
  overflow: hidden;
  z-index: 18 !important;
}
html.dark .bm-right-panel,
html.theme-beast-black .bm-right-panel {
  background: linear-gradient(145deg, rgba(20,22,30,0.98), rgba(8,9,14,0.96)) !important;
}
.bm-right-panel__header {
  padding: 1rem !important;
  background: radial-gradient(circle at 0 0, rgba(239,68,68,0.14), transparent 45%);
}
.bm-right-panel__header h3 { font-size: 18px !important; font-weight: 850 !important; letter-spacing: -0.035em; }
.bm-right-panel__close { min-width: 46px !important; min-height: 46px !important; border-radius: 15px !important; }
.bm-right-panel__stats { padding: 0.9rem !important; }
.bm-right-stat {
  min-height: 76px;
  border-radius: 18px;
  border: 1px solid var(--bm-border);
  background: color-mix(in srgb, var(--bm-panel) 88%, transparent);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bm-right-stat div:first-child { font-size: 12px !important; font-weight: 800; letter-spacing: .08em; }
.bm-right-stat div:last-child { font-size: 28px !important; line-height: 1; }
.bm-right-panel .live-log {
  border-radius: 16px;
  border: 1px solid var(--bm-border);
  background: rgba(0,0,0,0.22);
  padding: 0.75rem;
}
.bm-live-fab { z-index: 18 !important; min-height: 50px; border-radius: 999px !important; }

.bm-theme-btn {
  min-width: 48px !important;
  min-height: 48px !important;
  border-radius: 16px !important;
  border: 1px solid var(--bm-border) !important;
  background: color-mix(in srgb, var(--bm-panel) 88%, transparent) !important;
  color: var(--bm-text) !important;
}
.bm-theme-btn svg { width: 22px; height: 22px; stroke-width: 2.35; }
.bm-theme-btn__icon {
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
}
.bm-theme-btn[data-theme-current="beast-black"] {
  color: #ff3366 !important;
  box-shadow: inset 0 0 0 1px rgba(255,51,102,0.35), 0 0 24px rgba(255,51,102,0.18);
}

.bm-diagnostic-panel {
  border-radius: 22px !important;
  border: 1px solid var(--bm-border) !important;
  background:
    radial-gradient(circle at 0 0, rgba(239,68,68,0.10), transparent 38%),
    color-mix(in srgb, var(--bm-panel) 92%, transparent) !important;
  padding: 0.85rem !important;
}
.bm-diagnostic-toggle {
  min-height: 56px;
  border-radius: 18px;
  padding: 0.55rem 0.75rem;
}
.bm-diagnostic-toggle h3 { font-size: 16px !important; letter-spacing: -0.02em !important; color: var(--bm-text) !important; }
.bm-diagnostic-score {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px !important;
  padding-inline: 0.8rem !important;
  font-size: 13px !important;
}
.bm-article-chip {
  min-height: 36px !important;
  border-radius: 999px !important;
  padding: 0.42rem 0.72rem !important;
  border: 1px solid var(--bm-border) !important;
  background: color-mix(in srgb, var(--bm-panel) 84%, transparent) !important;
  color: var(--bm-text) !important;
  font-size: 13px !important;
  font-weight: 820 !important;
}
.bm-chip-repair {
  background: linear-gradient(135deg, rgba(251,146,60,0.18), rgba(239,68,68,0.12)) !important;
  color: #fb923c !important;
  border-color: rgba(251,146,60,0.40) !important;
}
.bm-chip-status-ok { background: rgba(16,185,129,0.14) !important; color: #34d399 !important; border-color: rgba(16,185,129,0.35) !important; }

/* Accessibilité: réduire animations si demandé par OS */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
