/* Cité Éducative de Grigny — interface v3
   Couleurs tirées du logo : violet → magenta, turquoise, bleu.
   Chaque catégorie, axe, type de porteur… a sa propre couleur (réglable dans l'administration). */

:root {
  --fond: #F3F2F8;
  --surface: #FFFFFF;
  --surface-2: #F8F7FC;
  --encre: #1A1630;
  --encre-2: #48435F;
  --discret: #6E6987;
  --trait: #E5E2EE;
  --trait-fort: #D3CFE2;
  --marque: #5A3FD0;
  --marque-fonce: #4630AE;
  --marque-pale: #EEEAFD;
  --magenta: #D62B55;
  --turquoise: #12B5C6;
  --bleu: #1F5FAE;
  --danger: #C92A2A;
  --danger-pale: #FDECEC;
  --ok: #0B8A5F;
  --ok-pale: #E3F6EE;
  --attention: #B35C00;
  --attention-pale: #FFF4E0;
  --barre: #171229;
  --barre-2: #221B3B;
  --barre-encre: #D6D2EA;
  --barre-discret: #8E88AD;
  --ombre: 0 1px 2px rgba(26, 22, 48, .05), 0 6px 20px rgba(26, 22, 48, .06);
  --ombre-forte: 0 20px 60px rgba(15, 10, 40, .28);
  --rayon: 14px;
  --c: var(--marque);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --fond: #0F0C1B;
  --surface: #191530;
  --surface-2: #201B3A;
  --encre: #F1EFFA;
  --encre-2: #CBC6E2;
  --discret: #9C96BA;
  --trait: #2C2648;
  --trait-fort: #3B3460;
  --marque: #9C87FF;
  --marque-fonce: #B5A5FF;
  --marque-pale: #2A2352;
  --magenta: #FF6B8E;
  --danger: #FF7B7B;
  --danger-pale: #3A1A24;
  --ok: #4AD3A2;
  --ok-pale: #12352A;
  --attention: #FFB454;
  --attention-pale: #3A2A12;
  --barre: #0B0915;
  --barre-2: #191530;
  --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--encre); background: var(--fond);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--marque); }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--marque); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--marque) 28%, transparent); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--trait-fort); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
.num { font-variant-numeric: tabular-nums; }
.discret { color: var(--discret); }
.cache { display: none !important; }

/* ---------- structure ---------- */
.app { display: grid; grid-template-columns: 256px 1fr; height: 100vh; }
.scene { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.contenu { flex: 1; overflow: auto; padding: 24px 32px 48px; outline: none; scroll-behavior: smooth; }
.page { max-width: 1400px; margin: 0 auto; animation: entree .22s ease-out; }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- barre latérale ---------- */
.barre { background: linear-gradient(180deg, var(--barre) 0%, var(--barre-2) 100%); color: var(--barre-encre); display: flex; flex-direction: column; padding: 16px 12px 14px; overflow: auto; }
.barre .logo { background: #fff; border-radius: 12px; padding: 8px 10px; display: flex; justify-content: center; margin-bottom: 6px; border: 0; width: 100%; }
.barre .logo img { height: 58px; }
.barre .sous-titre { font-size: 11.5px; color: var(--barre-discret); text-align: center; margin-bottom: 8px; }
.barre .groupe { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--barre-discret); padding: 14px 12px 6px; }
.nav { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 12px; border: 0; background: none; color: inherit; border-radius: 10px; text-align: left; text-decoration: none; position: relative; }
.nav:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav.actif { background: rgba(255, 255, 255, .11); color: #fff; font-weight: 600; }
.nav.actif::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, #8C6BFF, var(--magenta)); }
.nav .compte { margin-left: auto; font-size: 11.5px; background: rgba(255, 255, 255, .1); padding: 1px 8px; border-radius: 20px; color: var(--barre-encre); }
.nav.presenter { background: linear-gradient(120deg, rgba(140, 107, 255, .35), rgba(214, 43, 85, .3)); color: #fff; font-weight: 600; margin-top: 6px; }
.nav.presenter:hover { filter: brightness(1.15); }
.barre .bas { margin-top: auto; padding-top: 14px; }
.profil { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .06); margin-top: 8px; }
.profil .nom { font-weight: 600; color: #fff; font-size: 13px; line-height: 1.2; }
.profil .role { font-size: 11.5px; color: var(--barre-discret); }
.profil button { margin-left: auto; background: none; border: 0; color: var(--barre-discret); padding: 6px; border-radius: 8px; display: flex; }
.profil button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-connexion { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: #fff; font-weight: 600; }
.btn-connexion:hover { background: rgba(255, 255, 255, .12); }
.credit { font-size: 10.5px; color: var(--barre-discret); text-align: center; margin-top: 10px; line-height: 1.35; }

/* ---------- en-tête ---------- */
.entete { display: flex; align-items: center; gap: 14px; padding: 12px 32px; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--trait); min-height: 62px; }
.fil { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--discret); min-width: 0; }
.fil a { color: var(--discret); text-decoration: none; white-space: nowrap; }
.fil a:hover { color: var(--marque); }
.fil strong { color: var(--encre); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fil svg.i { width: 14px; height: 14px; }
.entete .espace { flex: 1; }
.choix-annee { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 11px; background: var(--marque-pale); color: var(--marque-fonce); font-weight: 700; border: 1px solid color-mix(in srgb, var(--marque) 25%, transparent); white-space: nowrap; }
.choix-annee svg.i { width: 16px; height: 16px; }
.choix-annee select { appearance: none; border: 0; background: transparent; font-weight: 700; color: inherit; padding: 2px 18px 2px 0; cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235A3FD0' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right center; }
.choix-annee select option { color: #1A1630; background: #fff; }
.rech { position: relative; width: min(320px, 30vw); }
.rech svg.i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--discret); }
.rech input { width: 100%; padding: 9px 56px 9px 38px; border-radius: 11px; border: 1px solid var(--trait); background: var(--surface-2); }
.rech input:focus { outline: none; border-color: var(--marque); box-shadow: 0 0 0 3px color-mix(in srgb, var(--marque) 18%, transparent); background: var(--surface); }
.rech kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px "Segoe UI", sans-serif; color: var(--discret); border: 1px solid var(--trait); border-radius: 6px; padding: 1px 6px; background: var(--surface); }
.rond { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--trait); background: var(--surface); color: var(--encre-2); flex: none; }
.rond:hover { border-color: var(--trait-fort); color: var(--marque); }
.badge-demo { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--attention); background: var(--attention-pale); padding: 4px 10px; border-radius: 20px; white-space: nowrap; }

