/* Sonde RAM — panneau.
   Direction : une barrette de RAM serveur. Navigation vert circuit imprimé, or des contacts réservé aux pépites
   et à la rangée de contacts qui ferme chaque carte d'affaire, états en « LED » toujours accompagnées d'un libellé. */

:root {
  color-scheme: light;
  --plan: #eceFec;
  --surface: #ffffff;
  --surface-2: #f3f5f3;
  --surface-3: #e7ece8;
  --encre: #16201c;
  --encre-2: #4c5a54;
  --encre-3: #6f7d77;
  --trait: #dce2de;
  --trait-fort: #c3ccc7;
  --pcb: #123a30;
  --pcb-2: #1b4a3e;
  --pcb-3: #0d2c24;
  --serigraphie: #e3eee8;
  --serigraphie-2: #9fbcb0;
  --or: #c79a1e;
  --or-fond: #f6ecc9;
  --or-texte: #7a5c00;
  --vert: #1e7a4c;
  --vert-fond: #dcefe4;
  --rouge: #c8372d;
  --rouge-fond: #f8e0dd;
  --ambre: #d98a00;
  --bleu: #2d63c8;
  --bleu-fond: #e1eafa;
  --serie-obs: #2d63c8;
  --serie-affaire: #c79a1e;
  --ombre: 0 1px 0 rgba(22, 32, 28, 0.04), 0 8px 24px -12px rgba(22, 32, 28, 0.18);
  --police: "Archivo", system-ui, "Segoe UI", sans-serif;
  --police-ref: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --rayon-carte: 12px;
  --rayon-ctrl: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --plan: #0b1210; --surface: #121c19; --surface-2: #192622; --surface-3: #20302b;
    --encre: #e8efeb; --encre-2: #a9b8b1; --encre-3: #87968f; --trait: #24332e; --trait-fort: #33463f;
    --pcb: #0e2a23; --pcb-2: #163b31; --pcb-3: #0a211b;
    --or: #d9ae3a; --or-fond: #3a2f12; --or-texte: #f0cd6c;
    --vert: #3daa72; --vert-fond: #133325; --rouge: #e5574c; --rouge-fond: #3b1a17; --ambre: #f0a531;
    --bleu: #5b8deb; --bleu-fond: #172846;
    --serie-obs: #5b8deb; --serie-affaire: #b5861a;
    --ombre: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --plan: #0b1210; --surface: #121c19; --surface-2: #192622; --surface-3: #20302b;
  --encre: #e8efeb; --encre-2: #a9b8b1; --encre-3: #87968f; --trait: #24332e; --trait-fort: #33463f;
  --pcb: #0e2a23; --pcb-2: #163b31; --pcb-3: #0a211b;
  --or: #d9ae3a; --or-fond: #3a2f12; --or-texte: #f0cd6c;
  --vert: #3daa72; --vert-fond: #133325; --rouge: #e5574c; --rouge-fond: #3b1a17; --ambre: #f0a531;
  --bleu: #5b8deb; --bleu-fond: #172846;
  --serie-obs: #5b8deb; --serie-affaire: #b5861a;
  --ombre: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--plan); color: var(--encre); font: 15px/1.5 var(--police); font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--bleu); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-variation-settings: "wdth" 88; }
h1 { font-size: 26px; font-weight: 750; letter-spacing: -0.01em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 680; }
p { margin: 0; }
.secondaire { color: var(--encre-2); }
.discret { color: var(--encre-3); font-size: 13px; }
.ref { font-family: var(--police-ref); font-size: 12.5px; letter-spacing: 0.01em; }
.chiffres { font-variant-numeric: tabular-nums; }
.erreur { color: var(--rouge); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------------ connexion */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 20% -10%, var(--pcb-2), transparent), var(--pcb-3); }
.connexion-carte { width: min(380px, 100%); background: var(--surface); border-radius: 16px; padding: 32px 28px 0;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6); overflow: hidden; display: grid; gap: 14px; }
.connexion-carte h1 { font-size: 28px; font-variation-settings: "wdth" 80; }
.connexion-carte .pins { margin: 14px -28px 0; }
.bouton-oauth { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 16px; border-radius: 10px;
  background: var(--pcb); color: var(--serigraphie); font-weight: 650; font-size: 15px; border: 0; cursor: pointer; width: 100%; }
