/*
 * Portail Agents — thème « A · Clair institutionnel » (maquettes A-tableau-de-bord, A-consommation).
 * Barre latérale claire, cartes blanches, accent bleu, IBM Plex. Repose sur Bulma 1.0.4.
 * Polices hébergées par le portail (public/fonts, licence SIL OFL) : aucun appel à un service tiers.
 */

@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

/* ---------- Jetons de couleur et réglages Bulma ---------- */
/*
 * Trois apparences, choisies dans « Mon compte » et posées sur <html> :
 *   Jour    → data-theme="light"  (jetons ci-dessous) ;
 *   Nuit    → data-theme="dark"   (jetons « Nuit ») ;
 *   Système → pas d'attribut : Nuit si le poste est réglé en sombre, Jour sinon.
 * Bulma 1 suit le même attribut pour ses propres composants (champs, listes, boutons).
 */
:root {
  --ink: #101828;
  --mut: #5d6675;
  --icon: #8a93a3;
  --line: #e3e6eb;
  --line-soft: #eef0f3;
  --bg: #f5f6f8;
  --surface: #fff;
  --surface-2: #f8f9fb;
  --hover: #fafbfc;
  --chip: #f2f4f7;
  --chip-ink: #344054;
  --neutre-ink: #475467;
  --acc: #1d4ed8;
  --acc-dark: #1e3a8a;
  --soft: #eef2fe;
  --soft-line: #c7d4fb;
  --av-bg: #e0e7ff; --av-ink: #3730a3;
  --ok: #146c2e; --ok-bg: #e7f6ec; --ok-line: #b7e4c4;
  --warn: #b54708; --warn-bg: #fff1e0; --warn-ink: #8a3a0c;
  --alerte-bg: #fffaeb; --alerte-line: #fde7b0; --alerte-ink: #6b3a07;
  --err: #b42318; --err-bg: #fef3f2; --err-line: #fecdca; --err-ink: #912018;
  --droits-bg: #e8f1fd; --droits-ink: #1849a9;
  --agent-bg: #efeafd; --agent-ink: #5925dc;
  --axe: #cfd4dc;
  --cache: #93b4f8;
  --sortie: #f79009;
  --ombre: rgba(16, 24, 40, .04);
  color-scheme: light;

  /* Bulma 1 : accent bleu pour primary et link (#1d4ed8 = hsl(224 76% 48%)) */
  --bulma-primary-h: 224deg; --bulma-primary-s: 76%; --bulma-primary-l: 48%;
  --bulma-link-h: 224deg; --bulma-link-s: 76%; --bulma-link-l: 48%;
  --bulma-info-h: 224deg; --bulma-info-s: 76%; --bulma-info-l: 48%;
  --bulma-family-primary: 'IBM Plex Sans', system-ui, sans-serif;
  --bulma-family-code: 'IBM Plex Mono', ui-monospace, monospace;
  --bulma-body-size: 14px;
  --bulma-radius: 8px;
  --bulma-text: var(--ink);
  --bulma-text-strong: var(--ink);
}

