/* Espace Aulit : identité « néon broadcast » d'Olivier (Site/docs/DESIGN_BRIEF.md), intensité OUTIL (sobre : pas de soleil,
   ni grille, ni titre chromé). Idée propre à l'Espace : le pass « coulisses » (carte d'accès biseautée, crochets d'angle).
   Polices auto-hébergées (OFL, polices/LICENCE.txt), aucun tiers ; aucun style en ligne (CSP style-src 'self'). */
@font-face { font-family: 'Saira Condensed'; font-weight: 700; font-display: swap; src: url(polices/saira-condensed-700.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: swap; src: url(polices/plex-sans-400.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: swap; src: url(polices/plex-sans-600.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url(polices/plex-mono-400.woff2) format('woff2'); }

:root {
  --bg: #070a10; --surface: #0d1220; --surface2: #080c18; --line: #1a2540; --line-fort: #2a3a60;
  --cyan: #00f5ff; --magenta: #ff2d78; --violet: #9b5cff; --amber: #ffb24e; --ok: #53e39b;
  --white: #e8eaf6; --muted: #8f99b0; /* >= 4,5:1 sur --bg et --surface */
  --f-titre: 'Saira Condensed', 'Arial Narrow', system-ui, sans-serif;
  --f-texte: 'IBM Plex Sans', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --biseau: 14px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(60rem 26rem at 100% -8%, color-mix(in srgb, var(--violet) 16%, transparent), transparent 70%),
    radial-gradient(44rem 22rem at -10% 105%, color-mix(in srgb, var(--cyan) 10%, transparent), transparent 70%), var(--bg);
  color: var(--white); font: 400 1rem/1.6 var(--f-texte);
}
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--white); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
[hidden] { display: none !important; }
.lien-evitement { position: absolute; left: -999px; top: 0; z-index: 10; padding: .5rem 1rem; background: var(--cyan); color: var(--bg); font-weight: 600; }
.lien-evitement:focus { left: 1rem; top: 1rem; }

/* ---- Bandeau ---- */
.entete { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .85rem clamp(16px, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface2) 80%, transparent); }
.marque { display: inline-flex; align-items: baseline; gap: .45rem; color: var(--white); text-decoration: none;
  font: 700 1.35rem/1 var(--f-titre); letter-spacing: .06em; text-transform: uppercase; }
.marque b { color: var(--cyan); font-weight: 700; text-shadow: 0 0 14px color-mix(in srgb, var(--cyan) 55%, transparent); }
.marque i { font: 400 .7rem var(--f-mono); font-style: normal; color: var(--magenta); letter-spacing: .1em; }
.entete nav { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.entete nav a { font: 700 .95rem var(--f-titre); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: .35rem 0; }
.entete nav a:hover, .entete nav a[aria-current='page'] { color: var(--white); box-shadow: inset 0 -2px var(--cyan); }
.entete form { margin: 0; }

/* ---- Typo ---- */
.hud { margin: 0; font: 400 .78rem/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--magenta); }
.hud::before { content: '// '; color: var(--muted); }
h1, h2, h3 { font-family: var(--f-titre); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1.1; }
h1 { margin: .35rem 0 .6rem; font-size: clamp(2rem, 6vw, 2.8rem); }
h1 span { color: var(--cyan); }
h2 { margin: 0 0 .75rem; font-size: 1.45rem; }
h3 { margin: 0; font-size: 1.15rem; }
.chapeau { margin: 0 0 1.5rem; color: var(--muted); max-width: 44rem; }
code, .mono { font-family: var(--f-mono); font-size: .92em; overflow-wrap: anywhere; }

/* ---- Panneau anguleux : biseau + crochets d'angle ---- */
.panneau { position: relative; padding: 1.4rem clamp(1rem, 3vw, 1.6rem); background: linear-gradient(165deg, var(--surface), var(--surface2));
  border: 1px solid var(--line); clip-path: polygon(0 0, calc(100% - var(--biseau)) 0, 100% var(--biseau), 100% 100%, var(--biseau) 100%, 0 calc(100% - var(--biseau))); }
.panneau::before, .panneau::after { content: ''; position: absolute; width: 18px; height: 18px; pointer-events: none; }
.panneau::before { left: 6px; top: 6px; border-left: 2px solid var(--cyan); border-top: 2px solid var(--cyan); }
.panneau::after { right: 6px; bottom: 6px; border-right: 2px solid var(--magenta); border-bottom: 2px solid var(--magenta); }

/* ---- Formulaires ---- */
label, .etiquette { display: block; margin: 1rem 0 .35rem; font: 700 .85rem/1.2 var(--f-titre); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
input[type=text], input[type=password], input[type=email], input:not([type]), input[inputmode] {
  width: 100%; min-height: 48px; padding: .6rem .85rem; border: 1px solid var(--line-fort); border-radius: 4px;
  background: var(--bg); color: var(--white); font: 400 1.05rem var(--f-texte); }
input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
input[readonly] { color: var(--muted); }
.aide { margin: .35rem 0 0; font-size: .9rem; color: var(--muted); }
.code-saisie { font-family: var(--f-mono) !important; letter-spacing: .3em; font-size: 1.35rem !important; text-align: center; }
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .55rem 1.2rem; cursor: pointer;
  border: 1px solid var(--cyan); background: var(--cyan); color: var(--bg); text-decoration: none;
  font: 700 1rem/1 var(--f-titre); letter-spacing: .12em; text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background-color .15s ease-out, color .15s ease-out, transform .1s ease-out; }
.bouton:hover { background: var(--white); border-color: var(--white); color: var(--bg); }
.bouton:active { transform: translateY(1px); }
.bouton.large { width: 100%; margin-top: 1.4rem; min-height: 50px; }
.bouton.second { background: transparent; color: var(--cyan); }
.bouton.second:hover { color: var(--bg); background: var(--cyan); }
.bouton.danger { background: transparent; color: var(--magenta); border-color: var(--magenta); }
.bouton.danger:hover { background: var(--magenta); color: var(--bg); }
.bouton.petit { min-height: 38px; padding: .4rem .8rem; font-size: .88rem; }
.bouton[disabled] { opacity: .55; cursor: progress; }
.lien-bouton { background: none; border: 0; padding: .35rem 0; cursor: pointer; color: var(--muted); font: 700 .95rem var(--f-titre); letter-spacing: .1em; text-transform: uppercase; }
.lien-bouton:hover { color: var(--magenta); }
.message { margin: 1rem 0 0; padding: .65rem .85rem; border-left: 3px solid var(--magenta); background: color-mix(in srgb, var(--magenta) 10%, transparent); color: #ffb3cb; }
.message.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); color: #b6f3d2; }
.message.info { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 9%, transparent); color: #ffd9a8; }
.message:empty { display: none; }

/* ---- Pages d'accès (connexion, invitation) : le pass coulisses ---- */
.page-pass main { flex: 1; display: grid; place-items: center; padding: 2rem 16px; }
.pass { width: 100%; max-width: 440px; padding-top: 2.2rem; }
.pass .fente { position: absolute; top: .8rem; left: 50%; width: 64px; height: 8px; margin-left: -32px; border-radius: 4px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-fort); }
.pass .bande { display: flex; justify-content: space-between; gap: 1rem; margin: 1.4rem -1.6rem -1.4rem; padding: .55rem 1.6rem;
  border-top: 1px dashed var(--line-fort); font: 400 .72rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pass.large { max-width: 620px; }

/* ---- Double vérification ---- */
.totp { display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.25rem; align-items: center; margin-top: .5rem; }
.qr { width: 168px; height: 168px; padding: 8px; background: #fff; border-radius: 4px; }
.qr svg { display: block; width: 100%; height: 100%; }
.cle { font: 400 1rem/1.5 var(--f-mono); letter-spacing: .08em; color: var(--amber); overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .8rem; margin: 1rem 0; padding: 1rem; list-style: none;
  border: 1px dashed var(--amber); font: 400 1.1rem var(--f-mono); color: var(--amber); }
.rangee { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
@media (max-width: 480px) { .totp { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* ---- Pages d'application (compte, administration) ---- */
.contenu { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 2rem clamp(16px, 4vw, 2.5rem) 3rem; }
.grille { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.sites { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.site { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-left: 3px solid var(--cyan); background: var(--surface2); }
.site b { display: block; font: 700 1.15rem var(--f-titre); letter-spacing: .05em; text-transform: uppercase; }
.site small { color: var(--muted); }
.vide { color: var(--muted); font-style: italic; }
.etat { display: inline-flex; align-items: center; gap: .4rem; font: 400 .8rem var(--f-mono); letter-spacing: .06em; color: var(--muted); }
.etat::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.etat.ok { color: var(--ok); } .etat.attente { color: var(--amber); } .etat.off { color: var(--magenta); }

/* Administration : une fiche par personne */
.barre { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.personnes { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.personne { display: grid; grid-template-columns: minmax(12rem, 1.2fr) 2fr auto; gap: .6rem 1.25rem; align-items: start; }
.personne.inactive { opacity: .62; }
.personne .qui b { display: block; font: 700 1.25rem/1.15 var(--f-titre); letter-spacing: .04em; text-transform: uppercase; }
.personne .qui span { display: block; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.puces { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .5rem; padding: 0; list-style: none; }
.puce { padding: .15rem .55rem; border: 1px solid var(--line-fort); font: 400 .8rem var(--f-mono); color: var(--white); }
.puce[data-site=animations] { border-color: color-mix(in srgb, var(--cyan) 60%, transparent); }
.puce[data-site=pack] { border-color: color-mix(in srgb, var(--violet) 70%, transparent); }
.puce[data-site=espace] { border-color: color-mix(in srgb, var(--magenta) 65%, transparent); }
.etats { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
@media (max-width: 860px) { .personne { grid-template-columns: 1fr; } .actions { justify-content: flex-start; } }

.journal { width: 100%; border-collapse: collapse; font-size: .92rem; }
.journal th, .journal td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.journal th { font: 700 .8rem var(--f-titre); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.journal td:first-child { font-family: var(--f-mono); font-size: .82rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .journal thead { position: absolute; left: -9999px; }
  .journal tr, .journal td { display: block; border: 0; padding: .05rem 0; }
  .journal tr { padding: .55rem 0; border-bottom: 1px solid var(--line); }
}

/* Fenêtres (<dialog>) */
dialog { width: min(36rem, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; background: transparent; color: var(--white); }
dialog::backdrop { background: rgb(3 5 10 / .78); }
dialog .panneau { overflow: auto; max-height: calc(100vh - 32px); }
fieldset { margin: 1rem 0 0; padding: .6rem .9rem .8rem; border: 1px solid var(--line); }
legend { padding: 0 .4rem; font: 700 .95rem var(--f-titre); letter-spacing: .1em; text-transform: uppercase; }
.choix { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.choix label { display: inline-flex; align-items: center; gap: .45rem; margin: .35rem 0 0; font: 400 1rem var(--f-texte); letter-spacing: 0; text-transform: none; color: var(--white); cursor: pointer; }
.choix input { width: 1.15rem; height: 1.15rem; accent-color: var(--cyan); }

/* ---- Pages légales ---- */
.texte { max-width: 46rem; padding-block: 1rem 3rem; }
.texte h2 { margin-top: 2rem; color: var(--cyan); font-size: 1.3rem; }
.texte ul { padding-left: 1.2rem; }
.tableau { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; }
.tableau th, .tableau td { text-align: left; vertical-align: top; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.tableau th { font: 700 .82rem var(--f-titre); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 600px) {
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; }
  .tableau thead { position: absolute; left: -9999px; }
  .tableau tr { padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .tableau td { padding: .1rem 0; border: 0; }
}

.pied { padding: 1.25rem 16px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .9rem; }
.pied ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.pied p { margin: 0 0 .4rem; font-family: var(--f-mono); font-size: .78rem; letter-spacing: .06em; }

/* Apparition du pass : courte, coupée si l'utilisateur réduit les animations */
@keyframes arrivee { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pass, .contenu > * { animation: arrivee .32s cubic-bezier(.2, .8, .2, 1) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
