/* ==========================================================================
   RHEMA INFORMATIQUE — Design system unifié (charte graphique officielle)
   Tokens → base → typographie → layout → composants → utilitaires
   Partagé par le site public, l'espace client, le back-office et le POS.
   ========================================================================== */

/* Polices de la charte, auto-hébergées (aucune requête externe, compatible CSP font-src 'self') :
   Montserrat (titres), Inter (texte), JetBrains Mono (chiffres, étiquettes techniques). Sous-ensemble latin. */
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-variable.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-variable.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-variable.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  /* Couleurs de la charte */
  --ink: #0A0F16;        /* graphite — principal */
  --navy: #0F2236;       /* institutionnel */
  --steel: #2E4358;      /* acier — secondaire */
  --slate: #5E7185;
  --graphite-2: #121A24; /* surfaces sombres (bandeaux, barre latérale) */
  --graphite-3: #1B2531;
  --gold: #F2B134;       /* accent / marque — CTA */
  --gold-dark: #9E6600;  /* or foncé en TEXTE : 4.9:1 sur blanc (#C98200 ne faisait que 3.1:1) */
  --cyan: #00A8CC;       /* interaction */
  --cyan-dark: #006F88;  /* liens : ≥ 4.5:1 aussi sur les fonds teintés (alertes, surfaces grises) */
  --green: #2E8B57;      /* succès */
  --red: #D64545;        /* erreur */
  --orange: #E67E22;     /* attention */
  --purple: #6C5CE7;     /* IA / innovation */
  --light: #F3F5F7;      /* fond */
  --surface: #FFFFFF;
  --surface-2: #F7F9FA;
  --mist: #E5E7EB;
  --line: #DCE2E8;
  --line-strong: #B9C4CF;
  --muted: #526273;      /* texte secondaire (contraste AA sur blanc) */

  /* Rôles de texte : ce sont eux qui basculent en thème sombre. --ink / --navy restent les couleurs
     de surface de la marque (bandeaux, barre latérale, boutons) et ne changent jamais. */
  --fg: var(--ink);        /* texte courant */
  --fg-2: var(--steel);    /* texte secondaire appuyé (libellés) */
  --fg-3: var(--slate);    /* texte tertiaire (étiquettes techniques) */
  --heading: var(--navy);  /* titres, liens au survol, bordures d'accent */
  --gold-bg: #FDF3DC;      /* fond d'icône or */
  --row-hover: #FBF7EC;    /* survol de ligne de tableau */
  --header-bg: rgba(255,255,255,.96);
  --header-bg-scrolled: rgba(255,255,255,.985);

  /* Tons sémantiques (fond / texte) */
  --success-bg: #E7F5EC; --success-fg: #1E6B41;
  --danger-bg: #FCEBEB;  --danger-fg: #A12D2D;
  --warning-bg: #FEF3E2; --warning-fg: #8A4B08;
  --info-bg: #E3F6FA;    --info-fg: #045E73;
  --accent-bg: #EFEDFD;  --accent-fg: #4B3DB8;
  --neutral-bg: #EEF2F6; --neutral-fg: #334E68;

  --font-display: "Montserrat", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;

  --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem; --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem; --fs-3xl: 2.25rem; --fs-4xl: clamp(2rem, 4.2vw, 3.25rem);

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.25rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;

  /* Angles nets (industriel) */
  --radius-sm: 3px; --radius-md: 5px; --radius-lg: 8px; --radius-xl: 12px; --radius-pill: 999px;
  --shadow-1: 0 1px 0 rgba(10,15,22,.04), 0 1px 2px rgba(10,15,22,.06);
  --shadow-2: 0 14px 34px -14px rgba(10,15,22,.28), 0 2px 6px rgba(10,15,22,.05);
  --shadow-3: 0 28px 60px -20px rgba(10,15,22,.40);
  --focus: 0 0 0 3px rgba(242,177,52,.55);

  /* Trame « plan technique » et animations */
  --grid-dark: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  --grid-light: linear-gradient(rgba(15,34,54,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(15,34,54,.05) 1px, transparent 1px);
  --grid-size: 44px 44px;
  --hazard: repeating-linear-gradient(-45deg, var(--gold) 0 10px, var(--ink) 10px 20px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: .28s;

  --container: 1280px;
  --header-h: 72px;
  --sidebar-w: 264px;
  --tap: 44px;
}

/* ---------------------------------------------------------------- Base */
/* Thème : html[data-theme] est posé avant l'affichage par partials/theme-script (choix mémorisé, sinon réglage
   de l'appareil). color-scheme indique au navigateur les deux thèmes : il n'assombrit plus le site de force,
   et ses contrôles natifs (barres de défilement, listes, calendriers) suivent le thème. */
:root { color-scheme: light; }

/* ---------------------------------------------------------------- Thème sombre
   Écran seulement : l'impression reste toujours sur fond blanc. Surfaces graphite de la charte,
   texte clair, tons sémantiques assombris ; l'or reste l'accent. Contrastes texte ≥ 4.5:1. */
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --light: #0B1118;        /* fond de page */
    --surface: #121A24;
    --surface-2: #172230;
    --mist: #1E2935;
    --line: #243140;
    --line-strong: #3A4D62;
    --muted: #9AABBD;
    --fg: #E4ECF3;
    --fg-2: #C3D0DC;
    --fg-3: #9FB0C1;
    --heading: #F3F6F9;
    --cyan-dark: #4FC8E3;    /* liens : contraste suffisant sur graphite */
    --gold-dark: #F5BD4E;
    --gold-bg: #33290F;
    --row-hover: #1B2632;
    --header-bg: rgba(18,26,36,.94);
    --header-bg-scrolled: rgba(18,26,36,.985);
    --success-bg: #11301F; --success-fg: #7FD8A3;
    --danger-bg: #3A1719;  --danger-fg: #F4A6A6;
    --warning-bg: #3A2B10; --warning-fg: #F5C878;
    --info-bg: #0D2D37;    --info-fg: #80D4E9;
    --accent-bg: #221E45;  --accent-fg: #BDB3FF;
    --neutral-bg: #1C2733; --neutral-fg: #C3D0DC;
    --shadow-1: 0 1px 0 rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.35);
    --shadow-2: 0 14px 34px -14px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.3);
    --shadow-3: 0 28px 60px -20px rgba(0,0,0,.8);
    --grid-light: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