/* Nuit : jetons sombres, appliqués si on les demande… */
:root[data-theme="dark"] {
  --ink: #e6e9ef;
  --mut: #98a2b3;
  --icon: #7d8798;
  --line: #2a3342;
  --line-soft: #222a37;
  --bg: #0f141c;
  --surface: #161d27;
  --surface-2: #1b2330;
  --hover: #1a2230;
  --chip: #222b38;
  --chip-ink: #c9d1dc;
  --neutre-ink: #b3bcc9;
  --acc: #5b8cff;
  --acc-dark: #9dbbff;
  --soft: #1c2a4a;
  --soft-line: #2e4377;
  --av-bg: #26335a; --av-ink: #c7d2fe;
  --ok: #6fdc95; --ok-bg: #133222; --ok-line: #1f5236;
  --warn: #f5a64a; --warn-bg: #3a2812; --warn-ink: #fcc98a;
  --alerte-bg: #2e2412; --alerte-line: #5a4416; --alerte-ink: #f7d79b;
  --err: #f88b84; --err-bg: #3a1716; --err-line: #6b2a26; --err-ink: #fbb4ae;
  --droits-bg: #172a4a; --droits-ink: #9cc0ff;
  --agent-bg: #2a1f4d; --agent-ink: #c4b5fd;
  --axe: #3a4456;
  --cache: #3d5ea8;
  --sortie: #f79009;
  --ombre: rgba(0, 0, 0, .3);
  --bulma-primary-l: 56%; --bulma-link-l: 56%; --bulma-info-l: 60%;
  color-scheme: dark;
}
/* …ou si le membre a choisi « Système » et que le poste est en sombre. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ink: #e6e9ef;
    --mut: #98a2b3;
    --icon: #7d8798;
    --line: #2a3342;
    --line-soft: #222a37;
    --bg: #0f141c;
    --surface: #161d27;
    --surface-2: #1b2330;
    --hover: #1a2230;
    --chip: #222b38;
    --chip-ink: #c9d1dc;
    --neutre-ink: #b3bcc9;
    --acc: #5b8cff;
    --acc-dark: #9dbbff;
    --soft: #1c2a4a;
    --soft-line: #2e4377;
    --av-bg: #26335a; --av-ink: #c7d2fe;
    --ok: #6fdc95; --ok-bg: #133222; --ok-line: #1f5236;
    --warn: #f5a64a; --warn-bg: #3a2812; --warn-ink: #fcc98a;
    --alerte-bg: #2e2412; --alerte-line: #5a4416; --alerte-ink: #f7d79b;
    --err: #f88b84; --err-bg: #3a1716; --err-line: #6b2a26; --err-ink: #fbb4ae;
    --droits-bg: #172a4a; --droits-ink: #9cc0ff;
    --agent-bg: #2a1f4d; --agent-ink: #c4b5fd;
    --axe: #3a4456;
    --cache: #3d5ea8;
    --sortie: #f79009;
    --ombre: rgba(0, 0, 0, .3);
    --bulma-primary-l: 56%; --bulma-link-l: 56%; --bulma-info-l: 60%;
    color-scheme: dark;
  }
}

html, body { background: var(--bg); }
body { margin: 0; color: var(--ink); font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 14px; }
a { color: var(--acc); }
a:hover { color: var(--acc-dark); }
code { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; background: var(--chip); color: var(--chip-ink); border-radius: 4px; padding: 1px 5px; }
pre { font-family: 'IBM Plex Mono', ui-monospace, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }

.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.num { font-variant-numeric: tabular-nums; }
.mut { color: var(--mut); }
.petit { font-size: 12px; }
.est-cache { display: none !important; }

/* ---------- Mise en page : barre latérale + colonne principale ---------- */
.pa { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.pa-side {
  background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px;
  display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; height: 100vh; box-sizing: border-box; overflow-y: auto;
}
.pa-marque { display: flex; align-items: center; gap: 10px; padding: 4px 10px 8px; color: var(--ink); }
.pa-marque:hover { color: var(--ink); }
.pa-logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--acc); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.pa-marque-nom { font-weight: 600; font-size: 15px; line-height: 1.2; }
.pa-side .menu-label { font-size: 11px; letter-spacing: .08em; color: var(--mut); margin: 18px 10px 6px; font-weight: 600; text-transform: uppercase; }
.pa-side .menu-list { list-style: none; margin: 0; padding: 0; }
.pa-side .menu-list a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: var(--chip-ink); font-size: 14px; min-height: 40px; box-sizing: border-box; background: transparent;
}
.pa-side .menu-list a:hover { background: var(--chip); color: var(--ink); }
.pa-side .menu-list a.is-active { background: var(--soft); color: var(--acc); font-weight: 600; }
.pa-side .menu-list a svg { color: var(--icon); flex-shrink: 0; }
.pa-side .menu-list a.is-active svg { color: var(--acc); }
.pa-side .pastille { margin-left: auto; background: var(--ok-bg); color: var(--ok); height: 20px; min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 500; display: inline-grid; place-items: center; }
.pa-pied { margin-top: auto; padding: 12px 10px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }

.pa-principal { min-width: 0; display: flex; flex-direction: column; }
.pa-topbar {
  height: 64px; border-bottom: 1px solid var(--line); background: var(--surface);
  display: flex; align-items: center; gap: 16px; padding: 0 32px;
  position: sticky; top: 0; z-index: 20;
}
.pa-topbar .breadcrumb { margin: 0; font-size: 13px; }
.pa-recherche { margin-left: auto; width: 280px; }
.pa-recherche .input { border-radius: 8px; min-height: 36px; box-shadow: none; }
.pa-recherche .icon { height: 36px; }
.pa-utilisateur { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.pa-utilisateur-nom { font-weight: 600; font-size: 13px; line-height: 1.2; }
.pa-burger { display: none; }

.pa-contenu { padding: 32px; display: flex; flex-direction: column; gap: 24px; max-width: 1280px; width: 100%; box-sizing: border-box; }
.pa-contenu > .notification { margin: 0; }

/* En-tête de page : titre, sous-titre, actions */
.pa-entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pa-entete h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.pa-entete p { margin: 4px 0 0; color: var(--mut); }
.pa-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }

