/* ==========================================================================
   SIZA ERP : systeme de design
   Charte SIZA (siza-engineering.com) adaptee a un outil de gestion :
   le jaune signe (actions, element actif, chiffres cles, soulignes), les
   neutres portent la lecture longue, les etats ont leur propre palette.
   ========================================================================== */

@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(../fonts/figtree-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(../fonts/figtree-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-mono-latin.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(../fonts/ibm-plex-mono-500-latin.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url(../fonts/ibm-plex-mono-600-latin.woff2) format("woff2"); }

:root {
  /* Charte */
  --jaune: #FCC51A;
  --jaune-clair: #FFE58A;
  --jaune-pale: #FFF7DB;
  --jaune-sombre: #8A6A00;
  --encre: #1E1E1E;
  --creme: #FFF4DF;
  /* Neutres */
  --fond: #F6F5F2;
  --surface: #FFFFFF;
  --surface-2: #FAF9F7;
  --bord: #E7E4DE;
  --bord-fort: #D4D0C8;
  --texte: #1E1E1E;
  --texte-2: #5B5852;
  --texte-3: #8C877F;
  /* Etats */
  --ok: #1F8A4C;      --ok-fond: #E5F4EA;
  --info: #2563C9;    --info-fond: #E7EEFB;
  --attente: #C26A00; --attente-fond: #FDF0DC;
  --alerte: #C9302C;  --alerte-fond: #FBE7E6;
  --neutre: #6B675F;  --neutre-fond: #EEECE8;
  /* Formes */
  --r: 14px;
  --rb: 6px;
  --ombre: 0 1px 2px rgba(30, 30, 30, .05), 0 1px 1px rgba(30, 30, 30, .03);
  --ombre-haute: 0 10px 30px rgba(30, 30, 30, .12), 0 2px 6px rgba(30, 30, 30, .06);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --police: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --largeur-menu: 232px;
  --hauteur-barre-mobile: 64px;
  --cible: 44px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

/* Transitions entre pages (navigateurs recents) : le menu et l'en-tete
   restent en place, seul le contenu change en fondu court. Sans support,
   rien ne change. */
@view-transition { navigation: auto; }
.menu { view-transition-name: menu; }
.entete { view-transition-name: entete; }
.barre-mobile { view-transition-name: barre-mobile; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 140ms; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--police); font-size: 15px; line-height: 1.5;
  color: var(--texte); background: var(--fond); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--jaune); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .8em; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.mono, code, .numero { font-family: var(--mono); font-size: .92em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icone { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------- Mise en page ---------- */
.app { display: grid; grid-template-columns: var(--largeur-menu) 1fr; min-height: 100vh; }
.menu {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--encre); color: #EDEBE6;
  display: flex; flex-direction: column; padding: 18px 12px;
}
.menu__logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; text-decoration: none; }
.menu__logo img { height: 26px; width: auto; }
.menu__logo span { font-family: var(--mono); font-size: .68rem; letter-spacing: .22em; color: var(--jaune); text-transform: uppercase; }
.menu__lien {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px; margin: 1px 0;
  border-radius: var(--rb); color: #CFCBC3; text-decoration: none; font-weight: 500;
}
.menu__lien:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.menu__lien[aria-current="page"] { background: var(--jaune); color: var(--encre); font-weight: 650; }
.menu__sep { margin: 14px 12px 6px; font-family: var(--mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: #8C877F; }
.menu__bas { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.menu__utilisateur { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: .9rem; }
.pastille {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--jaune); color: var(--encre); font-weight: 700; font-size: .78rem; flex: none;
}
.contenu { min-width: 0; display: flex; flex-direction: column; }
.entete {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; background: rgba(246, 245, 242, .92); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--bord);
}
.entete__titre { font-weight: 700; font-size: 1.05rem; margin: 0; }
.entete__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.recherche-globale {
  display: flex; align-items: center; gap: 8px; min-width: 260px; height: 38px; padding: 0 12px;
  border: 1px solid var(--bord); border-radius: var(--rb); background: var(--surface); color: var(--texte-3);
}
.recherche-globale input[type=search] { border: 0; outline: 0; box-shadow: none; background: transparent; width: 100%; min-height: 0; padding: 0; font: inherit; color: var(--texte); }
.page { padding: 24px 28px 48px; width: 100%; min-width: 0; } /* toute la largeur disponible a cote du menu */
.page--etroite { max-width: 880px; }
.titre-page { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.titre-page h1 { margin: 0; }
.titre-page .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.surtitre { font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--jaune-sombre); margin-bottom: 4px; }
.souligne { background: linear-gradient(transparent 62%, var(--jaune-clair) 62%); padding: 0 2px; }

.grille { display: grid; gap: 16px; }
.grille--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grille--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grille--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grille--fiche { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.pile > * + * { margin-top: 16px; }
.ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ligne--espace { justify-content: space-between; }
.pousse { margin-left: auto; }
.discret { color: var(--texte-3); font-size: .88rem; }

/* ---------- Cartes ---------- */
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--r); box-shadow: var(--ombre); }
.carte__entete { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--bord); }
.carte__entete h2, .carte__entete h3 { margin: 0; font-size: 1rem; }
.carte__corps { padding: 16px 18px; }
.carte__pied { padding: 12px 18px; border-top: 1px solid var(--bord); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }
.carte--accent { border-top: 3px solid var(--jaune); }

/* Chiffre cle */
.kpi { padding: 16px 18px; }
.kpi__libelle { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--texte-3); }
.kpi__valeur { font-size: 1.9rem; font-weight: 750; letter-spacing: -.02em; margin-top: 4px; }
.kpi__sous { font-size: .86rem; color: var(--texte-2); }
.jauge { height: 8px; border-radius: 99px; background: var(--neutre-fond); overflow: hidden; margin-top: 10px; }
.jauge > span { display: block; height: 100%; background: var(--jaune); border-radius: 99px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 8px 16px; border-radius: var(--rb); border: 1px solid var(--bord-fort); background: var(--surface);
  color: var(--texte); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { border-color: var(--encre); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(252, 197, 26, .55); outline-offset: 1px;
}
.btn--principal { background: var(--jaune); border-color: var(--jaune); color: var(--encre); }
.btn--principal:hover { background: #F2B800; border-color: #F2B800; }
.btn--sombre { background: var(--encre); border-color: var(--encre); color: #fff; }
.btn--danger { color: var(--alerte); border-color: #EBC4C2; }
.btn--danger:hover { background: var(--alerte-fond); border-color: var(--alerte); }
.btn--fantome { border-color: transparent; background: transparent; }
.btn--fantome:hover { background: var(--neutre-fond); border-color: transparent; }
.btn--petit { min-height: 32px; padding: 4px 10px; font-size: .88rem; }
.btn--icone { width: 40px; padding: 0; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; }

/* ---------- Badges d'etat ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px;
  font-size: .78rem; font-weight: 650; background: var(--neutre-fond); color: var(--neutre); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--ok-fond); color: var(--ok); }
.badge--info { background: var(--info-fond); color: var(--info); }
.badge--attente { background: var(--attente-fond); color: var(--attente); }
.badge--alerte { background: var(--alerte-fond); color: var(--alerte); }
.badge--jaune { background: var(--jaune-pale); color: var(--jaune-sombre); }
.badge--nu::before { display: none; }
.etiquette { display: inline-block; padding: 1px 8px; border-radius: var(--rb); background: var(--neutre-fond); font-size: .78rem; color: var(--texte-2); }

/* ---------- Tableaux ---------- */
.tableau-conteneur { overflow-x: auto; }
table.tableau { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tableau th {
  text-align: left; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--texte-3); font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--bord); white-space: nowrap;
}
/* Tri par les en-tetes (static/js/tri.js, macro m.th_tri) : le libelle
   devient un bouton, une fleche discrete indique le sens. */
.tableau th .tri, .tableau th a.tri {
  all: unset; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: inherit;
  font: inherit; letter-spacing: inherit; text-transform: inherit; min-height: 24px; text-decoration: none;
}
.tableau th .tri:hover, .tableau th .tri:focus-visible { color: var(--encre); }
.tableau th .tri:focus-visible { outline: 2px solid var(--jaune); outline-offset: 2px; border-radius: 3px; }
.tri__icone { display: inline-block; opacity: .35; font-family: var(--police); font-size: .85rem; line-height: 1; letter-spacing: 0; }
.tri__icone::before { content: "↕"; }
.tableau th[aria-sort] { color: var(--encre); }
.tableau th[aria-sort] .tri__icone { opacity: 1; }
.tableau th[aria-sort="ascending"] .tri__icone::before { content: "↑"; }
.tableau th[aria-sort="descending"] .tri__icone::before { content: "↓"; }
.tableau th.num .tri { justify-content: flex-end; }
.tableau td { padding: 11px 14px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau tbody tr:hover { background: var(--jaune-pale); }
.tableau .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau a.ligne-lien { text-decoration: none; font-weight: 600; }
.tableau a.ligne-lien:hover { text-decoration: underline; }
.vide { padding: 36px 18px; text-align: center; color: var(--texte-3); }

/* ---------- Formulaires ---------- */
.champ { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.champ > label, .libelle { font-weight: 600; font-size: .88rem; }
.champ .aide { font-size: .8rem; color: var(--texte-3); }
.champ .erreur { font-size: .82rem; color: var(--alerte); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=tel],
input[type=url], input[type=date], input[type=datetime-local], input[type=time], input[type=month], input[type=week], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; font: inherit; color: var(--texte); background: var(--surface);
  border: 1px solid var(--bord-fort); border-radius: var(--rb); transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { border-color: var(--jaune-sombre); box-shadow: 0 0 0 3px rgba(252, 197, 26, .25); outline: 0; }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.champ--erreur input, .champ--erreur select, .champ--erreur textarea { border-color: var(--alerte); }
input[type=checkbox], input[type=radio] { flex: none; width: 20px; height: 20px; accent-color: var(--encre); }
.case { display: flex; align-items: center; gap: 10px; min-height: var(--cible); cursor: pointer; }
.formulaire-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.formulaire-grille .plein { grid-column: 1 / -1; }
/* Case a cocher a cote d'un champ : alignee sur le champ, pas sur son libelle. */
.formulaire-grille > .champ:has(> .case) { align-self: end; }
.formulaire-grille > .champ:has(> .case) > .case { min-height: 42px; }
.actions-formulaire { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.filtres { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filtres input:not([type=checkbox]):not([type=radio]), .filtres select { width: auto; min-width: 160px; }
/* Case de filtre : une pastille a cocher, de la hauteur des autres champs. */
.filtres .case {
  flex: none; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--bord);
  border-radius: 99px; background: var(--surface); font-size: .9rem; font-weight: 500; color: var(--texte-2);
}
.filtres .case input { width: 16px; height: 16px; min-width: 0; margin: 0; accent-color: var(--encre); }
.filtres .case:hover { border-color: var(--encre); }
.filtres .case:has(input:checked) { background: var(--jaune-pale); border-color: var(--jaune); color: var(--encre); }

.compteur-saisie { align-self: flex-end; font-size: .78rem; color: var(--texte-3); font-variant-numeric: tabular-nums; }
.compteur-saisie--plein { color: var(--alerte); font-weight: 600; }

/* ---------- Robustesse aux valeurs extremes ----------
   Un nom de 200 caracteres sans espace, une adresse email interminable ou un
   montant a 9 chiffres ne doivent jamais deborder d'une carte ou d'un
   tableau : les textes se coupent ou passent a la ligne, les montants
   restent sur une ligne et le tableau defile horizontalement si besoin. */
.carte, .kanban__carte, .tableau td, .definitions dd, .fil li, .message, .bandeau-saisie,
.titre-page h1, .entete__titre, .champ { overflow-wrap: anywhere; min-width: 0; }
.titre-page > div { min-width: 0; }
.tableau td.num, .tableau th.num, .kpi__valeur, .badge, .num { overflow-wrap: normal; white-space: nowrap; }
.kpi__valeur { font-size: clamp(1.2rem, 1rem + 1.4vw, 1.9rem); }
.grille > *, .grille--fiche > * { min-width: 0; }

/* ---------- Messages ---------- */
.messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.message { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--rb); border: 1px solid; font-weight: 500; }
.message--success { background: var(--ok-fond); border-color: #BFE3CC; color: #14532D; }
.message--error { background: var(--alerte-fond); border-color: #F0C4C1; color: #7F1D1D; }
.message--info { background: var(--info-fond); border-color: #C9D8F5; color: #1E3A8A; }
.message--attente { background: var(--attente-fond); border-color: #F3D2A2; color: #7C3F00; }
/* Un bandeau pose dans la page respire comme une carte ; dans la pile des
   messages flash ou en fin de carte, l'espacement vient du conteneur. */
.message { margin: 0 0 16px; }
.messages > .message, .message:last-child { margin-bottom: 0; }

/* Champ fichier a la charte : le bouton natif prend le dessin d'un .btn et
   s'aligne avec le bouton d'envoi voisin. */
input[type=file] { font: inherit; font-size: .9rem; color: var(--texte-2); max-width: 100%; }
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; margin-right: 12px; padding: 0 14px; height: 38px; cursor: pointer;
  border: 1px solid var(--bord); border-radius: var(--rb); background: var(--surface); color: var(--texte);
}
input[type=file]::file-selector-button:hover { border-color: var(--encre); }
.formulaire-ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.formulaire-ligne input[type=file] { flex: 1 1 220px; min-width: 0; }
.formulaire-ligne:has(input[type=file]) { align-items: center; }

/* Bandeau de saisie non enregistree (static/js/formulaires.js) */
.bandeau-saisie {
  position: sticky; top: 64px; z-index: 30; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px; border-radius: var(--rb); background: var(--attente-fond);
  border: 1px solid #F3D2A2; color: #7C3F00; font-weight: 600; box-shadow: var(--ombre-haute);
}
.bandeau-saisie--ok { background: var(--ok-fond); border-color: #BFE3CC; color: #14532D; }
.indicateur-envoi { font-size: .82rem; color: var(--texte-3); }

/* ---------- Onglets ---------- */
.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--bord); margin-bottom: 18px; overflow-x: auto; }
.onglets a { padding: 10px 14px; text-decoration: none; color: var(--texte-2); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.onglets a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--jaune); }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kanban__colonne { background: var(--surface-2); border: 1px solid var(--bord); border-radius: var(--r); padding: 10px; min-height: 120px; }
.kanban__titre { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; font-weight: 700; font-size: .9rem; }
.kanban__carte { display: block; background: var(--surface); border: 1px solid var(--bord); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; text-decoration: none; box-shadow: var(--ombre); }
.kanban__carte:hover { border-color: var(--jaune); }
.kanban__colonne.survol { outline: 2px dashed var(--jaune); }

/* ---------- Liste d'evenements (journal) ---------- */
.fil { list-style: none; margin: 0; padding: 0; }
.fil li { position: relative; padding: 0 0 16px 22px; }
.fil li::before { content: ""; position: absolute; left: 5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--bord-fort); }
.fil li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--bord); }
.fil li:last-child::after { display: none; }
.fil li.fil--note::before { background: var(--jaune); }
.fil li.fil--email_recu::before, .fil li.fil--email_envoye::before { background: var(--info); }
.fil li.fil--statut::before { background: var(--ok); }
.fil__meta { font-size: .8rem; color: var(--texte-3); }

/* ---------- Divers ---------- */
.definitions { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.definitions dt { color: var(--texte-3); font-size: .86rem; }
.definitions dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.separateur { height: 1px; background: var(--bord); margin: 16px 0; border: 0; }
/* Documentation lue dans l'ERP (Mon compte) : texte long, blocs de code a copier. */
.documentation { line-height: 1.55; overflow-wrap: anywhere; }
.documentation h2 { font-size: 1.15rem; margin-top: 1.4em; }
.documentation h3, .documentation h4 { font-size: 1rem; margin-top: 1.2em; }
.documentation pre { overflow-x: auto; background: var(--surface-2); padding: 12px; border-radius: var(--rb); font-size: .85rem; overflow-wrap: normal; }
.documentation table { border-collapse: collapse; display: block; overflow-x: auto; font-size: .9rem; }
.documentation th, .documentation td { border: 1px solid var(--bord); padding: 6px 10px; text-align: left; vertical-align: top; }
.documentation blockquote { margin: 0; padding: 4px 14px; border-left: 3px solid var(--jaune); color: var(--texte-2); }
.urgence { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 99px; font-weight: 700; font-size: .78rem; font-family: var(--mono); background: var(--neutre-fond); }
.urgence--haute { background: var(--alerte); color: #fff; }
.urgence--moyenne { background: var(--jaune); color: var(--encre); }
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--encre); }
.connexion .carte { width: 100%; max-width: 420px; }
.connexion__logo { display: flex; justify-content: center; margin-bottom: 22px; }
.connexion__logo img { height: 34px; }
.qr { display: grid; place-items: center; padding: 12px; background: #fff; border: 1px solid var(--bord); border-radius: var(--r); }
.codes-secours { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: var(--mono); font-size: 1rem; }
.chantier { text-align: center; padding: 60px 20px; }
.chantier .surtitre { font-size: .8rem; }

/* ---------- Barre mobile ---------- */
.barre-mobile { display: none; }
.bouton-menu { display: none; }

@media (max-width: 1100px) {
  .grille--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille--fiche { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .app { display: block; padding-bottom: calc(var(--hauteur-barre-mobile) + env(safe-area-inset-bottom)); }
  .menu {
    position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 60; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--ombre-haute);
  }
  .menu.ouvert { transform: none; }
  .voile { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 55; }
  .bouton-menu { display: inline-flex; }
  .entete { padding: 10px 16px; }
  .recherche-globale { min-width: 0; flex: 1; }
  .entete__titre { display: none; }
  .page { padding: 16px 16px 32px; }
  .grille--2, .grille--3, .grille--4, .formulaire-grille { grid-template-columns: 1fr; }
  .titre-page h1 { font-size: 1.35rem; }
  .titre-page .actions { margin-left: 0; width: 100%; }
  .btn { min-height: var(--cible); }
  .tableau--empile thead { display: none; }
  .tableau--empile tr { display: block; padding: 10px 4px; border-bottom: 1px solid var(--bord); }
  .tableau--empile td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 10px; }
  .tableau--empile td::before { content: attr(data-libelle); color: var(--texte-3); font-size: .82rem; }
  .tableau--empile td.principal { display: block; font-size: 1.02rem; }
  .tableau--empile td.principal::before { display: none; }
  .barre-mobile {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--hauteur-barre-mobile) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--bord); box-shadow: 0 -4px 16px rgba(0, 0, 0, .05);
  }
  .barre-mobile a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: .72rem; font-weight: 600; color: var(--texte-2); }
  .barre-mobile a[aria-current="page"] { color: var(--encre); }
  .barre-mobile a[aria-current="page"] .icone { color: var(--jaune-sombre); }
  .barre-mobile a.saisir .icone { width: 28px; height: 28px; padding: 4px; border-radius: 50%; background: var(--jaune); color: var(--encre); }
  .bandeau-saisie { top: 58px; }
}