/* overflow-wrap : une adresse e-mail, une URL ou une référence longue passe à la ligne au lieu d'élargir la page. */
body { margin: 0; font-family: var(--font-body); font-size: var(--fs-md); line-height: 1.55; color: var(--fg); background: var(--light); overflow-x: hidden; overflow-wrap: break-word; }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--cyan-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--heading); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
::selection { background: var(--gold); color: var(--ink); }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-6) 0; }
table { border-collapse: collapse; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 1000; background: var(--gold); color: var(--ink); padding: .75rem 1rem; border-radius: var(--radius-md); font-weight: 700; }
.skip-link:focus { top: 1rem; }
/* !important : un sélecteur plus spécifique (ex. input[type=text] { width: 100% }) ne doit jamais faire réapparaître l'élément. */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* ---------------------------------------------------------------- Typographie */
h1, h2, h3, h4, h5 { font-family: var(--font-display); color: var(--heading); line-height: 1.15; margin: 0 0 var(--space-3); letter-spacing: -.02em; }
h1 { font-size: var(--fs-4xl); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: var(--fs-xl); font-weight: 700; }
h4 { font-size: var(--fs-lg); font-weight: 700; }
p { margin: 0 0 var(--space-4); }
small, .small { font-size: var(--fs-sm); }
.muted { color: var(--muted); }
.lead { font-size: var(--fs-lg); color: var(--fg-2); }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }
.mono { font-family: var(--font-mono); font-size: .92em; font-variant-numeric: tabular-nums; }
.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--space-8); }
.prose h3 { margin-top: var(--space-6); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 var(--space-4); }
.prose li { margin-bottom: .35rem; }
.prose img { border-radius: var(--radius-lg); margin: var(--space-6) 0; }
.prose blockquote { margin: var(--space-6) 0; padding: var(--space-4) var(--space-6); border-left: 4px solid var(--gold); background: var(--surface); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.prose table { width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem .75rem; text-align: left; }

/* ---------------------------------------------------------------- Icônes */
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.icon-sm { width: 1em; height: 1em; }
.icon-lg { width: 1.75rem; height: 1.75rem; }
.icon-xl { width: 2.25rem; height: 2.25rem; }

/* ---------------------------------------------------------------- Layout */
/* Gouttières : 1rem, élargies par l'encoche des iPhone en paysage (viewport-fit=cover). */
.container { width: min(var(--container), 100% - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); margin-inline: auto; }
.container-narrow { width: min(880px, 100% - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); margin-inline: auto; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-alt { background: var(--surface); }
.section-dark { background: linear-gradient(135deg, var(--ink), var(--navy)); color: #E4ECF3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-8); }
.section-head p { margin: 0; color: var(--muted); max-width: 60ch; }
.stack > * + * { margin-top: var(--space-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.split { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; }
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
/* Contenu principal d'abord, colonne latérale (<aside>) à droite : c'est l'ordre de toutes les vues qui l'utilisent. */
.grid-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: var(--space-8); align-items: start; }
/* Toujours minmax(0, 1fr) et jamais 1fr seul : « 1fr » vaut minmax(auto, 1fr) et grandit jusqu'au mot le
   plus long de la colonne (une adresse e-mail suffit à faire déborder un téléphone). */
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-sidebar { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- Boutons */
.btn { --btn-bg: var(--surface); --btn-fg: var(--heading); --btn-bd: var(--line-strong);
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--tap); padding: .625rem 1.15rem;
  border: 1px solid var(--btn-bd); border-radius: var(--radius-md); background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm); letter-spacing: .01em; line-height: 1.1; text-decoration: none; cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  /* Libellé sur une ligne tant qu'il a la place ; contraint (grille, colonne étroite), il passe à la ligne au lieu d'être rogné par overflow: hidden. */
  white-space: normal; text-align: center; max-width: 100%; }
/* Reflet métallique au survol */
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%); transform: translateX(-120%); transition: transform .6s var(--ease); pointer-events: none; }
.btn:hover::after { transform: translateX(120%); }
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: none; box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { --btn-bg: var(--gold); --btn-fg: var(--ink); --btn-bd: #E0A128; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 0 rgba(10,15,22,.08); }
.btn-primary:hover { --btn-bg: #F5BD4E; --btn-bd: #E0A128; }
.btn-secondary { --btn-bg: var(--navy); --btn-fg: #fff; --btn-bd: var(--navy); }
.btn-secondary:hover { --btn-bg: var(--ink); --btn-bd: var(--ink); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--heading); --btn-bd: var(--line-strong); }
.btn-ghost:hover { --btn-bd: var(--navy); }
.btn-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.45); }
.btn-light:hover { --btn-bg: rgba(255,255,255,.1); }
/* Fonds de bouton un ton plus soutenus que --red / --green : texte blanc ≥ 4.5:1 (4.4 et 4.25 avant). */
.btn-danger { --btn-bg: #C23B3B; --btn-fg: #fff; --btn-bd: #C23B3B; }
.btn-success { --btn-bg: #237A4B; --btn-fg: #fff; --btn-bd: #237A4B; }
.btn-link { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--cyan-dark); padding-inline: .25rem; }
.btn-sm { min-height: 36px; padding: .4rem .75rem; font-size: var(--fs-xs); }
.btn-lg { min-height: 52px; padding: .85rem 1.5rem; font-size: var(--fs-md); }
.btn-block { width: 100%; }
/* Dans un tableau, la colonne s'élargit (le tableau défile dans .table-wrap) : le bouton reste sur une ligne. */
.table .btn, .row-actions .btn { white-space: nowrap; }
.btn-icon { width: var(--tap); padding: 0; }
.btn-whatsapp { --btn-bg: #1FA855; --btn-fg: #fff; --btn-bd: #1FA855; }

/* ---------------------------------------------------------------- Formulaires */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-5); }
.form-grid .span-2, .form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: .375rem; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: var(--fs-sm); color: var(--fg-2); }
.required::after { content: " *"; color: var(--red); }
.input, .select, .textarea, input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="search"], input[type="url"], input[type="date"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: var(--tap); padding: .625rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface); color: var(--fg); font-size: 1rem; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: var(--focus); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"], .has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--heading); margin: 0; flex: none; }
input[type="file"] { padding: .5rem; min-height: auto; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--light); width: 100%; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--fs-sm); min-height: 32px; cursor: pointer; }
.check input { margin-top: .15rem; }
/* Le libellé d'une case peut contenir un code sans espace (ex. « finance.close_period ») : il se coupe au lieu de déborder. */
.check > :not(input) { min-width: 0; overflow-wrap: anywhere; }
.help { font-size: var(--fs-xs); color: var(--muted); margin: 0; }
.field-error { color: var(--danger-fg); font-size: var(--fs-sm); font-weight: 600; margin: 0; }
.input-group { display: flex; }
/* Le champ prend la place libre et peut rétrécir ; le bouton garde sa largeur (jamais rogné). */
.input-group > input, .input-group > select { flex: 1 1 auto; min-width: 0; width: auto; }
.input-group > .btn { flex: none; }
.input-group > input, .input-group > select { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); align-items: center; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); margin: 0 0 var(--space-5); min-width: 0; }
legend { font-family: var(--font-display); font-weight: 700; color: var(--heading); padding: 0 .5rem; }
.choice-list { display: grid; gap: var(--space-3); }
.choice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--cyan); box-shadow: var(--focus); }
.choice strong { display: block; }
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.qty button { width: 40px; border: 0; background: var(--light); cursor: pointer; font-size: 1.1rem; }
.qty input { width: 64px; border: 0; text-align: center; min-height: 40px; border-radius: 0; box-shadow: none !important; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------------------------------------------------------------- Cartes */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-1); min-width: 0; }
.card-flat { box-shadow: none; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.card-head h2, .card-head h3 { margin: 0; font-size: var(--fs-lg); display: flex; align-items: center; gap: .6rem; min-width: 0; overflow-wrap: anywhere; }
/* Repère d'en-tête de carte : filet or, signature industrielle */
.card-head h2::before, .card-head h3::before { content: ""; width: 4px; height: 18px; background: var(--gold); border-radius: 1px; flex: none; }
.card-link { display: block; color: inherit; text-decoration: none; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.card-link:hover { color: inherit; transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--heading); }
.feature-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); color: var(--heading); margin-bottom: var(--space-4); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.card-link:hover .feature-icon, .card:hover > .feature-icon { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.feature-icon.gold { background: var(--gold-bg); color: var(--gold-dark); }
.feature-icon.navy { background: var(--neutral-bg); color: var(--heading); }

/* ---------------------------------------------------------------- Badges */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .55rem; border-radius: var(--radius-sm); font-size: var(--fs-xs); font-weight: 700; line-height: 1.5; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral-fg); letter-spacing: .01em; }
.badge-success { background: var(--success-bg); color: var(--success-fg); }
.badge-danger { background: var(--danger-bg); color: var(--danger-fg); }
.badge-warning { background: var(--warning-bg); color: var(--warning-fg); }
.badge-info { background: var(--info-bg); color: var(--info-fg); }
.badge-accent { background: var(--accent-bg); color: var(--accent-fg); }
.badge-gold { background: var(--gold); color: var(--ink); }
.badge-navy { background: var(--navy); color: #fff; }

/* ---------------------------------------------------------------- Alertes */
.alert { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); border: 1px solid transparent; margin-bottom: var(--space-5); background: var(--info-bg); color: var(--info-fg); }
.alert .icon { margin-top: .1rem; }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert-success { background: var(--success-bg); color: var(--success-fg); border-color: #BFE3CC; }
.alert-error, .alert-danger { background: var(--danger-bg); color: var(--danger-fg); border-color: #F2C4C4; }
.alert-warning { background: var(--warning-bg); color: var(--warning-fg); border-color: #F6D7A8; }
.alert-info { border-color: #B5E3EE; }

/* ---------------------------------------------------------------- Tableaux */
/* position: relative : les libellés .sr-only (absolus) des en-têtes restent dans la zone qui défile au lieu d'élargir la page. */
.table-wrap { position: relative; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.table { width: 100%; font-size: var(--fs-sm); }
.table th, .table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--surface-2); color: var(--fg-3); font-family: var(--font-mono); font-weight: 600; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; border-bottom-color: var(--line-strong); }
.table th a { color: inherit; text-decoration: none; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover { background: var(--row-hover); box-shadow: inset 3px 0 0 var(--gold); }
.table tr:last-child td { border-bottom: 0; }
.table .num, .table td.num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table td.num { font-family: var(--font-mono); font-size: .82rem; letter-spacing: -.01em; }
.table .actions { text-align: right; white-space: nowrap; }
.table-compact th, .table-compact td { padding: .45rem .6rem; }
.totals { width: 100%; max-width: 380px; margin-left: auto; }
.totals td { padding: .35rem 0; }
.totals td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.totals .grand td { font-size: var(--fs-lg); font-weight: 800; border-top: 2px solid var(--heading); padding-top: .6rem; color: var(--heading); }
/* Même composant en liste de définitions : `dt`/`dd` à plat, ou enveloppés par paire dans des `div`. */
dl.totals { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0 0 0 auto; }
dl.totals > div { display: contents; }
dl.totals dt { margin: 0; }
dl.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
dl.totals .totals-main dt, dl.totals .totals-main dd { font-size: var(--fs-lg); font-weight: 800; border-top: 2px solid var(--heading); padding-top: .6rem; color: var(--heading); }
@media (max-width: 640px) {
  .table-stack thead { display: none; }
  .table-stack tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .table-stack td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .3rem .9rem; text-align: right; }
  .table-stack td::before { content: attr(data-label); font-weight: 700; color: var(--muted); text-align: left; }
}

/* ---------------------------------------------------------------- Définitions */
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .45rem 1rem; margin: 0; font-size: var(--fs-sm); }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- Pagination / fil d'Ariane / onglets */
.pagination { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-top: var(--space-8); padding: 0; list-style: none; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: var(--tap); min-height: var(--tap); padding: 0 .6rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--heading); text-decoration: none; font-weight: 600; }
.pagination a:hover { border-color: var(--cyan); }
.pagination [aria-current="page"] { background: var(--ink); color: var(--gold); border-color: var(--ink); font-family: var(--font-mono); }
.pagination .gap { border: 0; background: transparent; }
.breadcrumb { font-size: var(--fs-sm); color: var(--muted); padding-block: var(--space-4); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: .35rem; color: var(--line-strong); }
.breadcrumb a { color: var(--fg-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--cyan-dark); text-decoration: underline; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: var(--space-6); overflow-x: auto; scrollbar-width: thin; }
.tabs a { padding: .75rem 1rem; color: var(--fg-2); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); border-bottom: 3px solid transparent; white-space: nowrap; min-height: var(--tap); display: inline-flex; align-items: center; }
.tabs a { transition: color .15s, border-color .15s; }
.tabs a:hover { color: var(--heading); border-bottom-color: var(--line-strong); }
.tabs a[aria-current="page"], .tabs a.active { color: var(--heading); border-bottom-color: var(--gold); }

