/* Chantiplan dans le navigateur */
:root {
  --fond: #F4F6F8; --papier: #ffffff; --texte: #1f2a37; --doux: #5b6b7d; --trait: #dde3ea;
  --bleu: #3a6ea5; --bleu-fonce: #2c5583; --bleu-clair: #e6eef7; --sur-bleu: #ffffff;
  --vert: #2f7f5f; --vert-clair: #e2f3ea; --ambre: #8a4f06; --ambre-clair: #fbf0dc;
  --rouge: #b42318; --rouge-clair: #fdecea; --lateral: #2B3A4A; --lateral-texte: #D5DEE8; --lateral-actif: #38495C; --accent: #3C9D93;
  --rayon: 10px; --ombre: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #1E222A; --papier: #262B35; --texte: #E2E8F0; --doux: #8D99A8; --trait: #333A46;
    --bleu: #7FA8DA; --bleu-fonce: #A9C6EA; --bleu-clair: #2A3446; --sur-bleu: #10161F;
    --vert: #6fcf9f; --vert-clair: #15302a; --ambre: #f0b25c; --ambre-clair: #33270f;
    --rouge: #f19a92; --rouge-clair: #3a1d1b; --lateral: #171A20; --lateral-texte: #B8C2CF; --lateral-actif: #232831; --accent: #4FB3A8;
    --ombre: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #1E222A; --papier: #262B35; --texte: #E2E8F0; --doux: #8D99A8; --trait: #333A46;
  --bleu: #7FA8DA; --bleu-fonce: #A9C6EA; --bleu-clair: #2A3446; --sur-bleu: #10161F;
  --vert: #6fcf9f; --vert-clair: #15302a; --ambre: #f0b25c; --ambre-clair: #33270f;
  --rouge: #f19a92; --rouge-clair: #3a1d1b; --lateral: #171A20; --lateral-texte: #B8C2CF; --lateral-actif: #232831; --accent: #4FB3A8;
  --ombre: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fond); color: var(--texte); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--bleu); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; }
.chargement { padding: 32px; color: var(--doux); }
.doux { color: var(--doux); }
.petit { font-size: .9rem; }
[hidden] { display: none !important; }