/* ---------- Cartes ---------- */
.carte { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px var(--ombre); min-width: 0; }
.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.carte-tete h2 { margin: 0; font-size: 15px; font-weight: 600; }
.carte-tete .sous-titre { font-size: 12px; color: var(--mut); margin-top: 2px; }
.carte-corps { padding: 16px 20px; }
.carte-pied { font-size: 12px; color: var(--mut); margin: 0; padding: 12px 20px; border-top: 1px solid var(--line-soft); }
.carte .table { margin: 0; }
.carte .table-container { margin: 0; }

/* La .box Bulma prend l'allure d'une carte (formulaires, encadrés). */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px var(--ombre); color: var(--ink); }

/* Indicateurs */
.kpis { display: grid; grid-template-columns: repeat(var(--kpis, 5), minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.kpi-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi-tete span:first-child { color: var(--mut); font-weight: 500; }
.kpi-valeur { font-size: 32px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-note { font-size: 12px; color: var(--mut); }
.puce { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--soft); color: var(--acc); }
.puce.ok { background: var(--ok-bg); color: var(--ok); }
.puce.alerte { background: var(--warn-bg); color: var(--warn); }
.puce.neutre { background: var(--chip); color: var(--neutre-ink); width: 30px; height: 30px; border-radius: 8px; }

.g21 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.g11 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.g111 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pile { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- Tableaux ---------- */
.table { font-size: 14px; background: transparent; color: var(--ink); }
.table th { font-size: 12px; color: var(--mut); font-weight: 600; border-bottom: 1px solid var(--line) !important; padding: 10px 20px; white-space: nowrap; vertical-align: middle; }
.table td, .table tbody th { border-color: var(--line-soft); vertical-align: middle; padding: 12px 20px; }
.table tbody th { color: var(--ink); font-size: 14px; font-weight: 600; white-space: normal; border-bottom: 1px solid var(--line-soft) !important; }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0 !important; }
.table.is-hoverable tbody tr:not(.is-selected):hover { background: var(--hover); }
.table .r, .table .has-text-right { text-align: right; white-space: nowrap; }
.table tfoot td, .table tfoot th { font-weight: 600; border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; }
.table tr.grp td, .table tr.grp th { background: var(--surface-2); border-top: 1px solid var(--line); font-weight: 600; }
.table td.retrait, .table th.retrait { padding-left: 36px; }
.table.is-narrow td, .table.is-narrow th { padding: 8px 14px; }
.table caption { caption-side: top; }

/* ---------- Petits éléments ---------- */
.agent { font-family: 'IBM Plex Mono', monospace; font-size: 12px; background: var(--chip); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--chip-ink); white-space: nowrap; }
.modele { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--acc); }
.av { width: 28px; height: 28px; border-radius: 50%; background: var(--av-bg); color: var(--av-ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; flex-shrink: 0; }
.av.sys { background: var(--chip); color: var(--mut); }
.qui { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qui-nom { font-weight: 600; }
.qui-id { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mut); overflow-wrap: anywhere; }

.tag { font-weight: 500; font-size: 12px; border-radius: 999px; height: 24px; }
.tag.ev-ok, .tag.ev-acces { background: var(--ok-bg); color: var(--ok); }
.tag.ev-connexion { background: var(--chip); color: var(--neutre-ink); }
.tag.ev-droits { background: var(--droits-bg); color: var(--droits-ink); }
.tag.ev-agent { background: var(--agent-bg); color: var(--agent-ink); }
.tag.ev-compte { background: var(--warn-bg); color: var(--warn-ink); }
.tag.ev-refus { background: var(--err-bg); color: var(--err); }
.tag.ev-neutre { background: var(--chip); color: var(--neutre-ink); }
.tag.ev-info { background: var(--soft); color: var(--acc); }

.barre { height: 8px; border-radius: 99px; background: var(--line-soft); overflow: hidden; flex-grow: 1; }
.barre span { display: block; height: 100%; background: var(--acc); border-radius: 99px; }
.barre span.cache { background: var(--cache); }
.part { display: flex; align-items: center; gap: 10px; }
.part .num { font-size: 12px; color: var(--mut); width: 36px; text-align: right; flex-shrink: 0; }

.live { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .15); display: inline-block; flex-shrink: 0; }
.live.discret { width: 6px; height: 6px; box-shadow: none; }

.liste-plate { list-style: none; margin: 0; padding: 8px 0; }
.liste-plate > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-soft); }
.liste-plate > li:last-child { border-bottom: 0; }
.tuile-session { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }

