/* ═══════════════════════════════════════════════════════════════════════════
   LEX ORDINEM — feuille de style
   Ordre des Avocats au Barreau d'Auxerre

   Parti pris : une institution judiciaire, pas un tableau de bord de start-up.
   Des filets fins plutôt que des ombres portées, une hiérarchie
   typographique forte plutôt que des cadres colorés, un seul accent tenu.
   Le mouvement sert la lecture : il indique d'où vient une information,
   jamais il ne décore.
═══════════════════════════════════════════════════════════════════════════ */

@import url('../assets/polices.css');

:root {
  /* ── Encres ────────────────────────────────────────────────────────────
     Un noir légèrement bleuté : le noir pur vibre sur les écrans clairs. */
  --encre:      #16181d;
  --encre-80:   #3a3f49;
  --texte:      #24272e;
  --doux:       #5f656e;
  --faible:     #8b9099;

  /* ── Accent ────────────────────────────────────────────────────────────
     Sang de bœuf : le rouge du barreau, assombri pour tenir sur du papier
     comme à l'écran. L'or ne sert qu'aux marques d'état, jamais aux aplats. */
  --sang:       #7c1626;
  --sang-vif:   #a6203a;
  --sang-pale:  #f6ebec;
  --sang-voile: #fdf7f7;
  --or:         #b08a2e;
  --or-pale:    #faf3e2;

  /* ── Fonds ─────────────────────────────────────────────────────────────
     Un blanc cassé chaud, pas un gris : l'écran doit évoquer le papier. */
  --papier:     #faf8f5;
  --surface:    #ffffff;
  --surface-2:  #f5f2ee;
  --filet:      #e7e2da;
  --filet-fort: #d6cfc4;

  /* ── Sémantique ────────────────────────────────────────────────────────
     Chaque couleur a un sens unique et ne sert qu'à cela. */
  --vert:       #1b6b4f;
  --vert-pale:  #e9f3ef;
  --ambre:      #a8690f;
  --ambre-pale: #fbf1e2;
  --rouge:      #a32020;
  --rouge-pale: #fbecec;
  --bleu:       #1b4b8f;
  --bleu-pale:  #eaeff8;
  --violet:     #5b2a86;
  --violet-pale:#f2ecf9;

  /* ── Typographie ───────────────────────────────────────────────────────*/
  --titre: 'EB Garamond', 'Iowan Old Style', Garamond, 'Times New Roman', serif;
  --ui:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* ── Géométrie ─────────────────────────────────────────────────────────*/
  --r-carte:  12px;
  --r-champ:  8px;
  --r-pilule: 999px;
  --barre:    248px;

  /* Une seule ombre douce, réservée aux éléments réellement flottants. */
  --ombre:      0 1px 2px rgba(22,24,29,.04), 0 8px 24px -12px rgba(22,24,29,.16);
  --ombre-haut: 0 24px 60px -20px rgba(22,24,29,.35);

  --vitesse: 170ms;
  --courbe:  cubic-bezier(.2,.7,.3,1);
}

/* ═══ Base ════════════════════════════════════════════════════════════════ */

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.55;
  color: var(--texte);
  background: var(--papier);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv05' 1, 'ss01' 1;
}

/* Les chiffres doivent s'aligner en colonne dans les tableaux. */
.tbl, .kv, .num, input[type="number"] { font-variant-numeric: tabular-nums; }

a { color: var(--sang); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--sang-vif); }

button { font: inherit; color: inherit; }
svg.ic { flex-shrink: 0; display: block; }

:focus-visible {
  outline: 2px solid var(--sang-vif);
  outline-offset: 2px;
  border-radius: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══ Coque ═══════════════════════════════════════════════════════════════ */

#app { display: flex; min-height: 100vh; }

/* ── Barre latérale ────────────────────────────────────────────────────── */

#sidebar {
  width: var(--barre);
  flex-shrink: 0;
  background: var(--encre);
  color: #d8d4cd;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  /* Un filet chaud sépare l'encre du papier sans créer de vide. */
  border-right: 1px solid #000;
}

.marque {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 20px 20px;
}
.marque-embleme {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  color: var(--or);
  background: rgba(176,138,46,.1);
  border: 1px solid rgba(176,138,46,.28);
  border-radius: 10px;
  flex-shrink: 0;
}
.marque-texte { line-height: 1.15; min-width: 0; }
.marque-texte .logo {
  font-family: var(--titre);
  font-size: 21px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .2px;
  display: block;
}
.marque-texte .logo em { color: var(--or); font-style: italic; }
.marque-texte .barreau {
  display: block;
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #7d8189;
  margin-top: 3px;
}

/* ── Navigation ────────────────────────────────────────────────────────── */

#nav {
  flex: 1;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#nav::-webkit-scrollbar { width: 0; }