/* ---- cadre ---- */
.cadre { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.lateral { background: var(--lateral); color: var(--lateral-texte); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 10px 24px; }
.marque { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; padding: 6px 8px 16px; }
.marque img { width: 34px; height: 34px; border-radius: 6px; background: #fff; }
.marque span { display: grid; min-width: 0; }
.marque small { color: var(--lateral-texte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-menu { font-size: .72rem; letter-spacing: .08em; font-weight: 700; opacity: .65; padding: 14px 10px 6px; }
.menu .entree { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 0; background: none;
  color: var(--lateral-texte); text-decoration: none; text-align: left; cursor: pointer; }
.menu .entree svg { width: 19px; height: 19px; flex: none; }
.menu .entree:hover { background: var(--lateral-actif); color: #fff; }
.menu .entree { border-left: 3px solid transparent; border-radius: 0 8px 8px 0; }
.menu .entree[aria-current="page"] { background: var(--lateral-actif); color: #fff; border-left-color: var(--accent); font-weight: 600; }
.menu .groupe .chevron { margin-left: auto; transition: transform .15s; }
.menu .groupe[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.menu .enfant { padding-left: 39px; font-size: .94rem; }
.principal { min-width: 0; display: flex; flex-direction: column; }
.haut { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--papier); border-bottom: 1px solid var(--trait); position: sticky; top: 0; z-index: 5; }
.titre-page { font-size: 1.3rem; flex: 1; min-width: 0; }
.outils { display: flex; align-items: center; gap: 8px; }
.ouvrir-menu { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.ouvrir-menu svg, .cloche svg { width: 24px; height: 24px; }
.cloche { position: relative; color: var(--texte); padding: 6px; display: inline-flex; }
.cloche .compteur { position: absolute; top: 0; right: -2px; background: var(--rouge); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 0 5px; min-width: 18px; text-align: center; }
.zone-compte { position: relative; }
.compte { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--trait); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--bleu); color: var(--sur-bleu); display: grid; place-items: center; font-weight: 700; }
.menu-compte { position: absolute; right: 0; top: calc(100% + 6px); background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: 0 8px 24px rgba(0,0,0,.15); min-width: 240px; padding: 6px; display: grid; z-index: 10; }
.menu-compte a, .menu-compte button { padding: 9px 12px; border-radius: 6px; text-decoration: none; color: var(--texte); background: none; border: 0; text-align: left; cursor: pointer; }
.menu-compte a:hover, .menu-compte button:hover { background: var(--bleu-clair); }
.contenu { padding: 24px; display: grid; gap: 18px; align-content: start; max-width: 1400px; width: 100%; }
.contenu:focus { outline: none; }

/* ---- éléments ---- */
.carte { background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 18px 20px; display: grid; gap: 14px; box-shadow: var(--ombre); min-width: 0; }
.carte h2 { font-size: 1.1rem; }
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--bleu); color: var(--sur-bleu); border: 1px solid var(--bleu);
  border-radius: 8px; padding: 8px 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.bouton:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); }
.bouton.secondaire { background: transparent; color: var(--bleu); }
.bouton.secondaire:hover { background: var(--bleu-clair); }
.bouton.danger { background: transparent; color: var(--rouge); border-color: var(--rouge); }
.bouton.danger:hover { background: var(--rouge-clair); }
.bouton.petit { padding: 4px 10px; font-size: .88rem; }
.bouton.large { width: 100%; padding: 11px; }
.bouton:disabled { opacity: .55; cursor: default; }
.barre-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.recherche { flex: 1 1 260px; max-width: 420px; }
input, select, textarea { background: var(--papier); border: 1px solid var(--trait); border-radius: 8px; padding: 8px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--bleu); outline-offset: 1px; }
.case { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.pastille { display: inline-block; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: var(--fond); color: var(--doux); border: 1px solid var(--trait); white-space: nowrap; }
.pastille.bleu { background: var(--bleu-clair); color: var(--bleu); border-color: transparent; }
.pastille.vert { background: var(--vert-clair); color: var(--vert); border-color: transparent; }
.pastille.ambre { background: var(--ambre-clair); color: var(--ambre); border-color: transparent; }
.pastille.rouge { background: var(--rouge-clair); color: var(--rouge); border-color: transparent; }
.message { border-radius: 8px; padding: 12px 14px; background: var(--bleu-clair); }
.message.erreur { background: var(--rouge-clair); color: var(--rouge); }
.vide { color: var(--doux); padding: 8px 0; }
.retour { text-decoration: none; font-weight: 600; justify-self: start; }
.bonjour { font-size: 1.15rem; font-weight: 600; margin: 0; }

/* ---- tableaux ---- */
.defile { overflow-x: auto; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--papier); }
.carte .defile { border-radius: 8px; }
table.liste { width: 100%; border-collapse: collapse; }
.liste th { text-align: left; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); background: var(--fond); padding: 9px 12px; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.liste td { padding: 9px 12px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.liste tr:last-child td { border-bottom: 0; }
.liste .nombre { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.liste .fort { font-weight: 600; }
.liste tr.cliquable { cursor: pointer; }
.liste tr.cliquable:hover td { background: var(--bleu-clair); }
.liste td select { padding: 4px 6px; }

/* ---- fiches ---- */
.entete-fiche { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; }
.entete-fiche h2 { font-size: 1.35rem; }
.infos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 20px; }
.info { display: grid; gap: 2px; min-width: 0; }
.info span { font-size: .82rem; color: var(--doux); }
.info strong { font-weight: 600; overflow-wrap: anywhere; }
.totaux { display: grid; gap: 4px; justify-self: end; min-width: min(300px, 100%); }
.totaux div { display: flex; justify-content: space-between; gap: 24px; }
.totaux .ttc { font-size: 1.15rem; border-top: 1px solid var(--trait); padding-top: 6px; }
ul.simple { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* ---- tableau de bord ---- */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tuile { background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px 18px; display: grid; gap: 4px; text-decoration: none; color: var(--texte); box-shadow: var(--ombre); }
.tuile:hover { border-color: var(--bleu); }
.tuile .titre { font-size: .88rem; color: var(--doux); }
.tuile strong { font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.tuile small { color: var(--doux); }
.tuile.alerte strong { color: var(--rouge); }
.tuiles.kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tuiles.kpi.colonnes-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tuiles.kpi .tuile { padding: 12px 16px; gap: 2px; }
.tuiles.kpi .tuile .titre { font-weight: 600; }
.tuiles.kpi .tuile strong { font-size: 1.6rem; font-weight: 600; }
.bas-tableau { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; align-items: start; }
.bas-tableau.seul { grid-template-columns: minmax(0, 1fr); }
.libelle-kpi { font-size: .95rem; font-weight: 600; color: var(--doux); }
.entete-carte { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.carte-jour { gap: 8px; }
.carte-jour .libelle-kpi + * { margin-bottom: 8px; }
.graphe-ca { width: 100%; height: auto; display: block; }
.graphe-ca .grille { stroke: var(--trait); stroke-width: 1; }
.graphe-ca .axe { fill: var(--doux); font-size: 11.5px; }
.graphe-ca .valeur { fill: var(--texte); font-size: 12px; font-weight: 600; }
.graphe-ca .colonne { fill: var(--bleu); }
.graphe-ca .survol { fill: transparent; }
.graphe-ca g:hover .survol { fill: var(--bleu-clair); opacity: .6; }
ul.a-faire { list-style: none; margin: 0; padding: 0; }
ul.a-faire li { padding: 8px 4px; border-bottom: 1px solid var(--trait); }
ul.a-faire li:last-child { border-bottom: 0; }
ul.a-faire a { color: var(--texte); text-decoration: none; display: block; }
ul.a-faire a:hover { color: var(--bleu); }

/* ---- interrupteur glissant clair / sombre (comme le logiciel PC) ---- */
.interrupteur-theme { width: 54px; height: 28px; border-radius: 14px; border: 0; padding: 0; background: #CBD5E0; position: relative; cursor: pointer; flex: none; transition: background .18s; }
.interrupteur-theme .curseur { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #F6C453; color: #7A5A00;
  display: grid; place-items: center; font-size: 13px; line-height: 1; transition: transform .18s ease-in-out, background .18s; }
.interrupteur-theme .lune { display: none; }
.interrupteur-theme[aria-checked="true"] { background: #3A4658; }
.interrupteur-theme[aria-checked="true"] .curseur { transform: translateX(26px); background: #DCE4F0; color: #3A4658; }
.interrupteur-theme[aria-checked="true"] .soleil { display: none; }
.interrupteur-theme[aria-checked="true"] .lune { display: inline; }
.interrupteur-theme:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }

/* ---- droits par rang ---- */
table.droits { width: 100%; border-collapse: collapse; }
.droits th, .droits td { padding: 7px 10px; border-bottom: 1px solid var(--trait); text-align: left; }
.droits th { font-size: .82rem; color: var(--doux); background: var(--fond); white-space: nowrap; }
.droits .centre { text-align: center; }
.droits tr:last-child td { border-bottom: 0; }
.droits input { width: 18px; height: 18px; }

.barres { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; height: 200px; align-items: end; }
.barre { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; gap: 4px; }
.barre .colonne { align-self: end; background: var(--bleu); border-radius: 6px 6px 0 0; min-height: 2px; }
.barre .montant, .barre .libelle { font-size: .8rem; color: var(--doux); white-space: nowrap; }

/* ---- formulaires ---- */
.grille-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.champ { display: grid; gap: 4px; align-content: start; }
.champ.large { grid-column: 1 / -1; }
.champ label { font-weight: 600; font-size: .92rem; }
.champ small { color: var(--doux); font-size: .82rem; }
.champ.case { display: flex; grid-column: 1 / -1; }

/* ---- fenêtres ---- */
dialog.fenetre { border: 0; border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--papier); color: var(--texte); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
dialog.fenetre.large { width: min(820px, calc(100vw - 24px)); }
dialog.fenetre::backdrop { background: rgba(10, 16, 24, .45); }
.tete-fenetre { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--trait); }
.tete-fenetre .fermer { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--doux); }
.corps-fenetre { padding: 18px 20px; overflow-y: auto; max-height: calc(100vh - 200px); display: grid; gap: 12px; }
.pied-fenetre { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--trait); }
.choix-liste { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.choix { display: flex; justify-content: space-between; gap: 12px; text-align: left; padding: 9px 12px; border: 1px solid var(--trait); border-radius: 8px; background: var(--papier); cursor: pointer; }
.choix:hover { border-color: var(--bleu); }
.choix[aria-pressed="true"] { border-color: var(--bleu); background: var(--bleu-clair); }
ul.problemes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

/* ---- notifications, annonces ---- */
.liste-notifs { display: grid; gap: 8px; }
.notif { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px 16px; }
.notif p { margin: 2px 0; }
.notif.non-lue { border-left: 4px solid var(--bleu); }
#annonces { position: fixed; bottom: 18px; right: 18px; display: grid; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 36px)); }
.annonce { background: var(--texte); color: var(--papier); padding: 12px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .4s; }
.annonce.erreur { background: var(--rouge); color: #fff; }
.annonce.part { opacity: 0; }
.bientot { max-width: 640px; }

/* ---- équipe : semaines, plannings, onglets ---- */
.pile { display: grid; gap: 14px; min-width: 0; }
.onglets { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--trait); }
.onglet { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--doux); cursor: pointer; }
.onglet[aria-selected="true"] { color: var(--bleu); border-bottom-color: var(--bleu); }
.nav-semaine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nav-semaine .bouton { min-width: 38px; }
.nav-semaine input[type="date"] { width: auto; }
.defile.planning { overflow-x: auto; }
.grille-semaine { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; table-layout: fixed; }
.grille-semaine.materiel { min-width: 0; }
.grille-semaine th, .grille-semaine td { border-bottom: 1px solid var(--trait); border-right: 1px solid var(--trait); padding: 6px; vertical-align: top; text-align: left; }
.grille-semaine thead th { background: var(--fond); font-size: .85rem; position: sticky; top: 0; }
.grille-semaine th.jour span { display: block; font-weight: 700; }
.grille-semaine th.jour small { display: block; font-weight: 400; color: var(--doux); font-size: .75rem; }
.grille-semaine th.ferie, .grille-semaine td.ferie { background: var(--ambre-clair); }
.grille-semaine th.vacances small { color: var(--vert); }
.grille-semaine th.aujourdhui { color: var(--bleu); box-shadow: inset 0 -3px 0 var(--bleu); }
.grille-semaine th.personne { width: 150px; background: var(--papier); font-weight: 600; position: sticky; left: 0; z-index: 1; }
.grille-semaine th.personne small { display: block; font-weight: 400; color: var(--doux); font-size: .78rem; }
.grille-semaine.materiel th.personne { width: 190px; }
.grille-semaine .cellule { cursor: pointer; min-height: 52px; height: 52px; }
.grille-semaine .cellule:hover, .grille-semaine .cellule:focus-visible { background: var(--bleu-clair); outline: none; }
.grille-semaine .etroit { width: 34px; padding: 4px 2px; text-align: center; }
.grille-semaine th.weekend { color: var(--doux); }
.grille-semaine .cellule.etroit { height: 36px; min-height: 0; }
.grille-semaine .cellule.occupee { background: var(--bleu); }
.grille-semaine .cellule.occupee:hover { background: var(--bleu-fonce); }
.grille-semaine .cellule.hs { background: repeating-linear-gradient(45deg, var(--fond), var(--fond) 4px, var(--papier) 4px, var(--papier) 8px); cursor: default; }
.grille-semaine .etiquette { display: block; font-size: .7rem; font-weight: 700; color: var(--sur-bleu); white-space: nowrap; overflow: visible; text-align: left; position: relative; z-index: 1; }
.puce { display: grid; gap: 1px; background: var(--bleu-clair); border-left: 3px solid var(--bleu); border-radius: 6px; padding: 4px 7px; margin-bottom: 4px; font-size: .85rem; overflow-wrap: anywhere; }
.puce strong { font-variant-numeric: tabular-nums; }
.puce small { color: var(--doux); }
.puce a { font-size: .85rem; }
.puce.absence { background: var(--ambre-clair); border-left-color: var(--ambre); color: var(--ambre); font-weight: 700; }
.puce.absence.attente { border-left-style: dashed; font-weight: 600; }
.puce.cliquable { cursor: pointer; }
.puce.cliquable:hover { border-left-width: 5px; }
.semaine-perso { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.jour-perso { background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.jour-perso h3 { font-size: 1rem; margin: 0; }
.jour-perso h3 small { color: var(--doux); font-weight: 400; }
.jour-perso.aujourdhui { border-color: var(--bleu); box-shadow: 0 0 0 1px var(--bleu); }
.jour-perso.libre { opacity: .75; }
.jour-perso p { margin: 0; }
.lien-ajout { justify-self: start; background: none; border: 0; padding: 2px 0; color: var(--bleu); font: inherit; font-weight: 600; cursor: pointer; }
.ligne-choix { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--trait); border-radius: 8px; }
.participants { border: 1px solid var(--trait); border-radius: 8px; padding: 10px 12px; margin: 0; }
.participants legend { font-weight: 600; padding: 0 4px; }
.participants .cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; }
.texte-long { white-space: pre-wrap; margin: 0; }

/* ---- connexion ---- */
.page-connexion { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.connexion { width: min(400px, 100%); }
.connexion .champ input { padding: 10px 12px; }
.marque-connexion { display: flex; gap: 12px; align-items: center; }
.marque-connexion img { width: 48px; height: 48px; }
.marque-connexion p { margin: 0; color: var(--doux); }

/* ---- téléphone et petite tablette ---- */
@media (max-width: 900px) {
  .cadre { grid-template-columns: 1fr; }
  .lateral { position: fixed; left: 0; top: 0; z-index: 20; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  body.menu-ouvert .lateral { transform: none; box-shadow: 0 0 0 100vmax rgba(10, 16, 24, .45); }
  .ouvrir-menu { display: inline-flex; }
  .haut { padding: 10px 16px; }
  .contenu { padding: 16px; }
  .compte .nom { display: none; }
  .compte { padding: 3px; }
  .grille-champs { grid-template-columns: 1fr; }
  .titre-page { font-size: 1.1rem; }
  /* Tableaux en cartes empilées */
  .defile { border: 0; background: none; }
  table.liste thead { display: none; }
  table.liste, .liste tbody, .liste tr, .liste td { display: block; width: 100%; }
  .liste tr { background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); margin-bottom: 10px; padding: 6px 0; }
  .liste td { border: 0; padding: 4px 14px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .liste td::before { content: attr(data-titre); color: var(--doux); font-size: .85rem; text-align: left; }
  .liste td[data-titre=""]::before { content: none; }
  .liste td.nombre { text-align: right; }
  .barres { gap: 6px; }
  .tuiles.kpi, .tuiles.kpi.colonnes-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tuiles.kpi .tuile { padding: 10px 12px; }
  .tuiles.kpi .tuile strong { font-size: 1.2rem; }
  .tuiles.kpi .tuile .titre, .tuiles.kpi .tuile small { font-size: .8rem; }
  .bas-tableau { grid-template-columns: minmax(0, 1fr); }
  .droits th, .droits td { padding: 6px; font-size: .88rem; }
  .barre .montant { display: none; }
}

/* ---- aperçu ouvert depuis l'Espace éditeur ---- */
.bandeau-apercu { background: var(--ambre-clair); color: var(--ambre); padding: 8px 24px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .92rem; border-bottom: 1px solid var(--trait); }
.bandeau-apercu .bouton { margin-left: auto; }

/* Numérotation : aperçu du prochain numéro */
.apercu-ligne { margin: 12px 0 0; }
.apercu-numero { font-size: 1.1rem; letter-spacing: .02em; }
.apercu-numero.erreur { color: var(--rouge, #c0392b); font-size: .95rem; letter-spacing: 0; }