/* Encadré d'avertissement (maquette « Deux réserves ») */
.notification { border-radius: 10px; font-size: 13px; line-height: 1.5; padding: 14px 16px; border: 1px solid transparent; }
.notification.is-warning.is-light { background: var(--alerte-bg); border-color: var(--alerte-line); color: var(--alerte-ink); }
.notification.is-warning.is-light strong { color: var(--alerte-ink); }
.notification.is-info.is-light, .notification.is-link.is-light { background: var(--soft); border-color: var(--soft-line); color: var(--acc-dark); }
.notification.is-success.is-light { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.notification.is-danger.is-light { background: var(--err-bg); border-color: var(--err-line); color: var(--err-ink); }
.notification.is-light:not(.is-warning):not(.is-info):not(.is-link):not(.is-success):not(.is-danger) { background: var(--surface); border-color: var(--line); color: var(--mut); }
.encadre { display: flex; gap: 12px; align-items: flex-start; }
.encadre > svg { flex-shrink: 0; margin-top: 1px; }
.encadre p { margin: 0; }

/* Boutons et champs aux dimensions des maquettes */
.button { border-radius: 8px; font-weight: 500; }
.button.is-small { border-radius: 8px; min-height: 36px; font-size: 13px; }
.button.is-white { border: 1px solid var(--line); }
.input, .select select, .textarea { border-radius: 8px; box-shadow: none; }
.input.is-small, .select.is-small select { min-height: 36px; font-size: 13px; }
.label { font-weight: 600; color: var(--ink); }
.label.is-small { font-weight: 500; color: var(--mut); margin-bottom: 4px; font-size: 12px; }
.help { color: var(--mut); }
.checkbox input, .matrice input[type="checkbox"] { accent-color: var(--acc); }
.buttons.has-addons .button.is-selected { background: var(--soft); color: var(--acc); border-color: var(--soft-line); z-index: 1; }
.tabs.is-toggle a { border-color: var(--line); }
.tabs.is-toggle li.is-active a { background: var(--acc); border-color: var(--acc); }

/* ---------- Graphique quotidien empilé ---------- */
.graphe { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; }
.graphe-y { display: flex; flex-direction: column; justify-content: space-between; height: 240px; font-size: 11px; color: var(--mut); text-align: right; }
.graphe-y span { transform: translateY(-50%); }
.graphe-y span:first-child { transform: none; }
.graphe-y span:last-child { transform: translateY(0); }
.graphe-zone { position: relative; height: 240px; border-bottom: 1px solid var(--axe); background: linear-gradient(to top, var(--line-soft) 1px, transparent 1px) 0 0 / 100% 25%; }
.graphe-cols, .graphe-x { display: grid; grid-template-columns: repeat(var(--jours, 31), minmax(0, 1fr)); gap: 6px; padding: 0 4px; }
.graphe-cols { position: absolute; inset: 0; align-items: end; }
.graphe-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.graphe-col.futur { background: repeating-linear-gradient(45deg, transparent 0, transparent 4px, var(--chip) 4px, var(--chip) 5px); border-radius: 4px 4px 0 0; opacity: .7; }
.graphe-col > span { display: block; }
.graphe-col > .s-sortie { background: var(--sortie); border-radius: 4px 4px 0 0; }
.graphe-col > .s-cache { background: var(--cache); }
.graphe-col > .s-entree { background: var(--acc); }
.graphe-col > .valeur { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 600; color: var(--ink); background: none; }
.graphe-x { padding-top: 6px; font-size: 11px; color: var(--mut); text-align: center; }
.graphe-x .actif { font-weight: 600; color: var(--ink); }
.graphe-legende { display: flex; gap: 16px; flex-wrap: wrap; }
.legende { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mut); }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.defile { overflow-x: auto; }

/* ---------- Écrans de connexion ---------- */
.page-centree { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; box-sizing: border-box; }
.boite-etroite { width: 100%; max-width: 26rem; }
.boite-etroite .pa-marque { justify-content: center; margin-bottom: 20px; }
.boite-etroite .carte { padding: 28px 28px 24px; }
.boite-etroite h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; text-align: center; }
.boite-etroite .intro { color: var(--mut); text-align: center; margin: 0 0 20px; }
.puce-regle { font-weight: 700; margin-right: 0.4rem; }