.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  color: #a2a7b0;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: color var(--vitesse) var(--courbe), background var(--vitesse) var(--courbe);
}
.nav-btn .ic { opacity: .82; transition: opacity var(--vitesse) var(--courbe); }
.nav-btn:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-btn:hover .ic { opacity: 1; }

.nav-btn.active { color: #fff; background: rgba(255,255,255,.08); }
.nav-btn.active .ic { color: var(--or); opacity: 1; }
/* Un repère franc à gauche : l'onglet actif se repère sans lire. */
.nav-btn.active::before {
  content: '';
  position: absolute;
  left: -12px; top: 50%;
  width: 3px; height: 20px;
  background: var(--or);
  border-radius: 0 3px 3px 0;
  transform: translateY(-50%);
}

.nlabel { flex: 1; min-width: 0; }

.nbadge {
  min-width: 19px;
  padding: 1px 6px;
  border-radius: var(--r-pilule);
  background: var(--sang-vif);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  line-height: 17px;
}

/* ── Pied de barre : identité et sortie ────────────────────────────────── */

.sb-pied {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.huser {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px 10px;
  min-width: 0;
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--sang-vif), var(--sang));
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--titre);
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}
.sb-identite { min-width: 0; line-height: 1.25; }
.sb-identite strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #eceae6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hbadge {
  display: block;
  font-size: 10.5px;
  color: #7d8189;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-actions { display: flex; gap: 6px; }
.sb-actions .btn {
  flex: 1;
  justify-content: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  color: #c8ccd2;
  padding: 7px 10px;
}
.sb-actions .btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.hspacer { display: none; }

/* ── Colonne principale ────────────────────────────────────────────────── */

#principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* L'emblème compact ne sert qu'à la barre supérieure du téléphone. */
.marque-compacte { display: none; }

#main {
  flex: 1;
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 34px 40px 64px;
}

/* ═══ Titres de page ══════════════════════════════════════════════════════ */

.sec-title {
  font-family: var(--titre);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--encre);
  line-height: 1.12;
}
.sec-sub {
  font-size: 13.5px;
  color: var(--doux);
  margin: 6px 0 26px;
  max-width: 62ch;
}

/* ═══ Cartes ══════════════════════════════════════════════════════════════ */

.card {
  background: var(--surface);
  border: 1px solid var(--filet);
  border-radius: var(--r-carte);
  margin-bottom: 18px;
  overflow: hidden;
  transition: border-color var(--vitesse) var(--courbe), box-shadow var(--vitesse) var(--courbe);
}
.card:hover { border-color: var(--filet-fort); }

.card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--filet);
  background: linear-gradient(180deg, #fff, var(--surface-2));
}
.card-head h2 {
  font-family: var(--titre);
  font-size: 19px;
  font-weight: 600;
  color: var(--encre);
  letter-spacing: -.005em;
}
.ch-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--sang-pale);
  color: var(--sang);
  flex-shrink: 0;
}
.card-sub {
  margin-left: auto;
  font-size: 12px;
  color: var(--faible);
  text-align: right;
}
.card-body { padding: 20px; }

/* ═══ Indicateurs ═════════════════════════════════════════════════════════
   Le libellé annonce, le chiffre frappe. L'inverse de l'ordre habituel :
   on lit d'abord ce qu'on mesure, ensuite combien.                        */

.kpi {
  background: var(--surface);
  border: 1px solid var(--filet);
  border-radius: var(--r-carte);
  padding: 16px 18px 18px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--vitesse) var(--courbe), transform var(--vitesse) var(--courbe);
}
.kpi::after {
  content: '';
  position: absolute; inset: auto 0 0 0;
  height: 2px;
  background: var(--sang);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--courbe);
}
.kpi:hover { border-color: var(--filet-fort); transform: translateY(-1px); }
.kpi:hover::after { transform: scaleX(1); }

.kpi .kl {
  order: -1;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--faible);
  margin-bottom: 9px;
}
.kpi .kv {
  font-family: var(--titre);
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  color: var(--encre);
  letter-spacing: -.015em;
}
.kpi.vert  .kv { color: var(--vert);  } .kpi.vert::after  { background: var(--vert);  }
.kpi.or    .kv { color: var(--ambre); } .kpi.or::after    { background: var(--ambre); }
.kpi.bleu  .kv { color: var(--bleu);  } .kpi.bleu::after  { background: var(--bleu);  }

/* ═══ Grilles ═════════════════════════════════════════════════════════════ */

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }

