/* =====================================================================
   FranceTable – feuille de style (refonte du 15/11/2026)
   Mode jour (par défaut) et mode nuit : toutes les couleurs sont des variables.
   ===================================================================== */
:root {
  color-scheme: light;
  --fond: #f3f5fa; --fond-2: #e9edf6;
  --carte: #ffffff; --carte-2: #f7f8fc; --carte-3: #eef1f8; --verre: rgba(255,255,255,.72);
  --bord: #e2e6ef; --bord-fort: #cfd5e3;
  --texte: #141a2e; --doux: #4f5872; --tres-doux: #8189a0;
  --bleu: #2f54eb; --bleu-fonce: #1d3bc4; --bleu-clair: #e8edff; --bleu-encre: #1f3fbf;
  --vert: #12805c; --vert-clair: #e2f5ec; --vert-encre: #0d6648;
  --orange: #b45309; --orange-vif: #e8780f; --orange-clair: #fff2e2; --orange-encre: #7a3a06;
  --rouge: #c0352b; --rouge-clair: #fdecea; --rouge-encre: #8f2219;
  --violet: #6d4ae0; --violet-clair: #efe9ff;
  --ambre: #b7791f; --ambre-clair: #fdf3dc;
  --rose: #c43a7c; --rose-clair: #fde8f2;
  --ombre-1: 0 1px 2px rgba(18,26,52,.06);
  --ombre: 0 1px 2px rgba(18,26,52,.05), 0 8px 24px rgba(18,26,52,.07);
  --ombre-forte: 0 18px 50px rgba(18,26,52,.18), 0 4px 12px rgba(18,26,52,.08);
  --rayon: 14px; --rayon-grand: 20px;
  /* menu de gauche (toujours foncé) */
  --cote-fond: linear-gradient(180deg, #121a3a 0%, #0d1430 60%, #0b112a 100%);
  --cote-texte: #c9d1ea; --cote-doux: #7e88a9; --cote-survol: rgba(255,255,255,.07); --cote-actif: rgba(116,141,255,.18);
  /* feuille de facture */
  --papier: #ffffff; --encre: #111111; --papier-ligne: #d4d4d4; --papier-gris: #ececec;
  /* graphiques (palette de référence, une seule série par graphique) */
  --serie-1: #2a78d6; --serie-1-aire: rgba(42,120,214,.12);
  --grille: #e7e9ef; --axe: #c3c8d4; --graph-texte: #6b7287;
  --cc0: #edf0f5; --cc1: #b7d3f6; --cc2: #6da7ec; --cc3: #2a78d6; --cc4: #184f95;
  --hausse: #0d6648; --baisse: #a12a20;
  --degrade-marque: linear-gradient(135deg, #4f6bff 0%, #2f54eb 45%, #7c4dff 100%);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fond: #0a0f1e; --fond-2: #0f1528;
  --carte: #131a2e; --carte-2: #182036; --carte-3: #1f2842; --verre: rgba(19,26,46,.72);
  --bord: #263049; --bord-fort: #34405f;
  --texte: #e8ecf8; --doux: #a8b1cb; --tres-doux: #727c98;
  --bleu: #7b93ff; --bleu-fonce: #9aaeff; --bleu-clair: rgba(123,147,255,.15); --bleu-encre: #a9b9ff;
  --vert: #3fcf96; --vert-clair: rgba(63,207,150,.13); --vert-encre: #6fe0b2;
  --orange: #f0a04b; --orange-vif: #f59e3d; --orange-clair: rgba(245,158,61,.14); --orange-encre: #ffc285;
  --rouge: #ff7b70; --rouge-clair: rgba(255,123,112,.14); --rouge-encre: #ffaaa3;
  --violet: #a58bff; --violet-clair: rgba(165,139,255,.15);
  --ambre: #f2c063; --ambre-clair: rgba(242,192,99,.14);
  --rose: #ff7fb8; --rose-clair: rgba(255,127,184,.14);
  --ombre-1: 0 1px 2px rgba(0,0,0,.4);
  --ombre: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px rgba(0,0,0,.35);
  --ombre-forte: 0 24px 60px rgba(0,0,0,.6), 0 4px 14px rgba(0,0,0,.4);
  --cote-fond: linear-gradient(180deg, #0c1226 0%, #090e1e 100%);
  --papier: #121a2d; --encre: #8a96b8; --papier-ligne: #2a3450; --papier-gris: #1b2440;
  --serie-1: #3987e5; --serie-1-aire: rgba(57,135,229,.16);
  --grille: #222b44; --axe: #36415f; --graph-texte: #8a93ad;
  --cc0: #1a2238; --cc1: #184f95; --cc2: #256abf; --cc3: #3987e5; --cc4: #86b6ef;
  --hausse: #3fcf96; --baisse: #ff8a80;
}
.transition-theme, .transition-theme * { transition: background-color .35s, color .35s, border-color .35s, fill .35s, box-shadow .35s !important; }

/* ---------------------------------------------------------------- bases */
* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  line-height: 1.45; -webkit-font-smoothing: antialiased; }
body.avec-menu { background:
  radial-gradient(1200px 500px at 85% -120px, rgba(124,77,255,.10), transparent 60%),
  radial-gradient(900px 420px at 20% -160px, rgba(47,84,235,.12), transparent 60%), var(--fond); background-attachment: fixed; }
h1 { font-size: 1.75rem; margin: 0 0 12px; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 1.2rem; margin: 26px 0 10px; letter-spacing: -.01em; }
h3 { font-size: 1rem; margin: 0; }
a { color: var(--bleu); }
code { background: var(--carte-3); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
::selection { background: rgba(47,84,235,.25); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; margin-right: 7px; flex: none; }
.ic-grand { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-titre { width: 28px; height: 28px; vertical-align: -5px; margin-right: 10px; color: var(--rose); }
kbd { font: 600 .7rem/1 "Segoe UI", system-ui, sans-serif; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--bord-fort); background: var(--carte-2); color: var(--doux); }
:focus-visible { outline: 3px solid rgba(47,84,235,.45); outline-offset: 2px; }

/* ---------------------------------------------------------------- disposition : menu à gauche + zone */
.appli { display: flex; min-height: 100vh; }
.cote { position: sticky; top: 0; height: 100vh; width: 258px; flex: none; background: var(--cote-fond); color: var(--cote-texte);
  display: flex; flex-direction: column; padding: 16px 12px; z-index: 40; transition: width .25s ease; overflow: hidden;
  box-shadow: 1px 0 0 rgba(255,255,255,.04); }
.cote::before { content: ''; position: absolute; inset: -40% -60% auto auto; width: 320px; height: 320px; pointer-events: none;
  background: radial-gradient(circle, rgba(124,77,255,.35), transparent 65%); filter: blur(10px); }
.cote-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; padding: 4px 6px 14px; position: relative; }
.logo-pastille { width: 44px; height: 44px; border-radius: 13px; background: #fff; display: grid; place-items: center; flex: none;
  box-shadow: 0 6px 18px rgba(79,107,255,.45); }
.logo-pastille img { width: 36px; height: auto; }
.logo-texte { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.logo-texte strong { font-size: 1.12rem; letter-spacing: -.01em; }
.logo-texte small { color: var(--cote-doux); font-size: .72rem; margin-top: 2px; }
.nouveau-zone { position: relative; padding: 2px 4px 10px; }
.bouton-nouveau { width: 100%; display: flex; align-items: center; justify-content: center; gap: 4px; border: 0; color: #fff;
  background: var(--degrade-marque); background-size: 160% 160%; padding: 12px 16px; border-radius: 14px; font: 700 1rem/1 inherit; cursor: pointer;
  box-shadow: 0 8px 22px rgba(79,107,255,.45), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .15s, background-position .4s; }
.bouton-nouveau:hover { transform: translateY(-1px); background-position: 100% 0; }
.bouton-nouveau .ic { margin-right: 4px; stroke-width: 2.6; }
.cote-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; flex: 1; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.cote-titre { color: var(--cote-doux); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 14px 12px 6px; white-space: nowrap; }
.cote-nav a { position: relative; display: flex; align-items: center; gap: 2px; padding: 10px 12px; border-radius: 11px; color: var(--cote-texte);
  text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; transition: background .15s, color .15s; }
.cote-nav a .ic { width: 21px; height: 21px; margin-right: 10px; opacity: .85; }
.cote-nav a:hover { background: var(--cote-survol); color: #fff; }
.cote-nav a.actif { background: var(--cote-actif); color: #fff; }
.cote-nav a.actif::before { content: ''; position: absolute; left: -4px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #8ea2ff, #b18cff); box-shadow: 0 0 12px rgba(142,162,255,.8); }
.cote-nav a.actif .ic { opacity: 1; color: #a9b8ff; }
.cote-nav .compteur { margin-left: auto; background: #ff8a3d; color: #1a0f00; font-size: .72rem; font-weight: 800; min-width: 22px; height: 22px;
  border-radius: 11px; display: grid; place-items: center; padding: 0 6px; }
.cote-nav .nouveaute { margin-left: auto; font-style: normal; font-size: .64rem; font-weight: 700; color: #d9ccff; background: rgba(165,139,255,.18);
  padding: 2px 7px; border-radius: 8px; letter-spacing: .02em; }
.cote-bas { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); }
.puce-essai { display: flex; align-items: center; gap: 2px; color: #ffd28a; background: rgba(255,170,60,.12); border: 1px solid rgba(255,170,60,.25);
  padding: 7px 12px; border-radius: 10px; font-size: .8rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.puce-essai .ic { width: 16px; height: 16px; }
.interrupteur-theme { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: var(--cote-texte); padding: 6px 8px;
  border-radius: 10px; cursor: pointer; font: 600 .88rem inherit; white-space: nowrap; }
.interrupteur-theme:hover { background: var(--cote-survol); }
.it-piste { width: 50px; height: 28px; border-radius: 14px; background: rgba(255,255,255,.12); position: relative; flex: none; transition: background .3s; }
.it-bouton { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  transition: transform .3s cubic-bezier(.5,1.6,.5,1), background .3s; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.it-bouton .ic { width: 14px; height: 14px; margin: 0; position: absolute; color: #e08a00; transition: opacity .25s, transform .3s; }
.it-lune { opacity: 0; transform: rotate(-60deg); }
[data-theme="dark"] .it-piste { background: linear-gradient(90deg, #4f6bff, #7c4dff); }
[data-theme="dark"] .it-bouton { transform: translateX(22px); background: #10162c; }
[data-theme="dark"] .it-soleil { opacity: 0; transform: rotate(60deg); }
[data-theme="dark"] .it-lune { opacity: 1; transform: none; color: #ffd76a; }
.si-nuit { display: none !important; }
[data-theme="dark"] .si-jour { display: none !important; }
[data-theme="dark"] .si-nuit { display: inline !important; }
[data-theme="dark"] svg.si-nuit { display: inline-block !important; }
.utilisateur { display: flex; align-items: center; gap: 10px; padding: 6px 4px; white-space: nowrap; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; flex: none;
  background: linear-gradient(135deg, #ff8a3d, #ff4f8b); box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.u-nom { font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.u-nom small { font-weight: 500; font-size: .7rem; color: var(--cote-doux); }
.utilisateur form { margin: 0; }
.u-sortie { background: transparent; border: 0; color: var(--cote-doux); padding: 8px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; font: 600 .8rem inherit; }
.u-sortie:hover { background: var(--cote-survol); color: #fff; }
.u-sortie .ic { margin-right: 4px; }

/* menu replié (bureau) : seulement les icônes */
.cote-replie .cote { width: 78px; }
.cote-replie .cote .logo-texte, .cote-replie .cote-nav a span, .cote-replie .cote-titre, .cote-replie .cote-nav .nouveaute,
.cote-replie .bouton-nouveau span, .cote-replie .it-texte, .cote-replie .u-nom, .cote-replie .u-sortie span, .cote-replie .puce-essai span { display: none; }
.cote-replie .cote-titre { display: block; height: 10px; padding: 0; }
.cote-replie .cote-nav a { justify-content: center; padding: 11px 0; }
.cote-replie .cote-nav a .ic { margin: 0; }
.cote-replie .cote-nav .compteur { position: absolute; top: 3px; right: 6px; min-width: 18px; height: 18px; font-size: .65rem; }
.cote-replie .bouton-nouveau { padding: 12px 0; }
.cote-replie .bouton-nouveau .ic { margin: 0; }
.cote-replie .utilisateur { flex-direction: column; }
.cote-replie .interrupteur-theme { justify-content: center; padding: 6px 0; }
.cote-replie .puce-essai { justify-content: center; }
.cote-replie .puce-essai .ic { margin: 0; }

.zone { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.haut { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: color-mix(in srgb, var(--fond) 78%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--bord) 70%, transparent); }
.haut-bouton { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--bord); background: var(--carte);
  color: var(--doux); cursor: pointer; padding: 0; box-shadow: var(--ombre-1); }
.haut-bouton:hover { color: var(--texte); border-color: var(--bord-fort); }
.haut-bouton .ic { margin: 0; }
.haut-recherche { flex: 1; min-width: 0; max-width: 560px; display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 10px 0 14px; border-radius: 13px;
  border: 1px solid var(--bord); background: var(--carte); color: var(--tres-doux); cursor: pointer; font: inherit; font-size: .95rem; text-align: left;
  box-shadow: var(--ombre-1); transition: border-color .15s, box-shadow .15s; }
.haut-recherche:hover { border-color: var(--bleu); box-shadow: 0 0 0 4px var(--bleu-clair); }
.hr-texte { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.haut-droite { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.horloge { display: flex; align-items: center; color: var(--doux); font-weight: 700; font-variant-numeric: tabular-nums; padding: 0 6px; }
.horloge .ic { width: 18px; height: 18px; margin-right: 6px; color: var(--tres-doux); }
.haut-facture { padding: 10px 16px; }
main { width: 100%; max-width: 1480px; margin: 0 auto; padding: 22px 28px 90px; }
main.seul { max-width: none; padding: 0; }
.voile-cote { display: none; }

/* ---------------------------------------------------------------- menu « Nouveau » */
.menu-nouveau { position: fixed; z-index: 80; width: 330px; background: var(--carte); border: 1px solid var(--bord); border-radius: 18px; padding: 8px;
  box-shadow: var(--ombre-forte); animation: apparait .16s ease-out; }
.mn-titre { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--tres-doux); padding: 8px 12px 6px; }
.menu-nouveau a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; text-decoration: none; color: var(--texte); }
.menu-nouveau a:hover, .menu-nouveau a:focus-visible { background: var(--carte-3); outline: none; }
.menu-nouveau a .ic { width: 38px; height: 38px; padding: 9px; border-radius: 11px; margin: 0; box-sizing: border-box; }
.menu-nouveau a span { display: flex; flex-direction: column; line-height: 1.2; }
.menu-nouveau a strong { font-size: .95rem; }
.menu-nouveau a small { color: var(--doux); font-size: .78rem; }
.mn-violet .ic { background: var(--violet-clair); color: var(--violet); }
.mn-bleu .ic { background: var(--bleu-clair); color: var(--bleu); }
.mn-vert .ic { background: var(--vert-clair); color: var(--vert); }
.mn-ambre .ic { background: var(--ambre-clair); color: var(--ambre); }
.mn-rose .ic { background: var(--rose-clair); color: var(--rose); }
.mn-gris .ic { background: var(--carte-3); color: var(--doux); }
.mn-sep { height: 1px; background: var(--bord); margin: 6px 8px; }
@keyframes apparait { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- palette de recherche (Ctrl + K) */
.palette { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.palette[hidden] { display: none; }
.palette-fond { position: absolute; inset: 0; background: rgba(8,12,28,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fondu .15s; }
.palette-boite { position: relative; width: min(680px, 100%); max-height: 72vh; display: flex; flex-direction: column; background: var(--carte);
  border: 1px solid var(--bord); border-radius: 20px; box-shadow: var(--ombre-forte); overflow: hidden; animation: apparait .18s ease-out; }
.palette-champ { display: flex; align-items: center; gap: 4px; padding: 14px 18px; border-bottom: 1px solid var(--bord); }
.palette-champ .ic { width: 22px; height: 22px; color: var(--bleu); }
.palette-champ input { flex: 1; border: 0; outline: none; background: transparent; font-size: 1.15rem; padding: 6px 4px; color: var(--texte); }
.palette-liste { overflow-y: auto; padding: 8px; }
.pal-groupe { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--tres-doux); padding: 10px 12px 4px; }
.pal-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--texte); font-weight: 600; }
.pal-item .ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--carte-3); color: var(--doux); box-sizing: border-box; margin: 0 6px 0 0; }
.pal-item.actif { background: var(--bleu-clair); }
.pal-item.actif .ic { background: var(--bleu); color: #fff; }
.pal-texte { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pal-texte strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-texte small { color: var(--doux); font-weight: 400; font-size: .82rem; }
.pal-action { font-size: .75rem; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: var(--carte); border: 1px solid var(--bord); color: var(--bleu); white-space: nowrap; }
.pal-action:hover { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.pal-vide { padding: 18px; color: var(--doux); text-align: center; }
.pal-tout { color: var(--bleu); }
.palette-pied { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 18px; border-top: 1px solid var(--bord); color: var(--tres-doux); font-size: .78rem; background: var(--carte-2); }
.palette-pied kbd { margin-right: 3px; }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- messages (toasts) et infobulles */
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 95; display: flex; flex-direction: column-reverse; gap: 10px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.sans-menu .toasts { top: 22px; bottom: auto; }
.message { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; background: var(--carte); color: var(--texte); border: 1px solid var(--bord);
  border-radius: 16px; padding: 13px 12px 13px 14px; box-shadow: var(--ombre-forte); animation: toast-entre .35s cubic-bezier(.2,1.2,.4,1) both; font-weight: 500; }
.message.sortie { animation: toast-sort .3s ease-in forwards; }
.toast-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 900; color: #fff; background: var(--vert); }
.toast-ic .ic { width: 16px; height: 16px; margin: 0; stroke-width: 3; }
.message.error .toast-ic { background: var(--rouge); }
.message.info .toast-ic { background: var(--bleu); font-family: Georgia, serif; }
.message.error { border-color: color-mix(in srgb, var(--rouge) 40%, var(--bord)); }
.toast-texte { flex: 1; padding-top: 3px; font-size: .95rem; }
.toast-fermer { border: 0; background: transparent; color: var(--tres-doux); font-size: 1.4rem; line-height: 1; padding: 0 6px; cursor: pointer; }
.toast-fermer:hover { color: var(--texte); filter: none; }
@keyframes toast-entre { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-sort { to { opacity: 0; transform: translateX(40px); } }
.infobulle { position: fixed; z-index: 99; pointer-events: none; background: #0f1530; color: #fff; padding: 7px 11px; border-radius: 10px; font-size: .82rem;
  font-weight: 600; box-shadow: 0 8px 22px rgba(0,0,0,.25); max-width: 320px; }
[data-theme="dark"] .infobulle { background: #e8ecf8; color: #10162c; }

/* ---------------------------------------------------------------- boutons et champs */
button, .bouton { display: inline-flex; align-items: center; justify-content: center; gap: 2px; font: inherit; font-size: .98rem; font-weight: 600;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--bord-fort); background: var(--carte); color: var(--texte); cursor: pointer;
  text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s, transform .1s; line-height: 1.25; }
button:hover, .bouton:hover { border-color: var(--bleu); color: var(--bleu); }
button:active, .bouton:active { transform: translateY(1px); }
button.principal, .bouton.principal { background: var(--bleu); border-color: var(--bleu); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--bleu) 35%, transparent); }
button.principal:hover, .bouton.principal:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); color: #fff; }
[data-theme="dark"] button.principal, [data-theme="dark"] .bouton.principal { color: #0b1020; }
.bouton.secondaire { color: var(--doux); }
.bouton-rose { border-color: color-mix(in srgb, var(--rose) 45%, var(--bord)); color: var(--rose); background: var(--rose-clair); }
.bouton-rose:hover { border-color: var(--rose); color: var(--rose); }
button.gros, .bouton.gros { font-size: 1.08rem; padding: 14px 24px; border-radius: 14px; }
button.danger { border-color: color-mix(in srgb, var(--rouge) 50%, var(--bord)); color: var(--rouge); }
button.danger:hover { background: var(--rouge-clair); border-color: var(--rouge); color: var(--rouge); }
.petit-bouton, button.petit-bouton, .bouton.petit-bouton { font-size: .8rem; padding: 5px 11px; border-radius: 9px; }
button.retirer { font-size: .8rem; padding: 4px 9px; border-color: color-mix(in srgb, var(--rouge) 35%, var(--bord)); color: var(--rouge); background: transparent; border-radius: 9px; }
button.retirer:hover { background: var(--rouge-clair); border-color: var(--rouge); color: var(--rouge); }
select, input, textarea { font: inherit; color: var(--texte); padding: 9px 11px; border: 1px solid var(--bord-fort); border-radius: 10px; background: var(--carte);
  max-width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 4px var(--bleu-clair); }
input::placeholder, textarea::placeholder { color: var(--tres-doux); }
input[type=checkbox], input[type=radio] { accent-color: var(--bleu); }
.defaut-invisible { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.centre { text-align: center; }

/* ---------------------------------------------------------------- textes communs */
.entete { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.entete h1 { margin: 0; }
.entete-aide { flex-basis: 100%; margin: -2px 0 4px; }
.sous-titre { margin: 2px 0 6px; font-size: 1.05rem; }
.sous-titre-h1 { font-size: 1rem; font-weight: 400; color: var(--doux); }
.erreur { color: var(--rouge); display: block; }
.aide { color: var(--doux); }
.petit { font-size: .82rem; color: var(--doux); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions form { display: inline; margin: 0; }
.compte { color: var(--doux); margin: 8px 0; }
.alerte { background: var(--orange-clair); color: var(--orange-encre); border-radius: 7px; padding: 1px 8px; font-size: .82rem; white-space: nowrap; font-weight: 600; }
.encadre-alerte { background: var(--orange-clair); color: var(--orange-encre); border-radius: 14px; padding: 12px 16px; margin: 0 0 14px; border: 1px solid color-mix(in srgb, var(--orange-vif) 25%, transparent); }
.encadre-alerte a { color: inherit; font-weight: 700; }
.pastille { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.pastille.bleu { background: var(--bleu-clair); color: var(--bleu-encre); }
.pastille.vert { background: var(--vert-clair); color: var(--vert-encre); }
.pastille.orange { background: var(--orange-clair); color: var(--orange-encre); }
.pastille.rouge { background: var(--rouge-clair); color: var(--rouge-encre); }
.etiquette { font-size: .76rem; border-radius: 8px; padding: 3px 9px; vertical-align: middle; font-weight: 700; white-space: nowrap; }
.etiquette.brouillon { background: var(--orange-clair); color: var(--orange-encre); }
.etiquette.ok { background: var(--vert-clair); color: var(--vert-encre); }
.etiquette.annule { background: var(--carte-3); color: var(--tres-doux); text-decoration: line-through; }
a.retour, .retour { display: inline-flex; align-items: center; background: transparent; border: 0; color: var(--doux); font-weight: 600; text-decoration: none;
  padding: 4px 10px 4px 4px; margin: 0 0 12px -4px; font-size: .92rem; border-radius: 10px; }
a.retour .ic { margin-right: 2px; }
a.retour:hover { color: var(--bleu); background: var(--bleu-clair); }
details pre { white-space: pre-wrap; background: var(--carte); padding: 10px; border-radius: 10px; }
.titre-section { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tres-doux); margin: 30px 0 12px; font-weight: 800; }

/* ---------------------------------------------------------------- cartes, listes, tableaux */
.carte, .carte-blanche { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon-grand); box-shadow: var(--ombre); padding: 18px 20px; }
.carte { margin-bottom: 16px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0 24px; }
.tuile { background: var(--carte); border: 1px solid var(--bord); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: var(--doux); box-shadow: var(--ombre-1); }
.tuile strong { display: block; font-size: 1.6rem; color: var(--texte); letter-spacing: -.02em; }
.tuile.attention strong { color: var(--orange); }
table.liste { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--carte); border: 1px solid var(--bord); border-radius: 16px; overflow: hidden; box-shadow: var(--ombre); }
.liste th { text-align: left; background: var(--carte-2); color: var(--tres-doux); font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: 11px 12px; border-bottom: 1px solid var(--bord); }
.liste td { padding: 11px 12px; border-top: 1px solid var(--bord); vertical-align: top; }
.liste tbody tr:first-child td { border-top: 0; }
.liste tbody tr { cursor: pointer; transition: background .12s; }
.liste tbody tr:hover { background: var(--bleu-clair); }
.liste tr.hors { color: var(--tres-doux); }
.liste .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.liste .ref { font-weight: 800; white-space: nowrap; }
.liste .vide, .vide { text-align: center; color: var(--doux); cursor: default; }
table.sans-bord { box-shadow: none; border: 0; border-radius: 0; background: transparent; }
.recherche { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 6px; }
.recherche input[type=search] { flex: 1 1 380px; font-size: 1.1rem; padding: 12px 16px; border: 1px solid var(--bord-fort); border-radius: 14px; box-shadow: var(--ombre-1); }
.recherche select { max-width: 340px; border-radius: 14px; }
form.fiche { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 22px; background: var(--carte); border: 1px solid var(--bord);
  border-radius: var(--rayon-grand); padding: 22px; box-shadow: var(--ombre); }
.champ label { display: block; font-weight: 700; margin-bottom: 5px; font-size: .9rem; }
.champ input:not([type=checkbox]), .champ select, .champ textarea { width: 100%; }
.champ input[type=checkbox] { width: 24px; height: 24px; }
.champ.large { grid-column: 1 / -1; }
.champ.en-erreur input, .champ.en-erreur select { border-color: var(--rouge); }
.pied { grid-column: 1 / -1; }
.deux-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.deux-col > section > h2:first-child { margin-top: 0; }
.deux-col > section:not(.carte-blanche) { overflow-x: auto; padding-bottom: 6px; }

/* ---------------------------------------------------------------- connexion */
.connexion-fond { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden;
  background: radial-gradient(800px 500px at 10% 10%, rgba(79,107,255,.35), transparent 60%), radial-gradient(700px 500px at 90% 90%, rgba(124,77,255,.35), transparent 60%), #0b1130; }
.connexion-deco span { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; animation: flotte 14s ease-in-out infinite; }
.connexion-deco span:nth-child(1) { width: 240px; height: 240px; left: 8%; top: 12%; background: radial-gradient(circle at 30% 30%, #6f86ff, transparent 70%); }
.connexion-deco span:nth-child(2) { width: 180px; height: 180px; right: 10%; top: 20%; background: radial-gradient(circle at 30% 30%, #b18cff, transparent 70%); animation-delay: -5s; }
.connexion-deco span:nth-child(3) { width: 300px; height: 300px; right: 25%; bottom: -80px; background: radial-gradient(circle at 30% 30%, #3fcf96, transparent 70%); animation-delay: -9s; opacity: .25; }
@keyframes flotte { 50% { transform: translateY(-24px) translateX(12px); } }
.carte.connexion { position: relative; width: min(420px, 100%); margin: 0; padding: 32px; border-radius: 26px; background: var(--verre); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.35); }
.connexion-logo { width: 72px; height: 72px; border-radius: 20px; background: #fff; display: grid; place-items: center; margin-bottom: 14px; box-shadow: 0 10px 30px rgba(79,107,255,.4); }
.connexion-logo img { width: 58px; }
.connexion h1 { margin-bottom: 2px; }
.connexion label { display: block; margin: 14px 0; font-weight: 700; }
.connexion input:not([type=checkbox]) { width: 100%; font-size: 1.1rem; margin-top: 5px; }
.connexion label.case { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: .92rem; color: var(--doux); }
.connexion label.case input { width: 20px; height: 20px; }
.connexion button { width: 100%; }

/* =====================================================================
   Tableau de bord (accueil)
   ===================================================================== */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.hero-texte { padding: 8px 0; }
.hero-date { margin: 0 0 4px; color: var(--doux); font-weight: 600; }
.hero-date::first-letter { text-transform: uppercase; }
.hero h1 { font-size: 2.3rem; margin: 0 0 6px; background: linear-gradient(90deg, var(--texte) 30%, var(--bleu) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main-salut { display: inline-block; -webkit-text-fill-color: initial; color: initial; animation: salut 2.4s ease-in-out 1; transform-origin: 70% 70%; }
@keyframes salut { 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } 50% { transform: none; } }
.hero-sous { color: var(--doux); margin: 0 0 16px; }
.grande-recherche { display: flex; align-items: center; gap: 8px; background: var(--carte); border-radius: 18px; box-shadow: var(--ombre); padding: 7px 7px 7px 18px;
  margin: 10px 0 6px; border: 1px solid var(--bord); transition: border-color .15s, box-shadow .15s; }
.grande-recherche:focus-within { border-color: var(--bleu); box-shadow: 0 0 0 5px var(--bleu-clair), var(--ombre); }
.grande-recherche .ic { color: var(--tres-doux); width: 24px; height: 24px; }
.grande-recherche input { flex: 1; min-width: 0; width: 100%; border: 0; font-size: 1.15rem; padding: 10px 4px; outline: none; background: transparent; box-shadow: none !important; }
.grande-recherche button { font-size: 1.02rem; padding: 12px 22px; }
.hero-chiffre { position: relative; overflow: hidden; border-radius: 24px; padding: 22px 24px 14px; color: #fff; background: var(--degrade-marque);
  box-shadow: 0 18px 40px rgba(47,84,235,.35); isolation: isolate; }
.hero-chiffre::before { content: ''; position: absolute; width: 260px; height: 260px; right: -70px; top: -90px; border-radius: 50%; background: rgba(255,255,255,.12); z-index: -1; }
.hero-chiffre::after { content: ''; position: absolute; width: 180px; height: 180px; left: -60px; bottom: -110px; border-radius: 50%; background: rgba(255,255,255,.08); z-index: -1; }
[data-theme="dark"] .hero-chiffre { box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.hc-titre { font-weight: 700; opacity: .92; }
.hc-titre span { font-size: .75rem; background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 8px; margin-left: 6px; vertical-align: 2px; }
.hc-valeur { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 8px; white-space: nowrap; }
.hc-evolution { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 6px; background: rgba(255,255,255,.95); color: #0d6648; border-radius: 10px; padding: 4px 10px; font-weight: 800; font-size: .88rem; }
.hc-evolution.baisse { color: #a12a20; }
.hc-evolution.neutre { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.hc-evolution span:not(.fleche) { font-weight: 600; color: #3a4260; }
.hc-evolution.neutre span { color: #fff; }
.sparkline { display: block; width: 100%; height: 64px; margin-top: 10px; overflow: visible; }
.sl-aire { fill: rgba(255,255,255,.16); }
.sl-ligne { fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sl-point { fill: #fff; stroke: rgba(47,84,235,.9); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hc-legende { font-size: .75rem; opacity: .8; }
.bandeau-essai { display: flex; gap: 12px; align-items: flex-start; background: var(--orange-clair); color: var(--orange-encre); border-radius: 16px; padding: 14px 18px; margin: 20px 0 0;
  border: 1px solid color-mix(in srgb, var(--orange-vif) 25%, transparent); }
.bandeau-essai .ic { color: var(--orange-vif); margin-top: 2px; }

.actions-rapides { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.action-tuile { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px; text-decoration: none; color: var(--texte);
  background: var(--carte); border: 1px solid var(--bord); box-shadow: var(--ombre); transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; isolation: isolate; }
.action-tuile::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 180px; height: 180px; border-radius: 50%; opacity: .0; z-index: -1; transition: opacity .25s; background: var(--teinte-clair); }
.action-tuile:hover { transform: translateY(-4px); box-shadow: var(--ombre-forte); border-color: color-mix(in srgb, var(--teinte) 45%, var(--bord)); }
.action-tuile:hover::after { opacity: 1; }
.action-tuile.grande { grid-column: span 2; grid-row: span 2; color: #fff; border: 0; background: linear-gradient(140deg, #8a5cf6 0%, #6d4ae0 45%, #4b2a9e 100%); justify-content: flex-end; min-height: 240px; }
.action-tuile.grande::before { content: ''; position: absolute; right: -40px; top: -40px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.12); z-index: -1; }
.action-tuile.grande .at-icone { background: rgba(255,255,255,.18); color: #fff; width: 64px; height: 64px; margin-bottom: auto; }
.action-tuile.grande .at-icone .ic { width: 32px; height: 32px; }
.action-tuile.grande strong { font-size: 1.55rem; }
.action-tuile.grande small { color: rgba(255,255,255,.88); font-size: 1rem; }
.at-icone { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--teinte-clair); color: var(--teinte); }
.at-icone .ic { margin: 0; width: 24px; height: 24px; }
.at-texte { display: flex; flex-direction: column; gap: 3px; }
.at-texte strong { font-size: 1.08rem; letter-spacing: -.01em; }
.at-texte small { color: var(--doux); font-size: .86rem; }
.at-puces { display: flex; gap: 8px; flex-wrap: wrap; }
.at-puces span { display: inline-flex; align-items: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); padding: 5px 11px; border-radius: 20px; font-size: .82rem; font-weight: 700; }
.at-puces .ic { width: 16px; height: 16px; margin-right: 5px; }
.at-badge { position: absolute; top: 14px; right: 14px; background: var(--orange-vif); color: #fff; font-size: .8rem; min-width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; padding: 0 8px;
  box-shadow: 0 0 0 4px var(--orange-clair); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px transparent; } }
.t-violet { --teinte: var(--violet); --teinte-clair: var(--violet-clair); }
.t-bleu { --teinte: var(--bleu); --teinte-clair: var(--bleu-clair); }
.t-vert { --teinte: var(--vert); --teinte-clair: var(--vert-clair); }
.t-orange { --teinte: var(--orange-vif); --teinte-clair: var(--orange-clair); }
.t-rose { --teinte: var(--rose); --teinte-clair: var(--rose-clair); }
.t-ambre { --teinte: var(--ambre); --teinte-clair: var(--ambre-clair); }
.en-cours { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.ec-titre { display: flex; align-items: center; font-weight: 700; color: var(--orange); font-size: .9rem; }
.ec-puce { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: 12px; background: var(--carte); border: 1px dashed color-mix(in srgb, var(--orange-vif) 55%, var(--bord));
  text-decoration: none; color: var(--texte); font-size: .88rem; }
.ec-puce:hover { border-style: solid; background: var(--orange-clair); }
.ec-puce span { color: var(--doux); font-variant-numeric: tabular-nums; }
.ec-plus { font-size: .88rem; font-weight: 700; }

.grille-tableau { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panneau { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon-grand); box-shadow: var(--ombre); padding: 18px 20px; min-width: 0; }
.p-large { grid-column: span 2; }
.panneau-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.panneau-tete h3 { font-size: 1.02rem; }
.panneau-tete h3 span { display: block; font-size: .78rem; font-weight: 500; color: var(--tres-doux); margin-top: 2px; }
.lien-discret { font-size: .85rem; font-weight: 700; text-decoration: none; }
.vide-graph { color: var(--tres-doux); font-size: .9rem; padding: 18px 4px; text-align: center; list-style: none; }
/* colonnes */
.graph-colonnes { width: 100%; height: auto; display: block; overflow: visible; }
.graph-colonnes .grille { stroke: var(--grille); stroke-width: 1; }
.graph-colonnes .axe { stroke: var(--axe); stroke-width: 1; }
.graph-colonnes .graduation, .graph-colonnes .mois { fill: var(--graph-texte); font-size: 11px; font-variant-numeric: tabular-nums; }
.graph-colonnes .barre { fill: var(--serie-1); transition: opacity .15s; }
.graph-colonnes .zone-survol { fill: transparent; }
.graph-colonnes .colonne:hover .zone-survol, .graph-colonnes .colonne:focus .zone-survol { fill: var(--carte-3); }
.graph-colonnes .colonne { outline: none; cursor: default; }
.graph-colonnes .valeur { fill: var(--texte); font-size: 11.5px; font-weight: 700; }
.graph-colonnes .courante .mois { fill: var(--texte); font-weight: 800; }
.voir-chiffres { margin-top: 6px; font-size: .85rem; }
.voir-chiffres summary { cursor: pointer; color: var(--doux); font-weight: 600; }
.voir-chiffres table { margin-top: 6px; }
.voir-chiffres td { padding: 4px 8px; }
/* mini statistiques */
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; background: var(--carte-2); border: 1px solid var(--bord); text-decoration: none; color: var(--texte); transition: transform .15s; }
.mini-stat:hover { transform: translateY(-2px); border-color: var(--bord-fort); }
.mini-stat strong { font-size: 1.7rem; letter-spacing: -.02em; line-height: 1.1; margin-top: 6px; }
.mini-stat small { color: var(--doux); font-size: .8rem; }
.ms-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.ms-ic .ic { margin: 0; width: 18px; height: 18px; }
.ms-ic.bleu { background: var(--bleu-clair); color: var(--bleu); }
.ms-ic.vert { background: var(--vert-clair); color: var(--vert); }
.ms-ic.ambre { background: var(--ambre-clair); color: var(--ambre); }
.ms-ic.orange { background: var(--orange-clair); color: var(--orange-vif); }
/* barres horizontales */
.barre-h { display: block; padding: 7px 0; text-decoration: none; color: var(--texte); outline: none; border-radius: 8px; }
.barre-h.lien:hover .bh-nom { color: var(--bleu); }
.bh-nom { font-size: .86rem; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bh-nom b { color: var(--doux); margin-right: 4px; }
.bh-piste { display: flex; align-items: center; gap: 10px; }
.bh-barre { display: block; height: 12px; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--serie-1); transform-origin: left; animation: pousse .8s cubic-bezier(.2,.8,.2,1) both; }
.bh-valeur { font-size: .8rem; font-weight: 700; color: var(--doux); white-space: nowrap; font-variant-numeric: tabular-nums; }
@keyframes pousse { from { transform: scaleX(0); } }
/* classement clients */
.classement { list-style: none; margin: 0; padding: 0; }
.classement a { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 12px; text-decoration: none; color: var(--texte); }
.classement a:hover { background: var(--carte-3); }
.rang { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--carte-3); color: var(--doux); flex: none; }
.classement li:first-child .rang { background: linear-gradient(135deg, #ffd56a, #f0a020); color: #4a2c00; }
.classement li:nth-child(2) .rang { background: linear-gradient(135deg, #e6ebf5, #b9c2d6); color: #2b3550; }
.classement li:nth-child(3) .rang { background: linear-gradient(135deg, #f3c39a, #c9814b); color: #3d1f06; }
.cl-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cl-nom strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.cl-nom small { color: var(--tres-doux); font-size: .78rem; }
.cl-montant { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .9rem; }
/* carte de chaleur */
.carte-chaleur { display: flex; flex-direction: column; gap: 8px; }
.cc-svg { width: 100%; max-width: 580px; height: auto; display: block; }
.cc-svg rect { transition: transform .15s; transform-box: fill-box; transform-origin: center; }
.cc-svg rect:hover { transform: scale(1.25); }
.cc-mois, .cc-jour { fill: var(--graph-texte); font-size: 8px; }
.cc0 { fill: var(--cc0); background: var(--cc0); } .cc1 { fill: var(--cc1); background: var(--cc1); } .cc2 { fill: var(--cc2); background: var(--cc2); }
.cc3 { fill: var(--cc3); background: var(--cc3); } .cc4 { fill: var(--cc4); background: var(--cc4); }
.cc-legende { display: flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--tres-doux); align-self: flex-end; }
.cc-legende i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }
.cc-legende span { margin: 0 4px; }
/* fil des derniers documents */
.fil { list-style: none; margin: 0; padding: 0; position: relative; }
.fil::before { content: ''; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 2px; background: var(--bord); }
.fil a { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 6px; border-radius: 12px; text-decoration: none; color: var(--texte); }
.fil a:hover { background: var(--carte-3); }
.fil-point { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-left: 0; box-shadow: 0 0 0 3px var(--carte); z-index: 1; }
.fil-point.bleu { background: var(--bleu); } .fil-point.vert { background: var(--vert); } .fil-point.ambre { background: var(--ambre); } .fil-point.orange { background: var(--orange-vif); }
.fil-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fil-texte strong { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fil-texte small { color: var(--tres-doux); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fil-montant { font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
.liens-fichiers { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.p-pleine { grid-column: 1 / -1; }
.liens-fichiers a { display: flex; align-items: center; gap: 4px; padding: 11px 12px; border-radius: 14px; background: var(--carte-2); border: 1px solid var(--bord); text-decoration: none; color: var(--doux); }
.liens-fichiers a:hover { border-color: var(--bleu); color: var(--texte); }
.liens-fichiers .ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--bleu-clair); color: var(--bleu); box-sizing: border-box; margin-right: 8px; }
.liens-fichiers a.attention .ic { background: var(--orange-clair); color: var(--orange-vif); }
.liens-fichiers strong { color: var(--texte); }

/* recherche globale */
.resultats-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.resultats-3 h2 { font-size: 1.05rem; margin: 4px 0 10px; display: flex; align-items: center; color: var(--texte); }
.resultat { display: block; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--texte); }
.resultat:hover { background: var(--bleu-clair); }
.resultat strong { display: block; }
.resultat span { color: var(--doux); font-size: .88rem; }

/* =====================================================================
   Documents (liste, création, feuille de facture)
   ===================================================================== */
.sous-titre { margin: 0 0 6px; }
.grands-boutons { margin: 10px 0 4px; }
.lignes-doc input { width: 100%; padding: 6px 8px; }
.saisie-article { position: relative; }
.suggestions { display: none; position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--carte); border: 1px solid var(--bord-fort);
  border-radius: 14px; max-height: 360px; overflow-y: auto; box-shadow: var(--ombre-forte); min-width: 520px; padding: 4px; }
.suggestion { padding: 9px 12px; cursor: pointer; border-radius: 10px; }
.suggestion + .suggestion { margin-top: 1px; }
.suggestion.active, .suggestion:hover { background: var(--bleu-clair); }
.suggestion-vide { padding: 9px 12px; color: var(--doux); }
.bas-doc { display: flex; gap: 20px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-top: 14px; }
.bas-doc .carte { flex: 1 1 420px; }
table.totaux { background: var(--carte); border: 2px solid var(--encre); border-radius: 12px; border-collapse: separate; border-spacing: 0; min-width: 320px; overflow: hidden; }
.totaux td { padding: 7px 14px; }
.totaux tr.total td { border-top: 2px solid var(--encre); font-weight: 800; font-size: 1.2rem; background: var(--carte-2); }
.totaux tr.petit td { font-size: .85rem; color: var(--doux); }
.totaux .num { text-align: right; font-variant-numeric: tabular-nums; }
.pied-doc { margin-top: 16px; justify-content: flex-end; }
.carte.confirmation, .carte.nouveau-doc { max-width: 760px; padding: 26px; }
.nouveau-doc label { font-weight: 700; display: block; margin: 12px 0 5px; }
.nouveau-doc #client_saisie { width: 100%; font-size: 1.2rem; padding: 13px 14px; border: 2px solid var(--bleu); border-radius: 14px; }
.choix-type { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.gros-choix { display: inline-flex; align-items: center; border: 1px solid var(--bord-fort); border-radius: 12px; padding: 10px 16px; font-weight: 700; cursor: pointer; background: var(--carte); transition: all .15s; }
.gros-choix:has(input:checked) { border-color: var(--bleu); background: var(--bleu-clair); color: var(--bleu-encre); box-shadow: 0 0 0 3px var(--bleu-clair); }
.gros-choix input { width: 18px; height: 18px; margin: 0 8px 0 0; }
.barre-doc { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.c-supprimer { width: 200px; text-align: right; white-space: nowrap; }
.c-supprimer form { display: inline; }
.etat-enregistrement { color: var(--doux); font-size: .9rem; align-self: center; margin-right: auto; }
.etat-enregistrement.ok { color: var(--vert); }
.etat-enregistrement.erreur { color: var(--rouge); font-weight: 700; }

/* ---- la feuille (comme la facture imprimée) ---- */
.feuille { background: var(--papier); color: var(--texte); border: 1px solid var(--bord); border-radius: 10px; box-shadow: var(--ombre-forte);
  padding: 28px 32px 24px; max-width: 1150px; margin: 0 auto; font-family: "Times New Roman", Georgia, serif; }
.f-entete { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; }
.f-activites { font-style: italic; font-size: 1rem; line-height: 1.35; }
.f-activites.droite { text-align: right; }
.f-logo { height: 62px; }
[data-theme="dark"] .f-logo { background: #fff; border-radius: 8px; padding: 4px; }
.f-blocs { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 18px 0 14px; }
.f-titre { border: 1.5px solid var(--encre); padding: 8px 12px; font-weight: 700; font-size: 1.35rem; }
.f-titre span { white-space: nowrap; }
.f-titre small { display: block; font-weight: 400; font-size: .75rem; color: var(--doux); font-family: "Segoe UI", system-ui, sans-serif; }
.f-contact { margin-top: 10px; font-family: "Segoe UI", system-ui, sans-serif; font-size: .95rem; }
.f-client { text-align: center; font-family: "Segoe UI", system-ui, sans-serif; font-size: .95rem; }
.f-client-titre { border: 1.5px solid var(--bleu); border-radius: 8px; font-family: "Times New Roman", serif; font-weight: 700; font-size: 1.2rem; padding: 2px; }
.f-client-nom { display: block; font-family: "Times New Roman", serif; font-weight: 700; font-size: 1.25rem; margin: 6px 0 2px; color: var(--texte); text-decoration: none; }
.f-client-nom:hover { text-decoration: underline; }
.f-client-ids { display: flex; gap: 8px; justify-content: center; margin-top: 6px; flex-wrap: wrap; }
.f-client-ids label { font-size: .8rem; color: var(--doux); }
.f-client-ids input { width: 170px; padding: 4px 7px; font-size: .9rem; }
.f-client-ids input.manquant { border: 2px solid var(--orange-vif); background: var(--orange-clair); }
.alerte-texte { color: var(--orange); margin-top: 4px; }
table.f-lignes { width: 100%; border-collapse: collapse; border: 1.5px solid var(--encre); font-size: 1rem; }
.f-lignes th { font-family: "Segoe UI", system-ui, sans-serif; font-size: .74rem; font-weight: 800; border: 1px solid var(--encre); padding: 6px 4px; background: var(--papier); }
.f-lignes td { border-left: 1px solid var(--encre); border-right: 1px solid var(--encre); border-bottom: 1px solid var(--papier-ligne); padding: 3px 6px; vertical-align: middle; }
.f-lignes .c-ref { width: 64px; text-align: center; font-weight: 700; font-family: "Segoe UI", system-ui, sans-serif; }
.f-lignes .c-vol { width: 80px; text-align: center; }
.f-lignes .c-zone-doc { width: 58px; text-align: center; font-weight: 800; font-family: "Segoe UI", system-ui, sans-serif; letter-spacing: .03em; }
.f-lignes .c-qte { width: 76px; text-align: center; background: var(--papier-gris); }
.f-lignes .c-prix { width: 100px; text-align: right; }
.f-lignes .c-rem { width: 72px; text-align: right; }
.f-lignes .c-tva { width: 96px; text-align: center; }
.f-lignes .c-mont { width: 100px; text-align: right; }
.f-lignes .c-act { width: 82px; text-align: center; border-left: 1px dashed var(--papier-ligne); }
.f-lignes input.discret, .f-lignes select.discret { border: 1px solid transparent; background: transparent; font: inherit; width: 100%; padding: 3px 4px; border-radius: 6px; box-shadow: none; }
.f-lignes input.discret:hover, .f-lignes select.discret:hover { border-color: var(--bord-fort); }
.f-lignes input.discret:focus, .f-lignes select.discret:focus { border-color: var(--bleu); background: var(--bleu-clair); outline: none; }
.f-lignes input.nb { text-align: right; }
.f-lignes .c-qte input.nb { text-align: center; }
.f-nouvelle td { background: var(--bleu-clair); border-top: 2px solid var(--bleu); padding: 9px 6px; font-family: "Segoe UI", system-ui, sans-serif; }
.f-nouvelle .c-qte { background: var(--bleu-clair); }
.f-nouvelle input { width: 100%; padding: 9px; font-size: 1.02rem; border: 2px solid var(--bleu); border-radius: 10px; }
.f-nouvelle input.nb { text-align: center; }
.f-nouvelle select { width: 100%; }
.apercu-num { font-size: .85rem; color: var(--vert); margin-top: 3px; min-height: 1em; }
.apercu-num.erreur { color: var(--rouge); }
.f-nouvelle .suggestions { min-width: 640px; max-height: 55vh; font-family: "Segoe UI", system-ui, sans-serif; }
.ligne-texte td { font-style: italic; color: var(--doux); }
.f-pied { display: flex; gap: 24px; justify-content: space-between; align-items: flex-start; margin-top: 16px; flex-wrap: wrap; font-family: "Segoe UI", system-ui, sans-serif; }
.f-infos { flex: 1 1 420px; }
.f-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.f-champs label { font-size: .85rem; color: var(--doux); }
.f-champs label.large { grid-column: 1 / -1; }
.f-champs input, .f-champs select, .f-champs textarea { width: 100%; display: block; margin-top: 3px; }
.f-iban { border: 1px solid var(--encre); padding: 6px 10px; display: inline-block; }
.f-date input { font: inherit; padding: 2px 7px; }
.carnet-puces { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 6px; font-family: "Segoe UI", system-ui, sans-serif; }
.cp-titre { display: flex; align-items: center; font-weight: 700; color: var(--rose); font-size: .85rem; margin-right: 4px; }
.cp-titre .ic { width: 17px; height: 17px; margin-right: 5px; }
.cp-puce { font-size: .8rem; font-weight: 600; padding: 5px 10px; border-radius: 20px; background: var(--rose-clair); border: 1px solid color-mix(in srgb, var(--rose) 30%, transparent); color: var(--texte); }
.cp-puce b { color: var(--rose); margin-right: 3px; }
.cp-puce span { color: var(--doux); margin-left: 3px; }
.cp-puce:hover { border-color: var(--rose); color: var(--texte); }
.cp-puce.pris { opacity: .45; }
.commande-origine { margin-top: 18px; }
.commande-origine summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.co-contenu { display: flex; gap: 18px; margin-top: 12px; align-items: flex-start; flex-wrap: wrap; }
.co-image img { max-height: 340px; max-width: 220px; border-radius: 12px; border: 1px solid var(--bord); box-shadow: var(--ombre); display: block; }
.co-texte { flex: 1; min-width: 240px; margin: 0; background: var(--carte-2); border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px; font-family: inherit; font-size: .92rem; white-space: pre-wrap; }

/* =====================================================================
   Articles et clients
   ===================================================================== */
.articles-2col { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.articles-2col > section { min-width: 0; overflow-x: auto; }
@media (max-width: 1250px) { .articles-2col { grid-template-columns: 250px minmax(0, 1fr); } }
.arbre { background: var(--carte); border: 1px solid var(--bord); border-radius: 18px; padding: 8px 0; max-height: calc(100vh - 110px); overflow-y: auto; position: sticky; top: 84px; box-shadow: var(--ombre); scrollbar-width: thin; }
.arbre .noeud { display: flex; justify-content: space-between; gap: 6px; padding: 5px 12px; margin: 0 6px; border-radius: 9px; text-decoration: none; color: var(--texte); font-size: .86rem; line-height: 1.25; }
.arbre .noeud:hover { background: var(--carte-3); }
.arbre .noeud.actif { background: var(--bleu); color: #fff; }
[data-theme="dark"] .arbre .noeud.actif { color: #0b1020; }
.arbre .noeud.racine { font-weight: 800; margin-bottom: 4px; }
.arbre .niveau-0 { font-weight: 800; font-size: .92rem; margin-top: 6px; color: var(--bleu-encre); }
.arbre .niveau-1 { font-weight: 600; }
.arbre .nb { color: var(--tres-doux); font-size: .76rem; font-weight: 500; }
.arbre .noeud.actif .nb { color: inherit; opacity: .8; }
.arbre .noeud.trouve { background: var(--ambre-clair); }
tr.titre-groupe td { background: var(--bleu-clair); font-weight: 800; color: var(--bleu-encre); font-size: .86rem; cursor: pointer; }
.recherche-groupe { padding: 4px 10px 8px; border-bottom: 1px solid var(--bord); position: sticky; top: -8px; background: var(--carte); z-index: 1; margin-bottom: 4px; }
.recherche-groupe input { width: 100%; border-radius: 10px; padding: 8px 11px; }
.filtres-clients .titre-filtre { font-weight: 800; color: var(--tres-doux); padding: 12px 18px 4px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; border-top: 1px solid var(--bord); margin-top: 6px; }
.filtres-clients .titre-filtre:first-child { border-top: 0; margin-top: 0; }
.filtres-clients .noeud { padding-left: 1.1em; }
.puces { margin: 6px 0; font-size: .9rem; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.puce { display: inline-block; background: var(--bleu); color: #fff; border-radius: 14px; padding: 3px 11px; text-decoration: none; font-weight: 600; }
[data-theme="dark"] .puce { color: #0b1020; }
.liste-clients th a { color: inherit; text-decoration: none; }
.liste-clients th a:hover { text-decoration: underline; }
.actions-ligne { white-space: nowrap; text-align: right; width: 96px; }
.actions-ligne .bouton { display: flex; margin: 2px 0; }
select.choix-categorie { margin-top: 4px; font-size: .85rem; padding: 3px 6px; }
select.choix-categorie.enregistre { border-color: var(--vert); background: var(--vert-clair); }
select.choix-categorie.refuse { border-color: var(--rouge); }
.liste-clients td:nth-child(4) { font-size: .85rem; }
.resume-client { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0 16px; }
.resume-client .tuile strong { font-size: 1.4rem; }
.prix-speciaux { margin-top: 18px; }
.prix-speciaux h2 { margin-top: 0; }
.ajout-prix { display: grid; grid-template-columns: 2fr 120px 1.2fr auto; gap: 10px; margin-top: 10px; align-items: start; }
.ajout-prix input { width: 100%; }
.section-fiche h2 { margin: 0; display: flex; align-items: center; font-size: 1.1rem; }
.section-fiche h2 .ic { color: var(--rose); }
#contacts h2 .ic { color: var(--vert); }
.sf-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.liste-carnet, .liste-contacts { list-style: none; margin: 10px 0; padding: 0; max-height: 420px; overflow-y: auto; }
.liste-carnet li, .liste-contacts li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--bord); }
.liste-carnet li:first-child, .liste-contacts li:first-child { border-top: 0; }
.lc-ref { font-weight: 800; min-width: 48px; color: var(--rose); }
.lc-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .92rem; }
.lc-nom small { color: var(--tres-doux); font-size: .78rem; }
.lc-fois { font-weight: 800; font-size: .82rem; color: var(--doux); background: var(--carte-3); padding: 2px 8px; border-radius: 8px; }
.liste-carnet form, .liste-contacts form { margin: 0; }
.liste-carnet button.retirer, .liste-contacts button.retirer { padding: 2px 9px; font-size: 1rem; }
.petit-avatar { width: 32px; height: 32px; font-size: .8rem; background: linear-gradient(135deg, #25d366, #128c7e); box-shadow: none; }
.ajout-ligne { display: flex; gap: 8px; }
.ajout-ligne .saisie-article { flex: 1; }
.ajout-ligne input { width: 100%; }
.ajout-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.ajout-contact input { width: 100%; min-width: 0; }
.sf-tete .bouton { white-space: nowrap; }

/* ---- commerciaux ---- */
.ligne-commercial { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 8px; align-items: center; }
.ligne-commercial input { width: 100%; min-width: 0; }
.commerciaux tbody tr { cursor: default; }
.commerciaux tbody tr:hover { background: transparent; }
.attribuer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 10px; padding: 10px 14px; border-radius: 14px;
  background: var(--carte-2); border: 1px dashed var(--bord-fort); font-size: .9rem; }
.attribuer select { max-width: 260px; }
.puce-commercial { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; color: var(--violet); background: var(--violet-clair);
  border-radius: 8px; padding: 1px 8px; white-space: nowrap; }
.f-commercial { margin-top: 8px; border: 1px solid var(--encre); padding: 5px 10px; font-family: "Segoe UI", system-ui, sans-serif; font-size: .92rem; }
.f-commercial a { font-size: .8rem; }

/* ---- liste des articles : suite chargée en descendant ---- */
tr.charger-suite td { text-align: center; padding: 16px; background: var(--carte-2); cursor: default; }
tr.charger-suite .petit { margin-left: 10px; }
.liste tbody tr.charger-suite:hover { background: transparent; }
.remonter { position: fixed; right: 24px; bottom: 24px; z-index: 30; border-radius: 22px; box-shadow: var(--ombre-forte); padding: 10px 18px; }
.remonter[hidden] { display: none; }
@media (max-width: 1000px) { .remonter { bottom: 96px; right: 14px; } }

/* ---- panneau admin ---- */
.cartes-utilisateurs { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-top: 12px; }
.carte-utilisateur { display: flex; flex-direction: column; gap: 10px; background: var(--carte); border: 1px solid var(--bord); border-radius: 20px;
  padding: 16px 18px; text-decoration: none; color: var(--texte); box-shadow: var(--ombre); transition: transform .15s, border-color .15s; }
.carte-utilisateur:hover { transform: translateY(-3px); border-color: var(--bleu); }
.carte-utilisateur.inactif { opacity: .55; }
.cu-haut { display: flex; align-items: center; gap: 12px; }
.cu-haut .avatar { width: 44px; height: 44px; font-size: .95rem; box-shadow: none; }
.cu-nom { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cu-nom small { color: var(--tres-doux); }
.avatar.role-admin { background: linear-gradient(135deg, #4f6bff, #7c4dff); }
.avatar.role-bureau { background: linear-gradient(135deg, #12b886, #0b7a5c); }
.avatar.role-commercial { background: linear-gradient(135deg, #ff8a3d, #ff4f8b); }
.avatar.role-prepa { background: linear-gradient(135deg, #8a94ab, #4f5872); }
.pastille.role-p-admin { background: var(--violet-clair); color: var(--violet); }
.pastille.role-p-bureau { background: var(--vert-clair); color: var(--vert-encre); }
.pastille.role-p-commercial { background: var(--rose-clair); color: var(--rose); }
.pastille.role-p-prepa { background: var(--carte-3); color: var(--doux); }
.cu-ligne { display: flex; align-items: center; gap: 4px; font-size: .88rem; color: var(--doux); }
.cu-ligne .ic { width: 16px; height: 16px; margin-right: 4px; }
.cu-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cu-stats span { display: flex; flex-direction: column; background: var(--carte-2); border: 1px solid var(--bord); border-radius: 12px; padding: 7px 9px; font-size: .74rem; color: var(--doux); }
.cu-stats b { font-size: .98rem; color: var(--texte); white-space: nowrap; }
.cu-droits { display: flex; flex-wrap: wrap; gap: 4px; }
.cu-droits span { font-size: .68rem; background: var(--bleu-clair); color: var(--bleu-encre); padding: 2px 7px; border-radius: 7px; }
.cu-droits span.aucun { background: var(--carte-3); color: var(--doux); }
.roles-tableau tbody tr { cursor: default; }
.fiche-admin { display: grid; gap: 16px; }
.fiche-admin h2 { margin-top: 0; }
.grille-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 18px; }
.grille-champs label, .champ-commercial { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: .9rem; }
.grille-champs label.case { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.champ-commercial select { max-width: 420px; }
.liste-droits { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 8px; }
.droit { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 12px; cursor: pointer; background: var(--carte-2); }
.droit:has(input:checked) { border-color: var(--bleu); background: var(--bleu-clair); }
.droit input { width: 20px; height: 20px; flex: none; }

/* ---- zones du stock (gestion) ---- */
.ligne-zone { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.4fr) 80px auto; gap: 8px; align-items: center; }
.ligne-zone input { width: 100%; min-width: 0; }
.code-zone { font-weight: 800; text-align: center; }
.tableau-zones tbody tr { cursor: default; }
.tableau-zones tbody tr:hover { background: transparent; }
tr.titre-groupe-zone td { background: var(--ambre-clair); font-weight: 800; padding: 8px 12px; }
.zones-puces .groupe-zone { font-size: .75rem; font-weight: 800; color: var(--ambre); text-transform: uppercase; letter-spacing: .05em; margin-left: 6px; }
@media (max-width: 760px) { .ligne-zone { grid-template-columns: 1fr 1fr; } }

/* ---- zone de rangement (articles) ---- */
.c-zone { width: 92px; }
.champ-zone { width: 74px; padding: 5px 8px; font-weight: 800; text-align: center; text-transform: none; border-radius: 9px; border: 1px dashed var(--bord-fort);
  background: transparent; letter-spacing: .03em; }
.champ-zone:hover { border-style: solid; }
.champ-zone:focus { border-style: solid; background: var(--carte); }
.champ-zone.rempli { border-style: solid; border-color: color-mix(in srgb, var(--ambre) 45%, var(--bord)); background: var(--ambre-clair); color: var(--texte); }
.champ-zone.enregistre { border-color: var(--vert); box-shadow: 0 0 0 3px var(--vert-clair); }
.champ-zone.refuse { border-color: var(--rouge); box-shadow: 0 0 0 3px var(--rouge-clair); }
.zone-groupe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 10px; padding: 10px 14px; border-radius: 14px;
  background: var(--ambre-clair); border: 1px dashed color-mix(in srgb, var(--ambre) 45%, var(--bord)); font-size: .9rem; }
.zone-groupe input { width: 90px; text-align: center; font-weight: 800; }
.zones-puces { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.zones-puces a { text-decoration: none; font-size: .8rem; font-weight: 800; padding: 3px 10px; border-radius: 9px; background: var(--carte); border: 1px solid var(--bord);
  color: var(--texte); }
.zones-puces a span { font-weight: 500; color: var(--tres-doux); margin-left: 3px; }
.zones-puces a.actif { background: var(--ambre); border-color: var(--ambre); color: #fff; }
[data-theme="dark"] .zones-puces a.actif { color: #1a1200; }

/* ---- carnet de commande (commander) ---- */
.carnet-barre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.filtre-carnet { min-width: 280px; border-radius: 14px; }
.grille-carnet { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.carte-article { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--carte); border: 1px solid var(--bord); border-radius: 18px; padding: 14px; box-shadow: var(--ombre-1);
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.carte-article.choisi { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-clair), var(--ombre); }
.carte-article[hidden] { display: none; }
.ca-haut { display: flex; justify-content: space-between; align-items: center; }
.ca-ref { font-weight: 800; color: var(--rose); background: var(--rose-clair); padding: 2px 9px; border-radius: 8px; font-size: .85rem; }
.ca-fois { font-weight: 800; font-size: .8rem; color: var(--doux); }
.ca-nom { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.ca-infos { font-size: .82rem; color: var(--doux); }
.ca-derniere { font-size: .78rem; color: var(--tres-doux); }
.ca-qte { display: flex; align-items: stretch; gap: 0; margin-top: auto; }
.ca-qte button { width: 44px; padding: 0; font-size: 1.3rem; border-radius: 12px 0 0 12px; }
.ca-qte button.ca-plus { border-radius: 0 12px 12px 0; }
.ca-qte input { width: 100%; min-width: 0; text-align: center; font-size: 1.15rem; font-weight: 700; border-radius: 0; border-left: 0; border-right: 0; }
.ca-raccourcis { display: flex; gap: 6px; flex-wrap: wrap; }
.autres-articles { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.autres-articles input { width: 100%; }
.ligne-autre { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--bord); }
.ligne-autre .la-nom { flex: 1; font-size: .9rem; }
.ligne-autre .ca-qte { width: 190px; }
.vide-carnet { text-align: center; padding: 30px; }
.vide-carnet .ic { width: 46px; height: 46px; color: var(--rose); }
.barre-total { position: sticky; bottom: 14px; z-index: 15; margin-top: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px 12px 20px;
  border-radius: 20px; background: var(--verre); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--bord); box-shadow: var(--ombre-forte); }
.barre-total.pret { border-color: var(--rose); }
.bt-resume { display: flex; flex-direction: column; }
.bt-resume span { color: var(--doux); font-size: .85rem; }
.bt-commentaire { flex: 1; min-width: 200px; }

/* =====================================================================
   Commande reçue
   ===================================================================== */
.commande-haut { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.etape { position: relative; padding-left: 66px; display: flex; flex-direction: column; gap: 10px; }
.etape-num { position: absolute; left: 18px; top: 18px; width: 34px; height: 34px; border-radius: 12px; background: var(--degrade-marque); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(47,84,235,.35); }
.etape-titre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.etape-titre .etape-num { position: static; }
.etape label .aide { display: block; font-weight: 400; margin-top: 4px; }
.onglets { display: flex; gap: 4px; padding: 4px; background: var(--carte-3); border-radius: 14px; flex-wrap: wrap; align-self: flex-start; }
.onglets button { border: 0; background: transparent; color: var(--doux); padding: 8px 11px; border-radius: 11px; font-size: .86rem; box-shadow: none; }
.onglets button .ic { width: 18px; height: 18px; margin-right: 6px; }
.onglets button:hover { color: var(--texte); background: transparent; }
.onglets button.actif { background: var(--carte); color: var(--texte); box-shadow: var(--ombre-1); }
.volet { display: flex; flex-direction: column; gap: 10px; animation: fondu .2s; }
.volet[hidden] { display: none; }
.zone-texte { position: relative; }
.etape textarea { width: 100%; font-size: 1.05rem; border: 2px solid var(--bord-fort); border-radius: 16px; padding: 14px; padding-bottom: 54px; font-family: inherit; resize: vertical; }
.etape textarea:focus { border-color: var(--bleu); }
.bouton-coller { position: absolute; right: 10px; bottom: 12px; padding: 7px 14px; font-size: .88rem; border-radius: 11px; }
.grand-champ { width: 100%; font-size: 1.12rem; padding: 11px 13px; border: 2px solid var(--bord-fort); border-radius: 14px; }
.depot { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 18px; border: 2px dashed var(--bord-fort); border-radius: 18px;
  background: var(--carte-2); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.depot:hover, .depot-actif .depot { border-color: var(--violet); background: var(--violet-clair); }
.depot-actif .depot { transform: scale(1.02); }
.depot-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--violet-clair); color: var(--violet); margin-bottom: 4px; }
.depot-ic .ic { width: 30px; height: 30px; margin: 0; }
.depot-boutons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.apercu-image { display: flex; gap: 14px; align-items: flex-start; padding: 10px; border-radius: 16px; background: var(--vert-clair); }
.apercu-image img { width: 110px; max-height: 200px; object-fit: cover; object-position: top; border-radius: 12px; border: 1px solid var(--bord); display: block; }
.apercu-image div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.lecture-en-cours { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--violet); }
.lecture-en-cours[hidden] { display: none; }
.rond-charge { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--violet-clair); border-top-color: var(--violet); animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.occupe { cursor: progress; }
.dictee { display: flex; gap: 18px; align-items: center; padding: 10px 0; }
.dictee > div { display: flex; flex-direction: column; gap: 4px; }
.micro { width: 84px; height: 84px; border-radius: 50%; flex: none; border: 0; color: #fff; background: linear-gradient(135deg, #ff5f6d, #c43a7c); box-shadow: 0 10px 26px rgba(196,58,124,.4); padding: 0; }
.micro .ic { width: 36px; height: 36px; margin: 0; }
.micro:hover { color: #fff; transform: scale(1.04); }
.micro.ecoute { animation: ecoute 1.3s ease-in-out infinite; }
.micro:disabled { opacity: .4; cursor: not-allowed; }
@keyframes ecoute { 0% { box-shadow: 0 0 0 0 rgba(255,95,109,.55); } 100% { box-shadow: 0 0 0 26px rgba(255,95,109,0); } }
.dictee-texte { font-size: 1.05rem; font-weight: 600; color: var(--texte); white-space: pre-wrap; min-height: 1.4em; }
.reconnu { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--vert-clair); color: var(--vert-encre); }
.reconnu .ic { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--vert); color: #fff; margin: 0; box-sizing: border-box; stroke-width: 3; }
.reconnu span { display: flex; flex-direction: column; }
.reconnu small { font-size: .8rem; opacity: .85; }
.choisir-client.choisi { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.expediteur { border: 1px solid var(--bord); border-radius: 14px; padding: 10px 12px; background: var(--carte-2); }
.ex-titre { display: flex; align-items: center; font-weight: 700; font-size: .88rem; gap: 2px; flex-wrap: wrap; }
.ex-titre .ic { color: var(--vert); width: 18px; height: 18px; }
.ex-champs { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 8px; }
.ex-champs input { width: 100%; padding: 8px 10px; font-size: .92rem; }
.resume-lecture .pastille { margin-left: 4px; }
.tout-bon { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--vert-encre); background: var(--vert-clair); padding: 10px 14px; border-radius: 12px; margin: 4px 0 8px; }
.tout-bon .ic { stroke-width: 3; }
.lignes-commande td { vertical-align: top; }
.lignes-commande tbody tr { cursor: default; }
.lignes-commande tbody tr:hover { background: transparent; }
.lignes-commande tr.statut-sur td:first-child { box-shadow: inset 5px 0 0 var(--vert); }
.lignes-commande tr.statut-choix td:first-child { box-shadow: inset 5px 0 0 var(--orange-vif); }
.lignes-commande tr.statut-choix { background: color-mix(in srgb, var(--orange-clair) 55%, transparent); }
.lignes-commande tr.statut-introuvable td:first-child { box-shadow: inset 5px 0 0 var(--rouge); }
.lignes-commande tr.statut-introuvable { background: color-mix(in srgb, var(--rouge-clair) 55%, transparent); }
.lignes-commande .c-message { width: 30%; }
.lignes-commande .c-retirer { width: 96px; text-align: right; }
.lignes-commande tr.retiree td { opacity: .45; }
.lignes-commande tr.retiree td:first-child { box-shadow: inset 5px 0 0 var(--bord-fort); text-decoration: line-through; }
.lignes-commande tr.retiree td.c-retirer { opacity: 1; }
.lignes-commande tr.retiree { background: var(--carte-2) !important; }
button.retirer.remettre { color: var(--vert); border-color: color-mix(in srgb, var(--vert) 45%, var(--bord)); }
button.retirer.remettre:hover { background: var(--vert-clair); color: var(--vert); border-color: var(--vert); }
.lignes-commande tr.tete-message td { background: var(--violet-clair); border-top: 2px solid color-mix(in srgb, var(--violet) 35%, transparent); padding: 9px 12px; }
.lignes-commande tbody.groupe-message + tbody.groupe-message tr.tete-message td { border-top-width: 6px; border-top-color: var(--carte); }
.garder-message { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; cursor: pointer; margin-right: 10px; }
.garder-message input { width: 20px; height: 20px; }
.tm-num { color: var(--violet); }
.tm-titre { background: var(--carte); border-radius: 8px; padding: 2px 9px; font-size: .85rem; color: var(--texte); }
.tm-apercu { color: var(--doux); font-size: .88rem; font-style: italic; }
.tm-nb { float: right; font-size: .8rem; color: var(--tres-doux); font-weight: 700; }
.message-ecarte .tete-message td { background: var(--carte-2); }
.message-ecarte .tm-num { color: var(--tres-doux); text-decoration: line-through; }
.tm-client { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-weight: 700; font-size: .9rem; }
.tm-client input.client-msg-saisie { width: 300px; max-width: 100%; padding: 6px 10px; font-weight: 700; }
.tm-client .suggestions { top: 100%; left: 50px; right: auto; min-width: 420px; }
#nb-gardees { align-self: center; margin-right: 6px; font-size: .9rem; }
.lignes-commande .c-article select { width: 100%; font-size: .93rem; padding: 8px; }
.lignes-commande .autre { margin-top: 6px; }
.lignes-commande .autre input { width: 100%; font-size: .9rem; padding: 6px 9px; }
.nb-court { width: 84px; text-align: right; font-size: 1.08rem; padding: 8px; }
.nb-moyen { width: 104px; text-align: right; padding: 8px; }
.commentaire-commande { display: block; margin-top: 12px; color: var(--doux); font-size: .9rem; }
.commentaire-commande input { width: 100%; margin-top: 4px; }

/* aide */
.aide-liste { display: grid; gap: 12px; max-width: 920px; }
.aide-liste details summary { font-size: 1.12rem; font-weight: 800; cursor: pointer; padding: 4px 0; }
.aide-liste details[open] summary { margin-bottom: 8px; color: var(--bleu); }
.aide-liste li { margin: 6px 0; }

/* =====================================================================
   Téléphone et petits écrans
   ===================================================================== */
.onglets-bas { display: none; }
@media (max-width: 1250px) {
  .actions-rapides { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grille-tableau { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .horloge { display: none; }
}
@media (max-width: 1000px) {
  html { font-size: 17px; }
  .cote { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-105%); transition: transform .28s cubic-bezier(.3,.9,.3,1); width: 280px; box-shadow: var(--ombre-forte); }
  .cote-ouvert .cote { transform: none; }
  .cote-replie .cote { width: 280px; }
  .cote-ouvert .voile-cote { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(8,12,28,.45); backdrop-filter: blur(3px); }
  .haut { padding: 10px 14px; }
  .haut-facture span, .hr-texte + kbd { display: none; }
  main { padding: 16px 14px 110px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .commande-haut, .deux-col, .articles-2col { grid-template-columns: minmax(0, 1fr); }
  .arbre { max-height: 260px; position: static; }
  .onglets-bas { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 50; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--verre); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); border: 1px solid var(--bord); border-radius: 22px; box-shadow: var(--ombre-forte); }
  .onglets-bas a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; color: var(--tres-doux); text-decoration: none; font-size: .68rem; font-weight: 700; border-radius: 14px; }
  .onglets-bas a .ic { margin: 0; width: 22px; height: 22px; }
  .onglets-bas a.actif { color: var(--bleu); background: var(--bleu-clair); }
  .ob-plus { justify-self: center; width: 58px; height: 58px; border-radius: 20px; padding: 0; margin-top: -26px; border: 4px solid var(--fond); color: #fff; background: var(--degrade-marque);
    box-shadow: 0 10px 24px rgba(47,84,235,.45); }
  .ob-plus .ic { margin: 0; width: 26px; height: 26px; stroke-width: 2.6; transition: transform .25s; }
  .ob-plus:hover { color: #fff; }
  .nouveau-ouvert .ob-plus .ic { transform: rotate(45deg); }
  .menu-nouveau { left: 10px !important; right: 10px; top: auto !important; bottom: 92px; width: auto; animation: monte .22s ease-out; }
  .toasts { bottom: 96px; right: 10px; left: 10px; width: auto; }
}
@keyframes monte { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .actions-rapides, .grille-tableau { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .action-tuile.grande { grid-column: span 2; grid-row: auto; min-height: 200px; }
  .p-large { grid-column: span 2; }
  .grille-tableau > .panneau { grid-column: span 2; }
  .hc-valeur { font-size: 2.4rem; }
  .hero h1 { font-size: 1.8rem; }
  .liste th:nth-child(3), .liste td:nth-child(3) { display: none; }
  .lignes-commande th:nth-child(3), .lignes-commande td:nth-child(3) { display: table-cell; }
  .ajout-prix, .ajout-contact, .ex-champs { grid-template-columns: 1fr; }
  .suggestions { min-width: 0; }
  .feuille { padding: 14px; }
  .f-blocs { grid-template-columns: 1fr; }
  .f-lignes .c-vol, .f-lignes .c-rem { display: none; }
  .etape { padding-left: 18px; padding-top: 58px; }
  .etape-num { top: 14px; }
  .haut-recherche kbd { display: none; }
  .grande-recherche button { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .cote, .haut, .onglets-bas, .toasts, .retour { display: none !important; }
  body { background: #fff; }
}