/* ---------- Recherche instantanee (static/js/recherche.js) ----------
   Liste deroulante sous un champ : barre d'en-tete (fiches a ouvrir) ou
   champ de reference (choix qui renseigne le champ). Cibles de 44 px. */
.recherche-ancre { position: relative; }
.suggestions {
  position: absolute; left: 0; top: 100%; z-index: 45; min-width: 100%; max-width: calc(100vw - 32px);
  max-height: min(420px, 60vh); overflow-y: auto; overscroll-behavior: contain; padding: 4px;
  background: var(--surface); color: var(--texte); border: 1px solid var(--bord-fort); border-radius: var(--rb);
  box-shadow: var(--ombre-haute); text-align: left;
}
.suggestions[hidden] { display: none; }
.suggestions--globale { top: calc(100% + 4px); left: auto; right: 0; width: min(440px, calc(100vw - 32px)); }
.suggestions__groupe {
  padding: 8px 10px 4px; font-family: var(--mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--jaune-sombre);
}
.suggestion {
  display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: var(--cible);
  padding: 6px 10px; border-radius: var(--rb); color: var(--texte); text-decoration: none; cursor: pointer;
  overflow-wrap: anywhere;
}
.suggestion:hover { background: var(--surface-2); }
.suggestion[aria-selected="true"] { background: var(--jaune-pale); box-shadow: inset 3px 0 0 var(--jaune); }
.suggestion__titre { font-weight: 600; line-height: 1.25; }
.suggestion__sous-titre { font-size: .8rem; color: var(--texte-3); line-height: 1.3; }
.suggestions__vide { padding: 12px 10px; color: var(--texte-3); font-size: .9rem; }
[data-resultats][aria-busy="true"] { opacity: .6; transition: opacity .12s; }
.lecteur-seul {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (max-width: 860px) {
  /* Sur telephone, la liste de la barre d'en-tete prend la largeur de
     l'en-tete (et non du seul champ), sans deborder de l'ecran. */
  .recherche-globale.recherche-ancre { position: static; }
  .suggestions--globale { left: 16px; right: 16px; width: auto; max-width: none; }
}

/* Conversations email (courrier, fiche contact, fiche tache). */
.sens { font-size: .8rem; font-weight: 600; color: var(--texte-2); }
.sens--envoye { color: var(--texte-3); }
.fils-email { list-style: none; margin: 0; padding: 0; }
.fils-email .fil-email { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--bord); }
.fils-email .fil-email:last-child { border-bottom: 0; }
.fils-email .fil-email > a { text-decoration: none; overflow-wrap: anywhere; }
.fil-email--non-lu > a strong { box-shadow: inset 0 -.45em 0 var(--jaune-clair); }
.fil-email__extrait { overflow-wrap: anywhere; }
.fil-email .btn { min-height: var(--cible); }

