:root {
  --orange: #e87511;
  --orange-fonce: #c45f08;
  --vert: #17924a;
  --violet: #5b3fa8;
  --violet-clair: #efeaff;
  --fond: #f5f6f8;
  --carte: #ffffff;
  --texte: #1d2330;
  --doux: #667085;
  --bord: #e3e6ec;
  --danger: #c62828;
  --ok: #17924a;
  --rayon: 10px;
  --ombre: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--fond); color: var(--texte); font-size: 16px; line-height: 1.5;
}
a { color: var(--violet); }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.2; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
.muted { color: var(--doux); }
.hidden { display: none !important; }

/* Boutons et champs */
button, .btn {
  font: inherit; cursor: pointer; border: 1px solid transparent; border-radius: 8px;
  padding: .55em 1em; background: var(--orange); color: #fff; font-weight: 600;
  display: inline-flex; align-items: center; gap: .4em; text-decoration: none;
}
button:hover, .btn:hover { background: var(--orange-fonce); }
button:disabled { opacity: .55; cursor: not-allowed; }
.btn-sec { background: #fff; color: var(--texte); border-color: var(--bord); }
.btn-sec:hover { background: #f0f1f4; }
.btn-violet { background: var(--violet); }
.btn-violet:hover { background: #48308a; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f1c4c4; }
.btn-danger:hover { background: #fdecec; }
.btn-petit { padding: .3em .65em; font-size: .85rem; }
input, select, textarea {
  font: inherit; width: 100%; padding: .55em .7em; border: 1px solid var(--bord);
  border-radius: 8px; background: #fff; color: var(--texte);
}
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 2px solid var(--violet); outline-offset: 1px;
}
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3em; }
.champ { margin-bottom: .9em; }
.grille-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1em; }
.case { display: flex; gap: .5em; align-items: flex-start; font-weight: 400; margin-bottom: .45em; }
.case input { width: auto; margin-top: .25em; }

.alerte { padding: .7em 1em; border-radius: 8px; margin-bottom: 1em; font-size: .92rem; }
.alerte-erreur { background: #fdecec; color: var(--danger); border: 1px solid #f5c2c2; }
.alerte-ok { background: #e8f6ee; color: #0f6b36; border: 1px solid #b8e2c8; }
.alerte-info { background: var(--violet-clair); color: #3b2a75; border: 1px solid #d8ccfa; }

/* Page de connexion */
.page-connexion {
  min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(135deg, #fff4ea 0%, #f5f6f8 45%, #ecfaf1 100%);
}
.boite-connexion {
  width: 100%; max-width: 400px; background: var(--carte); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .12); padding: 2em 1.8em; border-top: 5px solid var(--orange);
}
.boite-connexion .logo { display: block; width: 110px; height: 110px; margin: 0 auto 1em; border-radius: 50%; object-fit: cover; }
.boite-connexion h1 { text-align: center; font-size: 1.25rem; color: var(--violet); }
.boite-connexion p.sous-titre { text-align: center; color: var(--doux); margin-top: -.3em; margin-bottom: 1.5em; }
.boite-connexion button[type=submit] { width: 100%; justify-content: center; padding: .7em; }
.qr { display: block; margin: .5em auto 1em; border: 1px solid var(--bord); border-radius: 8px; }
.code-secret { font-family: Consolas, monospace; background: #f3f4f6; padding: .4em .6em; border-radius: 6px; word-break: break-all; display: block; text-align: center; font-size: .85rem; }
.champ-code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-family: Consolas, monospace; }
.etapes { font-size: .9rem; padding-left: 1.2em; color: var(--doux); }

/* Application */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.barre {
  background: #211a3d; color: #d9d3f2; display: flex; flex-direction: column; padding: 1em .8em;
  position: sticky; top: 0; height: 100vh;
}
.barre .marque { display: flex; align-items: center; gap: .6em; padding: .2em .4em 1.2em; color: #fff; font-weight: 700; }
.barre .marque img { width: 42px; height: 42px; border-radius: 50%; background: #fff; }
.barre .marque small { display: block; font-weight: 400; color: #b7aee0; font-size: .75rem; }
.barre nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.barre nav a {
  color: inherit; text-decoration: none; padding: .6em .8em; border-radius: 8px; display: flex; gap: .6em; align-items: center;
}
.barre nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.barre nav a.actif { background: var(--orange); color: #fff; }
.barre .utilisateur { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: .8em; font-size: .85rem; }
.barre .utilisateur button { margin-top: .6em; width: 100%; justify-content: center; background: transparent; border-color: rgba(255,255,255,.25); }
.barre .utilisateur button:hover { background: rgba(255,255,255,.08); }
.contenu { padding: 1.6em 2em; min-width: 0; }
.entete { display: flex; justify-content: space-between; align-items: center; gap: 1em; flex-wrap: wrap; margin-bottom: 1.2em; }
.entete h1 { margin: 0; }
.actions { display: flex; gap: .5em; flex-wrap: wrap; }

.carte { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.2em 1.3em; margin-bottom: 1.2em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1em; margin-bottom: 1.2em; }
.kpi { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1em 1.2em; border-left: 4px solid var(--orange); }
.kpi .val { font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .lib { color: var(--doux); font-size: .88rem; }
.kpi.v { border-left-color: var(--violet); }
.kpi.g { border-left-color: var(--vert); }
.deux-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.2em; }
@media (max-width: 1150px) { .deux-col { grid-template-columns: minmax(0, 1fr); } }
tr.ligne-fed td:first-child { min-width: 220px; }

.filtres { display: flex; gap: .6em; flex-wrap: wrap; margin-bottom: 1em; }
.filtres > * { width: auto; min-width: 160px; flex: 1; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6em .7em; border-bottom: 1px solid var(--bord); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--doux); background: #fafbfc; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.ligne-fed { cursor: pointer; }
tr.ligne-fed:hover { background: #fff8f1; }
tr.sous td { background: #fbfbfd; font-size: .88rem; }
tr.sous td:first-child { padding-left: 2.2em; }
td.acts { white-space: nowrap; text-align: right; }
.vide { text-align: center; color: var(--doux); padding: 2em; }
.pastille { display: inline-block; padding: .1em .55em; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.p-actif { background: #e8f6ee; color: #0f6b36; }
.p-inactif { background: #f1f2f4; color: #5c6370; }
.p-admin { background: var(--violet-clair); color: var(--violet); }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 1em; gap: 1em; flex-wrap: wrap; }

.barres .ligne { display: grid; grid-template-columns: minmax(120px, 38%) 1fr 56px; gap: .6em; align-items: center; margin-bottom: .5em; font-size: .88rem; }
.barres .piste { background: #f0f1f4; border-radius: 4px; height: 14px; overflow: hidden; }
.barres .rempli { background: var(--orange); height: 100%; border-radius: 4px; }
.barres .ligne span:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.repartition { display: flex; height: 22px; border-radius: 6px; overflow: hidden; margin: .5em 0; background: #f0f1f4; }
.repartition div { height: 100%; }
.legende { display: flex; gap: 1em; font-size: .85rem; flex-wrap: wrap; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35em; }

/* Fenêtre modale */
.modale-fond { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modale { background: #fff; border-radius: 12px; width: 100%; max-width: 680px; max-height: 92vh; overflow: auto; padding: 1.4em 1.5em; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modale .pied { display: flex; justify-content: flex-end; gap: .5em; margin-top: 1em; }

.zone-import { border: 2px dashed var(--bord); border-radius: var(--rayon); padding: 1.5em; text-align: center; background: #fcfcfd; }
.zone-import.survol { border-color: var(--orange); background: #fff8f1; }
.etapes-import { counter-reset: e; list-style: none; padding: 0; }
.etapes-import li { counter-increment: e; padding-left: 2.2em; position: relative; margin-bottom: .8em; }
.etapes-import li::before {
  content: counter(e); position: absolute; left: 0; top: 0; width: 1.6em; height: 1.6em; border-radius: 50%;
  background: var(--violet); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}

.toast { position: fixed; bottom: 20px; right: 20px; background: #1d2330; color: #fff; padding: .8em 1.1em; border-radius: 8px; z-index: 60; box-shadow: var(--ombre); max-width: 90vw; }
.toast.err { background: var(--danger); }
.menu-mobile { display: none; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .barre { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .barre.ouverte { transform: none; }
  .menu-mobile { display: inline-flex; }
  .contenu { padding: 1em 16px; }
  .deux-col { grid-template-columns: 1fr; }
  .filtres > * { min-width: 100%; }
}

/* =====================================================================
   Accessibilité et ergonomie
   - Contraste du texte blanc sur les boutons ≥ 4,5:1 (orange foncé)
   - Zones de clic ≥ 44 px sur écran tactile
   - Focus clavier toujours visible
   - Tableaux lisibles en fiches sur mobile
   - Réglage « réduire les animations » respecté
   ===================================================================== */
:root {
  --action: #b45309;          /* orange foncé : blanc dessus = 5,0:1 */
  --action-survol: #92400e;
  --danger-plein: #b91c1c;    /* blanc dessus = 6,5:1 */
  --anneau: #5b3fa8;
}

/* Icônes SVG (remplacent les emojis) */
.ic { width: 1.15em; height: 1.15em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.ic-grand { width: 2.6rem; height: 2.6rem; color: var(--violet); stroke-width: 1.5; }

/* Boutons : contraste, taille, retour visuel */
button, .btn { background: var(--action); min-height: 40px; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
button:hover, .btn:hover { background: var(--action-survol); }
.btn-sec { background: #fff; }
.btn-sec:hover { background: #f0f1f4; }
.btn-violet { background: var(--violet); }
.btn-violet:hover { background: #48308a; }
.btn-danger { background: #fff; }
.btn-danger:hover { background: #fdecec; }
.btn-danger-plein { background: var(--danger-plein); }
.btn-danger-plein:hover { background: #991b1b; }
.btn-petit { min-height: 34px; }
.actions .btn-petit, td.acts .btn-petit { margin: 2px 0; }
@media (pointer: coarse) {
  button, .btn, .btn-petit, input, select { min-height: 44px; }
  .barre nav a { min-height: 44px; }
}

/* Focus clavier visible partout */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--anneau); outline-offset: 2px; border-radius: 6px; }
.barre :focus-visible { outline-color: #fff; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
#vue:focus { outline: none; }

/* Lien d'évitement (clavier / lecteur d'écran) */
.lien-evitement { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--violet); color: #fff; padding: .6em 1em; border-radius: 8px; font-weight: 600; text-decoration: none; }
.lien-evitement:focus { top: 8px; }

/* Menu latéral */
.barre nav a { transition: background-color .15s ease, color .15s ease; font-weight: 500; }
.barre nav a .ic { opacity: .85; }
.barre nav a.actif { background: var(--action); }
.barre .utilisateur button { gap: .5em; }

/* Barre du haut sur mobile + voile derrière le menu ouvert */
.barre-mobile { display: none; }
.voile { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); z-index: 35; }

/* Alertes et messages avec icône */
.alerte { display: flex; gap: .6em; align-items: flex-start; }
.alerte .ic { margin-top: .15em; }
.annonces { position: fixed; bottom: 20px; right: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.annonces .toast { position: static; display: flex; gap: .6em; align-items: flex-start; animation: apparition .2s ease-out; }
@keyframes apparition { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Fenêtres */
.modale h2 { display: flex; gap: .5em; align-items: center; }
.modale-petite { max-width: 440px; }
.modale-petite h2 .ic { color: var(--danger-plein); }
body.modale-ouverte { overflow: hidden; }

/* Chargement */
.chargement { display: flex; align-items: center; gap: .7em; color: var(--doux); padding: 1.5em 0; }
.roue { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #e3e6ec; border-top-color: var(--action); animation: tourner .8s linear infinite; }
@keyframes tourner { to { transform: rotate(360deg); } }

/* Dépliage des fédérations (tableau de bord) */
.deplier { background: none; color: inherit; border: 0; padding: .2em .2em .2em 0; min-height: 0; font-weight: 400; text-align: left; gap: .45em; align-items: center; }
.deplier:hover { background: none; color: var(--violet); }
.deplier:disabled { opacity: 1; cursor: default; }
.deplier:disabled .ic { visibility: hidden; }
.deplier .ic { transition: transform .15s ease; color: var(--doux); }
.deplier[aria-expanded="true"] .ic { transform: rotate(90deg); }
tr.ligne-fed td:first-child { min-width: 190px; }
.deux-col th, .deux-col td { padding-left: .5em; padding-right: .5em; }

/* Lisibilité des tableaux */
td .ic { margin-right: .3em; color: var(--ok); }
td.acts .ic { color: inherit; margin: 0; }
td.acts { display: table-cell; }

/* Mobile */
@media (max-width: 860px) {
  .barre-mobile { display: flex; align-items: center; gap: .8em; margin-bottom: 1em; }
  .barre-mobile-titre { font-weight: 700; color: var(--violet); }
  .menu-mobile { display: none; }
  .annonces { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

/* Tableaux en fiches sur petit écran : chaque cellule affiche le titre de sa colonne */
@media (max-width: 640px) {
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead, .table-wrap tfoot { display: none; }
  .table-wrap tr { border: 1px solid var(--bord); border-radius: 10px; margin-bottom: .8em; padding: .4em .2em; background: #fff; }
  .table-wrap td { border: 0; padding: .35em .8em; text-align: right; overflow: hidden; }
  .table-wrap td::before { content: attr(data-label); font-weight: 600; color: var(--doux); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; text-align: left; float: left; margin-right: 1em; line-height: 1.9; }
  .table-wrap td:empty, .table-wrap td[data-label=""]::before { display: none; }
  .table-wrap td.acts { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: .4em; padding-top: .6em; text-align: left; }
  .table-wrap td.acts::before { display: none; }
  .table-wrap td.vide { text-align: center; }
  .table-wrap td.vide::before { display: none; }
  tr.ligne-fed td:first-child { min-width: 0; }
  tr.ligne-fed td:first-child::before, tr.sous td:first-child::before { display: none; }
  tr.sous td:first-child { padding-left: .8em; }
  tr.sous { margin-left: 1em; width: calc(100% - 1em); background: #fbfbfd; }
  .pagination { justify-content: center; text-align: center; }
}

/* Réduire les animations si l'utilisateur l'a demandé */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Graphiques du tableau de bord
   Palette validée (violet/orange de la marque : écart daltonisme 31,7, contraste ≥ 3:1) ;
   gris de mise en retrait pour « non renseigné » / « inactifs ».
   ===================================================================== */
:root {
  --g-s1: #5b3fa8;       /* série 1 : violet UNATR-CI */
  --g-s2: #e87511;       /* série 2 : orange UNATR-CI */
  --g-neutre: #8f8d86;   /* mise en retrait (3,3:1) */
  --g-attenue: #dcdad3;  /* barres hors sélection */
  --g-grille: #e1e0d9;   /* repères fins */
  --g-texte-2: #52514e;
  --g-texte-3: #6f6d67;
}
.g-filtres { display: flex; flex-wrap: wrap; gap: .8em 1.6em; align-items: center; margin: .2em 0 1em; }
.g-filtre { display: flex; align-items: center; gap: .6em; }
.g-filtre-lib { font-weight: 600; font-size: .88rem; margin: 0; color: var(--g-texte-2); }
.g-filtre select { width: auto; min-width: 200px; }
.segmente { display: inline-flex; background: #eceef2; border-radius: 9px; padding: 3px; gap: 2px; }
.segmente button { background: transparent; color: var(--texte); font-weight: 600; min-height: 34px; padding: .35em .9em; border-radius: 7px; }
.segmente button:hover { background: rgba(255,255,255,.6); }
.segmente button[aria-pressed="true"] { background: #fff; color: var(--violet); box-shadow: 0 1px 2px rgba(16,24,40,.15); }

.grille-graphes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 1.2em; margin-bottom: 1.2em; }
.g-carte { margin: 0 0 0; min-width: 0; }
.g-carte figcaption h2 { margin-bottom: .1em; }
.g-sous { margin: 0 0 .8em; color: var(--g-texte-3); font-size: .85rem; }
.g-legende { list-style: none; display: flex; flex-wrap: wrap; gap: .3em 1.1em; padding: 0; margin: 0 0 .8em; font-size: .85rem; color: var(--g-texte-2); }
.g-legende li { display: inline-flex; align-items: center; gap: .4em; }
.g-legende i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Barres horizontales */
.g-barres { display: flex; flex-direction: column; }
.g-ligne { display: grid; grid-template-columns: minmax(80px, 34%) 1fr 3.2em; align-items: center; gap: .7em; padding: 3px 4px; border-radius: 6px; cursor: default; }
.g-ligne:not(.g-axe):hover, .g-ligne:not(.g-axe):focus-visible { background: #f5f3fb; }
.g-nom { font-size: .85rem; color: var(--texte); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-nom small { display: block; color: var(--g-texte-3); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; }
.g-piste { position: relative; height: 24px; display: flex; align-items: center; }
.g-barre { display: flex; gap: 2px; height: 16px; min-width: 2px; }
.g-seg { height: 100%; min-width: 2px; }
.g-seg:last-child { border-radius: 0 4px 4px 0; }
.g-val { font-size: .85rem; font-weight: 600; color: var(--g-texte-2); font-variant-numeric: tabular-nums; }
.g-axe { padding-top: 0; }
.g-graduations { position: relative; height: 1.2em; font-size: .72rem; color: var(--g-texte-3); font-variant-numeric: tabular-nums; }
.g-graduations span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.g-graduations span:first-child { transform: none; }

/* Colonnes */
.g-colonnes { display: grid; grid-template-columns: 2.6em 1fr; grid-template-rows: 180px auto; column-gap: .5em; }
.g-axe-y { position: relative; font-size: .72rem; color: var(--g-texte-3); font-variant-numeric: tabular-nums; }
.g-axe-y span { position: absolute; right: 0; transform: translateY(50%); }
.g-zone { display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid #c3c2b7; }
.g-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-radius: 6px 6px 0 0; }
.g-col:hover, .g-col:focus-visible { background: #f5f3fb; }
.g-col-barre { width: min(24px, 70%); border-radius: 4px 4px 0 0; min-height: 2px; }
.g-col-val { font-size: .75rem; font-weight: 600; color: var(--g-texte-2); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.g-etiquettes { display: flex; gap: 6px; font-size: .75rem; color: var(--g-texte-3); padding-top: 4px; }
.g-etiquettes span { flex: 1; text-align: center; }

/* Barre segmentée (une répartition) */
.segmentee { display: flex; gap: 2px; height: 28px; margin: .2em 0 .8em; }
.segmentee span { border-radius: 4px; color: #fff; font-size: .8rem; font-weight: 600; display: flex; align-items: center; padding-left: 8px; white-space: nowrap; overflow: visible; min-width: 2px; }

/* Tableau de données dépliable */
.g-donnees { margin-top: .8em; font-size: .88rem; }
.g-donnees summary { cursor: pointer; color: var(--violet); font-weight: 600; display: inline-block; padding: .3em 0; }
.g-donnees .table-wrap { margin-top: .5em; max-height: 320px; overflow: auto; }

/* Infobulle */
.infobulle { position: fixed; z-index: 70; pointer-events: none; background: #fff; border: 1px solid rgba(11,11,11,.12); border-radius: 8px; box-shadow: 0 6px 20px rgba(16,24,40,.16); padding: .55em .75em; font-size: .82rem; opacity: 0; transition: opacity .1s; max-width: 280px; }
.infobulle.visible { opacity: 1; }
.ib-titre { color: var(--g-texte-2); margin-bottom: .3em; font-size: .78rem; }
.ib-ligne { display: flex; align-items: center; gap: .5em; }
.ib-ligne i { width: 12px; height: 2px; border-radius: 1px; flex-shrink: 0; }
.ib-ligne b { color: var(--texte); font-variant-numeric: tabular-nums; }
.ib-ligne span { color: var(--g-texte-3); }

@media (max-width: 640px) {
  .g-ligne:not(.g-axe) { grid-template-columns: 1fr 3.2em; row-gap: 2px; }
  .g-ligne:not(.g-axe) .g-nom { grid-column: 1 / -1; }
  .g-axe { grid-template-columns: 1fr 3.2em; }
  .g-axe > span:first-child { display: none; }
  .g-filtre { width: 100%; justify-content: space-between; }
  .g-filtre select { flex: 1; min-width: 0; }
}
@media (forced-colors: active) {
  .g-seg, .g-col-barre, .segmentee span { forced-color-adjust: none; border: 1px solid CanvasText; }
}

/* Synthèse et tableaux triables des graphiques */
.g-synthese { margin: .8em 0 0; font-size: .88rem; color: var(--g-texte-2); line-height: 1.45; }
.g-synthese b { color: var(--texte); }
table.triable th { padding: 0; }
.tri { background: none; color: inherit; border: 0; min-height: 36px; width: 100%; padding: .6em .7em; font: inherit; font-weight: 600; text-transform: inherit; letter-spacing: inherit; justify-content: inherit; display: flex; gap: .3em; align-items: center; }
th.num .tri { justify-content: flex-end; }
.tri:hover { background: #f0f1f4; color: var(--texte); }
.tri-fleche::after { content: "↕"; opacity: .4; font-size: .9em; }
th[aria-sort="descending"] .tri-fleche::after { content: "↓"; opacity: 1; }
th[aria-sort="ascending"] .tri-fleche::after { content: "↑"; opacity: 1; }
.g-donnees td:first-child { min-width: 180px; }
.g-donnees .tri { white-space: nowrap; }
@media (max-width: 640px) { .g-donnees td:first-child { min-width: 0; } }

/* Barre de progression des gros imports */
.progression { height: 12px; background: #eceef2; border-radius: 6px; overflow: hidden; margin: .4em 0 .6em; }
.progression span { display: block; height: 100%; background: var(--g-s1); border-radius: 6px; transition: width .3s ease; }
.progression-texte { font-variant-numeric: tabular-nums; color: var(--g-texte-2); margin: 0 0 .8em; }
