/* bease-admin — la mise en page du shell (fiche n° 39, 1.1), copie adaptée de shell/shell.css de bease-app (shell/ORIGINE.json) :
   la charte Bease de ui/ (fond noir, carte #0a0a0a, or pour le seul bouton plein, Inter) ; ici seulement ce que le site n'a pas —
   l'en-tête du back-office, sa barre latérale, son bureau à tuiles, ses tableaux, ses filtres, la seconde authentification. Aucune
   couleur écrite en dur hors des jetons, sauf celles que le site emploie déjà (le blanc et le noir du code QR). */
body{min-height:100vh}
#admin{display:grid;grid-template-columns:15.5rem minmax(0,1fr);grid-template-rows:auto 1fr;min-height:100vh}

.admin-entete{grid-column:1/-1;position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:.9rem;padding:.6rem var(--pad);border-bottom:1px solid var(--line);background:rgba(0,0,0,.85);backdrop-filter:blur(12px)}
.admin-marque{display:inline-flex;align-items:center;gap:.7rem;min-height:44px;color:var(--fg)}.admin-marque img{height:1.55rem;width:auto}
.admin-marque-mot{font-size:.78rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--gold)}
.admin-entete-d{margin-inline-start:auto;display:flex;align-items:center;gap:.8rem}
.admin-roles{color:var(--muted);font-size:.82rem}
.admin-menu-btn{display:none;flex-direction:column;justify-content:center;gap:4px;width:44px;height:44px;padding:0 11px;border:1px solid var(--line2);border-radius:.75rem;background:transparent;cursor:pointer}
.admin-menu-btn span{display:block;height:2px;background:var(--fg);border-radius:2px}

.admin-barre{display:flex;flex-direction:column;gap:1rem;padding:1rem .7rem 1.5rem;border-inline-end:1px solid var(--line);background:var(--bg)}
.admin-barre-liste{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.15rem}
.admin-barre-lien{display:flex;align-items:center;gap:.7rem;min-height:44px;padding:.4rem .75rem;border-radius:.75rem;color:var(--soft);font-size:.92rem}
.admin-barre-lien .ic{width:1.15rem;height:1.15rem;flex:none}
.admin-barre-lien:hover{background:rgba(255,255,255,.05);color:var(--fg)}
.admin-barre-lien.actif{background:var(--bg2);color:var(--fg);box-shadow:inset 0 0 0 1px var(--line2)}

/* R3: every screen's first block starts 24 px under the header — the site's own distance (--page-top = header + 24 px) */
.admin-zone{min-width:0;padding:24px clamp(1rem,3.5vw,2.75rem) 4rem}
.admin-zone:focus{outline:none}
html,.admin-zone{overflow-anchor:none}
html{scroll-behavior:auto}
.admin-ecran{padding:0}
.admin-ecran-titre{font-size:clamp(1.7rem,3.2vw,2.4rem);margin:0 0 .4em}
.admin-ecran-titre[tabindex="-1"]:focus{outline:none}
.admin-ecran-sous{color:var(--muted);margin:0 0 1.2rem;max-width:52rem}

/* the desktop: what this entry lacks, then the day's figures, then the tiles */
.admin-avertissements{display:flex;flex-direction:column;gap:.6rem;margin:1rem 0 0;max-width:52rem}
.admin-avertissement{margin:0}
.admin-chiffres{list-style:none;margin:1.4rem 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(11rem,1fr));gap:1rem}
.admin-chiffre{padding:1rem 1.1rem;border-radius:var(--r2);background:var(--bg2);border:1px solid var(--line);min-height:6.2rem;display:flex;flex-direction:column;justify-content:space-between;gap:.5rem}
.admin-chiffre-valeur{font-size:1.9rem;font-weight:800;letter-spacing:-.01em;font-variant-numeric:tabular-nums;line-height:1.1}
.admin-chiffre-nom{color:var(--muted);font-size:.85rem;line-height:1.35}
.admin-chiffre .admin-bientot{font-size:1rem}
.admin-tuiles{list-style:none;margin:1.8rem 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(10.5rem,1fr));gap:1rem}
.admin-tuile{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:1.2rem;height:100%;min-height:7.5rem;padding:1.1rem;border-radius:var(--r2);background:var(--bg2);border:1px solid var(--line);color:var(--fg)}
.admin-tuile .ic{width:1.8rem;height:1.8rem}
.admin-tuile:hover,.admin-tuile:focus-visible{border-color:var(--line2);background:var(--bg3);color:var(--fg)}
.admin-tuile-nom{font-weight:600;font-size:1rem;line-height:1.25}
.admin-section-titre{font-size:1.15rem;margin:2.2rem 0 .2rem}

