/* Portail Norvessa : mêmes couleurs, formes et titres que le cockpit (v2/core.css), mobile d'abord. */
:root {
  --fond-page: #E2E5F6; --fond: #EEF0FA; --surface: #FFFFFF; --surface-2: #F4F5FD; --creux: #E4E7F6;
  --encre: #15133D; --encre-2: #54527A; --encre-3: #7C7B9E; --trait: #DCDEEF; --trait-fort: #C3C6E0;
  --bandeau: #15133D; --sur-bandeau: #FFFFFF; --sur-bandeau-2: #B9B8DA;
  --accent: #2B4BFF; --accent-doux: #E1E7FF; --sur-accent: #FFFFFF; --hero: #2B4BFF; --hero-2: #1B30C4; --sur-hero: #FFFFFF; --sur-hero-2: #CFD7FF;
  --bon: #0B9A58; --bon-doux: #D8F5E6; --attention: #B86E00; --attention-doux: #FFEDC7; --critique: #DC1F3C; --critique-doux: #FFE1E5; --neutre: #54527A; --neutre-doux: #E4E7F6;
  --ombre: 0 1px 2px rgba(21, 19, 61, .05), 0 10px 28px -12px rgba(21, 19, 61, .22);
  --f-titre: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-texte: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r-1: 6px; --r-2: 12px; --r-3: 20px; --r-4: 28px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond-page: #05041A; --fond: #0D0C24; --surface: #191838; --surface-2: #201F47; --creux: #131231;
    --encre: #F2F2FF; --encre-2: #B8B7DC; --encre-3: #8C8BB4; --trait: #2B2A57; --trait-fort: #3D3C72;
    --bandeau: #07061C; --accent: #7187FF; --accent-doux: #222965; --sur-accent: #0A0920; --hero: #2F47E6; --hero-2: #1D2B9C;
    --bon: #37D48B; --bon-doux: #0E3A29; --attention: #FFB83A; --attention-doux: #43310A; --critique: #FF6176; --critique-doux: #4A1622; --neutre: #B8B7DC; --neutre-doux: #26254F;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fond-page); color: var(--encre); font-family: var(--f-texte); font-size: 1rem; line-height: 1.45; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--accent); }
.haut { background: var(--bandeau); color: var(--sur-bandeau); padding: 12px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.haut .marque { font-family: var(--f-titre); font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; color: var(--sur-bandeau); text-decoration: none; }
.haut .droite { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: .8125rem; color: var(--sur-bandeau-2); }
.haut form { margin: 0; }
.haut .lien { background: none; border: 0; color: var(--sur-bandeau); font: inherit; text-decoration: underline; cursor: pointer; padding: 8px 0; min-height: 40px; }
main { max-width: 720px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-left)) 56px; display: flex; flex-direction: column; gap: 14px; }
h1, h2, h3 { font-family: var(--f-titre); font-weight: 800; line-height: 1.1; margin: 0; }
h1 { font-size: 1.875rem; } h2 { font-size: 1.375rem; } h3 { font-size: 1.0625rem; }
p { margin: 0; }
.discret { color: var(--encre-2); font-size: .875rem; }
.hero { background: var(--hero); color: var(--sur-hero); border-radius: var(--r-4) var(--r-4) var(--r-4) var(--r-1); padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; }
.hero p { color: var(--sur-hero-2); }
.carte { background: var(--surface); border-radius: var(--r-3); box-shadow: var(--ombre); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.carte.etroite { max-width: 440px; margin: 0 auto; width: 100%; }
label { font-weight: 700; font-size: .875rem; display: block; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  width: 100%; font: inherit; color: var(--encre); background: var(--surface-2); border: 1.5px solid var(--trait-fort); border-radius: var(--r-2); padding: 12px 14px; min-height: 48px; }
input:focus-visible, select:focus-visible, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 800; border-radius: var(--r-2); min-height: 48px; padding: 0 20px; border: 2px solid var(--accent); background: var(--surface); color: var(--accent); text-decoration: none; cursor: pointer; }
.btn.plein { background: var(--accent); color: var(--sur-accent); }
.btn.clair { background: var(--sur-hero); color: var(--hero); border-color: var(--sur-hero); }
.btn[disabled], .btn.inactif { opacity: .55; cursor: not-allowed; border-color: var(--trait-fort); color: var(--encre-2); background: var(--creux); }
.msg { border-radius: var(--r-2); padding: 12px 14px; font-weight: 600; }
.msg.bon { background: var(--bon-doux); color: var(--bon); }
.msg.erreur { background: var(--critique-doux); color: var(--critique); }
.msg.info { background: var(--accent-doux); color: var(--accent); }
.msg.att { background: var(--attention-doux); color: var(--attention); }
.pastille { display: inline-block; font-size: .75rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; background: var(--neutre-doux); color: var(--neutre); }
.pastille.bon { background: var(--bon-doux); color: var(--bon); }
.pastille.att { background: var(--attention-doux); color: var(--attention); }
.pastille.erreur { background: var(--critique-doux); color: var(--critique); }
.rang { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rang .grandit { flex: 1; min-width: 0; }
.logo { width: 44px; height: 44px; border-radius: 14px 14px 14px 4px; background: var(--accent-doux); color: var(--accent); display: grid; place-items: center; font-family: var(--f-titre); font-weight: 800; flex: none; }
ol.etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
ol.etapes > li { background: var(--surface); border-radius: var(--r-3); box-shadow: var(--ombre); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
ol.etapes .num { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-doux); color: var(--accent); display: grid; place-items: center; font-weight: 800; flex: none; }
ol.etapes li.fait .num { background: var(--bon-doux); color: var(--bon); }
ul.auto { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ul.auto li { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--r-2); padding: 12px 14px; }
ul.auto li .grandit { flex: 1; }
.champs { display: flex; flex-direction: column; gap: 14px; }
.deux { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .deux { grid-template-columns: 1fr 1fr; } }
/* 03/12 : carte « Mes clés » et tutos des clés */
ul.cles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
ul.cles > li { border: 1px solid var(--neutre-doux); border-radius: var(--r-2); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
ul.cles h3 { margin: 0; font-size: 1rem; }
.ui { font-weight: 800; background: var(--neutre-doux); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
pre.prompt { white-space: pre-wrap; word-break: break-word; background: var(--surface); border-radius: var(--r-2); padding: 14px; font-size: .85rem; line-height: 1.45; max-height: 420px; overflow: auto; }
/* 03/12 : console admin (tableaux qui défilent en 375 px, menu, boutons de suppression, codes) */
.nav-admin { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 16px; font-weight: 700; }
.nav-admin form { margin: 0 0 0 auto; }
.nav-admin .lien { background: none; border: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; }
.nav-admin a { min-height: 44px; display: inline-flex; align-items: center; }
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tableau { border-collapse: collapse; width: 100%; font-size: .875rem; }
.tableau th, .tableau td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--trait-fort); vertical-align: top; }
.tableau td { overflow-wrap: break-word; }   /* pas « anywhere » : il écrase les colonnes lettre par lettre à 375 px (03/12) */
.pastille, .tableau code { white-space: nowrap; }
.btn.danger { border-color: var(--critique); color: var(--critique); }
.liste-admin { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.boutique-admin { border-top: 1px solid var(--trait-fort); padding-top: 12px; }
.boutique-admin form { margin: 0; }
.boutique-admin input[type=text] { max-width: 220px; }
img.qr { display: block; margin: 8px auto; background: #fff; padding: 6px; border-radius: 8px; max-width: 100%; height: auto; }
ol.secours { columns: 2; font-size: 1.05rem; }
.code-beta code, ol.secours code { font-size: 1.1rem; font-weight: 800; letter-spacing: .04em; overflow-wrap: anywhere; }