/* ---------- éléments communs ---------- */
.titre-page { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.titre-page h1 { font-size: 26px; font-weight: 700; line-height: 1.2; }
.titre-page p { color: var(--discret); margin-top: 2px; }
.titre-page .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--trait-fort); background: var(--surface); font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--encre); transition: transform .08s, box-shadow .15s, background .15s; }
.btn:hover { border-color: var(--marque); color: var(--marque); }
.btn:active { transform: translateY(1px); }
.btn.principal { background: linear-gradient(135deg, var(--marque), #7B4FE0); border-color: transparent; color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--marque) 35%, transparent); }
:root[data-theme="dark"] .btn.principal { background: linear-gradient(135deg, #6C4FE6, #8A5CF0); }
.btn.principal:hover { color: #fff; filter: brightness(1.07); }
.btn.vif { background: linear-gradient(120deg, #4A34B8, #D62B55); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(214, 43, 85, .25); }
.btn.vif:hover { color: #fff; filter: brightness(1.08); }
.btn.danger { background: var(--danger); border-color: transparent; color: #fff; }
:root[data-theme="dark"] .btn.danger { color: #1a0b0b; }
.btn.leger { border-color: transparent; background: transparent; color: var(--encre-2); }
.btn.leger:hover { background: var(--surface-2); }
.btn.petit { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icone-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 0; background: none; color: var(--discret); }
.icone-btn:hover { background: var(--surface-2); color: var(--marque); }
.icone-btn.rouge:hover { background: var(--danger-pale); color: var(--danger); }
.icone-btn[disabled] { opacity: .3; pointer-events: none; }
.pastille { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; background: color-mix(in srgb, var(--c) 13%, var(--surface)); color: color-mix(in srgb, var(--c) 78%, var(--encre)); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.pastille::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.pastille.sans-point::before { display: none; }
.pastille svg.i { width: 13px; height: 13px; }
.pastille.neutre { --c: var(--discret); background: var(--surface-2); color: var(--encre-2); border: 1px solid var(--trait); font-weight: 500; }
.pastilles { display: flex; flex-wrap: wrap; gap: 5px; }
.tuile-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: color-mix(in srgb, var(--c) 85%, var(--encre)); }
.tuile-ico svg.i { width: 20px; height: 20px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--marque), var(--magenta)); }
.avatar.petit { width: 32px; height: 32px; font-size: 12px; }
.vide { text-align: center; padding: 48px 20px; color: var(--discret); }
.vide .tuile-ico { margin: 0 auto 14px; width: 56px; height: 56px; border-radius: 16px; }
.vide h3 { color: var(--encre); font-size: 17px; margin-bottom: 4px; }
.vide .btn { margin-top: 16px; }
.vide.compact { padding: 26px 16px; }
.etiq { font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 1px 7px; border-radius: 6px; flex: none; white-space: nowrap; }
.etiq.nouvelle { background: color-mix(in srgb, var(--turquoise) 16%, var(--surface)); color: color-mix(in srgb, var(--turquoise) 55%, var(--encre)); }
.etiq.reconduction { background: var(--surface-2); color: var(--encre-2); border: 1px solid var(--trait); }
.etiq.temps { background: color-mix(in srgb, var(--bleu) 12%, var(--surface)); color: color-mix(in srgb, var(--bleu) 75%, var(--encre)); }
.etiq.hors { background: color-mix(in srgb, #E8590C 12%, var(--surface)); color: color-mix(in srgb, #E8590C 75%, var(--encre)); }
.age { font-size: 11.5px; padding: 2px 8px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--trait); color: var(--encre-2); white-space: nowrap; }
.section-titre { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.section-titre h2 { font-size: 17px; font-weight: 700; }
.section-titre a, .section-titre .lien { margin-left: auto; font-size: 13px; text-decoration: none; font-weight: 600; }
.section-titre p { color: var(--discret); font-size: 13px; }
.alerte { display: flex; gap: 10px; padding: 11px 13px; border-radius: 10px; background: var(--attention-pale); color: var(--attention); font-size: 13px; margin-bottom: 14px; align-items: flex-start; }
.alerte.info { background: var(--marque-pale); color: var(--marque-fonce); }
.alerte.ok { background: var(--ok-pale); color: var(--ok); }
.alerte svg.i { flex: none; margin-top: 1px; }

/* ---------- filtres ---------- */
.outils { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 14px; flex-wrap: wrap; position: sticky; top: -24px; z-index: 5; }
.champ-rech { position: relative; flex: 1 1 160px; min-width: 150px; }
.champ-rech svg.i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--discret); }
.champ-rech input { width: 100%; padding: 8px 12px 8px 36px; border: 1px solid var(--trait); border-radius: 10px; background: var(--surface-2); }
.champ-rech input:focus { outline: none; border-color: var(--marque); background: var(--surface); }
select.filtre { appearance: none; padding: 8px 28px 8px 12px; border: 1px solid var(--trait); border-radius: 10px; max-width: 165px; text-overflow: ellipsis; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2377728F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
select.filtre.actif { border-color: var(--marque); background-color: var(--marque-pale); color: var(--marque-fonce); font-weight: 600; }
.bascule { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface); border: 1px solid var(--trait); }
.bascule button { display: flex; align-items: center; gap: 7px; padding: 6px 12px; border: 0; background: none; border-radius: 8px; color: var(--discret); font-weight: 600; }
.bascule button[aria-pressed="true"] { background: var(--marque-pale); color: var(--marque-fonce); }
.resume { display: flex; align-items: center; gap: 10px; margin: 0 4px 14px; color: var(--discret); font-size: 13px; flex-wrap: wrap; }
.resume b { color: var(--encre); }
.resume #compte { margin-right: auto; }
.resume button.lien { background: none; border: 0; color: var(--marque); font-weight: 600; padding: 0; }
.resume select.filtre { background-color: var(--surface); color: var(--encre); }
.filtres-actifs { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 4px 12px; }
.filtres-actifs button { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 10px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--c) 40%, var(--trait)); background: color-mix(in srgb, var(--c) 10%, var(--surface)); color: color-mix(in srgb, var(--c) 75%, var(--encre)); font-size: 12.5px; font-weight: 600; }
.filtres-actifs button svg.i { width: 13px; height: 13px; }

/* ---------- tableau de bord ---------- */
.bandeau-tdb { position: relative; overflow: hidden; border-radius: 20px; padding: 26px 30px; color: #fff; display: flex; gap: 24px; align-items: center; background: radial-gradient(900px 300px at 110% -30%, rgba(18, 181, 198, .55), transparent 60%), linear-gradient(120deg, #4A34B8 0%, #7C3AAE 50%, #D62B55 100%); box-shadow: 0 16px 40px rgba(90, 63, 208, .25); margin-bottom: 18px; }
.bandeau-tdb::after { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; border: 44px solid rgba(255, 255, 255, .07); right: -110px; bottom: -220px; }
.bandeau-tdb .sur { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .8); font-weight: 700; }
.bandeau-tdb h1 { font-size: 30px; line-height: 1.15; margin-top: 4px; }
.bandeau-tdb p { color: rgba(255, 255, 255, .88); margin-top: 6px; max-width: 640px; }
.bandeau-tdb .boutons { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; justify-content: flex-end; }
.bandeau-tdb .btn { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.bandeau-tdb .btn:hover { background: rgba(255, 255, 255, .24); }
.bandeau-tdb .btn.blanc { background: #fff; color: #3B2A9A; border-color: #fff; }
.bandeau-tdb .logos { background: #fff; border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.bandeau-tdb .logos img:first-child { height: 64px; }
.bandeau-tdb .logos img:last-child { height: 30px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; position: relative; overflow: hidden; text-decoration: none; color: inherit; }
.kpi::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--c); opacity: .8; }
.kpi .valeur { font-size: 27px; font-weight: 700; line-height: 1.1; font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; }
.kpi .libelle { font-size: 12.5px; color: var(--discret); }
.kpi .detail { font-size: 12px; color: var(--encre-2); margin-top: 4px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 20px; margin-left: 4px; vertical-align: middle; }
.delta.hausse { color: var(--ok); background: var(--ok-pale); }
.delta.baisse { color: var(--danger); background: var(--danger-pale); }
.delta.stable { color: var(--discret); background: var(--surface-2); }
.grille-graph { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.graph { padding: 18px 20px; grid-column: span 4; min-width: 0; display: flex; flex-direction: column; }
.graph.l6 { grid-column: span 6; }
.graph.l8 { grid-column: span 8; }
.graph.l12 { grid-column: span 12; }
.graph h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.graph .sous { font-size: 12.5px; color: var(--discret); margin: 2px 0 14px; }
.graph .corps { flex: 1; min-height: 0; }

/* ---------- graphiques ---------- */
.barres { display: grid; gap: 9px; }
.barre-l { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; border: 0; background: none; padding: 0; text-align: left; width: 100%; color: inherit; }
.barre-l .nom { font-size: 13px; color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-l .piste { display: block; height: 14px; border-radius: 7px; background: var(--surface-2); overflow: hidden; }
.barre-l .rempli { display: block; height: 100%; border-radius: 7px; background: var(--c); min-width: 3px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.barre-l .val { font-size: 13px; font-weight: 700; min-width: 48px; text-align: right; }
.barre-l .val small { font-weight: 500; color: var(--discret); margin-left: 4px; }
button.barre-l:hover .nom { color: var(--marque); }
button.barre-l:hover .rempli { filter: brightness(1.1); }
.barre-l.actif .nom { color: var(--encre); font-weight: 700; }
.anneau { display: flex; align-items: center; gap: 18px; }
.anneau svg { width: 150px; height: 150px; flex: none; }
.anneau svg path, .anneau svg circle.seg { cursor: pointer; transition: opacity .15s; }
.anneau svg path:hover { opacity: .85; }
.anneau .centre-v { font: 700 22px "Segoe UI Variable Display", "Segoe UI", sans-serif; fill: var(--encre); }
.anneau .centre-l { font-size: 10.5px; fill: var(--discret); }
.legende { display: grid; gap: 6px; min-width: 0; flex: 1; }
.legende button { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; border: 0; background: none; padding: 2px 4px; border-radius: 6px; text-align: left; color: var(--encre-2); font-size: 13px; min-width: 0; }
.legende button:hover { background: var(--surface-2); }
.legende i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legende span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legende b { font-variant-numeric: tabular-nums; }
.colonnes { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding-top: 18px; }
.colonne { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.colonne .barres-v { display: flex; align-items: flex-end; gap: 4px; height: 100%; width: 100%; justify-content: center; }
.colonne .bv { width: min(44px, 40%); border-radius: 7px 7px 3px 3px; background: var(--c); position: relative; min-height: 3px; transition: height .5s cubic-bezier(.2, .8, .2, 1); }
.colonne .bv span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--encre-2); }
.colonne .lib { font-size: 12.5px; font-weight: 600; color: var(--encre-2); }
.colonne.courante .lib { color: var(--marque); }
.empile { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.empile div { background: var(--c); display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; min-width: 2px; }
.legende-ligne { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--encre-2); }
.legende-ligne span { display: inline-flex; align-items: center; gap: 6px; }
.legende-ligne i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* ---------- explorer (tuiles) ---------- */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tuile { padding: 20px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; transition: transform .14s, box-shadow .14s, border-color .14s; min-height: 170px; }
.tuile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.tuile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 50%, var(--trait)); box-shadow: 0 14px 30px color-mix(in srgb, var(--c) 16%, transparent); }
.tuile .haut { display: flex; align-items: center; gap: 12px; }
.tuile .tuile-ico { width: 46px; height: 46px; border-radius: 13px; }
.tuile .nb { margin-left: auto; text-align: right; line-height: 1.1; }
.tuile .nb b { font-size: 26px; font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; color: color-mix(in srgb, var(--c) 80%, var(--encre)); }
.tuile .nb span { display: block; font-size: 11.5px; color: var(--discret); }
.tuile h3 { font-size: 16.5px; font-weight: 650; line-height: 1.25; }
.tuile p { font-size: 13px; color: var(--discret); }
.tuile .pied { margin-top: auto; font-size: 12.5px; font-weight: 600; color: color-mix(in srgb, var(--c) 78%, var(--encre)); display: flex; align-items: center; gap: 4px; }
.tuile .pied .benef { margin-left: auto; color: var(--discret); font-weight: 500; }
.tuile.vide-0 { opacity: .6; }

/* ---------- vue liste ---------- */
.liste { overflow: hidden; }
.liste .rang { display: grid; grid-template-columns: 44px minmax(240px, 2.6fr) minmax(140px, 1.3fr) minmax(110px, .9fr) minmax(120px, 1fr) 96px 22px; gap: 14px; align-items: center; padding: 12px 18px; }
.liste .tete { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--discret); background: var(--surface-2); border-bottom: 1px solid var(--trait); padding-top: 9px; padding-bottom: 9px; }
.liste .tete button { background: none; border: 0; padding: 0; text-transform: inherit; letter-spacing: inherit; color: inherit; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.liste .tete button:hover, .liste .tete button.tri { color: var(--marque); }
.liste .tete svg.i { width: 12px; height: 12px; }
.liste a.rang { text-decoration: none; color: inherit; border-bottom: 1px solid var(--trait); position: relative; transition: background .1s; }
.liste a.rang:last-child { border-bottom: 0; }
.liste a.rang:hover { background: color-mix(in srgb, var(--c) 5%, var(--surface)); }
.liste a.rang::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.rang .titre { font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rang .sous { font-size: 12.5px; color: var(--discret); margin-top: 4px; display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.rang .sous span.porteur { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.rang .col { min-width: 0; }
.rang .col .l2 { font-size: 12.5px; color: var(--discret); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.rang .ages { display: flex; flex-wrap: wrap; gap: 4px; }
.rang .montant { text-align: right; font-weight: 700; }
.rang .montant small { display: block; font-weight: 500; color: var(--discret); font-size: 11.5px; }
.rang .chev { color: var(--trait-fort); }
.liste a.rang:hover .chev { color: var(--c); }

/* ---------- vue blocs ---------- */
.blocs { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.bloc { text-decoration: none; color: inherit; display: flex; flex-direction: column; overflow: hidden; transition: transform .14s, box-shadow .14s, border-color .14s; }
.bloc:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 50%, var(--trait)); box-shadow: 0 16px 34px color-mix(in srgb, var(--c) 18%, transparent); }
.bloc .bandeau { padding: 13px 16px; display: flex; align-items: center; gap: 10px; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 22%, var(--surface)), color-mix(in srgb, var(--c) 6%, var(--surface))); border-bottom: 1px solid color-mix(in srgb, var(--c) 18%, var(--trait)); }
.bloc .bandeau .tuile-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--surface); }
.bloc .bandeau .cat { font-weight: 700; font-size: 13px; color: color-mix(in srgb, var(--c) 80%, var(--encre)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bloc .bandeau .etiq { margin-left: auto; }
.bloc .corps { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bloc h3 { font-size: 16px; font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bloc .desc { font-size: 13px; color: var(--encre-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bloc .meta { display: grid; gap: 5px; font-size: 12.5px; color: var(--discret); margin-top: auto; padding-top: 4px; }
.bloc .meta div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.bloc .meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bloc .meta svg.i { width: 14px; height: 14px; }
.bloc .pied { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--trait); background: var(--surface-2); }
.bloc .pied .ages { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.bloc .pied .montant { margin-left: auto; font-weight: 700; white-space: nowrap; text-align: right; }
.bloc .pied .montant small { font-weight: 500; color: var(--discret); }

/* ---------- fiche action ---------- */
.fiche-haut { border-radius: 20px; padding: 28px 32px 56px; position: relative; overflow: hidden; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 92%, #000) 0%, color-mix(in srgb, var(--c) 68%, #2B1B6B) 100%); color: #fff; box-shadow: 0 18px 40px color-mix(in srgb, var(--c) 26%, transparent); }
.fiche-haut::after { content: ""; position: absolute; right: -70px; top: -90px; width: 300px; height: 300px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .08); }
.fiche-haut .rubans { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; max-width: calc(100% - 260px); }
.fiche-haut .ruban { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .24); padding: 4px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 600; }
.fiche-haut .ruban svg.i { width: 14px; height: 14px; }
.fiche-haut h1 { font-size: 29px; line-height: 1.2; margin: 14px 0 10px; max-width: 980px; position: relative; z-index: 1; }
.fiche-haut .porteur { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .92); position: relative; z-index: 1; flex-wrap: wrap; }
.fiche-haut .actions { position: absolute; right: 24px; top: 22px; display: flex; gap: 8px; z-index: 2; }
.fiche-haut .actions .btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .26); color: #fff; }
.fiche-haut .actions .btn:hover { background: rgba(255, 255, 255, .28); }
.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); margin: -30px 24px 0; position: relative; z-index: 2; }
.chiffres > div { padding: 15px 20px; border-right: 1px solid var(--trait); min-width: 0; }
.chiffres > div:last-child { border-right: 0; }
.chiffres .k { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--discret); display: flex; align-items: center; gap: 6px; }
.chiffres .k svg.i { width: 14px; height: 14px; }
.chiffres .v { font-size: 17px; font-weight: 650; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.chiffres .v.grand { font-size: 24px; font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; color: color-mix(in srgb, var(--c) 80%, var(--encre)); }
.chiffres .v small { font-size: 12px; color: var(--discret); font-weight: 500; }
.fiche-corps { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; margin-top: 22px; align-items: start; }
.bloc-texte { padding: 22px 24px; margin-bottom: 16px; }
.bloc-texte h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bloc-texte h2 .tuile-ico { width: 30px; height: 30px; border-radius: 9px; }
.bloc-texte h2 .tuile-ico svg.i { width: 16px; height: 16px; }
.bloc-texte p { color: var(--encre-2); font-size: 14.5px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.bloc-texte.repli p { max-height: 230px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.bloc-texte .plus { margin-top: 8px; }
.puces { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.puces li { display: flex; gap: 10px; color: var(--encre-2); font-size: 14.5px; overflow-wrap: anywhere; }
.puces li svg.i { margin-top: 3px; width: 16px; height: 16px; color: var(--c); }
.frise { list-style: none; margin: 0; padding: 0 0 0 6px; }
.frise li { position: relative; padding: 0 0 14px 22px; color: var(--encre-2); border-left: 2px solid color-mix(in srgb, var(--c) 25%, var(--trait)); overflow-wrap: anywhere; }
.frise li:last-child { padding-bottom: 0; border-left-color: transparent; }
.frise li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c); box-sizing: border-box; }
.cote > .carte { padding: 18px 20px; margin-bottom: 16px; }
.cote h2 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); margin-bottom: 12px; font-weight: 700; }
.faits { display: grid; gap: 12px; margin: 0; }
.faits div { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.faits svg.i { color: var(--discret); margin-top: 2px; }
.faits dt { font-size: 12px; color: var(--discret); }
.faits dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.faits dd.absent { font-weight: 400; color: var(--discret); }
.contact { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.contact .n { font-weight: 700; font-size: 15px; }
.contact .p { font-size: 12.5px; color: var(--discret); }
.lien-contact { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--trait); border-radius: 10px; text-decoration: none; color: var(--encre); margin-top: 8px; font-weight: 500; overflow-wrap: anywhere; }
.lien-contact:hover { border-color: var(--marque); color: var(--marque); }
.lien-contact svg.i { color: var(--discret); width: 16px; height: 16px; }
.histo { display: grid; gap: 8px; }
.histo a, .histo div { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--trait); text-decoration: none; color: inherit; }
.histo a:hover { border-color: var(--marque); }
.histo .an { font-weight: 800; color: var(--marque); }
.histo .courant { background: var(--marque-pale); border-color: transparent; }
.financements { display: grid; gap: 8px; }
.financements div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.financements div b { margin-left: auto; font-variant-numeric: tabular-nums; }
.financements div i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.suivant { display: flex; gap: 14px; margin-top: 8px; }
.suivant a { flex: 1; padding: 14px 18px; text-decoration: none; color: inherit; min-width: 0; }
.suivant a:hover { border-color: var(--marque); }
.suivant a.droite { text-align: right; }
.suivant small { color: var(--discret); display: block; }
.suivant b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- statistiques ---------- */
.stats-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 18px; }
.stats-tete label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--encre-2); }
.stats-tete .actions { margin-left: auto; display: flex; gap: 8px; }
.ancre { scroll-margin-top: 10px; }
.sommaire-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.sommaire-stats a { padding: 6px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--trait); text-decoration: none; color: var(--encre-2); font-weight: 600; font-size: 13px; }
.sommaire-stats a:hover { border-color: var(--marque); color: var(--marque); }
h2.partie { font-size: 19px; margin: 28px 0 12px; display: flex; align-items: center; gap: 10px; }
h2.partie .tuile-ico { width: 34px; height: 34px; border-radius: 10px; }
.ecart { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.ecart .g { display: flex; justify-content: flex-end; }
.ecart .d { display: flex; justify-content: flex-start; }
.ecart .bar { height: 12px; border-radius: 6px; }
.ecart .g .bar { background: var(--danger); border-radius: 6px 0 0 6px; }
.ecart .d .bar { background: var(--ok); border-radius: 0 6px 6px 0; }
.ecart .axe { border-left: 2px solid var(--trait-fort); height: 22px; }

/* ---------- tableaux ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--discret); font-weight: 600; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--trait); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .id { color: var(--discret); font-variant-numeric: tabular-nums; width: 1%; }
.table .t1 { font-weight: 650; max-width: 420px; }
.table .t2 { font-size: 12.5px; color: var(--discret); }
.table .droite { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .actions { white-space: nowrap; text-align: right; width: 1%; }
.table td.liseré { border-left: 4px solid var(--c); }
.table-defile { overflow: auto; }

/* ---------- administration ---------- */
.onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--trait); margin-bottom: 20px; overflow-x: auto; }
.onglets a { display: flex; align-items: center; gap: 8px; padding: 11px 14px; text-decoration: none; color: var(--discret); font-weight: 600; border-bottom: 2.5px solid transparent; margin-bottom: -1px; border-radius: 8px 8px 0 0; white-space: nowrap; }
.onglets a:hover { color: var(--encre); background: var(--surface-2); }
.onglets a.actif { color: var(--marque); border-bottom-color: var(--marque); }
.onglets a .n { font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--trait); padding: 0 7px; border-radius: 20px; color: var(--encre-2); }
.cartes-pers { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.pers { padding: 18px; }
.pers .haut { display: flex; gap: 12px; align-items: center; }
.pers .haut .n { font-weight: 700; font-size: 15px; }
.pers .haut .p { font-size: 12.5px; color: var(--discret); }
.pers .haut .outils-p { margin-left: auto; display: flex; }
.pers .infos { display: grid; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--encre-2); }
.pers .infos div { display: flex; gap: 8px; align-items: center; overflow-wrap: anywhere; }
.pers .infos svg.i { width: 15px; height: 15px; color: var(--discret); flex: none; }
.pers .pied { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--trait); font-size: 12.5px; color: var(--discret); }
.refs { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
.refs .menu { padding: 8px; }
.refs .menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--encre-2); font-weight: 500; }
.refs .menu a:hover { background: var(--surface-2); }
.refs .menu a.actif { background: var(--marque-pale); color: var(--marque-fonce); font-weight: 650; }
.refs .menu a .n { margin-left: auto; font-size: 12px; color: var(--discret); }
.ajout-rapide { display: grid; grid-template-columns: 1fr 1.5fr 60px auto; gap: 10px; padding: 16px; border-bottom: 1px solid var(--trait); background: var(--surface-2); border-radius: var(--rayon) var(--rayon) 0 0; align-items: end; }
input[type="color"] { width: 44px; height: 38px; border: 1px solid var(--trait-fort); border-radius: 10px; padding: 3px; background: var(--surface); cursor: pointer; }
input[type="color"].pastille-couleur { width: 30px; height: 30px; border-radius: 8px; padding: 2px; }
.donnees { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.donnees .carte { padding: 22px; }
.donnees h2 { font-size: 16px; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.donnees p { color: var(--discret); margin-bottom: 14px; }
.donnees .rangee { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.compteurs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.compteurs div { padding: 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--trait); }
.compteurs b { font-size: 20px; display: block; line-height: 1.2; }
.compteurs span { font-size: 12px; color: var(--discret); }
.interrupteur { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--trait); }
.interrupteur:last-child { border-bottom: 0; }
.interrupteur .txt { flex: 1; }
.interrupteur .txt b { display: block; }
.interrupteur .txt span { font-size: 12.5px; color: var(--discret); }
.inter { position: relative; width: 44px; height: 26px; flex: none; }
.inter input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.inter span { position: absolute; inset: 0; border-radius: 20px; background: var(--trait-fort); transition: background .15s; }
.inter span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.inter input:checked + span { background: var(--marque); }
.inter input:checked + span::after { transform: translateX(18px); }
.inter input:focus-visible + span { outline: 2px solid var(--marque); outline-offset: 2px; }

/* ---------- import de fichiers ---------- */
.depot { display: block; border: 2px dashed var(--trait-fort); border-radius: 16px; padding: 34px 20px; text-align: center; background: var(--surface-2); transition: border-color .15s, background .15s; cursor: pointer; }
.depot:hover, .depot.survol { border-color: var(--marque); background: var(--marque-pale); }
.depot .tuile-ico { margin: 0 auto 12px; width: 56px; height: 56px; border-radius: 16px; }
.depot h3 { font-size: 17px; }
.depot p { color: var(--discret); margin-top: 4px; }
.depot .formats { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
/* photos : formulaire, fiche, liste, blocs, visionneuse */
.galerie-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tuile-img { border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; position: relative; }
.tuile-img.couverture { border-color: var(--marque); box-shadow: 0 0 0 1px var(--marque); }
.tuile-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--surface-2); }
.tuile-img .badge-couv { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--marque); color: #fff; }
.tuile-img input { border: 0; border-top: 1px solid var(--trait); padding: 7px 10px; font-size: 12.5px; background: transparent; color: var(--encre); width: 100%; }
.tuile-img .outils { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 4px 6px 6px; }
.tuile-img .outils small { font-size: 11px; }
.tuile-img .icone-btn.arme { display: inline-flex; align-items: center; width: auto; padding: 0 8px; gap: 4px; font-size: 12px; font-weight: 700; background: var(--danger); color: #fff; }
.depot-images { display: flex; align-items: center; gap: 14px; border: 2px dashed var(--trait-fort); border-radius: 14px; padding: 14px 16px; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.depot-images:hover, .depot-images.survol { border-color: var(--marque); background: var(--marque-pale); }
.depot-images.occupe { opacity: .6; pointer-events: none; }
.depot-images .tuile-ico { --c: var(--marque); }
.depot-images small { display: block; color: var(--discret); font-size: 12.5px; margin-top: 2px; }
.galerie-fiche { padding: 22px 24px; margin-bottom: 16px; }
.galerie-fiche h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.galerie-fiche h2 .tuile-ico { width: 30px; height: 30px; border-radius: 9px; }
.galerie-fiche h2 .tuile-ico svg.i { width: 16px; height: 16px; }
.galerie-fiche h2 small { font-weight: 600; color: var(--discret); }
.galerie { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 130px; gap: 8px; }
.galerie.n1 { grid-template-columns: 1fr; grid-auto-rows: 320px; }
.galerie.n2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 230px; }
.galerie.n3 > :first-child, .galerie.n4 > :first-child, .galerie.n5 > :first-child { grid-column: span 2; grid-row: span 2; }
.galerie.n3 { grid-template-columns: 2fr 1fr 1fr; }
.galerie button { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.galerie img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.galerie button:hover img { transform: scale(1.04); }
.galerie button span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 7px; font-size: 12px; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liste .tuile-ico.photo { overflow: hidden; padding: 0; background: var(--surface-2); }
.liste .tuile-ico.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bloc .photo-bloc { height: 150px; position: relative; background: var(--surface-2); }
.bloc .photo-bloc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bloc .photo-bloc span { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .55); padding: 2px 8px; border-radius: 20px; }
.bloc .photo-bloc svg.i { width: 13px; height: 13px; }
.visionneuse { position: fixed; inset: 0; background: rgba(8, 6, 18, .92); display: grid; place-items: center; padding: 40px 80px; z-index: 1; }
.visionneuse figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; }
.visionneuse img { max-width: calc(100vw - 160px); max-height: calc(100vh - 140px); object-fit: contain; border-radius: 10px; box-shadow: 0 20px 70px rgba(0, 0, 0, .6); pointer-events: auto; }
.visionneuse figcaption { color: #fff; font-size: 14px; display: flex; gap: 14px; align-items: baseline; }
.visionneuse figcaption span { color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }
.visionneuse .icone-btn { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .2); width: 44px; height: 44px; }
.visionneuse .icone-btn:hover { background: rgba(255, 255, 255, .25); }
.visionneuse .fermer-v { top: 18px; right: 18px; }
.visionneuse .nav-v { top: 50%; transform: translateY(-50%); }
.visionneuse .nav-v.g { left: 18px; }
.visionneuse .nav-v.d { right: 18px; }
.depot .formats span { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--trait); color: var(--encre-2); }
.fichier-choisi { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--trait); margin-top: 14px; }
.chiffres-import { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 16px; }
.chiffres-import div { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--trait); border-top: 3px solid var(--c); }
.chiffres-import b { display: block; font-size: 22px; line-height: 1.2; }
.chiffres-import span { font-size: 12px; color: var(--discret); }
.statut { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.statut.nouveau { background: var(--ok-pale); color: var(--ok); }
.statut.maj { background: var(--attention-pale); color: var(--attention); }
.statut.identique { background: var(--surface-2); color: var(--discret); border: 1px solid var(--trait); }
.ligne-import td { vertical-align: top; }
.ligne-import .details { font-size: 12.5px; color: var(--encre-2); margin-top: 6px; display: grid; gap: 3px; }
.ligne-import .details .chg { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }
.ligne-import .details .chg s { color: var(--discret); }
.ligne-import .details .av { color: var(--attention); }
.ligne-import.decoche { opacity: .5; }
.case { width: 18px; height: 18px; accent-color: var(--marque); cursor: pointer; }

/* ---------- formulaires ---------- */
.champ { display: grid; gap: 5px; min-width: 0; }
.champ > span { font-size: 12.5px; font-weight: 600; color: var(--encre-2); }
.champ > span i { color: var(--magenta); font-style: normal; }
.champ small { color: var(--discret); font-size: 12px; }
.champ input:not([type="color"]):not([type="checkbox"]):not([type="radio"]), .champ select, .champ textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--trait-fort); border-radius: 10px; background: var(--surface); }
.champ textarea { resize: vertical; min-height: 78px; line-height: 1.5; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--marque); box-shadow: 0 0 0 3px color-mix(in srgb, var(--marque) 18%, transparent); }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grille-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grille-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sec-form { padding: 20px 26px; border-bottom: 1px solid var(--trait); display: grid; gap: 14px; }
.sec-form > h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--marque); display: flex; align-items: center; gap: 8px; }
.sec-form > h3 b { width: 22px; height: 22px; border-radius: 50%; background: var(--marque-pale); display: grid; place-items: center; font-size: 12px; letter-spacing: 0; }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix label { position: relative; }
.choix input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choix span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 20px; border: 1px solid var(--trait-fort); background: var(--surface); font-weight: 500; }
.choix span i { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--marque)); }
.choix input:checked + span { background: color-mix(in srgb, var(--c, var(--marque)) 16%, var(--surface)); border-color: var(--c, var(--marque)); color: color-mix(in srgb, var(--c, var(--marque)) 80%, var(--encre)); font-weight: 650; }
.choix input:focus-visible + span { outline: 2px solid var(--marque); outline-offset: 2px; }
.lignes-fin { display: grid; gap: 8px; }
.lignes-fin .ligne { display: grid; grid-template-columns: 1fr 160px 36px; gap: 8px; }
.erreur-form { color: var(--danger); font-size: 13px; font-weight: 600; min-height: 18px; }

