/*
 * Thème « verre » (style Halo / iOS) : couche d'habillage commune à toutes les pages.
 *
 * Ne change aucune structure ni aucun script : redéfinit les variables de couleur et l'apparence des composants.
 * Activation : <html class="glass crm"> (ou "glass review") + <link rel="stylesheet" href="/glass.css"> dans <head>.
 * Chaque sélecteur commence par html.glass / html.crm / html.review pour passer devant les styles internes des pages,
 * y compris ceux qu'un script ajoute après coup.
 *
 * Principes (matériaux Apple) : surfaces translucides avec un liseré clair en haut (la lumière qui accroche le verre),
 * une seule surface claire par zone (jamais deux verres clairs empilés), action principale en blanc plein,
 * couleur réservée au sens (vert = argent, ambre = humain, rouge = alerte, bleu = IA).
 */

/* ---------- variables ---------- */
html.glass:root {
  --bg: #07080b;
  --bg2: #0c0d11;
  --glass: linear-gradient(145deg, rgba(255, 255, 255, 0.115), rgba(255, 255, 255, 0.04));
  --glass-strong: linear-gradient(145deg, rgba(255, 255, 255, 0.27), rgba(255, 255, 255, 0.1));
  --glass-inset: rgba(0, 0, 0, 0.28);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --card: var(--glass);
  --card2: var(--glass);
  --panel: var(--glass);
  --line: rgba(255, 255, 255, 0.075);
  --line2: rgba(255, 255, 255, 0.14);
  --text: #f4f5f7;
  --muted: #9a9fa9;
  --dim: #686c76;
  --accent: #ffffff;
  --accent2: #cfd4dc;
  --ok: #3ddc84;
  --warn: #ffc857;
  --bad: #ff6961;
  --pink: #ff8fc0;
  --info: #64a8ff;
  --ink: #0b0c10; /* texte sur une surface blanche */
  --r: 28px;
  --r2: 16px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: dark;
}

/* ---------- fond et typographie ---------- */
html.glass body {
  background-color: var(--bg);
  background-image: none;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* La lueur de fond vit sur un calque fixe à part : le navigateur ne la repeint pas à chaque défilement. */
html.glass body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1000px 560px at 10% -10%, rgba(196, 206, 226, 0.24), transparent 62%),
    radial-gradient(820px 560px at 92% 0%, rgba(150, 165, 195, 0.14), transparent 60%),
    radial-gradient(1000px 700px at 55% 118%, rgba(140, 150, 175, 0.13), transparent 60%);
}
html.glass ::selection { background: rgba(255, 255, 255, 0.28); }
html.glass .scroll::-webkit-scrollbar { width: 10px; }
html.glass .scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
html.glass .scroll::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); background-clip: padding-box; border: 3px solid transparent; }
html.glass :focus-visible { outline: 2px solid rgba(255, 255, 255, 0.75); outline-offset: 2px; }
html.glass input:focus-visible, html.glass textarea:focus-visible { outline: 0; }

/* ---------- surfaces ---------- */
html.glass .card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r);
  /* pas de backdrop-filter ici : derrière une carte il n'y a que le fond fixe, le flou ne changerait rien à l'image mais coûterait à chaque défilement */
  box-shadow: var(--edge), 0 24px 60px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}