/* ═══ Boutons ═════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: var(--r-champ);
  border: 1px solid transparent;
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .002em;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--vitesse) var(--courbe),
              border-color var(--vitesse) var(--courbe),
              color var(--vitesse) var(--courbe),
              transform 80ms var(--courbe);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--sang); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--sang-vif); }

.btn-ghost { background: var(--surface); border-color: var(--filet-fort); color: var(--texte); }
.btn-ghost:hover:not(:disabled) { border-color: var(--sang); color: var(--sang); background: var(--sang-voile); }

.btn-neutral { background: var(--surface-2); border-color: var(--filet); color: var(--doux); }
.btn-neutral:hover:not(:disabled) { background: var(--filet); color: var(--texte); }

.btn-vert   { background: var(--vert);  color: #fff; }
.btn-vert:hover:not(:disabled)   { filter: brightness(1.14); }
.btn-or     { background: var(--or);    color: #fff; }
.btn-or:hover:not(:disabled)     { filter: brightness(1.1); }
.btn-danger { background: var(--surface); border-color: #e6c9c9; color: var(--rouge); }
.btn-danger:hover:not(:disabled) { background: var(--rouge); border-color: var(--rouge); color: #fff; }

.btn-sm { padding: 6px 10px; font-size: 12px; gap: 5px; }
.btn-sm .ic { width: 15px; height: 15px; }

/* ═══ Formulaires ═════════════════════════════════════════════════════════ */

.field-group { margin-bottom: 15px; }
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--doux);
  margin-bottom: 6px;
}
.field-input, .field-select, .field-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--filet-fort);
  border-radius: var(--r-champ);
  font-family: var(--ui);
  font-size: 13.5px;
  color: var(--texte);
  background: var(--surface);
  transition: border-color var(--vitesse) var(--courbe), box-shadow var(--vitesse) var(--courbe);
}
.field-input::placeholder, .field-textarea::placeholder { color: var(--faible); }
.field-input:hover, .field-select:hover, .field-textarea:hover { border-color: #bdb4a6; }
.field-input:focus, .field-select:focus, .field-textarea:focus {
  outline: none;
  border-color: var(--sang);
  box-shadow: 0 0 0 3px rgba(124,22,38,.1);
}
.field-textarea { min-height: 92px; resize: vertical; line-height: 1.55; }

.field-select {
  appearance: none;
  /* Chevron dessiné en fond : pas d'élément supplémentaire à positionner. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235f656e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8.5 12 15.5 19 8.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 34px;
}

input[type="checkbox"] { accent-color: var(--sang); width: 15px; height: 15px; }
input[type="file"] { font-size: 12.5px; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600;
  margin-right: 10px; padding: 6px 12px;
  border: 1px solid var(--filet-fort); border-radius: var(--r-champ);
  background: var(--surface-2); color: var(--texte); cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--sang); color: var(--sang); }

/* ═══ Tableaux ════════════════════════════════════════════════════════════
   Pas de rayures : des filets fins et de l'air. Un tableau de l'Ordre se lit
   comme un registre, pas comme un tableur.                                 */

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-wrap .tbl { min-width: 620px; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface-2);
  color: var(--doux);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .085em;
  text-transform: uppercase;
  padding: 11px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--filet);
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--filet);
  font-size: 13.5px;
  vertical-align: middle;
}
.tbl tbody tr { transition: background var(--vitesse) var(--courbe); }
.tbl tbody tr:hover td { background: var(--sang-voile); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }
.tbl .tbl-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ═══ Étiquettes d'état ═══════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--r-pilule);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-vert  { background: var(--vert-pale);  color: var(--vert);  border-color: #cde5da; }
.badge-rouge { background: var(--rouge-pale); color: var(--rouge); border-color: #efd4d4; }
.badge-or    { background: var(--ambre-pale); color: var(--ambre); border-color: #f0dfc2; }
.badge-bleu  { background: var(--bleu-pale);  color: var(--bleu);  border-color: #d3ddef; }
.badge-gris  { background: var(--surface-2);  color: var(--doux);  border-color: var(--filet); }

/* ═══ Barre d'outils ══════════════════════════════════════════════════════ */

.barre-outils {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
.barre-outils .grandit { flex: 1; min-width: 210px; }

.filtres {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--filet);
  border-radius: var(--r-pilule);
}
.filtre {
  padding: 6px 14px;
  border-radius: var(--r-pilule);
  border: none;
  background: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--doux);
  cursor: pointer;
  transition: color var(--vitesse) var(--courbe), background var(--vitesse) var(--courbe);
}
.filtre:hover { color: var(--sang); }
.filtre.active { background: var(--surface); color: var(--sang); box-shadow: 0 1px 2px rgba(22,24,29,.07); }

/* ═══ Onglets internes ════════════════════════════════════════════════════ */

.itabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--filet);
  margin-bottom: 22px;
  overflow-x: auto;
}
.itab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--doux);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--vitesse) var(--courbe);
}
.itab::after {
  content: '';
  position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: var(--sang);
  transform: scaleX(0);
  transition: transform 220ms var(--courbe);
}
.itab:hover { color: var(--encre); }
.itab.active { color: var(--sang); }
.itab.active::after { transform: scaleX(1); }