/* ---------- fenêtres et tiroir ---------- */
.voile { position: fixed; inset: 0; background: rgba(14, 10, 32, .5); backdrop-filter: blur(3px); z-index: 50; display: grid; place-items: center; animation: fondu .16s; }
@keyframes fondu { from { opacity: 0; } }
.fenetre { background: var(--surface); border-radius: 18px; box-shadow: var(--ombre-forte); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; animation: zoom .18s ease-out; border: 1px solid var(--trait); }
.fenetre.large { width: min(640px, calc(100vw - 32px)); }
@keyframes zoom { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.fenetre .f-tete { padding: 22px 24px 0; display: flex; gap: 14px; align-items: flex-start; }
.fenetre .f-tete h2 { font-size: 19px; }
.fenetre .f-tete p { color: var(--discret); margin-top: 3px; }
.fenetre .f-corps { padding: 18px 24px; display: grid; gap: 14px; }
.fenetre .f-pied { padding: 0 24px 22px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.liste-coche { max-height: 300px; overflow: auto; border: 1px solid var(--trait); border-radius: 12px; }
.liste-coche label { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--trait); }
.liste-coche label:last-child { border-bottom: 0; }
.tiroir { position: fixed; top: 0; right: 0; bottom: 0; width: min(820px, 100vw); background: var(--surface); box-shadow: var(--ombre-forte); display: flex; flex-direction: column; animation: glisse .22s ease-out; }
@keyframes glisse { from { transform: translateX(40px); opacity: 0; } }
.tiroir .t-tete { padding: 18px 26px; border-bottom: 1px solid var(--trait); display: flex; align-items: center; gap: 12px; }
.tiroir .t-tete h2 { font-size: 19px; }
.tiroir .t-tete p { color: var(--discret); font-size: 13px; }
.tiroir .t-tete .icone-btn { margin-left: auto; }
.tiroir form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tiroir .t-corps { overflow: auto; flex: 1; }
.tiroir .t-pied { padding: 14px 26px; border-top: 1px solid var(--trait); display: flex; gap: 10px; align-items: center; background: var(--surface-2); }
.tiroir .t-pied .erreur-form { flex: 1; }
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 300; display: grid; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: #1A1630; color: #fff; box-shadow: var(--ombre-forte); animation: zoom .2s; max-width: 460px; }
.toast svg.i { color: #4AD3A2; }
.toast.erreur svg.i { color: #FF8B8B; }

/* ---------- mode présentation ---------- */
.pres { position: fixed; inset: 0; z-index: 200; background: #0D0A1A; color: #fff; display: flex; flex-direction: column; animation: fondu .2s; }
.pres-scene { flex: 1; display: grid; place-items: center; overflow: hidden; position: relative; }
.diapo { width: 1600px; height: 900px; position: absolute; left: 50%; top: 50%; transform-origin: center; border-radius: 22px; overflow: hidden; background: #fff; color: #1A1630; box-shadow: 0 30px 90px rgba(0, 0, 0, .55); display: flex; flex-direction: column; }
.diapo.entre { animation: diapo .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes diapo { from { opacity: 0; filter: blur(4px); } }
.pres-barre { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: rgba(255, 255, 255, .04); border-top: 1px solid rgba(255, 255, 255, .08); }
.pres-barre button, .pres-barre select { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff; border-radius: 9px; padding: 7px 12px; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.pres-barre button:hover { background: rgba(255, 255, 255, .16); }
.pres-barre select option { color: #1A1630; }
.pres-barre .pos { font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .75); min-width: 70px; text-align: center; }
.pres-barre .espace { flex: 1; }
.pres-progres { height: 3px; background: rgba(255, 255, 255, .08); }
.pres-progres div { height: 100%; background: linear-gradient(90deg, #8C6BFF, #FF6B8E); transition: width .3s; }
.pres-panneau { position: absolute; right: 16px; top: 16px; bottom: 16px; width: 330px; background: #fff; color: #1A1630; border-radius: 18px; padding: 18px; overflow: auto; z-index: 5; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); display: grid; gap: 12px; align-content: start; animation: glisse .2s; }
.pres-panneau h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pres-panneau .champ select { width: 100%; padding: 8px 10px; border: 1px solid #D3CFE2; border-radius: 10px; background: #fff; color: #1A1630; }
.pres-grille { position: absolute; inset: 0; background: rgba(13, 10, 26, .96); z-index: 6; overflow: auto; padding: 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; align-content: start; animation: fondu .2s; }
.pres-grille button { border: 2px solid transparent; border-radius: 12px; padding: 0; background: none; overflow: hidden; text-align: left; color: #fff; }
.pres-grille button.courante { border-color: #8C6BFF; }
.pres-grille .mini { height: 146px; overflow: hidden; position: relative; border-radius: 10px; background: #fff; }
.pres-grille .mini .diapo { transform: scale(.1625); transform-origin: top left; left: 0; top: 0; box-shadow: none; border-radius: 0; animation: none; }
.pres-grille span { display: block; font-size: 12.5px; padding: 6px 2px; color: rgba(255, 255, 255, .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* contenu des diapositives (dimensions fixes 1600 × 900, mises à l'échelle) */
.d-plein { flex: 1; display: flex; flex-direction: column; padding: 70px 90px; position: relative; }
.d-couverture { background: radial-gradient(1200px 500px at 100% 0%, rgba(18, 181, 198, .5), transparent 60%), linear-gradient(125deg, #4A34B8 0%, #7C3AAE 50%, #D62B55 100%); color: #fff; justify-content: center; }
.d-couverture::after { content: ""; position: absolute; width: 700px; height: 700px; border-radius: 50%; border: 90px solid rgba(255, 255, 255, .07); right: -200px; bottom: -380px; }
.d-couverture .sur { font-size: 26px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: rgba(255, 255, 255, .8); }
.d-couverture h1 { font-size: 96px; line-height: 1.02; margin: 18px 0 22px; max-width: 1100px; }
.d-couverture p { font-size: 30px; color: rgba(255, 255, 255, .9); max-width: 1000px; }
.d-couverture .logos { position: absolute; right: 90px; top: 70px; background: #fff; border-radius: 22px; padding: 18px 26px; display: flex; align-items: center; gap: 22px; }
.d-couverture .logos img:first-child { height: 120px; }
.d-couverture .logos img:last-child { height: 54px; }
.d-couverture .filtres { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.d-couverture .filtres span { font-size: 22px; padding: 8px 18px; border-radius: 30px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); font-weight: 600; }
.d-tete { display: flex; align-items: center; gap: 22px; margin-bottom: 40px; }
.d-tete .num { font-size: 22px; font-weight: 800; color: var(--c); letter-spacing: .1em; text-transform: uppercase; }
.d-tete h2 { font-size: 56px; line-height: 1.08; }
.d-tete .logo-mini { margin-left: auto; height: 64px; }
.d-pied { position: absolute; left: 90px; right: 90px; bottom: 34px; display: flex; justify-content: space-between; font-size: 18px; color: #8E88AD; }
.d-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.d-kpi { border-radius: 26px; padding: 34px 38px; background: color-mix(in srgb, var(--c) 9%, #fff); border: 2px solid color-mix(in srgb, var(--c) 18%, #fff); }
.d-kpi b { display: block; font: 800 76px/1 "Segoe UI Variable Display", "Segoe UI", sans-serif; color: color-mix(in srgb, var(--c) 85%, #1A1630); }
.d-kpi span { display: block; font-size: 26px; margin-top: 12px; color: #48435F; font-weight: 600; }
.d-kpi small { display: block; font-size: 20px; margin-top: 6px; color: #6E6987; }
.d-barres { display: grid; gap: 22px; }
.d-barre { display: grid; grid-template-columns: 420px 1fr 200px; gap: 24px; align-items: center; font-size: 26px; }
.d-barre .nom { font-weight: 700; display: flex; align-items: center; gap: 14px; }
.d-barre .nom i { width: 20px; height: 20px; border-radius: 6px; background: var(--c); flex: none; }
.d-barre .piste { height: 36px; border-radius: 18px; background: #F3F2F8; overflow: hidden; }
.d-barre .rempli { height: 100%; border-radius: 18px; background: var(--c); }
.d-barre .val { text-align: right; font-weight: 800; }
.d-barre .val small { display: block; font-size: 18px; color: #6E6987; font-weight: 600; }
.d-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; flex: 1; }
.d-trio > div h3 { font-size: 30px; margin-bottom: 22px; }
.d-anneau { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.d-anneau svg { width: 280px; height: 280px; }
.d-anneau .legende-d { display: grid; gap: 10px; width: 100%; }
.d-anneau .legende-d div { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; align-items: center; font-size: 21px; }
.d-anneau .legende-d i { width: 18px; height: 18px; border-radius: 5px; background: var(--c); }
.d-anneau .legende-d b { font-variant-numeric: tabular-nums; }
.d-chapitre { background: linear-gradient(125deg, color-mix(in srgb, var(--c) 95%, #000), color-mix(in srgb, var(--c) 65%, #2B1B6B)); color: #fff; justify-content: center; }
.d-chapitre .sur { font-size: 24px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .8; }
.d-chapitre h1 { font-size: 92px; line-height: 1.04; margin: 14px 0 28px; }
.d-chapitre .stats { display: flex; gap: 60px; font-size: 26px; }
.d-chapitre .stats b { display: block; font-size: 64px; line-height: 1; font-weight: 800; }
.d-chapitre .liste-actions { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 40px; font-size: 22px; max-width: 1350px; }
.d-chapitre .liste-actions div { display: flex; gap: 14px; align-items: baseline; border-bottom: 1px solid rgba(255, 255, 255, .2); padding-bottom: 8px; }
.d-chapitre .liste-actions b { margin-left: auto; white-space: nowrap; }
.d-action .bande { height: 16px; background: var(--c); }
.d-action .d-plein { padding-top: 54px; min-height: 0; overflow: hidden; }
.d-action .chips { display: flex; gap: 12px; flex-wrap: wrap; }
.d-action .chips span { font-size: 20px; font-weight: 700; padding: 7px 16px; border-radius: 30px; background: color-mix(in srgb, var(--k, var(--c)) 13%, #fff); color: color-mix(in srgb, var(--k, var(--c)) 85%, #1A1630); }
.d-action .chips .suite { --k: #6E6987; }
.d-action h1 { font-size: 60px; line-height: 1.08; margin: 22px 0 10px; max-width: 1420px; }
.d-action h1.long { font-size: 50px; }
.d-action h1.tres-long { font-size: 42px; }
.d-action .porteur { font-size: 26px; color: #6E6987; }
.d-action .porteur b { color: #1A1630; }
.d-action .corps-d { display: grid; grid-template-columns: minmax(0, 1fr) 470px; grid-template-rows: minmax(0, 1fr); gap: 50px; margin-top: 34px; flex: 1; min-height: 0; margin-bottom: 26px; }
.d-action .texte-d { font-size: 24px; line-height: 1.55; color: #48435F; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; min-height: 0; }
.d-action .gauche-d { display: flex; flex-direction: column; gap: 26px; min-height: 0; min-width: 0; }
.d-action .gauche-d .texte-d { flex: 0 1 auto; }
.d-action .couv-d { flex: 1 0 280px; min-height: 280px; border-radius: 18px; overflow: hidden; background: #F3F2F8; }
.d-action .couv-d img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-suite .corps-d { grid-template-columns: minmax(0, 1fr); margin-top: 26px; }
.d-suite .texte-d { column-count: 2; column-gap: 64px; column-fill: balance; }
.d-action .chiffres-d { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; min-height: 0; overflow: hidden; }
.d-action .chiffres-d div { border-radius: 18px; padding: 16px 22px; background: #F8F7FC; border: 1px solid #E5E2EE; min-width: 0; }
.d-action .chiffres-d .large { grid-column: span 2; }
.d-action .chiffres-d span { font-size: 16px; color: #6E6987; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.d-action .chiffres-d b { display: block; font-size: 40px; line-height: 1.15; margin-top: 4px; color: color-mix(in srgb, var(--c) 80%, #1A1630); overflow-wrap: anywhere; }
.d-action .chiffres-d b.moyen { font-size: 25px; }
.d-action .chiffres-d b small { font-size: 20px; color: #6E6987; font-weight: 600; }
.d-action .chiffres-d .contact-d { background: color-mix(in srgb, var(--c) 7%, #fff); border-color: color-mix(in srgb, var(--c) 22%, #fff); }
.d-action .chiffres-d .contact-d em { display: block; font-style: normal; font-size: 18px; color: #6E6987; margin-top: 4px; overflow-wrap: anywhere; }
.d-photos .mur { flex: 1; min-height: 0; margin: 26px 0 40px; display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.d-photos .mur.n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.d-photos .mur.n2 { grid-template-rows: 1fr; }
.d-photos .mur.n3 figure:first-child { grid-row: span 2; }
.d-photos figure { margin: 0; position: relative; border-radius: 18px; overflow: hidden; background: #F3F2F8; min-height: 0; }
.d-photos figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-photos figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 22px 14px; font-size: 20px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.d-fin { background: linear-gradient(125deg, #171229, #2A2152); color: #fff; justify-content: center; align-items: center; text-align: center; }
.d-fin h1 { font-size: 110px; }
.d-fin p { font-size: 28px; opacity: .8; margin-top: 18px; }
.d-fin .credit-d { position: absolute; bottom: 44px; font-size: 18px; opacity: .6; }

@media (max-width: 1280px) {
  .graph, .graph.l6 { grid-column: span 6; }
  .graph.l8 { grid-column: span 12; }
  .liste .rang { grid-template-columns: 44px minmax(200px, 2.4fr) minmax(120px, 1.1fr) minmax(100px, .9fr) 90px 22px; }
  .liste .rang .c-ages { display: none; }
  .bandeau-tdb .logos { display: none; }
  .chiffres-import { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1050px) {
  .fiche-corps, .donnees { grid-template-columns: 1fr; }
  .graph, .graph.l6, .graph.l8 { grid-column: span 12; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .barre { display: none; }
  .chiffres { grid-template-columns: 1fr 1fr; }
  .refs, .grille-3, .grille-4 { grid-template-columns: 1fr; }
}

@media print {
  body { overflow: visible; background: #fff; }
  .barre, .entete, .fiche-haut .actions, .suivant, .toasts, .stats-tete .actions, .sommaire-stats, .outils, .resume, .bandeau-tdb .boutons, .non-imprime { display: none !important; }
  .app, .scene { display: block; height: auto; }
  .contenu { overflow: visible; padding: 0; }
  .carte { box-shadow: none; break-inside: avoid; }
  .graph { break-inside: avoid; }
  .fiche-haut, .bandeau-tdb, .kpi, .rempli, .bv, .empile div, .pastille, .tuile-ico { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fiche-corps { grid-template-columns: 1fr 260px; }
  .bloc-texte.repli p { max-height: none; -webkit-mask-image: none; mask-image: none; }
  .grille-graph { grid-template-columns: repeat(2, 1fr); }
  .graph, .graph.l6, .graph.l8, .graph.l12 { grid-column: span 1; }
}

/* ---------- version web : connexion, comptes, copies de sécurité ---------- */
html.acces-ouvert .app { visibility: hidden; }
#ecran-acces { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 24px; overflow: auto;
  background: radial-gradient(900px 500px at 100% 0%, rgba(18, 181, 198, .35), transparent 60%), linear-gradient(125deg, #2B1F7A 0%, #5A2D8C 50%, #B0244C 100%); }
.acces-carte { width: min(440px, 100%); background: var(--surface); color: var(--encre); border-radius: 22px; padding: 30px 30px 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.acces-logos { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 18px; padding: 10px 14px; background: #fff; border-radius: 14px; }
.acces-logos img:first-child { height: 64px; }
.acces-logos img:last-child { height: 30px; }
.acces-carte h1 { font-size: 22px; text-align: center; }
.acces-sous { text-align: center; color: var(--discret); margin: 6px 0 18px; font-size: 14px; }
.acces-form { display: grid; gap: 12px; }
.acces-form .btn.grand { justify-content: center; padding: 12px; font-size: 15px; }
.acces-aide { text-align: center; font-size: 12.5px; margin: 0; }
.acces-credit { text-align: center; font-size: 11.5px; color: var(--discret); margin-top: 18px; }
.liste-comptes { padding: 0; overflow: auto; }
.liste-comptes .contact { display: flex; align-items: center; gap: 10px; }
.liste-comptes code { font-size: 12.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.liste-comptes tr.inactif td { opacity: .55; }
.outils-ligne { white-space: nowrap; text-align: right; }
.case { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13.5px; }
.liste-sauvegardes ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.liste-sauvegardes li { display: grid; grid-template-columns: 130px 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--trait); border-radius: 10px; font-size: 13px; }
@media (max-width: 860px) { .liste-sauvegardes li { grid-template-columns: 1fr auto; } }
