/* ==========================================================================
   Ploutos — feuille de style
   Inspiration : interfaces Apple (macOS, iOS). Police système, gris doux,
   cartes blanches sans bordure, une seule couleur d'action, clair et sombre.
   Tout le site lit les variables ci-dessous : changer une couleur ici la
   change partout.
   ========================================================================== */

/* ---- Jetons : clair (par défaut) --------------------------------------- */
:root {
  color-scheme: light;
  --fond: #F5F5F7;
  --barre: #EFEFF2;
  --barre-trait: #E0E0E5;
  --carte: #FFFFFF;
  --carte-2: #F5F5F7;
  --carte-survol: #FAFAFC;
  --remplissage: #E8E8ED;
  --trait: #D2D2D7;
  --trait-fin: #EBEBEF;
  --texte: #1D1D1F;
  --sourdine: #6E6E73;
  --sourdine-2: #86868B;
  --chevron: #C7C7CC;
  --action: #0066CC;
  --action-vif: #004499;
  --bouton: #0071E3;
  --bouton-vif: #0077ED;
  --bouton-texte: #FFFFFF;
  --actif-fond: #0071E3;
  --actif-texte: #FFFFFF;
  --positif: #1A7F37;
  --negatif: #C2410C;
  --attention: #A15C00;
  --info-fond: #E8F1FC;
  --alerte-fond: #FFF1E8;
  --succes-fond: #E9F6EC;
  --or: #B07A1F;
  --graph-1: #0071E3;
  --graph-2: #AEAEB2;
  --graph-3: #D1D1D6;
  --graph-zone: rgba(0, 113, 227, .10);
  --code-texte: #1D1D1F;
  --voile: rgba(0, 0, 0, .28);
  --ombre-feuille: 0 30px 80px rgba(0, 0, 0, .22);

  --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
  --police-titre: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", sans-serif;
  --graisse-titre: 700;
  --rayon: 18px;
  --rayon-tuile: 20px;
  --rayon-bouton: 999px;
}