/* ═══ Chips ═══════════════════════════════════════════════════════════════ */

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px 3px 11px;
  border-radius: var(--r-pilule);
  background: var(--sang-pale);
  border: 1px solid #ecd9db;
  color: var(--sang);
  font-size: 12px;
  font-weight: 600;
  animation: apparait 200ms var(--courbe);
}
.chip button {
  border: none; background: none; cursor: pointer;
  color: inherit; opacity: .55;
  width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; line-height: 1;
  transition: opacity var(--vitesse), background var(--vitesse);
}
.chip button:hover { opacity: 1; background: rgba(124,22,38,.12); }

/* ═══ Barres de progression ═══════════════════════════════════════════════ */

.progress-bar {
  height: 7px;
  background: var(--surface-2);
  border-radius: var(--r-pilule);
  overflow: hidden;
  border: 1px solid var(--filet);
}
.progress-fill {
  height: 100%;
  border-radius: var(--r-pilule);
  background: var(--sang);
  /* La largeur finale est posée en style en ligne : l'image-clé part de zéro
     et rejoint cette valeur calculée. */
  animation: remplir 780ms var(--courbe) both;
}
@keyframes remplir { from { width: 0 !important; } }

/* ═══ Encarts d'information ═══════════════════════════════════════════════ */

.alerte {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
  border: 1px solid;
}
.alerte > span:first-child { flex-shrink: 0; display: grid; place-items: center; margin-top: 1px; }
.alerte.info { background: var(--bleu-pale);  border-color: #d3ddef; color: #163d75; }
.alerte.ok   { background: var(--vert-pale);  border-color: #cde5da; color: #14553e; }
.alerte.warn { background: var(--ambre-pale); border-color: #f0dfc2; color: #83500a; }
.alerte.err  { background: var(--rouge-pale); border-color: #efd4d4; color: #8a1a1a; }
.alerte strong { font-weight: 600; }

/* ═══ Éléments à traiter ══════════════════════════════════════════════════ */

.valid-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--filet);
}
.valid-item:last-child { border-bottom: none; }
.valid-item .vi-info { flex: 1; min-width: 0; }
.valid-item .vi-title { font-size: 13.5px; font-weight: 600; color: var(--encre); }
.valid-item .vi-sub { font-size: 12px; color: var(--doux); margin-top: 2px; }

/* ═══ Calendrier ══════════════════════════════════════════════════════════ */

.cal-nav { display: flex; align-items: center; gap: 6px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
  gap: 1px;
  background: var(--filet);
  border: 1px solid var(--filet);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 4px;
}
.cal-head-day {
  background: var(--surface-2);
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--faible);
  padding: 9px 2px;
}
.cal-cell {
  background: var(--surface);
  min-width: 0;
  min-height: 104px;
  padding: 7px 8px;
  cursor: pointer;
  position: relative;
  transition: background var(--vitesse) var(--courbe);
}
.cal-cell:hover { background: var(--sang-voile); }
.cal-cell.other-month { background: var(--surface-2); }
.cal-cell.other-month .cal-day-num { color: var(--faible); }
.cal-cell.today { background: var(--sang-voile); }
.cal-cell.today .cal-day-num {
  background: var(--sang); color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  margin: -2px 0 3px -2px;
}
.cal-day-num {
  font-family: var(--titre);
  font-size: 14px;
  font-weight: 600;
  color: var(--encre);
  margin-bottom: 4px;
}
.cal-event {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 2px solid currentColor;
}
.cal-event.role { background: var(--bleu-pale);  color: var(--bleu);  }
.cal-event.gav  { background: var(--sang-pale);  color: var(--sang);  }

/* ═══ Zone de dépôt ═══════════════════════════════════════════════════════ */

.drop-zone {
  border: 1.5px dashed var(--filet-fort);
  border-radius: 12px;
  padding: 30px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color var(--vitesse) var(--courbe), background var(--vitesse) var(--courbe);
}
.drop-zone:hover, .drop-zone.drag { border-color: var(--sang); background: var(--sang-voile); }
.drop-zone .dz-icon {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  margin: 0 auto 11px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--filet);
  color: var(--sang);
}
.drop-zone p { color: var(--doux); font-size: 13px; }
.drop-zone strong { color: var(--sang); }

.upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--filet);
  border-radius: 10px;
  margin-bottom: 8px;
  animation: monte 260ms var(--courbe) both;
}
.upload-item .ui-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--bleu-pale); color: var(--bleu);
  flex-shrink: 0;
}
.upload-item .ui-info { flex: 1; min-width: 0; }
.upload-item .ui-name { font-weight: 600; font-size: 13px; color: var(--encre); }
.upload-item .ui-status { font-size: 11.5px; color: var(--doux); margin-top: 2px; }
.upload-item .ui-badge { flex-shrink: 0; }

/* ═══ Permanences ═════════════════════════════════════════════════════════ */

