/* ============================================================
   gestoapp — Backoffice
   Charte : identite/tokens.css (violet Gesto, neutres à biais violet).
   Thème clair uniquement, comme le site ; barre latérale en encre (« .inverse » du site).
   ============================================================ */

:root {
  color-scheme: only light;

  --violet-50: #F5F1FC;
  --violet-100: #EAE1F9;
  --violet-200: #D4C3F2;
  --violet-400: #9A7BE0;
  --violet-500: #7B4FD0;
  --violet-600: #6640BA;
  --violet-700: #5333A0;
  --violet-900: #331F63;

  --paper: #FAF8FC;
  --card: #FFFFFF;
  --ink: #1D1826;
  --ink-2: #342D47;
  --muted: #6B6280;
  --faint: #8C84A0;
  --line: #E7E2F0;
  --line-2: #D9D2E6;
  --chip: #F1EDF8;

  --brand: var(--violet-500);
  --brand-strong: var(--violet-700);
  --brand-soft: var(--violet-50);

  /* Sémantique : pastille = couleur pleine, texte = teinte foncée (contraste AA sur l'aplat). */
  --ok: #2F9E63;   --ok-soft: #E7F5ED;   --ok-ink: #1C6B43;
  --warn: #E19A10; --warn-soft: #FBF2DC; --warn-ink: #7D5300;
  --err: #CC3D33;  --err-soft: #FAE7E5;  --err-ink: #9E2A22;
  --info: #3573D9; --info-soft: #E7EFFB; --info-ink: #24539F;

  --side: #161120;
  --side-2: #221B35;
  --side-ink: #EFEBF7;
  --side-muted: #A297B8;
  --side-line: #322A47;

  --font-display: "Unbounded", "Avenir Next", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-s: 6px;
  --r-m: 10px;
  --r-l: 14px;
  --ombre: 0 1px 2px rgba(29, 24, 38, .04), 0 1px 1px rgba(29, 24, 38, .03);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; }