/* a block to come (no point in the API yet), a refusal of the API */
.admin-bientot{color:var(--muted);font-size:1.05rem;margin:0}
.admin-bientot-bloc{margin:1rem 0 0;padding:1rem 1.1rem;border:1px dashed var(--line2);border-radius:var(--r2)}
.admin-bientot-quoi{margin:0 0 .3rem;font-weight:600}
.admin-refus{margin:1rem 0 0}

/* the tables of a screen, in the charter's colours */
.admin-tableau-boite{margin-top:1rem;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:var(--r2)}
.admin-tableau{width:100%;border-collapse:collapse;font-size:.88rem}
.admin-tableau th,.admin-tableau td{padding:.6rem .75rem;text-align:start;vertical-align:middle;border-bottom:1px solid var(--line)}
.admin-tableau th{color:var(--muted);font-weight:600;font-size:.78rem;letter-spacing:.06em;text-transform:uppercase;background:var(--bg2);white-space:nowrap}
.admin-tableau tr:last-child td{border-bottom:0}
.admin-tableau td.num,.admin-tableau th.num{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap}
.admin-tableau td.bse{white-space:nowrap;font-weight:600;font-variant-numeric:tabular-nums}
.admin-tableau td a{display:inline-flex;align-items:center;min-height:44px}
.admin-vide{margin:0;padding:1rem}
.admin-etat{font-weight:600}
.admin-etat.ok{color:var(--ok)}
.admin-etat.attente{color:var(--gold)}
.admin-etat.refus{color:var(--erreur)}

/* the filters above a table, a form of gestures */
.admin-filtres{display:flex;flex-wrap:wrap;gap:.7rem 1rem;align-items:flex-end;margin:1rem 0 0}
.admin-filtres label{display:flex;flex-direction:column;gap:.3rem;font-size:.82rem;color:var(--muted)}
/* the charter's compact field (the site's .bfield: 3 rem, radius .8 rem) for filters and gestures ; a date too, on the dark */
.admin-filtres input,.admin-filtres select,.admin-gestes input,.admin-gestes select,.admin-gestes textarea{height:3rem;min-height:44px;width:auto;min-width:10rem;border-radius:.8rem;border:1px solid var(--line2);background-color:rgba(255,255,255,.04);color:var(--fg);font:inherit;font-size:.95rem;padding:0 1rem;color-scheme:dark}
.admin-gestes textarea{height:auto;min-height:3rem;padding-block:.7rem;width:100%}
.admin-filtres input:focus,.admin-filtres select:focus,.admin-gestes input:focus,.admin-gestes select:focus,.admin-gestes textarea:focus{border-color:var(--gold);outline:none}
.admin-gestes{display:flex;flex-wrap:wrap;gap:.6rem;align-items:flex-end;margin:.8rem 0 0}
.admin-gestes label{display:flex;flex-direction:column;gap:.3rem;font-size:.82rem;color:var(--muted)}
.admin-gestes p{margin:0;align-self:center}
.admin-retour{margin:-.2rem 0 1rem}
/* the tabs of a module (Bease Service): the site's chips */
.admin-onglets{display:flex;flex-wrap:wrap;gap:.5rem;margin:.4rem 0 .6rem}
.admin-onglet{display:inline-flex;align-items:center;min-height:44px;padding:0 1rem;border-radius:999px;border:1px solid var(--line2);color:var(--soft);font-size:.9rem}
.admin-onglet:hover{color:var(--fg);border-color:var(--fg)}
.admin-onglet.actif{border-color:var(--gold);color:var(--fg)}
.admin-geste-ligne{margin:.3rem 0;flex-wrap:nowrap}
.admin-geste-ligne input{min-width:9rem}
.admin-gestes label.admin-coche{flex-direction:row;align-items:center;gap:.5rem;color:var(--soft);font-size:.85rem;min-height:44px}
.admin-liens{margin:1rem 0 0;padding-inline-start:1.2rem}
.admin-liens a{display:inline-flex;align-items:center;min-height:44px}
.admin-champ-large{flex:1 1 18rem}
.admin-champ-large input,.admin-champ-large select{width:100%}
.admin-fiche{margin:1.2rem 0 0;padding:1.1rem 1.2rem;border:1px solid var(--line2);border-radius:var(--r2);background:var(--bg2)}
.admin-fiche h2{font-size:1.25rem;margin:0 0 .4rem}
.admin-fiche dl{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:.35rem 1.2rem;margin:.8rem 0 0}
.admin-fiche dt{color:var(--muted);font-size:.85rem}
.admin-fiche dd{margin:0;overflow-wrap:anywhere}
.admin-message{margin:1rem 0 0}
/* an e-mail's preview: its own white page in an isolated frame, inside the charter's dark */
.admin-apercu{margin-top:1rem;padding:16px;overflow-x:auto;background:var(--bg2);border:1px solid var(--line);border-radius:var(--r2)}
.admin-apercu-cadre{display:block;margin:0 auto;height:900px;border:0;background:#fff}
.admin-texte{margin-top:1rem;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--bg2);border:1px solid var(--line);border-radius:var(--r2);padding:1rem;font-size:.85rem;color:var(--soft)}
.admin-document{display:block;max-width:min(100%,36rem);height:auto;margin-top:1rem;border:1px solid var(--line2);border-radius:var(--r2);user-select:none;-webkit-user-drag:none}