.perm-slot {
  background: var(--surface-2);
  border: 1px solid var(--filet);
  border-radius: 9px;
  padding: 11px 10px;
  text-align: center;
  min-height: 54px;
  display: grid;
  place-items: center;
}
.perm-slot.assigned { background: var(--sang-pale); border-color: #ecd9db; }
.perm-slot .ps-name { font-size: 12.5px; font-weight: 600; color: var(--sang); line-height: 1.25; }
.perm-slot.empty .ps-name { color: var(--faible); font-weight: 400; }

/* ═══ Modèles de documents ════════════════════════════════════════════════ */

.model-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--filet);
  border-radius: var(--r-carte);
  cursor: pointer;
  transition: border-color var(--vitesse) var(--courbe),
              transform var(--vitesse) var(--courbe),
              box-shadow var(--vitesse) var(--courbe);
}
.model-card:hover {
  border-color: var(--sang);
  transform: translateY(-2px);
  box-shadow: var(--ombre);
}
.model-card .mc-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--sang-pale);
  color: var(--sang);
  flex-shrink: 0;
  transition: background var(--vitesse) var(--courbe), color var(--vitesse) var(--courbe);
}
.model-card:hover .mc-icon { background: var(--sang); color: #fff; }
.model-card .mc-info { flex: 1; min-width: 0; }
.model-card .mc-info h4 { font-size: 13.5px; font-weight: 600; color: var(--encre); line-height: 1.3; }
.model-card .mc-info p { font-size: 11.5px; color: var(--doux); margin-top: 3px; line-height: 1.4; }
.model-card .mc-fleche { color: var(--filet-fort); transition: color var(--vitesse), transform var(--vitesse); }
.model-card:hover .mc-fleche { color: var(--sang); transform: translateX(3px); }

/* ═══ Modales ═════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(22,24,29,.42);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  /* Au-dessus de l'écran de connexion (9000) : les codes de secours
     s'affichent pendant l'inscription, alors que la session n'est pas
     encore ouverte et que cet écran occupe encore la page. */
  z-index: 9500; padding: 24px;
  animation: voile 180ms var(--courbe);
}
.modal {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--ombre-haut);
  width: 100%; max-width: 580px; max-height: 88vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: surgit 240ms var(--courbe);
}
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--filet);
  background: linear-gradient(180deg, #fff, var(--surface-2));
}
.modal-head h3 {
  flex: 1;
  font-family: var(--titre);
  font-size: 20px; font-weight: 600;
  color: var(--encre);
}
.modal-close {
  border: none; background: none; cursor: pointer;
  color: var(--faible);
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; font-size: 17px; line-height: 1;
  transition: background var(--vitesse), color var(--vitesse);
}
.modal-close:hover { background: var(--surface-2); color: var(--encre); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--filet);
  display: flex; gap: 8px; justify-content: flex-end;
  background: var(--surface-2);
}

/* ═══ Notifications ═══════════════════════════════════════════════════════ */

#toast-container {
  position: fixed; bottom: 22px; right: 22px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  background: var(--encre);
  color: #f1efec;
  padding: 11px 17px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--ombre-haut);
  border-left: 3px solid var(--or);
  animation: glisse 260ms var(--courbe);
  max-width: 380px;
}
.toast.t-ok  { border-left-color: #3fb489; }
.toast.t-err { border-left-color: #e06060; }

/* ═══ États transitoires ══════════════════════════════════════════════════ */

.chargement {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  padding: 56px 20px;
  color: var(--faible);
  font-size: 13px;
}
.spinner {
  width: 17px; height: 17px;
  border: 2px solid var(--filet);
  border-top-color: var(--sang);
  border-radius: 50%;
  animation: tourne 640ms linear infinite;
}
.vide {
  text-align: center;
  padding: 46px 20px;
  color: var(--doux);
  font-size: 13px;
}
.vide .vide-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  margin: 0 auto 13px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--filet);
  color: var(--faible);
}

/* ═══ Bandeau d'avertissement ═════════════════════════════════════════════ */

.bandeau {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 40px;
  background: var(--ambre-pale);
  border-bottom: 1px solid #f0dfc2;
  font-size: 13px;
  color: #83500a;
}
.bandeau > span:first-child { display: grid; place-items: center; }
.bandeau .btn { margin-left: auto; }

/* ═══ Divers ══════════════════════════════════════════════════════════════ */

.mdp-provisoire {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  background: var(--encre); color: #f1efec;
  padding: 3px 8px; border-radius: 5px;
  font-size: 12px; letter-spacing: .04em;
}

.journal { max-height: 440px; overflow-y: auto; }
.journal-ligne {
  display: grid;
  grid-template-columns: 160px 190px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--filet);
  font-size: 12.5px;
}
.journal-ligne:last-child { border-bottom: none; }
.journal-ligne .j-date { color: var(--faible); white-space: nowrap; }
.journal-ligne .j-action { font-weight: 600; color: var(--sang); }