/* ---------------------------------------------------------------- Modale (dialog natif) */
dialog.modal { border: 0; border-radius: var(--radius-xl); padding: 0; width: min(560px, 100% - 2rem); box-shadow: var(--shadow-3); }
dialog.modal::backdrop { background: rgba(11,18,32,.55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: var(--fs-lg); }
.modal-body { padding: var(--space-6); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--line); background: var(--light); }

/* ---------------------------------------------------------------- KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: var(--space-4); margin-bottom: var(--space-6); }
/* KPI « panneau d'instrument » : filet d'accent en tête, étiquette technique, valeur en chiffres tabulaires,
   coin tramé. La teinte suit --kpi-accent (tons alert / danger / success / info). */
.kpi { --kpi-accent: var(--gold); position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-5) var(--space-4); display: flex; flex-direction: column; gap: .3rem; min-width: 0; box-shadow: var(--shadow-1); }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--kpi-accent) 0 38%, var(--line) 38%); }
.kpi::after { content: ""; position: absolute; right: 0; bottom: 0; width: 56px; height: 56px; background-image: var(--grid-light); background-size: 8px 8px; -webkit-mask: linear-gradient(135deg, transparent 50%, #000 50%); mask: linear-gradient(135deg, transparent 50%, #000 50%); pointer-events: none; }
.kpi-label { font-family: var(--font-mono); font-size: .68rem; font-weight: 600; color: var(--fg-3); text-transform: uppercase; letter-spacing: .1em; }
.kpi-value { font-family: var(--font-display); font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 800; color: var(--fg); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15; }
.kpi-hint { font-size: var(--fs-xs); color: var(--muted); }
a.kpi:hover .kpi-label { color: var(--heading); }
.kpi.alert-tone { --kpi-accent: var(--orange); }
.kpi.danger-tone { --kpi-accent: var(--red); }
.kpi.success-tone { --kpi-accent: var(--green); }
.kpi.info-tone { --kpi-accent: var(--cyan); }

/* Barres (graphiques légers sans bibliothèque) */
/* Histogramme : quadrillage d'oscilloscope, barres graphite à tête or, survol mis en évidence. */
.bars { position: relative; display: flex; align-items: flex-end; gap: .4rem; height: 180px; padding: 1rem .25rem 0; background: linear-gradient(to top, var(--line) 1px, transparent 1px) 0 0 / 100% 25%; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 0; height: 100%; justify-content: flex-end; }
.bars .bar span { display: block; width: 100%; max-width: 38px; background: linear-gradient(180deg, var(--gold) 0 4px, var(--steel) 4px, var(--ink) 100%); border-radius: 2px 2px 0 0; min-height: 3px; transform-origin: bottom; transition: background .15s; }
.bars .bar:hover span { background: linear-gradient(180deg, var(--gold) 0 4px, var(--cyan-dark) 4px, var(--navy) 100%); }
.bars .bar small { font-family: var(--font-mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.hbar { display: grid; grid-template-columns: minmax(0, 40%) 1fr auto; gap: .6rem; align-items: center; font-size: var(--fs-sm); margin-bottom: .55rem; }
.hbar .track { height: 10px; background: repeating-linear-gradient(90deg, var(--neutral-bg) 0 6px, #E4E9EF 6px 7px); border-radius: 2px; overflow: hidden; }
.hbar .fill { height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); border-radius: 2px; transform-origin: left; }
.hbar > :last-child { font-family: var(--font-mono); font-size: .8rem; font-variant-numeric: tabular-nums; }
.hbar .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 8px; background: var(--neutral-bg); border-radius: 2px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan-dark), var(--cyan)); transform-origin: left; }

/* ---------------------------------------------------------------- États vides / timeline */
.empty { text-align: center; padding: var(--space-12) var(--space-6); color: var(--muted); }
.empty .icon { width: 48px; height: 48px; color: var(--line-strong); margin: 0 auto var(--space-4); display: block; }
.empty h3 { color: var(--fg-2); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 var(--space-5) var(--space-8); }
.timeline li::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 3px; top: 4px; width: 14px; height: 14px; border-radius: 2px; background: var(--surface); border: 3px solid var(--gold); transform: rotate(45deg) scale(.8); }
.timeline li.done::after { border-color: var(--green); background: var(--green); }
.timeline time { display: block; font-size: var(--fs-xs); color: var(--muted); }

/* ---------------------------------------------------------------- Étapes */
.steps { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 var(--space-6); padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: .5rem; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.steps li::before { content: counter(step); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--neutral-bg); color: var(--fg-2); font-size: var(--fs-xs); }
.steps li + li::after { order: -1; content: ""; width: 24px; height: 2px; background: var(--line); }
.steps li.current { color: var(--heading); }
.steps li.current::before { background: var(--gold); color: var(--ink); }
.steps li.done::before { background: var(--green); color: #fff; content: "✓"; }

/* ---------------------------------------------------------------- Divers */
.price { font-family: var(--font-display); font-weight: 800; color: var(--heading); font-variant-numeric: tabular-nums; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .85em; font-weight: 500; margin-left: .4rem; }
.stars { color: var(--gold); letter-spacing: .05em; white-space: nowrap; }
.stars .off { color: var(--line-strong); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); flex: none; }
.divider-text { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: var(--fs-sm); }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.text-right { text-align: right; } .text-center { text-align: center; } .text-left { text-align: left; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); } .mt-8 { margin-top: var(--space-8); } .mb-4 { margin-bottom: var(--space-4); } .mb-6 { margin-bottom: var(--space-6); }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Sur un élément en ligne, l'ellipse ne s'applique pas : il devient bloc en ligne borné à son conteneur. */
span.truncate, a.truncate, code.truncate { display: inline-block; max-width: 100%; vertical-align: bottom; }
.inline-form { display: inline; }
.code-box { font-family: var(--font-mono); background: var(--ink); color: #E4ECF3; padding: var(--space-4); border-radius: var(--radius-md); overflow-x: auto; font-size: var(--fs-sm); white-space: pre-wrap; word-break: break-all; }
.toast-zone { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 900; display: grid; gap: .5rem; max-width: min(380px, 100% - 2rem); }
.toast { background: var(--ink); color: #fff; padding: .85rem 1.1rem; border-radius: var(--radius-md); box-shadow: var(--shadow-3); font-size: var(--fs-sm); animation: toast-in .2s ease; }
.toast.success { background: var(--green); } .toast.error { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(0,0,0,.12); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Titres de section et listes de méta */
.section-title { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; color: var(--heading); margin: 0 0 var(--space-4); }
.section-title + .lead, .section-title + p { margin-top: calc(var(--space-4) * -1 + var(--space-2)); color: var(--muted); }
.card-narrow { max-width: 78ch; margin-inline: auto; }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.list-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--fs-sm); }
.list-meta > li { display: flex; align-items: center; gap: .35rem; }
.list-meta .icon { color: var(--fg-3); }

/* ---------------------------------------------------------------- Page d'erreur / auth centrée */
.center-page { min-height: 70vh; min-height: 70dvh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: var(--space-10) 1rem; }
.center-card { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: clamp(1.5rem, 5vw, 2.75rem); box-shadow: var(--shadow-2); }
.error-code { font-family: var(--font-display); font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 800; line-height: 1; color: var(--heading); margin: 0; }
.error-code span { color: var(--gold-dark); }

@media print {
  html.motion .reveal, html.motion .bars .bar span, html.motion .hbar .fill, html.motion .progress > span { opacity: 1 !important; transform: none !important; }
  .no-print, header.site-header, footer.site-footer, .admin-sidebar, .admin-topbar, .toast-zone, .cookie-banner, .wa-float { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* ---------------------------------------------------------------- Mouvement (révélation, graphiques)
   Actif seulement quand app.js/admin.js pose html.motion : sans JavaScript, ou avec
   « réduire les animations », tout reste visible et immobile. */
html.motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
html.motion .reveal.is-in { opacity: 1; transform: none; }
html.motion .bars .bar span, html.motion .hbar .fill, html.motion .progress > span { transition: transform 1s var(--ease); transition-delay: var(--d, 0ms); }
html.motion .bars:not(.is-in) .bar span { transform: scaleY(0); }
html.motion .hbar:not(.is-in) .fill, html.motion .progress:not(.is-in) > span { transform: scaleX(0); }

/* Trames réutilisables */
.bg-grid-dark { background-image: var(--grid-dark); background-size: var(--grid-size); }
.bg-grid-light { background-image: var(--grid-light); background-size: var(--grid-size); }
.hazard-rule { height: 6px; background: var(--hazard); border: 0; margin: 0; }
/* Numérotation technique « 01 », « 02 »… */
.index-num { font-family: var(--font-mono); font-size: .75rem; font-weight: 600; letter-spacing: .12em; color: var(--gold-dark); }

/* ---------------------------------------------------------------- Tableaux de bord : finitions
   La valeur d'un KPI s'adapte à la largeur de sa carte (unités de conteneur) et ne se coupe jamais
   au milieu d'un mot : « 7 548 750 FCFA » passe au besoin à la ligne avant l'unité. */
.kpi { container-type: inline-size; }
.kpi-value { overflow-wrap: normal; word-break: normal; font-size: clamp(1.15rem, 10.5cqi, 1.85rem); }
/* Premier indicateur d'une rangée : cadran principal, graphite tramé, valeur en or */
.kpis > .kpi:first-child { background: var(--grid-dark), linear-gradient(135deg, var(--ink), var(--graphite-3)); background-size: 22px 22px, 22px 22px, auto; border-color: var(--ink); }
.kpis > .kpi:first-child::before { background: linear-gradient(90deg, var(--gold) 0 38%, rgba(255,255,255,.12) 38%); }
.kpis > .kpi:first-child::after { display: none; }
.kpis > .kpi:first-child .kpi-label { color: #9FB0C1; }
.kpis > .kpi:first-child .kpi-value { color: var(--gold); }
.kpis > .kpi:first-child .kpi-hint { color: #8FA2B4; }
/* Références et dates de tableaux sur une seule ligne */
.table td[data-label="N°"], .table td[data-label="Référence"], .table td[data-label="Date"], .table td[data-label="Numéro"] { white-space: nowrap; }
.table td[data-label="N°"] a, .table td[data-label="Référence"] a, .table td[data-label="Numéro"] a { font-family: var(--font-mono); font-size: .8rem; font-weight: 600; }
/* Jauges horizontales : le remplissage est un <span> → bloc, sinon sa largeur est ignorée.
   Variante à deux éléments (jauge + valeur, ex. colonne « Part ») : la jauge prend la place libre. */
.hbar .fill, .hbar .track { display: block; }
.hbar:has(> :nth-child(2):last-child) { grid-template-columns: minmax(64px, 1fr) auto; }
/* Étiquette de KPI cliquable : même aspect que l'étiquette simple */
.kpi-label a { color: inherit; text-decoration: none; }
.kpi-label a:hover { color: var(--gold-dark); }
.kpis > .kpi:first-child .kpi-label a:hover { color: var(--gold); }
/* Période sans valeur : simple trait neutre (posé par motion.js) */
.bars .bar.is-empty span { background: var(--line-strong); }

/* ---------------------------------------------------------------- Thème sombre : composants
   Ce que les jetons ne couvrent pas seuls. Un seul bloc pour le site, l'espace client, le back-office et le POS. */
@media screen {
  /* Papier : factures, tickets, aperçus d'e-mail restent des documents clairs (on les imprime, on les envoie). */
  :root[data-theme="dark"] :is(.document, .receipt, .pos-receipt-paper, .mkt-mail, .brand-tile:has(img)) {
    color-scheme: light;
    --light: #F3F5F7; --surface: #FFFFFF; --surface-2: #F7F9FA; --mist: #E5E7EB; --line: #DCE2E8; --line-strong: #B9C4CF;
    --muted: #526273; --fg: #0A0F16; --fg-2: #2E4358; --fg-3: #5E7185; --heading: #0F2236; --cyan-dark: #006F88; --gold-dark: #9E6600;
    --success-bg: #E7F5EC; --success-fg: #1E6B41; --danger-bg: #FCEBEB; --danger-fg: #A12D2D; --warning-bg: #FEF3E2; --warning-fg: #8A4B08;
    --info-bg: #E3F6FA; --info-fg: #045E73; --accent-bg: #EFEDFD; --accent-fg: #4B3DB8; --neutral-bg: #EEF2F6; --neutral-fg: #334E68;
    --row-hover: #FBF7EC; --gold-bg: #FDF3DC;
    color: var(--fg);
  }
  /* Logo (PNG sur fond blanc) : posé sur une plaque blanche arrondie, comme dans le pied de page et les e-mails. */
  :root[data-theme="dark"] :is(.site-header .brand img, .login-card .brand img, .center-card .brand img) {
    box-sizing: content-box; background: #FFFFFF; padding: 4px 8px; border-radius: 8px;
  }
  /* Photos produit et logos de marques (souvent sur fond blanc) : un puits clair, comme en magasin. */
  :root[data-theme="dark"] :is(.product-card .media, .gallery-main, .gallery-thumbs button, .suggest img, .cart-line img, .brand-tile:has(img), .cat-card > img) {
    background: #F3F5F7;
  }
  :root[data-theme="dark"] .brand-tile:has(img) { border-color: var(--line-strong); }
  :root[data-theme="dark"] .alert-success { border-color: #1F5A3A; }
  :root[data-theme="dark"] :is(.alert-error, .alert-danger) { border-color: #6B2A2D; }
  :root[data-theme="dark"] .alert-warning { border-color: #6A4D1C; }
  :root[data-theme="dark"] .alert-info { border-color: #1B5566; }
  :root[data-theme="dark"] .btn-secondary { --btn-bg: #2E4358; --btn-bd: #3A4D62; }
  :root[data-theme="dark"] .btn-secondary:hover { --btn-bg: #3A4D62; --btn-bd: #4A6078; }
  :root[data-theme="dark"] .btn-primary { box-shadow: none; }
  :root[data-theme="dark"] .spinner { border-color: rgba(255,255,255,.15); border-top-color: var(--cyan); }
  :root[data-theme="dark"] .hbar .track { background: repeating-linear-gradient(90deg, var(--neutral-bg) 0 6px, #2A3847 6px 7px); }
  :root[data-theme="dark"] .bars .bar span { background: linear-gradient(180deg, var(--gold) 0 4px, #6F869C 4px, #3A4D62 100%); }
  :root[data-theme="dark"] .bars .bar:hover span { background: linear-gradient(180deg, var(--gold) 0 4px, var(--cyan) 4px, #2E4358 100%); }
  :root[data-theme="dark"] .specs th { background: var(--surface-2); }
  :root[data-theme="dark"] body.admin { background: var(--light); }
  :root[data-theme="dark"] .kanban-col { background: var(--surface-2); }
  :root[data-theme="dark"] .pos-product:hover { background: var(--surface); }
  :root[data-theme="dark"] .thread-msg.from-staff { border-color: #1B5566; }
}

/* ---------------------------------------------------------------- Bouton de thème (soleil / lune) */
[data-theme-toggle] .icon-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .icon-sun { display: inline; }
:root[data-theme="dark"] [data-theme-toggle] .icon-moon { display: none; }