@media print {
  .menu, .entete, .barre-mobile, .actions, .actions-formulaire { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
}

/* ---------- Modification sur place (static/js/edition.js) ----------
   Le champ ressemble a du texte tant qu'on ne le survole pas : la liste
   reste lisible, un clic suffit pour changer la valeur. */
input.edition-champ, select.edition-champ, .edition-champ {
  width: auto; max-width: 100%; min-height: 32px; padding: 4px 8px; font: inherit; font-size: .88rem;
  border: 1px solid transparent; border-radius: var(--rb); background-color: transparent; color: var(--texte);
  cursor: pointer;
}
select.edition-champ { padding-right: 24px; }
.edition-champ:hover, .edition-champ:focus { border-color: var(--bord); background-color: var(--surface); }
.edition-champ:focus-visible { outline: 2px solid var(--jaune); outline-offset: 1px; }
.edition-champ[aria-busy="true"] { opacity: .6; }
.edition-champ.edition--erreur { border-color: var(--alerte); background-color: var(--alerte-fond); }
.edition-champ--en_cours { color: var(--info); font-weight: 600; }
.edition-champ--en_attente { color: var(--attente); font-weight: 600; }
.edition-champ--fait { color: var(--ok); font-weight: 600; }
.edition-champ--annule { color: var(--texte-3); }
.edition-champ--p3 { color: var(--alerte); font-weight: 600; }
.edition-champ--p1 { color: var(--texte-3); }
.edition-champ--retard { color: var(--alerte); font-weight: 650; }
.edition__etat { display: inline-block; margin-left: 4px; font-size: .78rem; color: var(--texte-3); }
.edition__etat--ok { color: var(--ok); font-weight: 700; }
.edition__etat--erreur { display: block; margin: 4px 0 0; color: var(--alerte); font-weight: 600; }
.edition__reessayer { font: inherit; font-size: .78rem; font-weight: 700; color: var(--alerte); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 0; }

/* Pieces jointes (macro m.liste_pieces). */
.pieces { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pieces__ligne { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 4px 0; }
.pieces__vignette, .pieces__icone { flex: none; width: 44px; height: 44px; border-radius: var(--rb); border: 1px solid var(--bord); overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
.pieces__vignette img { width: 100%; height: 100%; object-fit: cover; }
.pieces__icone { font-family: var(--mono); font-size: .62rem; letter-spacing: .06em; color: var(--texte-2); }
.pieces__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pieces__texte a { font-weight: 600; overflow-wrap: anywhere; }
.pieces__ligne + .pieces__ligne { border-top: 1px solid var(--bord); padding-top: 10px; }
/* Etat Google Drive : lien, emplacement, attente ou erreur, sous le nom. */
.pieces__drive { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: .86rem; min-width: 0; }
.pieces__drive a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.pieces__drive .discret { overflow-wrap: anywhere; }
.pieces__erreur { color: var(--alerte); font-weight: 600; overflow-wrap: anywhere; }
.pieces__actions { flex: none; display: flex; align-items: center; gap: 4px; }
.pieces__actions .form-action { margin: 0; }
/* Ou Drive rangera le prochain fichier (annonce AVANT l'envoi). */
.pieces__emplacement { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0; color: var(--texte-3); font-size: .86rem; overflow-wrap: anywhere; }
.pieces__emplacement .icone { flex: none; margin-top: 2px; }
/* Note d'origine d'un document (carte « Documents lies »). */
.pieces__note { margin-top: 2px; font-size: .86rem; color: var(--texte-2); overflow-wrap: anywhere; }
.pieces__texte .pieces__note a { font-weight: 600; }
/* Fichiers d'une note, dans l'historique d'une fiche. */
.fil__pieces .pieces { margin: 6px 0 0; }
.voir-tout { margin: 0 0 10px; }

/* Note ou remarque avec fichiers (macro m.formulaire_note, remarque de
   tache) : bouton « Joindre » a gauche, noms choisis, envoi a droite. */
.note-fiche textarea { min-height: 64px; }
.note-fiche .champ { margin-bottom: 8px; }
.remarque-envoi, .note-envoi { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.remarque-envoi__fichiers, .note-envoi__fichiers { cursor: pointer; }
.remarque-envoi [data-fichiers-choisis], .note-envoi [data-fichiers-choisis] { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; font-size: .85rem; }
.remarque-envoi .btn--principal, .note-envoi .btn--principal { margin-left: auto; }

/* Rendez-vous d'une fiche (macro m.carte_rendez_vous). */
.rdv-lies { list-style: none; margin: 0 0 10px; padding: 0; }
.rdv-lies__ligne { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--bord); min-width: 0; }
.rdv-lies__ligne:last-child { border-bottom: 0; }
.rdv-lies__quand { flex: none; font-family: var(--mono); font-size: .82rem; color: var(--texte-2); min-width: 9.5em; }
.rdv-lies__quoi { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rdv-lies__quoi a { font-weight: 600; overflow-wrap: anywhere; min-height: 24px; }
.rdv-lies__ligne--passe .rdv-lies__quand, .rdv-lies__ligne--passe a { color: var(--texte-3); }
.rdv-lies__separateur { padding: 10px 0 2px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-3); border-bottom: 1px solid var(--bord); }
@media (max-width: 520px) {
  .rdv-lies__ligne { flex-direction: column; gap: 2px; }
}

/* Page d'erreur : boutons centres et alignes sur la meme ligne. */
.actions-erreur { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.actions-erreur .btn { margin: 0; }

/* Champs de date : meme dessin que les autres, icone de calendrier discrete,
   texte vide estompe (le navigateur affiche « jj/mm/aaaa » ou des tirets). */
input[type=date], input[type=month], input[type=week], input[type=datetime-local], input[type=time] {
  font-variant-numeric: tabular-nums; color-scheme: light;
}
input[type=date]::-webkit-calendar-picker-indicator, input[type=month]::-webkit-calendar-picker-indicator,
input[type=week]::-webkit-calendar-picker-indicator, input[type=datetime-local]::-webkit-calendar-picker-indicator,
input[type=time]::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; }
input[type=date]:hover::-webkit-calendar-picker-indicator, input[type=month]:hover::-webkit-calendar-picker-indicator { opacity: .85; }
input[type=month]:invalid, input[type=date]:invalid, input[type=month]:not(:focus):placeholder-shown { color: var(--texte-3); }

/* Numero d'une tache ou d'une note, discret, a donner a l'assistant. */
.numero-id { font-family: var(--mono); font-size: .74rem; color: var(--texte-3); white-space: nowrap; user-select: all; }
/* Devant le titre d'une tache : #12, #G42 (GitLab). */
.numero-id--titre { font-size: .8rem; margin-right: 6px; }
.prochaine-action { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.prochaine-action input[type=text] { min-width: 140px; flex: 1 1 140px; }
.edition-champ--montant { width: 9em; text-align: right; font-variant-numeric: tabular-nums; }
input.edition-champ::placeholder { color: var(--texte-3); font-style: italic; }

/* Champ sur place : meme hauteur pour tous les types (la regle generale des
   champs, plus precise, ne doit pas les grossir). */
input.edition-champ, select.edition-champ { min-height: 32px; padding: 4px 8px; border-color: transparent; background-color: transparent; }
input.edition-champ:hover, input.edition-champ:focus, select.edition-champ:hover, select.edition-champ:focus { border-color: var(--bord); background-color: var(--surface); }
input.edition-champ.edition--erreur, select.edition-champ.edition--erreur { border-color: var(--alerte); background-color: var(--alerte-fond); }

/* « J'attends un retour… » sur la fiche tache : un bouton sous les statuts,
   qui s'ouvre en carte. */
.attente-form { margin: 0 0 18px; }
.attente-form > summary { display: inline-flex; list-style: none; cursor: pointer; }
.attente-form > summary::-webkit-details-marker { display: none; }
.attente-form[open] > summary { margin-bottom: 10px; }
.attente-form[open] > .carte__corps { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--ombre); }

/* Blocs empiles hors grille (cartes, titres, bandeaux, details) : toujours
   16 px entre deux blocs, comme dans .pile (audit visuel). */
:not(.grille):not(.pile):not(.k-grille):not(.k-bandeau) > :is(.carte, .message, details.carte, .grille, .tableau-conteneur) + :is(.carte, .grille, h2, h3, details, form, .message),
:not(.grille):not(.pile) > :is(h2, h3) + .carte { margin-top: 16px; }

/* Colonnes des tableaux (static/js/tri.js : classe tableau--aligne) : titre
   et contenu centres, sauf la colonne principale (a gauche) et les montants
   (a droite). Sur telephone, les tableaux s'empilent : rien ne change. */
@media (min-width: 861px) {
  .tableau--aligne th, .tableau--aligne td { text-align: center; }
  .tableau--aligne th.col-gauche, .tableau--aligne td.principal, .tableau--premiere-gauche td:first-child { text-align: left; }
  .tableau--aligne th.num, .tableau--aligne td.num { text-align: right; }
  .tableau--aligne th .tri { justify-content: center; }
  .tableau--aligne th.col-gauche .tri { justify-content: flex-start; }
  .tableau--aligne th.num .tri { justify-content: flex-end; }
}

/* Courrier : un point jaune avant le sujet d'une conversation non lue ; le
   sens (recu, envoye, brouillon) en texte discret, jamais en etiquette. */
.point-non-lu { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--jaune); vertical-align: middle; box-shadow: 0 0 0 2px var(--jaune-pale); }
.sens--brouillon { color: var(--attente); }

/* Dans une liste de definitions, un champ modifiable sur place aligne son
   texte sur les valeurs fixes voisines (on compense son retrait interieur). */
.definitions dd > .edition-champ:first-child { margin-left: -9px; }
/* Colonne principale des listes : assez large pour qu'un titre ne s'empile
   pas sur trois lignes. */
@media (min-width: 861px) { .tableau td.principal { min-width: 240px; } }
.montant-champ { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
/* Fiche tache : « J'attends un retour… » sur la meme ligne que les statuts. */
.statuts-boutons { vertical-align: middle; margin-right: 10px; }
.attente-form:not([open]) { display: inline-block; vertical-align: middle; }
.attente-form:not([open]) > summary { min-height: 42px; }
/* Une liste deroulante modifiable dans un tableau ne fait pas deborder la
   ligne : longue valeur coupee, complete au clic. */
.tableau select.edition-champ { max-width: 200px; text-overflow: ellipsis; }

/* Date et sens d'un message : l'un sous l'autre sur ordinateur, cote a cote
   (separes par un point) sur telephone, toujours ensemble. */
.date-sens { display: inline-flex; flex-direction: column; align-items: inherit; gap: 2px; }
@media (max-width: 860px) {
  .date-sens { flex-direction: row; gap: 6px; }
  .date-sens > .discret::before { content: "· "; }
  /* Filtres sur telephone : chaque champ sur toute la largeur, boutons et
     pastilles a leur taille. */
  .filtres input:not([type=checkbox]):not([type=radio]), .filtres select { flex: 1 1 100%; min-width: 0; width: 100%; }
}

/* Documents de l'entreprise : une carte par document, en grille. */
.ajout-document { margin-bottom: 16px; }
.ajout-document > summary { cursor: pointer; list-style: none; }
.ajout-document > summary::-webkit-details-marker { display: none; }

/* Tout ce qui se deplie montre un petit triangle (ferme : pointe a droite,
   ouvert : pointe en bas), quel que soit le dessin du titre. */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: ""; display: inline-block; flex: none; width: 0; height: 0; margin-right: 8px; vertical-align: middle;
  border-left: 6px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  opacity: .55; transition: transform .15s ease;
}
details[open] > summary::before { transform: rotate(90deg); }
details > summary:hover::before { opacity: .9; }

/* Compteur d'un bandeau qui regroupe plusieurs saisies identiques. */
.bandeau-saisie__nombre { flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--encre); color: #fff; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Page Usage de l'IA (agents/usage.html) : sections espacees. */
.usage-titre { margin: 28px 0 10px; font-size: 1.15rem; }
.usage-bloc { margin-top: 16px; }

/* Pagination commune (macro m.pagination) et « Voir tout » d'un bloc borne. */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 14px; }
.pagination .btn { min-height: 44px; }
.voir-tout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 0; }
/* Documents de l'entreprise : vue explorateur (un dossier par categorie, une
   ligne par document) ; reste lisible avec des centaines de documents. */