/* ═══ Écran de connexion ══════════════════════════════════════════════════
   Deux panneaux : l'emblème et la raison d'être à gauche, le formulaire à
   droite. La page de garde d'un dossier, pas une boîte flottante.          */

#auth-screen {
  position: fixed; inset: 0;
  display: flex;
  z-index: 9000;
  background: var(--papier);
}
.auth-cote {
  flex: 1;
  background: var(--encre);
  color: #cfcbc4;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
/* Une lueur sang de bœuf en fond, très sourde : de la profondeur sans motif. */
.auth-cote::before {
  content: '';
  position: absolute; inset: -30% -10% auto -30%;
  height: 90%;
  background: radial-gradient(60% 60% at 30% 40%, rgba(166,32,58,.28), transparent 70%);
  pointer-events: none;
}
.auth-cote > * { position: relative; }
.auth-embleme {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 16px;
  color: var(--or);
  background: rgba(176,138,46,.11);
  border: 1px solid rgba(176,138,46,.3);
}
.auth-accroche {
  font-family: var(--titre);
  font-size: 46px;
  font-weight: 500;
  line-height: 1.14;
  color: #fff;
  letter-spacing: -.015em;
  max-width: 12ch;
}
.auth-accroche em { font-style: italic; color: var(--or); }
.auth-pied { font-size: 12px; color: #7d8189; line-height: 1.6; }

.auth-panneau {
  width: min(480px, 100%);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 40px;
}
.auth-box { width: 100%; max-width: 340px; }
.auth-logo {
  font-family: var(--titre);
  font-size: 30px; font-weight: 600;
  color: var(--encre);
  letter-spacing: -.01em;
}
.auth-logo span { color: var(--or); font-style: italic; }
.auth-sub {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faible);
  margin: 5px 0 30px;
}
.auth-err {
  display: flex; align-items: flex-start; gap: 9px;
  background: var(--rouge-pale);
  border: 1px solid #efd4d4;
  color: #8a1a1a;
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  margin-bottom: 16px;
  animation: secoue 320ms var(--courbe);
}
.auth-note {
  font-size: 11.5px;
  color: var(--faible);
  margin-top: 22px;
  line-height: 1.65;
  padding-top: 18px;
  border-top: 1px solid var(--filet);
}

/* ═══ Mouvement ═══════════════════════════════════════════════════════════
   Le contenu d'une page monte de quelques pixels, bloc par bloc. On perçoit
   l'ordre de lecture avant même d'avoir lu.                                */

#page > * { animation: monte 380ms var(--courbe) both; }
#page > *:nth-child(1) { animation-delay: 0ms; }
#page > *:nth-child(2) { animation-delay: 40ms; }
#page > *:nth-child(3) { animation-delay: 80ms; }
#page > *:nth-child(4) { animation-delay: 120ms; }
#page > *:nth-child(5) { animation-delay: 160ms; }
#page > *:nth-child(n+6) { animation-delay: 200ms; }

@keyframes monte    { from { opacity: 0; transform: translateY(9px); } }
@keyframes apparait { from { opacity: 0; transform: scale(.94); } }
@keyframes surgit   { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes voile    { from { opacity: 0; } }
@keyframes glisse   { from { opacity: 0; transform: translateX(18px); } }
@keyframes tourne   { to { transform: rotate(360deg); } }
@keyframes secoue {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}

/* Certains utilisateurs sont gênés par le mouvement, et le système le dit. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  @keyframes remplir { from { width: inherit; } }
}

/* ═══ Tablette ════════════════════════════════════════════════════════════ */

@media (max-width: 1180px) {
  :root { --barre: 68px; }
  /* La barre se réduit à ses icônes : le contenu reprend la place. */
  .marque { justify-content: center; padding: 20px 0 16px; }
  .marque-texte, .nlabel, .sb-identite { display: none; }
  .nav-btn { justify-content: center; padding: 11px 0; }
  .nav-btn.active::before { left: -12px; }
  .nbadge { position: absolute; top: 4px; right: 8px; min-width: 16px; font-size: 9.5px; line-height: 15px; padding: 0 4px; }
  .huser { justify-content: center; padding: 6px 0 10px; }
  .sb-actions { flex-direction: column; }
  #main { padding: 28px 26px 56px; }
  .bandeau { padding-inline: 26px; }
  .grid4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .journal-ligne { grid-template-columns: 150px 1fr; }
  .journal-ligne .j-action { grid-column: 2; }
}

@media (max-width: 900px) {
  .grid2, .grid3 { grid-template-columns: minmax(0,1fr); }
  .auth-cote { display: none; }
  .auth-panneau { width: 100%; }
}

/* ═══ Téléphone ═══════════════════════════════════════════════════════════
   La barre latérale passe en bas : sur un écran tenu à une main, le pouce
   atteint le bas, pas le haut.                                             */

@media (max-width: 760px) {
  #app { flex-direction: column; }

  #sidebar {
    position: fixed;
    /* « top » vaut 0 sur ordinateur : sans cette remise à zéro, l'élément
       serait tendu du haut au bas de l'écran au lieu de se poser en bas. */
    top: auto; bottom: 0; left: 0; right: 0;
    width: auto; height: auto;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid #000;
    z-index: 200;
    padding: 0;
  }
  /* L'emblème pleine taille et le bloc identité vivent dans la barre
     supérieure sur téléphone ; la barre du bas ne porte que la navigation. */
  #sidebar > .marque { display: none; }
  .sb-actions { flex-direction: row; }
  #nav {
    flex-direction: row;
    padding: 4px 6px;
    gap: 0;
    justify-content: space-around;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }
  .nav-btn {
    flex-direction: column;
    gap: 3px;
    min-width: 60px;
    padding: 7px 4px;
    font-size: 9.5px;
    font-weight: 600;
  }
  .nav-btn .nlabel { display: block; white-space: nowrap; }
  .nav-btn.active { background: none; }
  .nav-btn.active::before {
    left: 50%; top: 0; bottom: auto;
    width: 18px; height: 2px;
    border-radius: 0 0 2px 2px;
    transform: translateX(-50%);
  }
  .nbadge { top: 2px; right: 12px; }

  /* En-tête compact : identité et sortie, que la barre du bas n'accueille pas.
     Il est ancré au haut de l'écran, et non à son parent : « sticky » resterait
     prisonnier de la barre inférieure, elle-même en position fixe. */
  #header {
    position: fixed; top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 54px;
    background: var(--encre);
    color: #fff;
    border-top: none;
    z-index: 210;
  }
  #principal { padding-top: 54px; }
  #header .marque-compacte { display: flex; padding: 0; }
  #header .marque-texte { display: block; }
  #header .marque-texte .logo { font-size: 17px; }
  #header .marque-embleme { width: 30px; height: 30px; border-radius: 8px; }
  #header .hspacer { display: block; flex: 1; }
  #header .huser { display: flex; padding: 0; gap: 7px; }
  #header .sb-identite { display: none; }
  #header .btn {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: #d8d4cd;
    padding: 6px 9px;
  }
  #header .btn-libelle { display: none; }

  #main { padding: 20px 15px 92px; }
  .bandeau { padding-inline: 15px; }
  .sec-title { font-size: 26px; }
  .sec-sub { margin-bottom: 20px; }
  .grid4 { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .kpi { padding: 13px 14px 15px; }
  .kpi .kv { font-size: 27px; }
  .card-head { padding: 13px 15px; flex-wrap: wrap; }
  .card-head h2 { font-size: 17px; }
  .card-sub { margin-left: 0; flex-basis: 100%; text-align: left; }
  .card-body { padding: 15px; }

  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    max-width: none; max-height: 92vh;
    border-radius: 16px 16px 0 0;
    animation: remonte 260ms var(--courbe);
  }
  @keyframes remonte { from { transform: translateY(100%); } }
  .modal-foot { position: sticky; bottom: 0; }

  #toast-container { left: 15px; right: 15px; bottom: 88px; }
  .toast { max-width: none; }

  .cal-grid { gap: 1px; }
  .cal-cell { min-height: 62px; padding: 4px; }
  .cal-day-num { font-size: 12px; }
  .cal-head-day { font-size: 9px; padding: 6px 1px; }
  /* Une colonne fait 45 px : un intitulé tronqué n'apprend rien, une
     pastille de couleur si. Le détail s'ouvre au toucher. */
  .cal-event {
    font-size: 0; line-height: 0;
    height: 5px; padding: 0; margin-bottom: 2px;
    border-radius: 3px; border-left: none;
    background-color: currentColor;
  }
  .journal-ligne { grid-template-columns: minmax(0,1fr); gap: 2px; }
  .journal-ligne .j-action { grid-column: auto; }
  .filtres { width: 100%; overflow-x: auto; }
}