/* ---------- Écrans particuliers ---------- */
/* Matrice des droits */
.matrice td, .matrice th { vertical-align: middle; }
.matrice .cellule-case { text-align: center; }
.matrice .cellule-case input[type="checkbox"] { width: 1.25rem; height: 1.25rem; cursor: pointer; }
.matrice thead th { text-align: center; }
.matrice thead th.colonne-membre { text-align: left; }
.matrice tr.ligne-suspendue td, .matrice tr.ligne-suspendue th { opacity: 0.6; background: var(--hover); }
.barre-enregistrement {
  position: sticky; bottom: 0; z-index: 10; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 -2px 8px rgba(16, 24, 40, .06); padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* Cartes d'agent de l'espace membre */
.grille-agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.carte-agent { display: flex; flex-direction: column; }
.carte-agent .carte-corps { flex-grow: 1; display: flex; flex-direction: column; gap: 10px; }
.carte-agent.est-refuse { background: var(--hover); }
.carte-agent.est-refuse .agent { color: var(--mut); }

/* Étapes de « Configurer mon IDE » */
.etape { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 20px; }
.numero-etape { width: 36px; height: 36px; border-radius: 10px; background: var(--soft); color: var(--acc); display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.etape h2 { margin: 6px 0 8px; font-size: 15px; font-weight: 600; }
.etape .content p { margin-bottom: 8px; }

/* Bloc de code avec bouton « Copier » en surimpression */
.bloc-code { position: relative; }
.bloc-code .bouton-copier { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 1; }
.bloc-code pre { padding: 2.75rem 1rem 1rem; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Fiche membre : tableau clé/valeur */
.cle-valeur th { width: 45%; color: var(--mut) !important; font-weight: 500 !important; font-size: 13px !important; }

/* ---------- Adaptation aux petits écrans ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g21, .g11, .g111 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .pa { grid-template-columns: minmax(0, 1fr); }
  .pa-side { display: none; position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 40; box-shadow: 0 0 0 100vmax rgba(16, 24, 40, .35); }
  .pa-side.est-ouvert { display: flex; }
  .pa-burger { display: inline-flex; }
  .masque-mobile { display: none !important; }
  .pa-topbar { padding: 0 16px; gap: 10px; }
  .pa-recherche { width: auto; flex-grow: 1; }
  .pa-contenu { padding: 20px 16px; }
  .kpis { grid-template-columns: 1fr; }
  .table th, .table td, .table tbody th { padding: 10px 12px; }
}

/* Fil d Ariane : rubrique sans page propre */
.breadcrumb li > span { padding: 0 .75em; color: var(--mut); }

/* Retouches après capture */
.breadcrumb li.is-active a { color: var(--ink); font-weight: 500; }
.pa-actions .label { margin-bottom: 4px !important; }
.pa-actions .input, .pa-actions .select, .pa-actions .select select { height: 36px; }
.pa-actions .select:not(.is-multiple):not(.is-loading)::after { margin-top: -0.3em; }
.qui-id { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
@media (max-width: 860px) {
  .pa-utilisateur { padding-left: 8px; gap: 6px; }
  .pa-entete h1 { font-size: 22px; }
}

/* Composants Bulma à aligner sur les jetons (sinon blancs en mode Nuit) */
.button.is-white { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button.is-white:hover { background: var(--hover); color: var(--ink); border-color: var(--line); }
.button:not(.is-link):not(.is-danger):not(.is-warning):not(.is-success):not(.is-white):not(.is-selected) { background: var(--surface); color: var(--ink); border-color: var(--line); }
.input, .select select, .textarea { background: var(--surface); color: var(--ink); border-color: var(--line); }
.input::placeholder { color: var(--icon); }
kbd { background: var(--chip); color: var(--chip-ink); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.content, .content strong, strong { color: inherit; }

/* Choix de l'apparence (Mon compte) */
.choix-theme { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.choix-theme label { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.choix-theme label:has(input:checked) { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.choix-theme .apercu { height: 54px; border-radius: 6px; border: 1px solid var(--line); display: grid; grid-template-columns: 30% 1fr; overflow: hidden; }
.choix-theme .apercu i, .choix-theme .apercu b { display: block; }
.apercu.jour i { background: #fff; border-right: 1px solid #e3e6eb; } .apercu.jour b { background: #f5f6f8; }
.apercu.nuit i { background: #161d27; border-right: 1px solid #2a3342; } .apercu.nuit b { background: #0f141c; }
.apercu.systeme i { background: #fff; border-right: 1px solid #e3e6eb; } .apercu.systeme b { background: linear-gradient(90deg, #f5f6f8 0 45%, #161d27 45% 58%, #0f141c 58%); }
.choix-theme .nom { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.choix-theme input { accent-color: var(--acc); }

/* Tableau dense (« Par membre » de la consommation, dans la colonne étroite) */
.table.serre th, .table.serre td { padding-left: 10px; padding-right: 10px; }
.table.serre th:first-child, .table.serre td:first-child { padding-left: 20px; }
.table.serre .qui-id { max-width: 150px; }