/* ---- Jetons : sombre ---------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) {
    color-scheme: dark;
    --fond: #000000; --barre: #161617; --barre-trait: #2C2C2E;
    --carte: #1C1C1E; --carte-2: #2C2C2E; --carte-survol: #232325; --remplissage: #2C2C2E;
    --trait: #38383A; --trait-fin: #2C2C2E;
    --texte: #F5F5F7; --sourdine: #A1A1A6; --sourdine-2: #8E8E93; --chevron: #5A5A5E;
    --action: #2997FF; --action-vif: #5DB0FF;
    --bouton: #0A84FF; --bouton-vif: #3395FF; --bouton-texte: #FFFFFF;
    --actif-fond: #0A84FF; --actif-texte: #FFFFFF;
    --positif: #30D158; --negatif: #FF9F0A; --attention: #FFD60A;
    --info-fond: #0B2A4A; --alerte-fond: #3A2208; --succes-fond: #0F2E19;
    --or: #D9B478;
    --graph-1: #0A84FF; --graph-2: #636366; --graph-3: #48484A; --graph-zone: rgba(10, 132, 255, .16);
    --code-texte: #E5E5EA; --voile: rgba(0, 0, 0, .55); --ombre-feuille: 0 30px 80px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="sombre"] {
  color-scheme: dark;
  --fond: #000000; --barre: #161617; --barre-trait: #2C2C2E;
  --carte: #1C1C1E; --carte-2: #2C2C2E; --carte-survol: #232325; --remplissage: #2C2C2E;
  --trait: #38383A; --trait-fin: #2C2C2E;
  --texte: #F5F5F7; --sourdine: #A1A1A6; --sourdine-2: #8E8E93; --chevron: #5A5A5E;
  --action: #2997FF; --action-vif: #5DB0FF;
  --bouton: #0A84FF; --bouton-vif: #3395FF; --bouton-texte: #FFFFFF;
  --actif-fond: #0A84FF; --actif-texte: #FFFFFF;
  --positif: #30D158; --negatif: #FF9F0A; --attention: #FFD60A;
  --info-fond: #0B2A4A; --alerte-fond: #3A2208; --succes-fond: #0F2E19;
  --or: #D9B478;
  --graph-1: #0A84FF; --graph-2: #636366; --graph-3: #48484A; --graph-zone: rgba(10, 132, 255, .16);
  --code-texte: #E5E5EA; --voile: rgba(0, 0, 0, .55); --ombre-feuille: 0 30px 80px rgba(0, 0, 0, .6);
}

/* ---- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { background: var(--fond); }
body {
  background: var(--fond); color: var(--texte);
  font: 15px/1.5 var(--police);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--action); text-decoration: none; }
a:hover { color: var(--action-vif); }
:focus-visible { outline: 3px solid var(--bouton); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--bouton) 25%, transparent); }
strong { font-weight: 600; }
.note { color: var(--sourdine); font-size: 13px; }
footer { margin-top: 44px; font-size: 13px; color: var(--sourdine-2); line-height: 1.6; }

/* ---- Structure : menu latéral + contenu --------------------------------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.barre {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px;
  padding: 26px 12px 16px; background: var(--barre); border-right: 1px solid var(--barre-trait);
}
.barre .marque { padding: 0 10px; }
.marque { font: 700 22px var(--police-titre); letter-spacing: -.03em; color: var(--texte); }
.marque .point { color: var(--or); }
.barre .client { display: block; padding: 2px 10px 0; font-size: 12.5px; color: var(--sourdine); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .section {
  padding: 14px 10px 6px; font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--sourdine-2);
}
.nav a {
  display: flex; align-items: center; gap: 11px; min-height: 36px; padding: 0 10px;
  border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--texte);
}
.nav a svg { width: 18px; height: 18px; flex: none; color: var(--bouton); }
.nav a:hover { background: color-mix(in srgb, var(--texte) 6%, transparent); color: var(--texte); }
.nav a.actif { background: var(--actif-fond); color: var(--actif-texte); }
.nav a.actif svg { color: var(--actif-texte); }
.nav .pastille-nb {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: #D70015; color: #FFFFFF; font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.nav a.actif .pastille-nb { background: #FFFFFF; color: #D70015; }

.barre .pied { margin-top: auto; display: flex; flex-direction: column; gap: 12px;
  padding: 14px 10px 0; border-top: 1px solid var(--barre-trait); }
.utilisateur { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--remplissage); color: var(--sourdine);
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center;
  text-transform: uppercase;
}
.utilisateur .nom { font-size: 13px; font-weight: 600; line-height: 1.2; }
.utilisateur a { font-size: 12px; }

/* Sélecteur d'apparence : contrôle segmenté */
.segment {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px;
  border-radius: 9px; background: var(--remplissage);
}
.segment button {
  min-height: 28px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  color: var(--sourdine); font: 500 12px var(--police);
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.segment button svg { width: 14px; height: 14px; }
.segment button[aria-pressed="true"] {
  background: var(--carte); color: var(--texte);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.contenu { min-width: 0; padding: 40px 48px 80px; }
.contenu > .cadre { max-width: 1080px; margin: 0 auto; }
.entete-page { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 26px; }
.entete-page .surtitre { font-size: 13px; font-weight: 600; color: var(--sourdine);
  text-transform: uppercase; letter-spacing: .04em; }
.entete-page h1 { margin-top: 4px; font: var(--graisse-titre) 36px var(--police-titre);
  letter-spacing: -.03em; line-height: 1.1; }

@media (max-width: 900px) {
  .app { display: block; }
  .barre { position: sticky; z-index: 30; height: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 8px 14px; padding: 12px 16px; border-right: 0;
    border-bottom: 1px solid var(--barre-trait); overflow: visible;
    background: color-mix(in srgb, var(--barre) 88%, transparent);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
  .barre .client { display: none; }
  .nav { flex-direction: row; overflow-x: auto; width: 100%; order: 3; gap: 4px; }
  .nav .section { display: none; }
  .nav a { white-space: nowrap; }
  .barre .pied { margin: 0 0 0 auto; flex-direction: row; align-items: center; border: 0; padding: 0; }
  .utilisateur .nom { display: none; }
  .contenu { padding: 26px 16px 64px; }
  .entete-page h1 { font-size: 30px; }
}

/* ---- Titres de section ------------------------------------------------- */
h2 { font: var(--graisse-titre) 22px var(--police-titre); letter-spacing: -.02em; margin: 36px 0 12px; }
h3 { font-size: 15px; font-weight: 600; }
.carte h3 { margin-bottom: 14px; }
.carte h3 .note { font-weight: 400; }

/* ---- Cartes et tuiles -------------------------------------------------- */
.carte { background: var(--carte); border-radius: var(--rayon); padding: 22px 24px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpis + .kpis { margin-top: 16px; }
.kpi { border-radius: var(--rayon-tuile); padding: 20px 22px; }
.kpi .etiquette { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--sourdine); }
.kpi .valeur { margin-top: 6px; font: 700 32px var(--police-titre); letter-spacing: -.035em;
  font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .delta { margin-top: 4px; font-size: 14px; color: var(--sourdine); font-variant-numeric: tabular-nums; }
.kpi.grand { padding: 26px 28px; }
.kpi.grand .valeur { font-size: 50px; letter-spacing: -.045em; }
.hausse { color: var(--positif); font-weight: 600; }
.baisse { color: var(--negatif); font-weight: 600; }
.neutre { color: var(--sourdine); }
.delta .hausse, .delta .baisse { font-weight: 600; }

/* Tuile cliquable : bouton qui ressemble à une carte */
.tuile {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  background: var(--carte); color: var(--texte); font: inherit;
  transition: background .15s ease, transform .15s ease;
}
.tuile:hover { background: var(--carte-survol); color: var(--texte); }
.tuile:active { transform: scale(.99); }
.chevron { width: 8px; height: 13px; flex: none; color: var(--chevron); }

.grille { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
@media (max-width: 860px) { .grille { grid-template-columns: 1fr; } }
canvas { max-height: 300px; }

/* ---- Listes groupées (façon Réglages iOS) ------------------------------ */
.liste { background: var(--carte); border-radius: var(--rayon); overflow: hidden; }
.rangee {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 20px;
  border: 0; border-bottom: 1px solid var(--trait-fin); background: var(--carte);
  color: var(--texte); font: inherit; text-align: left;
}
.rangee:last-child { border-bottom: 0; }
button.rangee, a.rangee { cursor: pointer; transition: background .12s ease; }
button.rangee:hover, a.rangee:hover { background: var(--carte-survol); color: var(--texte); }
.rangee .principal { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rangee .libelle { font-size: 16px; font-weight: 500; }
.rangee .detail { font-size: 13px; color: var(--sourdine); }
.rangee .valeur { font-size: 15px; color: var(--sourdine); font-variant-numeric: tabular-nums; }
.icone-carree {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--info-fond); color: var(--bouton);
}
.icone-carree svg { width: 18px; height: 18px; }
.icone-carree.alerte { background: var(--alerte-fond); color: var(--negatif); }
.icone-carree.succes { background: var(--succes-fond); color: var(--positif); }

/* Barre de progression */
.jauge { position: relative; height: 8px; border-radius: 4px; background: var(--remplissage); }
.jauge > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--bouton); }
.jauge > span.attention { background: #D97706; }
.jauge > span.depasse { background: var(--negatif); }
.jauge > i { position: absolute; top: -4px; width: 2px; height: 16px; border-radius: 1px;
  background: var(--texte); opacity: .35; }

/* ---- Tableaux ----------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
th { font-size: 12px; font-weight: 600; color: var(--sourdine); text-align: left;
  padding: 0 10px 10px; border-bottom: 1px solid var(--trait-fin); }
td { padding: 12px 10px; border-bottom: 1px solid var(--trait-fin); color: var(--texte); }
tr:last-child td { border-bottom: 0; }
td a { color: var(--texte); } td a:hover { color: var(--action); }
td.num, th.num { text-align: right; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }

/* ---- Boutons ------------------------------------------------------------ */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 20px; border: 0; border-radius: var(--rayon-bouton);
  background: var(--bouton); color: var(--bouton-texte); font: 500 15px var(--police);
  cursor: pointer; transition: background .15s ease;
}
.bouton:hover { background: var(--bouton-vif); color: var(--bouton-texte); }
.bouton[disabled] { background: var(--remplissage); color: var(--sourdine); cursor: default; }
.bouton-discret {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 0 14px; border: 0; border-radius: var(--rayon-bouton);
  background: var(--remplissage); color: var(--texte); font: 500 13.5px var(--police);
  cursor: pointer; flex: none;
}
.bouton-discret:hover { background: color-mix(in srgb, var(--remplissage) 80%, var(--texte)); color: var(--texte); }

/* ---- Feuilles de détail (fenêtres modales façon iOS) -------------------- */
dialog.feuille {
  width: min(620px, calc(100vw - 32px)); max-height: 88vh; padding: 0; border: 0;
  border-radius: 24px; background: var(--carte); color: var(--texte);
  box-shadow: var(--ombre-feuille); overflow: hidden;
}
dialog.feuille::backdrop { background: var(--voile); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
dialog.feuille[open] { animation: apparition .22s cubic-bezier(.2, .9, .3, 1); }
@keyframes apparition { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.feuille[open] { animation: none; } }
.feuille .interieur { max-height: 88vh; overflow-y: auto; padding: 24px 28px 28px; }
.feuille .tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.feuille .tete h2 { margin: 0; font-size: 22px; }
.feuille .chapo { margin: 6px 0 18px; font-size: 15px; color: var(--sourdine); }
.feuille .grand-chiffre { margin-top: 14px; font: 700 44px var(--police-titre); letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; }
.feuille .bas { margin-top: 18px; font-size: 13px; color: var(--sourdine-2); line-height: 1.55; }
.encadre { background: var(--carte-2); border-radius: 16px; overflow: hidden; font-size: 15px; }
.encadre > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px;
  border-bottom: 1px solid var(--trait-fin); }
.encadre > div:last-child { border-bottom: 0; }
.encadre strong { font-variant-numeric: tabular-nums; }
.message { padding: 15px 18px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.message.alerte { background: var(--alerte-fond); }
.message.info { background: var(--info-fond); }

/* ---- Alertes, verdicts, dépôt de fichier -------------------------------- */
.banniere {
  display: flex; align-items: center; gap: 12px; margin-bottom: 22px;
  padding: 13px 18px; border-radius: 14px; background: var(--carte); color: var(--texte); font-size: 15px;
}
.banniere:hover { background: var(--carte-survol); color: var(--texte); }
.banniere .texte { flex: 1; }
.banniere .texte .note { font-size: 15px; }
.pastille { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pastille.critique { background: var(--negatif); }
.pastille.attention { background: var(--attention); }
.pastille.info { background: var(--sourdine-2); }

.verdict { border-radius: var(--rayon); padding: 20px 24px; margin-top: 22px; background: var(--carte); }
.verdict.ok { background: var(--succes-fond); }
.verdict.refus { background: var(--alerte-fond); }
.verdict h3 { font-size: 17px; margin-bottom: 6px; }

.depot {
  border: 1.5px dashed var(--trait); border-radius: 22px; background: var(--carte);
  padding: 52px 28px; text-align: center; transition: border-color .15s, background .15s;
}
.depot.survol { border-color: var(--bouton); background: var(--info-fond); }
.depot p { color: var(--sourdine); margin-top: 6px; font-size: 15px; }
#nom-fichier { font-weight: 600; color: var(--texte); }
input[type=file] { display: none; }
.choisir { color: var(--action); font-weight: 500; cursor: pointer; }

pre {
  background: var(--carte); color: var(--code-texte); border-radius: 14px; padding: 16px 18px;
  font: 12.5px/1.6 ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace; overflow-x: auto; margin-top: 16px;
}

/* ---- Formulaires -------------------------------------------------------- */
label { display: block; font-size: 13px; font-weight: 500; color: var(--sourdine); margin: 16px 0 6px; text-align: left; }
input[type=text], input[type=password], input[type=month], input[type=search], select {
  width: 100%; min-height: 40px; border: 1px solid var(--trait); border-radius: 10px;
  padding: 8px 12px; font: 15px var(--police); background: var(--carte); color: var(--texte);
}
input:focus, select:focus { outline: none; border-color: var(--bouton);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bouton) 25%, transparent); }
.erreur { background: var(--alerte-fond); border-radius: 12px; padding: 12px 14px;
  font-size: 14px; margin-bottom: 8px; text-align: left; }

/* ---- Connexion --------------------------------------------------------- */
.ecran-connexion { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.connexion { width: 100%; max-width: 380px; text-align: center; }
.connexion .marque { display: block; font-size: 48px; letter-spacing: -.045em; }
.connexion .sous { display: block; margin: 6px 0 30px; font-size: 17px; color: var(--sourdine); }
.champs-groupes { background: var(--carte); border: 1px solid var(--trait); border-radius: 14px;
  overflow: hidden; text-align: left; }
.champs-groupes label { margin: 0; padding: 10px 16px 0; font-size: 12px; }
.champs-groupes input { border: 0; border-radius: 0; min-height: 0; padding: 2px 16px 12px; font-size: 17px; background: transparent; }
.champs-groupes input:focus { box-shadow: none; }
.champs-groupes .separateur { height: 1px; margin-left: 16px; background: var(--trait-fin); }
.connexion .bouton { width: 100%; min-height: 50px; margin-top: 18px; border-radius: 14px; font-size: 17px; font-weight: 600; }
.connexion .securite { display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 26px; font-size: 13px; color: var(--sourdine); }

/* ---- Alertes qualité ---------------------------------------------------- */
.niveau-tag { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; flex: none; }
.niveau-tag.critique { background: var(--alerte-fond); color: var(--negatif); }
.niveau-tag.attention { background: color-mix(in srgb, var(--attention) 14%, transparent); color: var(--attention); }
.niveau-tag.info { background: var(--remplissage); color: var(--sourdine); }
.alerte-ligne { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--trait-fin); }
.alerte-ligne:last-child { border-bottom: 0; }
.alerte-corps { flex: 1; }
.alerte-corps h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.alerte-corps p { font-size: 14px; color: var(--sourdine); line-height: 1.6; }
.alerte-vue { opacity: .45; }

/* ---- Impression ------------------------------------------------------- */
@media print {
  .barre, .banniere, .bouton, .bouton-discret { display: none !important; }
  .app { display: block; }
  .contenu { padding: 0; }
  .carte, .liste { break-inside: avoid; }
}

/* ---- Compléments -------------------------------------------------------- */
.connexion .securite svg { width: 13px; height: 13px; }
.rangee .jauge { margin-top: 9px; height: 6px; }
.rangee .valeur.hausse { color: var(--positif); }
.rangee .valeur.baisse { color: var(--negatif); }
.grille > section > h2:first-child { margin-top: 36px; }
.feuille table { margin-top: 4px; }
.feuille td.num, .feuille th.num { white-space: nowrap; }
dialog.feuille { margin: auto; }
.app { background: linear-gradient(to right, var(--barre) 252px, var(--fond) 252px); }
@media (max-width: 900px) { .app { background: var(--fond); } }

/* ---- Explorer : filtres et pastilles ----------------------------------- */
.filtres { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.filtres .champ label { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--sourdine); }
.filtres input, .filtres select { width: auto; background: var(--carte-2); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips label { margin: 0; padding: 6px 14px; border-radius: 999px; cursor: pointer; user-select: none;
  background: var(--carte-2); color: var(--texte); font-size: 13.5px; font-weight: 500; transition: background .12s; }
.chips label:hover { background: var(--remplissage); }
.chips input { display: none; }
.chips label:has(input:checked) { background: var(--bouton); color: var(--bouton-texte); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 20px; }
.export { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; margin-left: auto; }
.export svg { width: 16px; height: 16px; }
.lien-filtre { cursor: pointer; }
.rangee .detail.resume { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rangee.alerte-vue { opacity: 1; }
.rangee.alerte-vue .libelle, .rangee.alerte-vue .pastille { opacity: .5; }

/* ---- Lignes dépliables dans les feuilles ------------------------------- */
.depliables details { border-bottom: 1px solid var(--trait-fin); }
.depliables details:last-child { border-bottom: 0; }
.depliables summary { list-style: none; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; cursor: pointer; }
.depliables summary::-webkit-details-marker { display: none; }
.depliables summary .libelle { flex: 1; font-weight: 500; }
.depliables summary strong { font-variant-numeric: tabular-nums; }
.depliables summary .chevron { transition: transform .2s ease; }
.depliables details[open] summary .chevron { transform: rotate(90deg); }
.depliables summary:hover { background: color-mix(in srgb, var(--texte) 4%, transparent); }
.contenu-depli { padding: 0 18px 16px 30px; font-size: 14px; }
.contenu-depli > div { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0;
  color: var(--sourdine); font-variant-numeric: tabular-nums; }
.contenu-depli > a { display: inline-block; margin-top: 8px; font-weight: 500; }
.encadre.depliables > details { display: block; padding: 0; }
.ligne-poste { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 18px;
  border: 0; border-bottom: 1px solid var(--trait-fin); background: transparent; color: var(--texte);
  font: inherit; text-align: left; cursor: pointer; }
.ligne-poste:last-child { border-bottom: 0; }
.ligne-poste:hover { background: color-mix(in srgb, var(--texte) 4%, transparent); color: var(--texte); }
.ligne-poste .principal { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.ligne-poste .jauge { height: 5px; }
.ligne-poste .jauge > i { top: -3px; height: 11px; }
.ligne-poste strong { font-variant-numeric: tabular-nums; }
.bouton svg, .bouton-discret svg { width: 17px; height: 17px; }
.onglet { min-height: 30px; padding: 0 14px; border-radius: 7px; display: flex; align-items: center;
  color: var(--sourdine); font-size: 13.5px; font-weight: 500; }
.onglet:hover { color: var(--texte); }
.onglet[aria-current="true"] { background: var(--carte); color: var(--texte); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ligne-poste > strong { min-width: 84px; text-align: right; }

/* ---- Téléphone ------------------------------------------------------- */
.rangee .valeur { white-space: nowrap; }
@media (max-width: 600px) {
  .segment button span { display: none; }
  .segment button { min-width: 34px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpis > .grand, .kpis > :only-child { grid-column: 1 / -1; }
  .kpi { padding: 16px; }
  .kpi .valeur { font-size: 24px; }
  .kpi.grand .valeur { font-size: 38px; }
  .kpi .etiquette { font-size: 13px; }
  .rangee { padding: 10px 16px; }
  .feuille .interieur { padding: 20px; }
  .feuille .grand-chiffre { font-size: 36px; }
}
label.choisir { display: inline; margin: 0; font-size: inherit; font-weight: 500; color: var(--action); }
.barre-enregistrer { position: sticky; bottom: 16px; max-width: 640px; margin-top: 18px; display: flex; align-items: center;
  gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--carte) 85%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .10); }
.encadre strong { white-space: nowrap; }