/* ═══ Impression ══════════════════════════════════════════════════════════ */

@media print {
  #sidebar, #header, #toast-container, .barre-outils, .btn, .bandeau, .itabs { display: none !important; }
  #main { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { border-color: #ccc; break-inside: avoid; margin-bottom: 12px; }
  .card:hover { transform: none; }
  .tbl th { background: #eee !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #page > * { animation: none !important; }
  .sec-title { font-size: 24px; }
}

/* ═══ Second facteur ══════════════════════════════════════════════════════ */

/* Le panneau d'inscription porte plus de contenu que celui de connexion. */
.auth-box-large { max-width: 400px; }

.auth-retour {
  display: inline-flex; align-items: center; gap: 5px;
  border: none; background: none; cursor: pointer;
  color: var(--doux); font-size: 12.5px; font-weight: 600;
  padding: 0 0 14px;
  transition: color var(--vitesse) var(--courbe);
}
.auth-retour:hover { color: var(--sang); }

/* Un code à six chiffres se lit par blocs : on l'espace et on l'agrandit. */
.champ-code {
  font-family: var(--titre);
  font-size: 30px;
  font-weight: 600;
  text-align: center;
  letter-spacing: .34em;
  /* L'espacement pousse le texte à droite : on compense pour le recentrer. */
  text-indent: .34em;
  padding: 12px 10px;
}
.champ-code::placeholder { color: var(--filet-fort); letter-spacing: .34em; }

.mfa-etapes { list-style: none; counter-reset: etape; margin-top: 6px; }
.mfa-etapes > li {
  counter-increment: etape;
  position: relative;
  padding: 0 0 20px 34px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--doux);
}
/* Un filet relie les puces : la marche à suivre se lit comme une suite. */
.mfa-etapes > li:not(:last-child)::after {
  content: '';
  position: absolute; left: 11px; top: 26px; bottom: 6px;
  width: 1px; background: var(--filet);
}
.mfa-etapes > li::before {
  content: counter(etape);
  position: absolute; left: 0; top: 0;
  width: 23px; height: 23px;
  border-radius: 50%;
  background: var(--sang); color: #fff;
  font-family: var(--ui);
  font-size: 11.5px; font-weight: 700;
  display: grid; place-items: center;
}
.mfa-etapes strong { color: var(--encre); font-weight: 600; }