a { color: var(--brand-strong); }
a:hover { color: var(--violet-900); }
h1, h2, h3 { line-height: 1.25; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mono, .montant { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.petit { font-size: 13px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Structure ---------- */
.app {
  display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh;
  /* La colonne d'encre descend jusqu'en bas, même sur une page plus haute que l'écran. */
  background: linear-gradient(to right, var(--side) 252px, transparent 252px);
}

.sidebar {
  background: var(--side); color: var(--side-ink);
  padding: 20px 14px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.brand {
  display: flex; align-items: center; gap: 11px; padding: 4px 8px 10px;
  color: inherit; text-decoration: none;
}
.brand:hover { color: inherit; }
.brand img { flex: none; }
.brand-nom { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: .02em; line-height: 1.1; }
.brand-nom .suffix { color: var(--violet-400); }
.brand-nom small {
  display: block; margin-top: 3px;
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  color: var(--side-muted); letter-spacing: .12em; text-transform: uppercase;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-titre {
  margin: 14px 0 4px; padding: 0 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--side-muted);
}
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--r-m);
  color: var(--side-ink); text-decoration: none; font-weight: 500;
  opacity: .82;
}
.nav a:hover { background: var(--side-2); opacity: 1; color: var(--side-ink); }
.nav a.on { background: var(--side-2); opacity: 1; box-shadow: inset 3px 0 0 var(--violet-400); }
.nav svg { width: 19px; height: 19px; flex: none; }
.compteur {
  margin-left: auto; min-width: 22px; text-align: center;
  background: var(--violet-500); color: #fff;
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 7px;
}

.moi {
  margin-top: auto; padding: 14px 6px 0; border-top: 1px solid var(--side-line);
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--violet-700); color: #fff; font-weight: 700; font-size: 13px;
}
.moi-texte { min-width: 0; flex: 1; }
.moi-texte a { color: var(--side-ink); text-decoration: none; font-weight: 600; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moi-texte span { font-size: 12px; color: var(--side-muted); }
.btn-sortir {
  background: none; border: 0; color: var(--side-muted); cursor: pointer;
  padding: 7px; border-radius: var(--r-s); display: grid; place-items: center;
}
.btn-sortir:hover { color: var(--side-ink); background: var(--side-2); }
.btn-sortir svg { width: 18px; height: 18px; }

.main { min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 64px; }

.barre-mobile { display: none; }
.voile { display: none; }

@media (max-width: 920px) {
  .app { grid-template-columns: minmax(0, 1fr); background: none; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 272px; height: 100%; z-index: 50;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.ouverte { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  .voile.visible { display: block; position: fixed; inset: 0; background: rgba(15, 11, 23, .45); z-index: 40; }
  .barre-mobile {
    display: flex; align-items: center; gap: 12px;
    margin: -26px -16px 20px; padding: 10px 16px;
    background: var(--side); color: var(--side-ink);
  }
  .barre-mobile .brand { padding: 0; }
  .barre-mobile .brand-nom { font-size: 17px; }
  .btn-menu {
    background: var(--side-2); color: var(--side-ink); border: 0; border-radius: var(--r-m);
    width: 40px; height: 40px; font-size: 20px; cursor: pointer;
  }
}

/* ---------- En-tête de page ---------- */
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 22px; }
.entete h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2.4vw, 25px); margin: 0; letter-spacing: -.005em; }
.entete .sous-titre { margin: 4px 0 0; color: var(--muted); }
.fil { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.fil a { color: var(--muted); text-decoration: none; }
.fil a:hover { color: var(--brand-strong); text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2;
  padding: 9px 15px; border-radius: var(--r-m); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primaire { background: var(--violet-700); color: #fff; }
.btn-primaire:hover { background: var(--violet-600); color: #fff; }
.btn-secondaire { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn-secondaire:hover { border-color: var(--brand); color: var(--brand-strong); }
.btn-discret { background: transparent; color: var(--brand-strong); }
.btn-discret:hover { background: var(--brand-soft); }
.btn-danger { background: var(--card); color: var(--err-ink); border-color: #F0C9C5; }
.btn-danger:hover { background: var(--err-soft); color: var(--err-ink); }
.btn-whatsapp { background: #1F8F4E; color: #fff; }
.btn-whatsapp:hover { background: #197541; color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: var(--r-s); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
form.inline { display: inline; margin: 0; }

/* ---------- Alertes ---------- */
.alerte {
  border-radius: var(--r-m); padding: 12px 16px; margin-bottom: 18px;
  border: 1px solid; font-weight: 500;
  display: flex; gap: 10px; align-items: flex-start;
}
.alerte::before { font-weight: 700; flex: none; }
.alerte-ok { background: var(--ok-soft); border-color: #BFE3CF; color: var(--ok-ink); }
.alerte-ok::before { content: "✓"; }
.alerte-err { background: var(--err-soft); border-color: #F0C9C5; color: var(--err-ink); }
.alerte-err::before { content: "!"; }
.alerte-info { background: var(--info-soft); border-color: #C8D9F4; color: var(--info-ink); }
.alerte-info::before { content: "i"; }
.alerte-warn { background: var(--warn-soft); border-color: #F1DDA8; color: var(--warn-ink); }
.alerte-warn::before { content: "!"; }

/* ---------- Cartes ---------- */
.carte { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--ombre); }
.carte + .carte { margin-top: 18px; }
.carte-tete {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.carte-tete h2 { margin: 0; font-size: 15.5px; font-weight: 700; }
.carte-tete .muted { font-size: 13px; }
.carte-corps { padding: 18px; }
.carte-vide { padding: 28px 18px; text-align: center; color: var(--muted); }

.grille-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grille-2-egal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grille-2 > .carte + .carte, .grille-2-egal > .carte + .carte { margin-top: 0; }
.pile { display: grid; gap: 18px; margin-top: 18px; }
@media (max-width: 1100px) { .grille-2, .grille-2-egal { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Indicateurs ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (min-width: 1600px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--ombre);
  padding: 15px 17px; text-decoration: none; color: inherit; display: block; position: relative;
}
a.kpi:hover { border-color: var(--line-2); color: inherit; }
.kpi-libelle { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.kpi-valeur { font-family: var(--font-display); font-size: 25px; font-weight: 600; margin-top: 6px; line-height: 1.15; letter-spacing: -.01em; }
.kpi-valeur small { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kpi-sous { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.pastille { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--faint); }
.pastille.ok { background: var(--ok); } .pastille.warn { background: var(--warn); }
.pastille.err { background: var(--err); } .pastille.info { background: var(--info); }
.pastille.brand { background: var(--brand); }

/* ---------- Badges (toujours avec leur libellé) ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; line-height: 1.3;
  padding: 3px 9px 3px 8px; border-radius: 999px; white-space: nowrap;
  background: var(--chip); color: var(--ink-2);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.badge.ok { background: var(--ok-soft); color: var(--ok-ink); } .badge.ok::before { background: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn-ink); } .badge.warn::before { background: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err-ink); } .badge.err::before { background: var(--err); }
.badge.info { background: var(--info-soft); color: var(--info-ink); } .badge.info::before { background: var(--info); }
.badge.muted { background: var(--chip); color: var(--muted); }
.puce-app { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.puce-app i { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--brand); }

/* ---------- Tableaux ---------- */
.table-defile { overflow-x: auto; }
table.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FCFBFE; white-space: nowrap;
}
.tableau td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau tbody tr:hover td { background: #FCFBFE; }
.tableau .num { text-align: right; white-space: nowrap; }
.tableau td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.tableau .fin { text-align: right; white-space: nowrap; }
.tableau a.lien-ligne { color: var(--ink); font-weight: 600; text-decoration: none; }
.tableau a.lien-ligne:hover { color: var(--brand-strong); text-decoration: underline; }
.tableau .sous { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.tableau tfoot td { font-weight: 700; border-top: 1px solid var(--line-2); border-bottom: 0; }
.tableau tr.inactif td { color: var(--muted); }
.tableau tr.inactif .badge { margin-left: 6px; }
.liste-cases { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.avis-app { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; padding: 12px 18px 0; }
.avis-app form.delai { display: inline-flex; gap: 8px; align-items: center; }
.avis-app input[type=date] { width: auto; padding: 5px 8px; font-size: 13.5px; }

/* ---------- Filtres ---------- */
.filtres {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.filtres .champ { gap: 4px; }
.filtres label { font-size: 12px; }
.filtres input, .filtres select { min-width: 150px; padding: 8px 10px; }
.filtres .recherche { flex: 1 1 220px; }
.filtres .recherche input { width: 100%; }

/* ---------- Formulaires ---------- */
.formulaire { max-width: 860px; }
.form-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grille .large { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grille { grid-template-columns: minmax(0, 1fr); } }
.form-section { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 8px 0 -4px; grid-column: 1 / -1; }
.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ label, .etiquette { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.champ .requis { color: var(--err-ink); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search], input[type=tel], select, textarea {
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-m);
  padding: 9px 12px; width: 100%; min-width: 0;
}
input[type=color] { width: 56px; height: 40px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--card); }
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
.champ.en-erreur input, .champ.en-erreur select, .champ.en-erreur textarea { border-color: var(--err); }
.erreur-champ { font-size: 13px; color: var(--err-ink); font-weight: 500; }
.aide { font-size: 13px; color: var(--muted); }
.case { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.case input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--violet-600); flex: none; }
.case span small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.form-pied {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 14px 18px; border-top: 1px solid var(--line); background: #FCFBFE;
  border-radius: 0 0 var(--r-l) var(--r-l);
}
.encart {
  grid-column: 1 / -1; background: var(--paper); border: 1px dashed var(--line-2); border-radius: var(--r-m);
  padding: 14px 16px; display: grid; gap: 14px;
}
.encart .form-grille { gap: 12px 16px; }

/* ---------- Fiches ---------- */
.fiche { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 22px; margin: 0; }
.fiche dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fiche dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.notes { white-space: pre-line; background: var(--paper); border-radius: var(--r-m); padding: 12px 14px; margin: 16px 0 0; color: var(--ink-2); }

/* ---------- Abonnement sur la fiche client ---------- */
.abonnement { scroll-margin-top: 20px; }
.abonnement-tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.abonnement-tete h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 9px; }
.abonnement-tete h3 i { width: 12px; height: 12px; border-radius: 3px; background: var(--brand); }
.abonnement-tete .actions { margin-left: auto; }
.resume { display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.resume div span { color: var(--muted); font-size: 12.5px; display: block; }
.resume div strong { font-weight: 600; }
.periode-actuelle td:first-child { box-shadow: inset 3px 0 0 var(--violet-500); }
.paiements-ligne { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.paiements-ligne form button { background: none; border: 0; padding: 0 2px; color: var(--err-ink); cursor: pointer; font-size: 12px; }

/* ---------- Tableau de bord : graphe ---------- */
.graphe { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: 190px auto; padding: 16px 18px 12px 6px; }
.graphe-axe { position: relative; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.graphe-axe span { position: absolute; right: 10px; transform: translateY(-50%); white-space: nowrap; }
.graphe-zone { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; align-items: end; border-bottom: 1px solid var(--line-2); }
.graphe-ligne { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); pointer-events: none; }
.barre { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.barre i { display: block; width: min(30px, 72%); background: var(--violet-500); border-radius: 4px 4px 0 0; transition: background .12s; }
.barre:hover i, .barre:focus-visible i { background: var(--violet-700); }
.barre:focus-visible { outline: none; }
.barre b {
  position: absolute; bottom: calc(var(--h) + 4px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.graphe-mois { grid-column: 2; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; padding-top: 6px; font-size: 11.5px; color: var(--muted); text-align: center; }
.graphe-mois span.courant { color: var(--ink); font-weight: 700; }
.infobulle {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--ink); color: #fff; border-radius: var(--r-s); padding: 7px 10px;
  font-size: 12.5px; line-height: 1.35; white-space: nowrap; transform: translate(-50%, -100%);
  box-shadow: 0 6px 18px rgba(15, 11, 23, .18);
}
.infobulle strong { font-family: var(--font-mono); display: block; font-size: 13px; }
details.donnees { border-top: 1px solid var(--line); }
details.donnees summary { padding: 10px 18px; cursor: pointer; font-size: 13px; color: var(--brand-strong); font-weight: 600; }

.repartition { list-style: none; margin: 0; padding: 6px 0; }
.repartition li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 9px 18px; align-items: center; }
.repartition .jauge { grid-column: 1 / -1; height: 6px; background: var(--chip); border-radius: 999px; overflow: hidden; }
.repartition .jauge i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.repartition strong { font-family: var(--font-mono); font-size: 14px; }

.liste-simple { list-style: none; margin: 0; padding: 0; }
.liste-simple li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.liste-simple li:last-child { border-bottom: 0; }
.liste-simple .titre { font-weight: 600; color: var(--ink); text-decoration: none; }
.liste-simple .titre:hover { color: var(--brand-strong); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }

/* ---------- Message / demande ---------- */
.message-texte { white-space: pre-line; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; margin: 0; overflow-wrap: anywhere; }

/* ---------- Connexion ---------- */
.page-connexion {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(123, 79, 208, .35), transparent 60%),
    radial-gradient(700px 480px at -10% 110%, rgba(154, 123, 224, .22), transparent 60%),
    var(--side);
}
.connexion { width: 100%; max-width: 410px; }
.connexion .brand { justify-content: center; color: var(--side-ink); margin-bottom: 18px; }
.connexion .carte { padding: 28px; }
.connexion h1 { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin: 0 0 4px; }
.connexion form { display: grid; gap: 16px; margin-top: 20px; }
.connexion .btn { width: 100%; padding: 12px; font-size: 15px; }
.connexion .pied { text-align: center; color: var(--side-muted); font-size: 13px; margin-top: 18px; }
.connexion .pied a { color: var(--side-ink); }
.connexion .pied form { display: inline; margin: 0; }
.connexion .pied button { background: none; border: 0; padding: 0; font: inherit; color: var(--side-ink); text-decoration: underline; cursor: pointer; }
.connexion.large { max-width: 520px; }
.connexion .etapes { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); font-size: 14.5px; }
.connexion .qr { display: block; width: 200px; height: 200px; margin: 18px auto 8px; image-rendering: pixelated; border: 1px solid var(--line); border-radius: var(--r-m); }
.connexion .cle { text-align: center; font-family: var(--font-mono); font-size: 14px; letter-spacing: .04em; color: var(--ink); margin: 0; overflow-wrap: anywhere; }
input.code-saisi { font-family: var(--font-mono); font-size: 20px; letter-spacing: .18em; text-align: center; }

/* ---------- Double authentification (Mon compte) ---------- */
.codes-secours { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.codes-secours li { font-family: var(--font-mono); font-size: 16px; letter-spacing: .06em; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; text-align: center; }
.form-ligne { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.form-ligne .champ { width: 180px; }

/* ---------- Divers ---------- */
.separateur { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.vide-illustration { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.code { font-family: var(--font-mono); font-size: 13px; background: var(--chip); padding: 1px 6px; border-radius: 4px; }
.aide-smtp { font-size: 13.5px; color: var(--ink-2); background: var(--info-soft); border-radius: var(--r-m); padding: 12px 14px; }
.aide-smtp p { margin: 0 0 6px; }
.aide-smtp ul { margin: 0; padding-left: 18px; }
.erreur-journal { color: var(--err-ink); font-size: 12.5px; display: block; max-width: 520px; white-space: normal; }