/* the second factor: the QR code on white (an authenticator reads dark on light), the key, the backup codes */
.admin-seconde-texte{max-width:38rem}
.admin-seconde-qr{margin:1.2rem 0 .8rem;min-height:12rem}
.admin-qr{display:block;width:12rem;height:12rem;border-radius:var(--r)}
.admin-cle{font-size:.95rem;letter-spacing:.06em;word-break:break-all}
.admin-codes{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));gap:.5rem 2.2rem;margin:1.2rem 0 1.6rem;padding-inline-start:1.4rem;font-size:1.05rem}
.admin-codes code{letter-spacing:.08em}
.admin-seconde-sortie{margin-top:2rem}

@media(max-width:899px){
  #admin{grid-template-columns:minmax(0,1fr)}
  .admin-menu-btn{display:inline-flex}
  .admin-barre{position:fixed;z-index:45;top:4.1rem;bottom:0;inset-inline-start:0;width:min(18rem,86vw);overflow-y:auto;transform:translateX(-105%);visibility:hidden;transition:transform .25s ease,visibility 0s linear .25s}
  .admin-barre.ouverte{transform:none;visibility:visible;box-shadow:0 20px 40px rgba(0,0,0,.6);transition:transform .25s ease}
  .admin-roles{display:none}
  .admin-marque-mot{display:none}
}
@media(max-width:599px){
  .admin-tuiles,.admin-chiffres{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
  .admin-tuile{min-height:6.5rem;padding:.95rem}
  .admin-chiffre-valeur{font-size:1.5rem}
  .admin-fiche dl{grid-template-columns:minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce){.admin-barre{transition:none}}
/* a refused field: the charter's error state (bease-app's own) */
.bec-cellbox.champ-erreur{border:0!important;outline:1px solid var(--erreur);outline-offset:6px;border-radius:var(--r2)}
.ml-code-liens{margin:1rem 0 .25rem}
.ml-code-liens p{margin:.15rem 0}
.ml-lien{background:none;border:0;padding:.2rem 0;margin:0;font:inherit;font-size:.9rem;color:var(--soft);text-decoration:underline;text-underline-offset:3px;cursor:pointer;min-height:44px}
.ml-lien:hover{color:var(--fg)}
.ml-lien[aria-disabled="true"]{color:var(--dim);text-decoration:none;cursor:default}
.ml-attente{color:var(--muted);font-size:.9rem}
.admin-boite-envoi{margin:1.5rem 0 0;font-size:.8125rem}
.admin-boite-envoi a{display:inline-flex;align-items:center;min-height:44px;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
.admin-boite-envoi a:hover{color:var(--soft)}
/* touch targets of at least 44 × 44 px, and contrasts of 4.5:1 (bease-app's tour de qualité: --dim gives 4.1:1 on black) */
#admin .btn{min-height:44px}
/* Elias, 08/11/2026 : jamais l'icône rouge « interdit » sur un bouton en cours d'envoi (la charte : cursor not-allowed) */
.btn:disabled,.btn.btn-gated{cursor:default}
.bec-cellbox{min-height:44px}
:root{--dim:var(--muted)}
[dir=rtl] .bec-composer-line{justify-content:flex-end}