.mfa-qr {
  display: grid; place-items: center;
  margin: 12px 0 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--filet);
  border-radius: 12px;
}
.mfa-qr svg { display: block; border-radius: 4px; }

.mfa-manuel, .auth-secours { font-size: 12px; color: var(--doux); }
.mfa-manuel summary, .auth-secours summary {
  cursor: pointer; color: var(--sang); font-weight: 600;
  padding: 4px 0; list-style-position: inside;
}
.mfa-manuel summary::marker, .auth-secours summary::marker { font-size: .8em; }
.mfa-manuel p, .auth-secours p { margin: 8px 0; line-height: 1.6; }
.mfa-manuel code { display: inline-block; margin-top: 4px; }

.auth-secours {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--filet);
}

/* Les codes de secours sont faits pour être recopiés, donc lisibles. */
.codes-secours {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}
.codes-secours code {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 14.5px;
  letter-spacing: .09em;
  text-align: center;
  padding: 10px 6px;
  background: var(--surface-2);
  border: 1px solid var(--filet);
  border-radius: 8px;
  color: var(--encre);
}

/* ── Écran « ma sécurité » ─────────────────────────────────────────────── */

.secu-ligne {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--filet);
}
.secu-ligne:last-child { border-bottom: none; }
.secu-icone {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.secu-icone.ok { background: var(--vert-pale); color: var(--vert); }
.secu-icone.attention { background: var(--ambre-pale); color: var(--ambre); }
.secu-texte { flex: 1; min-width: 0; line-height: 1.45; }
.secu-texte strong { display: block; font-size: 13.5px; color: var(--encre); }
.secu-texte span { font-size: 12px; color: var(--doux); }

@media (max-width: 760px) {
  .codes-secours { grid-template-columns: minmax(0, 1fr); }
  .champ-code { font-size: 26px; }
  .secu-ligne { flex-wrap: wrap; }
  .secu-texte { flex-basis: calc(100% - 51px); }
  .secu-ligne .btn, .secu-ligne .badge { margin-left: 51px; }
}

/* ═══ Étiquette d'environnement ═══════════════════════════════════════════
   Rien ne distingue deux instances qui servent le même code. Ce bandeau est
   volontairement voyant : il vaut mieux qu'il agace en préproduction plutôt
   qu'on saisisse un jour une vraie cotisation au mauvais endroit.          */

.ruban-env {
  position: sticky;
  top: 0;
  z-index: 9600;
  padding: 5px 16px;
  background: repeating-linear-gradient(
    135deg, var(--ambre), var(--ambre) 12px,
    #945c0d 12px, #945c0d 24px);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  flex-shrink: 0;
}
.ruban-env::before { content: '⚠ '; }
.ruban-env::after  { content: ' — données de test'; letter-spacing: .08em; }

/* Sur l'écran de connexion, il coiffe les deux panneaux. */
#auth-screen { flex-wrap: wrap; }
#auth-screen .ruban-env { position: fixed; top: 0; left: 0; right: 0; }
#auth-screen:has(.ruban-env) .auth-cote,
#auth-screen:has(.ruban-env) .auth-panneau { padding-top: 60px; }

@media (max-width: 760px) {
  .ruban-env { font-size: 9.5px; letter-spacing: .1em; padding: 4px 10px; }
  .ruban-env::after { content: ''; }
}