.explorateur { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--r); box-shadow: var(--ombre); overflow: hidden; }
.explorateur__barre { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 10px 14px; border-bottom: 1px solid var(--bord); background: var(--surface-2); }
.explorateur__barre .pousse { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; }
.explorateur__filtre { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 260px; max-width: 420px; }
.explorateur__filtre input { width: 100%; min-height: 36px; }
.explorateur__dossier + .explorateur__dossier { border-top: 1px solid var(--bord); }
.explorateur__dossier > summary { display: flex; align-items: center; gap: 8px; padding: 8px 14px; cursor: pointer; background: var(--creme); font-size: .92rem; }
.explorateur__dossier > summary .icone { color: var(--jaune-sombre); }
.explorateur__table { margin: 0; width: 100%; table-layout: fixed; }
.explorateur__table th { font-size: .74rem; padding: 6px 10px; }
.explorateur__table td { padding: 2px 10px; vertical-align: middle; font-size: .88rem; }
/* Memes largeurs dans l'en-tete commun et dans chaque dossier (colgroup). */
.explorateur__c-nom { width: 30%; }
.explorateur__c-validite { width: 300px; }
.explorateur__c-version { width: 16%; }
.explorateur__c-actions { width: 172px; }
.explorateur__ligne:hover { background: var(--surface-2); }
.explorateur__ligne--expire td:first-child { box-shadow: inset 3px 0 0 var(--alerte); }
.explorateur__ligne--bientot td:first-child { box-shadow: inset 3px 0 0 var(--attente); }
.explorateur__nom { display: flex; align-items: center; gap: 8px; }
.explorateur__type { flex: none; width: 34px; text-align: center; font-family: var(--mono); font-size: .62rem; padding: 3px 0; border-radius: 4px; background: var(--surface-2); color: var(--texte-2); border: 1px solid var(--bord); }
.explorateur td input.edition-champ { width: 100%; min-width: 0; text-overflow: ellipsis; }
.explorateur__nom input.edition-champ { font-weight: 600; }
.explorateur__validite { white-space: nowrap; }
.explorateur__validite .badge { margin-left: 4px; }
.explorateur__entete { border-bottom: 1px solid var(--bord); }
.explorateur__entete th { text-align: left; }
.explorateur__table thead.sr { position: absolute; }
.explorateur__version { text-align: left; }
@media (max-width: 720px) { .explorateur__entete { display: none; } }
.explorateur table.tableau .explorateur__validite input.edition-champ { width: 150px; }
.explorateur__version { color: var(--texte-2); font-size: .82rem; }
.explorateur__anciennes summary { font-size: .78rem; color: var(--texte-3); cursor: pointer; }
.explorateur__anciennes ul { margin: 4px 0 0; padding-left: 16px; }
.explorateur__actions { text-align: right; white-space: nowrap; }
.explorateur__actions > *, .explorateur__envoi { display: inline-flex; vertical-align: middle; margin: 0; }
.explorateur__actions .btn--icone { width: 36px; min-height: 36px; }
@media (max-width: 720px) {
  .explorateur__table { table-layout: auto; }
  .explorateur__nom, .explorateur__actions { justify-content: flex-start; }
}
/* L'explorateur aligne tout a gauche (comme un explorateur de fichiers), les actions a droite. */
.explorateur table.tableau th, .explorateur table.tableau td { text-align: left; }
.explorateur table.tableau td.explorateur__actions { text-align: right; }

/* Modele de devis : apercu PDF dans la fiche (visionneuse du navigateur). */
.apercu-modele { margin-bottom: 16px; overflow: hidden; }
.apercu-modele > summary { flex-wrap: wrap; }
.apercu-modele__cadre { display: block; width: 100%; height: min(78vh, 900px); border: 0; background: var(--surface-2); }
@media (max-width: 720px) { .apercu-modele__cadre { height: 70vh; } }

/* Pastille du menu lateral (ex. emails a valider). */
.menu__pastille { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; background: var(--jaune); color: var(--encre); font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.menu__lien[aria-current="page"] .menu__pastille { background: var(--encre); color: #fff; }
/* Plusieurs boutons dans une cellule : sur une ligne, centres entre eux. */
.actions-ligne { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