.bouton-oauth:hover { background: var(--pcb-2); text-decoration: none; }
.bouton-oauth svg { width: 20px; height: 20px; }
.lien-bouton { background: none; border: 0; color: var(--encre-2); font: inherit; font-size: 13.5px; cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 3px; justify-self: center; }

/* ------------------------------------------------------------------ structure */
.appli { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.barre-laterale { background: var(--pcb); color: var(--serigraphie); display: flex; flex-direction: column; position: sticky;
  top: 0; height: 100vh; padding: 18px 12px; gap: 6px; }
.marque { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 750; font-size: 17px;
  font-variation-settings: "wdth" 82; letter-spacing: 0.01em; }
.marque svg { width: 34px; height: 22px; flex: none; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--serigraphie-2);
  font-weight: 560; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.nav a:hover { background: var(--pcb-2); color: var(--serigraphie); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--pcb-2); color: #fff; box-shadow: inset 3px 0 0 var(--or); }
.nav .compte { margin-left: auto; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: var(--or); color: #241a00; }
.leds { margin-top: auto; display: grid; gap: 7px; padding: 14px 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; }
.led { display: flex; align-items: center; gap: 8px; color: var(--serigraphie-2); }
.led i { width: 8px; height: 8px; border-radius: 50%; background: #50645c; flex: none; }
.led.ok i { background: #43d17f; box-shadow: 0 0 6px #43d17f99; }
.led.attention i { background: #f0a531; box-shadow: 0 0 6px #f0a53199; }
.led.critique i { background: #ef5a4e; box-shadow: 0 0 6px #ef5a4e99; }
.led span:last-child { margin-left: auto; color: var(--serigraphie-2); opacity: 0.75; font-size: 12px; }
.utilisateur { display: flex; align-items: center; gap: 8px; padding: 10px; font-size: 13px; color: var(--serigraphie-2);
  border-top: 1px solid rgba(255, 255, 255, 0.08); }
.utilisateur b { color: var(--serigraphie); font-weight: 600; display: block; }
.utilisateur button { margin-left: auto; background: none; border: 0; color: var(--serigraphie-2); cursor: pointer; padding: 6px; border-radius: 6px; display: grid; }
.utilisateur button svg { width: 18px; height: 18px; }
svg:not([width]):not([class]) { max-width: 100%; }
.utilisateur button:hover { color: #fff; background: var(--pcb-2); }

.principal { min-width: 0; display: flex; flex-direction: column; }
.entete { display: flex; align-items: center; gap: 12px; padding: 18px 32px; position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--plan) 88%, transparent); backdrop-filter: blur(10px); }
.entete .titre { display: grid; }
.entete .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.vue { padding: 4px 32px 48px; display: grid; gap: 22px; max-width: 1360px; width: 100%; outline: none; }
.vue.charge { opacity: 0.6; transition: opacity 0.15s; }
.section-titre { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-titre .actions { margin-left: auto; display: flex; gap: 8px; }

/* ------------------------------------------------------------------ contrôles */
.bouton { font: inherit; font-size: 14px; font-weight: 560; border-radius: var(--rayon-ctrl); padding: 8px 14px;
  border: 1px solid var(--trait-fort); background: var(--surface); color: var(--encre); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.bouton:hover { background: var(--surface-2); text-decoration: none; }
.bouton:disabled { opacity: 0.5; cursor: default; }
.bouton.principal { background: var(--pcb); border-color: var(--pcb); color: #fff; }
.bouton.principal:hover { background: var(--pcb-2); }
.bouton.fantome { border-color: transparent; background: transparent; }
.bouton.fantome:hover { background: var(--surface-3); }
.bouton.petit { padding: 5px 10px; font-size: 13px; }
.bouton.danger { color: var(--rouge); }
.bouton[aria-pressed="true"] { background: var(--pcb); border-color: var(--pcb); color: #fff; }
.bouton svg { width: 16px; height: 16px; }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }

input, select, textarea { font: inherit; font-size: 14.5px; color: var(--encre); background: var(--surface);
  border: 1px solid var(--trait-fort); border-radius: var(--rayon-ctrl); padding: 8px 11px; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--bleu); outline: none; box-shadow: 0 0 0 3px var(--bleu-fond); }
textarea { min-height: 130px; resize: vertical; width: 100%; }
label { font-weight: 600; font-size: 14px; }
.champ { display: grid; gap: 6px; align-content: start; }
.champ .aide { color: var(--encre-3); font-size: 13px; font-weight: 400; }
.champ input[type="number"] { max-width: 240px; }
.ligne-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.filtres { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.recherche { position: relative; flex: 1; max-width: 340px; min-width: 180px; }
.recherche input { width: 100%; padding-left: 34px; }
.recherche svg { position: absolute; left: 10px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--encre-3); }
.segment { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.segment button { font: inherit; font-size: 13.5px; font-weight: 600; border: 0; background: transparent; color: var(--encre-2);
  padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.segment button[aria-pressed="true"] { background: var(--surface); color: var(--encre); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }

.interrupteur { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 560; }
.interrupteur input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--trait-fort);
  position: relative; border: 0; padding: 0; cursor: pointer; transition: background 0.15s; flex: none; }
.interrupteur input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: translate 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.interrupteur input:checked { background: var(--vert); }
.interrupteur input:checked::after { translate: 16px 0; }

.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px;
  background: var(--surface-3); font-size: 13.5px; font-weight: 520; }
.puce button { border: 0; background: transparent; color: var(--encre-3); cursor: pointer; width: 20px; height: 20px;
  border-radius: 50%; display: grid; place-items: center; font-size: 15px; line-height: 1; }
.puce button:hover { background: var(--trait-fort); color: var(--encre); }
.puce-choix { font: inherit; font-size: 13.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--trait-fort); background: var(--surface); color: var(--encre-2); }
.puce-choix[aria-pressed="true"] { background: var(--pcb); border-color: var(--pcb); color: #fff; }
.editeur-termes { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--trait-fort);
  border-radius: var(--rayon-ctrl); background: var(--surface); }
.editeur-termes input { border: 0; padding: 4px 6px; flex: 1; min-width: 160px; box-shadow: none; }

/* ------------------------------------------------------------------ cartes et surfaces */
.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-carte); padding: 20px; box-shadow: var(--ombre); }
.carte.plate { box-shadow: none; }
.grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.tuile { display: grid; gap: 2px; padding: 16px 18px; }
.tuile .valeur { font-size: 28px; font-weight: 750; font-variation-settings: "wdth" 78; letter-spacing: -0.01em; }
.tuile .libelle { color: var(--encre-2); font-size: 13.5px; }

/* Règle des prix : la zone pépite, la zone bonne affaire, le marché, et chaque affaire posée dessus. */
.regle { padding: 22px 24px 18px; display: grid; gap: 14px; }
.regle-tete { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.regle-tete .marche { display: grid; }
.regle-tete .marche b { font-size: 44px; line-height: 1; font-weight: 780; font-variation-settings: "wdth" 72; letter-spacing: -0.02em; }
.regle-tete .seuils { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; font-size: 13.5px; color: var(--encre-2); }
.regle-tete .seuils b { color: var(--encre); font-variant-numeric: tabular-nums; }
.regle-tete .seuils i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.regle-svg { width: 100%; height: auto; display: block; overflow: visible; }
.regle-svg .zone-pepite { fill: var(--or-fond); }
.regle-svg .zone-bonne { fill: var(--vert-fond); }
.regle-svg .zone-normale { fill: var(--surface-3); }
.regle-svg .repere { stroke: var(--encre); stroke-width: 2; }
.regle-svg .graduation { fill: var(--encre-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.regle-svg .etiquette { fill: var(--encre-2); font-size: 12px; font-weight: 600; }
.regle-svg .point { stroke: var(--surface); stroke-width: 2; cursor: pointer; }
.regle-svg .point.barrettes { fill: var(--serie-affaire); }
.regle-svg .point.serveur { fill: var(--bleu); }
.regle-svg .point.actif { stroke: var(--encre); }

/* Carte d'affaire : une étiquette de barrette, fermée par sa rangée de contacts dorés. */
.affaires { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.affaire { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-carte); box-shadow: var(--ombre);
  display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.affaire .visuel { position: relative; aspect-ratio: 16 / 9; background: var(--surface-3) center / cover no-repeat; }
.affaire .visuel .badges { position: absolute; left: 12px; top: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.affaire .corps { padding: 16px 18px 14px; display: grid; gap: 10px; align-content: start; }
.affaire .provenance { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--encre-3); }
.affaire .titre { font-weight: 640; line-height: 1.32; }
.affaire .prix { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.affaire .prix b { font-size: 34px; line-height: 1; font-weight: 780; font-variation-settings: "wdth" 70; letter-spacing: -0.02em; }
.affaire .prix .par { color: var(--encre-2); font-size: 13.5px; }
.affaire .prix .total { margin-left: auto; color: var(--encre-3); font-size: 13px; }
.specs { display: flex; flex-wrap: wrap; gap: 5px; }
.spec { font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 5px; background: var(--surface-2);
  border: 1px solid var(--trait); color: var(--encre-2); }
.spec.alerte { border-color: var(--ambre); color: var(--encre); }
.affaire .ia { font-size: 13.5px; color: var(--encre-2); border-left: 3px solid var(--trait-fort); padding-left: 10px; }
.affaire .actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 18px 14px; }
.pins { height: 14px; background:
    linear-gradient(90deg, transparent 0 58%, var(--plan) 58% 61%, transparent 61%),
    repeating-linear-gradient(90deg, var(--or) 0 7px, transparent 7px 11px);
  border-top: 1px solid var(--trait); opacity: 0.55; }
.affaire.pepite .pins { opacity: 1; }
.affaire.serveur .pins { background:
    linear-gradient(90deg, transparent 0 58%, var(--plan) 58% 61%, transparent 61%),
    repeating-linear-gradient(90deg, var(--bleu) 0 7px, transparent 7px 11px); opacity: 0.45; }
.liste .affaires { grid-template-columns: 1fr; }
.liste .affaire { grid-template-columns: 180px minmax(0, 1fr); grid-template-rows: 1fr auto; }
.liste .affaire .visuel { aspect-ratio: auto; grid-row: 1 / span 2; min-height: 150px; }
.liste .affaire .pins { grid-column: 1 / -1; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; font-size: 12.5px;
  font-weight: 700; background: var(--surface); color: var(--encre); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); white-space: nowrap; }
.badge.pepite { background: var(--or); color: #241a00; }
.badge.bonne_affaire { background: var(--vert); color: #fff; }
.badge.anormal { background: var(--rouge); color: #fff; }
.badge.serveur { background: var(--bleu); color: #fff; }
.badge.neutre { box-shadow: none; background: var(--surface-3); color: var(--encre-2); }

.confiance { display: grid; gap: 4px; font-size: 13px; }
.etat { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--encre-2); }
.etat i { width: 8px; height: 8px; border-radius: 50%; background: var(--encre-3); flex: none; }
.etat.ok i { background: var(--vert); }
.etat.attention i { background: var(--ambre); }
.etat.critique i { background: var(--rouge); }
.points { margin: 0; padding-left: 18px; color: var(--encre-2); display: grid; gap: 2px; }

/* ------------------------------------------------------------------ tableaux */
.tableau { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--encre-3); font-size: 12.5px; padding: 8px 12px;
  border-bottom: 1px solid var(--trait-fort); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--trait); vertical-align: top; }
td.nb, th.nb { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr.cliquable { cursor: pointer; }
tbody tr.cliquable:hover { background: var(--surface-2); }
.cellule-titre { max-width: 520px; }
.cellule-titre small { display: block; color: var(--encre-3); margin-top: 2px; }
.pagination { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; }

/* ------------------------------------------------------------------ graphique du marché */
.graphique svg { display: block; width: 100%; height: auto; overflow: visible; }
.graphique .grille { stroke: var(--trait); stroke-width: 1; }
.graphique .axe { stroke: var(--trait-fort); stroke-width: 1; }
.graphique .texte-axe { fill: var(--encre-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.graphique .reference { stroke: var(--encre-2); stroke-width: 1.5; }
.graphique .seuil { stroke: var(--encre-3); stroke-width: 1; }
.graphique .etiquette { fill: var(--encre-2); font-size: 12px; font-weight: 600; }
.graphique .point { stroke: var(--surface); stroke-width: 2; }
.graphique .point.obs { fill: var(--serie-obs); }
.graphique .point.affaire { fill: var(--serie-affaire); }
.graphique .point.actif { stroke: var(--encre); }
.legende { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--encre-2); }
.legende span { display: inline-flex; align-items: center; gap: 7px; }
.legende i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ------------------------------------------------------------------ journal */
.journal { display: grid; }
.journal .evt { display: grid; grid-template-columns: 92px 28px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--trait); font-size: 14px; }
.journal .evt time { color: var(--encre-3); font-size: 12.5px; font-variant-numeric: tabular-nums; padding-top: 1px; }

/* ------------------------------------------------------------------ réglages */
.onglets-reglages { display: flex; gap: 4px; border-bottom: 1px solid var(--trait-fort); overflow-x: auto; }
.onglets-reglages a { padding: 10px 14px; color: var(--encre-2); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.onglets-reglages a:hover { color: var(--encre); text-decoration: none; }
.onglets-reglages a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--or); }
.bloc { display: grid; gap: 16px; }
.bloc-tete { display: grid; gap: 4px; }
.curseur { display: grid; gap: 6px; }
.curseur .tete { display: flex; justify-content: space-between; gap: 10px; }
.curseur input[type="range"] { width: 100%; accent-color: var(--pcb); padding: 0; border: 0; }
.curseur output { font-weight: 700; font-variant-numeric: tabular-nums; }
.webhook { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--trait); border-radius: 10px; background: var(--surface-2); }
.webhook .tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.webhook .tete .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.barre-enregistrer { position: sticky; bottom: 16px; display: flex; gap: 10px; align-items: center; padding: 12px 16px;
  background: var(--pcb); color: var(--serigraphie); border-radius: 12px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.45); }
.barre-enregistrer .actions { margin-left: auto; display: flex; gap: 8px; }
.barre-enregistrer .bouton { border-color: transparent; }

/* ------------------------------------------------------------------ tiroir, toast, infobulle */
.tiroir { position: fixed; inset: 0; z-index: 40; }
.tiroir-fond { position: absolute; inset: 0; background: rgba(5, 14, 11, 0.45); }
.tiroir-panneau { position: absolute; top: 0; right: 0; bottom: 0; width: min(680px, 100%); background: var(--surface);
  overflow-y: auto; display: grid; align-content: start; box-shadow: -10px 0 40px rgba(0, 0, 0, 0.25); }
.tiroir-panneau > .contenu { padding: 24px 26px 32px; display: grid; gap: 16px; }
.tiroir-fermer { position: absolute; top: 12px; right: 12px; z-index: 2; background: var(--surface) !important; }
.tiroir-image { width: 100%; max-height: 320px; object-fit: contain; background: var(--surface-3); display: block; }
.description { white-space: pre-wrap; font-size: 14px; background: var(--surface-2); border-radius: 10px; padding: 14px; max-height: 360px; overflow-y: auto; }
.toast { position: fixed; bottom: 22px; left: 50%; translate: -50% 0; z-index: 60; background: var(--pcb); color: #fff;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); max-width: calc(100% - 32px); }
.infobulle { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--encre);
  border: 1px solid var(--trait-fort); border-radius: 9px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); padding: 9px 11px;
  font-size: 13px; max-width: 300px; display: grid; gap: 2px; }
.infobulle b { font-size: 16px; }
.infobulle .cle { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.vide { padding: 36px; text-align: center; color: var(--encre-2); display: grid; gap: 10px; justify-items: center; }
.nouveau { position: fixed; top: 18px; left: 50%; translate: -50% 0; z-index: 30; }

/* ------------------------------------------------------------------ mobile */
.onglets-mobile { display: none; }
@media (max-width: 900px) {
  .appli { grid-template-columns: 1fr; }
  .barre-laterale { display: none; }
  .entete { padding: 14px 16px; }
  .vue { padding: 4px 16px 96px; }
  .onglets-mobile { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--pcb);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .onglets-mobile a { display: grid; justify-items: center; gap: 2px; color: var(--serigraphie-2); font-size: 11px; font-weight: 600;
    padding: 4px 6px; border-radius: 8px; min-width: 56px; }
  .onglets-mobile a svg { width: 22px; height: 22px; }
  .onglets-mobile a[aria-current="page"] { color: #fff; background: var(--pcb-2); }
  .regle-tete .marche b { font-size: 36px; }
  .regle-tete .seuils { margin-left: 0; }
  .affaires { grid-template-columns: 1fr; }
  .liste .affaire { grid-template-columns: 110px minmax(0, 1fr); }
  .journal .evt { grid-template-columns: 70px 24px minmax(0, 1fr); }
  .barre-enregistrer { bottom: 84px; }
  .toast { bottom: 90px; }
}