html.glass .card h2 { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
html.glass .card h2 small { font-weight: 450; margin-top: 3px; }

/* ---------- boutons ---------- */
html.glass .btn {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 650;
  white-space: nowrap;
  color: var(--text);
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--edge);
  transition: background-color 0.15s ease, opacity 0.15s ease, transform 0.1s var(--ease-out);
}
html.glass .btn:active { transform: scale(0.97); }
html.glass .btn.sm { padding: 7px 14px; }
html.glass .btn.primary { background: #fff; border-color: #fff; color: var(--ink); box-shadow: 0 8px 26px rgba(255, 255, 255, 0.14); }
html.glass .btn.ok { background: var(--ok); border-color: transparent; color: #052814; box-shadow: 0 8px 26px rgba(61, 220, 132, 0.18); }
html.glass .btn.warn { color: var(--warn); background: rgba(255, 200, 87, 0.1); border-color: rgba(255, 200, 87, 0.35); }
html.glass .btn.danger { color: var(--bad); background: rgba(255, 105, 97, 0.1); border-color: rgba(255, 105, 97, 0.35); }
html.glass .btn.ghost { background: transparent; box-shadow: none; }
html.glass .btn:disabled { transform: none; }
@media (hover: hover) and (pointer: fine) {
  html.glass .btn:hover { background: rgba(255, 255, 255, 0.13); }
  html.glass .btn.primary:hover { background: #e8ebf0; }
  html.glass .btn.ok:hover { background: #55e596; }
  html.glass .btn.ghost:hover { background: rgba(255, 255, 255, 0.07); }
}

/* ---------- pastilles ---------- */
html.glass .pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.05); color: var(--muted); }
html.glass .pill.human { color: var(--warn); background: rgba(255, 200, 87, 0.12); border-color: rgba(255, 200, 87, 0.3); }
html.glass .pill.ai { color: #cfe3ff; background: rgba(100, 168, 255, 0.13); border-color: rgba(100, 168, 255, 0.3); }
html.glass .pill.ok { color: var(--ok); background: rgba(61, 220, 132, 0.12); border-color: rgba(61, 220, 132, 0.3); }
html.glass .pill.bad { color: var(--bad); background: rgba(255, 105, 97, 0.12); border-color: rgba(255, 105, 97, 0.3); }
html.glass .pill.hot { color: #fff; background: var(--bad); border-color: transparent; }

/* ---------- bulles de conversation ---------- */
html.glass .msg { padding: 10px 14px; border-radius: 20px; line-height: 1.4; }
html.glass .msg.fan { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.06); border-bottom-left-radius: 7px; }
html.glass .msg.me {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom-right-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
html.glass .msg .meta { color: rgba(255, 255, 255, 0.56); }
html.glass .msg .tag { background: rgba(0, 0, 0, 0.26); border-color: rgba(255, 255, 255, 0.16); }
html.glass .msg .tag.ppv { color: var(--warn); border-color: rgba(255, 200, 87, 0.45); }
html.glass .msg .tag.bought { color: var(--ok); border-color: rgba(61, 220, 132, 0.5); }
html.glass .msg .tag.tip { color: var(--pink); border-color: rgba(255, 143, 192, 0.5); }

/* ---------- messages flottants ---------- */
html.glass .toast {
  border-radius: 20px;
  padding: 13px 18px;
  background: rgba(34, 36, 44, 0.78);
  border: 1px solid var(--line2);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 20px 60px rgba(0, 0, 0, 0.5);
}
html.glass .err { border-radius: var(--r2); border-color: rgba(255, 105, 97, 0.4); background: rgba(255, 105, 97, 0.08); color: #ffc2bd; }

/* =====================================================================
   Mouvement (règles : transform et opacity seulement, entrées en ease-out fort, moins de 300 ms,
   rien sur ce qui se répète toute la journée, variante douce si le système demande moins d'animations)
   ===================================================================== */

/* D'une page à l'autre : un fondu court au lieu d'un écran qui clignote ; la barre de gauche reste en place. */
@view-transition { navigation: auto; }
html.glass .rail { view-transition-name: rail; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.18s; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
::view-transition-group(rail), ::view-transition-old(rail), ::view-transition-new(rail) { animation-duration: 0.18s; }

/* Fenêtres (.modal) : le voile arrive en fondu, la feuille se matérialise (léger zoom + fondu) et repart par le même chemin. */
html.glass .modal { opacity: 0; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity 0.2s var(--ease-out), display 0.2s allow-discrete, overlay 0.2s allow-discrete; }
html.glass .modal.open { opacity: 1; }
html.glass .modal > * { transform: scale(0.96); transition: transform 0.2s var(--ease-out); }
html.glass .modal.open > * { transform: none; }
@starting-style {
  html.glass .modal.open { opacity: 0; }
  html.glass .modal.open > * { transform: scale(0.96); }
}
/* Fenêtres de la barre d'outils (.cmodal, ajoutées puis retirées de la page par ui/composer.js). */
/* Pas de flou derrière ces fenêtres : flouter toute la page à chaque image coûtait cher (grille du vault). Un voile sombre suffit. */
html.glass .cmodal { background: rgba(4, 5, 8, 0.72); transition: opacity 0.2s var(--ease-out); }
html.glass .cbox { transition: transform 0.2s var(--ease-out); }
@starting-style {
  html.glass .cmodal { opacity: 0; }
  html.glass .cbox { transform: scale(0.96); }
}

/* Un message qui vient d'arriver monte de quelques pixels depuis son coin. Jamais rejoué pour les messages déjà affichés. */
html.glass .msg.new { animation: msg-in 0.22s var(--ease-out) both; }
html.glass .msg.new.fan { transform-origin: left bottom; }
html.glass .msg.new.me { transform-origin: right bottom; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* =====================================================================
   CRM (ui/crm.html)
   ===================================================================== */
/* La rangée unique ne doit jamais dépasser la fenêtre : ce sont les listes qui défilent, pas la page. */
html.crm .app { grid-template-columns: 78px 1fr; grid-template-rows: minmax(0, 1fr); }
html.crm .main { min-height: 0; }

/* barre latérale : une pilule de verre flottante */
html.crm .rail {
  margin: 12px 0 12px 12px;
  padding: 12px 0;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  box-shadow: var(--edge), 0 18px 40px rgba(0, 0, 0, 0.35);
}
html.crm .rail .logo {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #c9cfd9);
  color: var(--ink); font-weight: 800;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 #fff;
}
html.crm .rail button, html.crm .rail a {
  width: 42px; height: 42px; border-radius: 50%;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s var(--ease-out);
}
html.crm .rail button:active, html.crm .rail a:active { transform: scale(0.94); }
html.crm .rail button.active { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); }
@media (hover: hover) and (pointer: fine) {
  html.crm .rail button:hover, html.crm .rail a:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--line); color: var(--text); }
  html.crm .rail button.active:hover { background: rgba(255, 255, 255, 0.18); }
}
html.crm .rail .badge, html.crm .bell .badge { background: var(--bad); box-shadow: 0 0 0 2px #101116; }

/* en-tête */
html.crm header { padding: 20px 26px 12px 18px; gap: 16px; }
html.crm header h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
html.crm header h1 small { font-size: 13.5px; font-weight: 450; letter-spacing: 0; margin-top: 6px; }
html.crm .acc {
  padding: 6px 14px 6px 6px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s var(--ease-out);
}
html.crm .acc:active { transform: scale(0.97); }
html.crm .acc .av { width: 28px; height: 28px; background: rgba(255, 255, 255, 0.1); color: #e9ebf0; }
html.crm .acc.active { background: var(--glass-strong); border-color: rgba(255, 255, 255, 0.22); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3); }
html.crm .acc.active .av { background: #fff; color: var(--ink); }
html.crm .acc .dot.connected { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
@media (hover: hover) and (pointer: fine) { html.crm .acc:not(.active):hover { background: rgba(255, 255, 255, 0.08); color: var(--text); } }
html.crm .clock { padding: 8px 18px; border-radius: 22px; border: 1px solid var(--line); background: var(--glass); box-shadow: var(--edge); font-weight: 700; letter-spacing: -0.01em; }
html.crm .clock small { font-weight: 450; letter-spacing: 0; }
html.crm .bell { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); box-shadow: var(--edge); transition: background-color 0.15s ease, transform 0.1s var(--ease-out); }
html.crm .bell:active { transform: scale(0.94); }

/* colonnes */
html.crm .cols { gap: 16px; padding: 6px 26px 22px 18px; }
html.crm .card > .hd { padding: 18px 20px 12px; }

/* liste des conversations */
html.crm .search { margin: 2px 16px 12px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-inset); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); transition: border-color 0.15s ease; }
html.crm .search:focus-within { border-color: rgba(255, 255, 255, 0.3); }
html.crm .search svg { color: var(--muted); }
html.crm .chips { padding: 0 16px 12px; }
html.crm .chip { padding: 6px 13px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--muted); transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s var(--ease-out); }
html.crm .chip:active { transform: scale(0.96); }
html.crm .chip.active { background: #fff; border-color: #fff; color: var(--ink); box-shadow: 0 6px 18px rgba(255, 255, 255, 0.12); }
@media (hover: hover) and (pointer: fine) { html.crm .chip:not(.active):hover { background: rgba(255, 255, 255, 0.09); color: var(--text); } }

html.crm .chat { margin: 2px 8px; padding: 10px; border-top: 0; border-radius: 18px; transition: background-color 0.15s ease; }
html.crm .chat.active { background: rgba(255, 255, 255, 0.11); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
@media (hover: hover) and (pointer: fine) { html.crm .chat:not(.active):hover { background: rgba(255, 255, 255, 0.05); } }
html.crm .chat .av { background: rgba(255, 255, 255, 0.09); color: #e6e8ee; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
html.crm .chat .av.new { background: rgba(61, 220, 132, 0.16); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(61, 220, 132, 0.35); }
html.crm .chat .av .on { background: var(--ok); border-color: #15171c; }
html.crm .chat .name { font-weight: 650; letter-spacing: -0.005em; }
html.crm .chat .name span { font-weight: 450; }
html.crm .chat .spend { font-weight: 700; }
/* aperçu d'un message non lu : du texte plus marqué, pas une pastille */
html.crm .chat .prev.unread { display: block; min-width: 0; height: auto; padding: 0; border-radius: 0; background: none; color: var(--text); font-size: 13px; font-weight: 600; }
html.crm .chat .side .unread { background: #fff; color: var(--ink); }
html.crm .more { border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--muted); font-weight: 600; transition: background-color 0.15s ease, transform 0.1s var(--ease-out); }
html.crm .more:active { transform: scale(0.98); }

/* conversation */
html.crm .conv .hd { padding: 16px 20px 14px; border-bottom: 1px solid var(--line); }
html.crm .conv .hd .av { background: rgba(255, 255, 255, 0.1) !important; color: #e9ebf0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
html.crm .conv .who b { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
html.crm .msgs { padding: 18px 20px; }
html.crm .msg { font-size: 14.5px; }
html.crm .composer { border-top: 1px solid var(--line); padding: 12px 14px; }
html.crm .composer textarea { border-radius: 22px; padding: 12px 16px; border: 1px solid var(--line); background: var(--glass-inset); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); transition: border-color 0.15s ease; }
html.crm .composer textarea:focus { border-color: rgba(255, 255, 255, 0.3); }
html.crm .empty { color: var(--muted); }

/* fiche fan */
html.crm .fan .hd h2 { font-size: 18px; }
/* le montant dépensé : la seule surface claire de la colonne */
html.crm .fan .big {
  display: block; padding: 18px 18px 16px; border-radius: 22px;
  background: var(--glass-strong); border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 14px 34px rgba(0, 0, 0, 0.3);
  font-size: 44px; font-weight: 700; letter-spacing: -0.035em; line-height: 1;
}
html.crm .fan .big small { display: block; margin-top: 8px; font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, 0.74); }
html.crm .kpis { gap: 10px; padding: 0 16px 16px; }
html.crm .kpi { padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
html.crm .kpi b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
html.crm .sect { padding: 14px 18px; border-top: 1px solid var(--line); }
html.crm .sect h3 { color: var(--dim); letter-spacing: 0.09em; }
html.crm .state { border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
html.crm .state .led.ai { background: var(--info); box-shadow: 0 0 12px var(--info); }
html.crm .state .led.human { background: var(--warn); box-shadow: 0 0 12px var(--warn); }
html.crm .note { color: #c9cdd6; }

/* panneau des alertes : un verre épais qui glisse depuis la droite */
/* Les cartes s'appellent .alert-card et non .alert : des extensions de navigateur masquent tout ce qui s'appelle « alert ». */
html.crm .drawer {
  top: 12px; right: 12px; width: 420px; max-width: calc(100vw - 24px); height: calc(100vh - 24px);
  border: 1px solid var(--line2); border-radius: 28px;
  background: linear-gradient(160deg, rgba(40, 43, 52, 0.82), rgba(18, 19, 24, 0.88));
  -webkit-backdrop-filter: blur(34px) saturate(160%);
  backdrop-filter: blur(34px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 30px 90px rgba(0, 0, 0, 0.6);
  transform: translateX(calc(100% + 24px));
  transition: transform 0.42s var(--ease-drawer);
  overflow: hidden;
}
html.crm .drawer.open { right: 12px; transform: none; }
html.crm .drawer .hd { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
html.crm .drawer h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
html.crm .alert-card { margin: 12px 14px; padding: 18px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.055); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
html.crm .alert-card.pending { border-color: rgba(255, 105, 97, 0.45); background: linear-gradient(145deg, rgba(255, 105, 97, 0.14), rgba(255, 255, 255, 0.04)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 14px 40px rgba(255, 80, 70, 0.1); }
html.crm .alert-card .top b { font-size: 16px; font-weight: 650; }
html.crm .alert-card .amount { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
html.crm .alert-card .amount small { font-weight: 500; letter-spacing: 0; }
html.crm .alert-card p { color: #c9cdd6; }
/* le « Oui » occupe toute la largeur, les deux autres choix se partagent la ligne suivante */
html.crm .alert-card .row { flex-wrap: wrap; }
html.crm .alert-card .row .btn.ok { flex: 1 0 100%; padding: 12px 18px; }
html.crm .toast { transition: opacity 0.2s ease, transform 0.3s var(--ease-out); }
html.crm .modal form, html.glass .cbox { border-radius: 28px; border: 1px solid var(--line2); background: linear-gradient(160deg, rgba(44, 47, 56, 0.94), rgba(20, 21, 27, 0.96)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 30px 90px rgba(0, 0, 0, 0.6); }
html.crm .modal h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
html.crm .modal input, html.crm .modal textarea { border: 1px solid var(--line); background: var(--glass-inset); transition: border-color 0.15s ease; }
html.crm .modal input:focus, html.crm .modal textarea:focus { border-color: rgba(255, 255, 255, 0.35); }
html.crm .toast.is-alert { border-color: rgba(255, 105, 97, 0.6); }

/* =====================================================================
   Brouillons IA (ui/review.html)
   ===================================================================== */
html.review header { background: rgba(16, 17, 22, 0.6); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%); padding: 14px 20px; }
html.review header h1 { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
html.review header .pill { border-radius: 999px; }
html.review aside { border-right: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
html.review .tabs { border-bottom: 1px solid var(--line); }
html.review .tabs button { font-weight: 600; transition: color 0.15s ease; }
html.review .tabs button.active { color: #fff; border-bottom-color: #fff; }
html.review .item { border-bottom: 1px solid var(--line); transition: background-color 0.15s ease; }
html.review .item:hover { background: rgba(255, 255, 255, 0.05); }
html.review .item.active { background: rgba(255, 255, 255, 0.1); }
html.review .status { font-weight: 600; background: rgba(255, 255, 255, 0.05); }
html.review .card { border-radius: 22px; padding: 18px; }
html.review .card h3 { color: var(--dim); letter-spacing: 0.08em; }
html.review textarea, html.review input[type="text"], html.review input[type="number"] { background: var(--glass-inset); border: 1px solid var(--line); border-radius: 14px; transition: border-color 0.15s ease; }
html.review textarea:focus, html.review input:focus { border-color: rgba(255, 255, 255, 0.3); }
html.review pre { background: var(--glass-inset); border: 1px solid var(--line); border-radius: 14px; }
html.review .vault div:hover { background: rgba(255, 255, 255, 0.06); }
html.review .msg.trigger { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 1px; }

/* =====================================================================
   Préférences d'accessibilité du système
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html.glass .modal > *, html.glass .cbox { transform: none; }
  html.glass *, html.glass *::before, html.glass *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html.glass .btn:active, html.crm .chip:active, html.crm .acc:active, html.crm .rail button:active, html.crm .rail a:active, html.crm .bell:active, html.crm .more:active { transform: none; }
  html.crm .drawer { transition: opacity 0.2s ease !important; opacity: 0; }
  html.crm .drawer.open { opacity: 1; }
}
@media (prefers-reduced-transparency: reduce) {
  html.crm .drawer, html.glass .toast, html.review header, html.glass .modal { -webkit-backdrop-filter: none; backdrop-filter: none; }
  html.glass .card, html.crm .rail { background: #14161b; }
  html.crm .drawer, html.glass .toast { background: #1b1d24; }
}
@media (prefers-contrast: more) {
  html.glass:root { --line: rgba(255, 255, 255, 0.28); --line2: rgba(255, 255, 255, 0.45); --muted: #c4c8d0; --dim: #a4a8b2; }
  html.glass .card, html.crm .rail { background: #101216; }
}
