/* 3Ais — Coque applicative et connexion (v7.0-rc12.0) */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif; background: #0b1626; color: #e6eef8; }
.hidden { display: none !important; }

/* ─── Connexion et licence (v7.0-rc16.14 : dans la lignée du site 3ais.fr) ─── */
@font-face { font-family: "Tais Poppins"; font-weight: 600; font-display: swap; src: url(ui/fonts/poppins-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Tais Poppins"; font-weight: 700; font-display: swap; src: url(ui/fonts/poppins-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Tais Mono"; font-weight: 400; font-display: swap; src: url(ui/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Tais Mono"; font-weight: 500; font-display: swap; src: url(ui/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); }
.hero {
    --abyss: #050d1a; --deep: #0a1830; --hull: #10223f; --line: rgba(143, 180, 232, .16);
    --ink: #e8eef7; --ink-dim: #a3b5cd; --ink-faint: #7189a9; --signal: #38bdf8; --flare: #ef4444;
    --f-display: "Tais Poppins", "Segoe UI", system-ui, sans-serif;
    --f-data: "Tais Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
    position: fixed; inset: 0; overflow: hidden; background: var(--abyss); color: var(--ink); color-scheme: dark;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, var(--abyss) 0%, rgba(5, 13, 26, .9) 30%, rgba(5, 13, 26, .2) 60%, rgba(5, 13, 26, 0) 100%);
}
.hero-in {
    position: relative; z-index: 2; height: 100%; overflow-y: auto;
    display: flex; flex-direction: column; justify-content: center;
    padding: 5vh 24px 64px clamp(24px, 8vw, 128px); max-width: calc(440px + clamp(24px, 8vw, 128px) + 24px);
}
.hero-note {
    position: absolute; z-index: 2; right: 24px; bottom: 34px; display: flex; align-items: center; gap: 8px;
    font: 400 11px/1.4 var(--f-data); color: var(--ink-faint); letter-spacing: .02em;
}
.hero-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--flare); box-shadow: 0 0 8px var(--flare); }
.a-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.a-brand img { width: 58px; height: 58px; }
.a-word { font: 700 34px/1 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.a-eyebrow { font: 500 10.5px/1.3 var(--f-data); letter-spacing: .16em; text-transform: uppercase; color: var(--signal); margin-top: 7px; }
.a-card {
    width: 100%; max-width: 440px; background: rgba(10, 24, 48, .82); backdrop-filter: blur(6px);
    border: 1px solid var(--line); border-top: 2px solid var(--signal); border-radius: 10px; padding: 26px 28px 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45); color: var(--ink);
}
.a-title { font: 600 20px/1.2 var(--f-display); color: var(--ink); }
.a-sub { color: var(--ink-dim); font-size: 13px; margin: 6px 0 20px; }
.a-field { margin-bottom: 14px; }
.a-field label { display: block; font: 500 10.5px/1.3 var(--f-data); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.a-field input {
    width: 100%; height: 42px; padding: 0 12px; border-radius: 6px; border: 1px solid rgba(143, 180, 232, .24);
    background: rgba(5, 13, 26, .7); color: var(--ink); font: inherit; font-size: 14px;
}
.a-field input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px rgba(56, 189, 248, .18); }
.a-hint { font-size: 12px; color: var(--ink-faint); margin: -4px 0 14px; line-height: 1.45; }
.a-err { background: rgba(239, 68, 68, .1); color: #fecaca; border: 1px solid rgba(239, 68, 68, .4); border-radius: 6px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; }
.a-ok { background: rgba(34, 197, 94, .1); color: #bbf7d0; border-color: rgba(34, 197, 94, .4); }
.a-btn {
    width: 100%; height: 44px; border-radius: 6px; border: 1px solid var(--signal); background: var(--signal); color: var(--abyss);
    font: 600 14.5px/1 var(--f-display); letter-spacing: .01em; cursor: pointer; margin-top: 8px; transition: background .15s, transform .15s;
}
.a-btn:hover { background: #7dd3fc; border-color: #7dd3fc; transform: translateY(-1px); }
.a-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.a-btn.ghost { background: transparent; color: var(--ink); border-color: rgba(232, 238, 247, .3); font-weight: 500; }
.a-btn.ghost:hover { background: rgba(232, 238, 247, .06); border-color: var(--ink); }
.a-foot { margin-top: 18px; font: 400 11px/1.5 var(--f-data); color: var(--ink-faint); letter-spacing: .02em; }
@media (max-width: 900px) {
    .hero::after { background: linear-gradient(180deg, rgba(5, 13, 26, .55) 0%, rgba(5, 13, 26, .88) 55%, var(--abyss) 100%); }
    .hero-in { padding: 6vh 16px 64px; margin: 0 auto; max-width: 472px; }
    .hero-note { display: none; }
}

/* ─── Modules : tiroir flottant (v7.0-rc16.15) ────────────
   Fermé par défaut : la page occupe tout l'écran. L'onglet à trois barres,
   collé au bord gauche, ouvre le tiroir par-dessus la page. */
#nav-toggle {
    position: fixed; left: 0; top: 50%; z-index: 22; transform: translateY(-50%);
    width: 22px; height: 72px; padding: 0; border: 1px solid rgba(143, 180, 232, .28); border-left: 0;
    border-radius: 0 10px 10px 0; background: rgba(10, 24, 48, .88); backdrop-filter: blur(4px);
    color: #a3b5cd; cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 2px 0 14px rgba(0, 0, 0, .35); transition: width .15s, background .15s, color .15s;
}
#nav-toggle:hover, #nav-toggle:focus-visible { width: 30px; background: #12345c; color: #fff; outline: none; }
.nt-bars { display: flex; flex-direction: column; gap: 3px; }
.nt-bars i { display: block; width: 12px; height: 2px; border-radius: 1px; background: currentColor; }
.nt-dot { position: absolute; top: 6px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 6px #ef4444; }
#app.nav-open #nav-toggle { opacity: 0; pointer-events: none; }
#nav-scrim { position: fixed; inset: 0; z-index: 24; background: rgba(3, 8, 16, .38); }
#rail {
    position: fixed; top: 12px; left: 12px; bottom: 12px; width: 236px; z-index: 30;
    background: rgba(10, 24, 48, .96); backdrop-filter: blur(8px);
    border: 1px solid rgba(143, 180, 232, .2); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
    transform: translateX(calc(-100% - 24px)); visibility: hidden;
    transition: transform .22s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .22s;
}
#app.nav-open #rail { transform: none; visibility: visible; transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.r-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 12px; margin-bottom: 4px;
    border-bottom: 1px solid rgba(143, 180, 232, .14); }
.r-brand { display: flex; align-items: center; gap: 10px; }
.r-brand img { width: 36px; height: 36px; }
.r-brand b { display: block; font: 700 18px/1 "Tais Poppins", "Segoe UI", sans-serif; color: #e8eef7; }
.r-brand small { display: block; margin-top: 4px; font: 500 8.5px/1.2 "Tais Mono", Consolas, monospace; letter-spacing: .08em; white-space: nowrap;
    text-transform: uppercase; color: #38bdf8; }
.r-close { width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(143, 180, 232, .2); background: transparent;
    color: #a3b5cd; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.r-close:hover { background: rgba(56, 189, 248, .12); color: #fff; border-color: rgba(56, 189, 248, .4); }
.r-sec { font: 500 9.5px/1.3 "Tais Mono", Consolas, monospace; letter-spacing: .14em; text-transform: uppercase;
    color: #7189a9; padding: 8px 8px 4px; }
#r-items, #r-sys { display: flex; flex-direction: column; gap: 2px; }
#r-sys { margin-bottom: 6px; }
.r-item, .r-user {
    width: 100%; min-height: 40px; padding: 0 10px; border-radius: 8px; background: transparent;
    border: 1px solid transparent; color: #a3b5cd; display: flex; align-items: center; gap: 12px;
    cursor: pointer; font: inherit; text-decoration: none; position: relative; text-align: left;
    transition: background .15s, color .15s;
}
.r-item svg { width: 19px; height: 19px; flex: none; }
.r-item span { font-size: 13.5px; line-height: 1.2; white-space: nowrap; }
.r-item:hover, .r-user:hover { background: rgba(56, 189, 248, .08); color: #e8eef7; }
.r-item.active { background: rgba(56, 189, 248, .14); border-color: rgba(56, 189, 248, .35); color: #fff; box-shadow: inset 3px 0 0 #38bdf8; }
.r-item .dot { margin-left: auto; min-width: 20px; height: 18px; border-radius: 9px; padding: 0 6px;
    background: #ef4444; color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.r-grow { flex: 1; min-height: 8px; }
.r-user { min-height: 52px; border-top: 1px solid rgba(143, 180, 232, .14); border-radius: 0 0 8px 8px; padding-top: 8px; }
.r-avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; background: #1f6feb; color: #fff; font-weight: 700; font-size: 12.5px;
    display: flex; align-items: center; justify-content: center; }
.r-who { display: flex; flex-direction: column; min-width: 0; }
.r-name { font-size: 13px; color: #e8eef7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-who small { font-size: 11px; color: #7189a9; }

/* ─── Zone principale ───────────────────────────────────── */
#main { position: fixed; inset: 0; background: #0b1a2e; }
#frame { width: 100%; height: 100%; border: 0; display: block; background: #0b1626; }

/* ─── Menu du compte ────────────────────────────────────── */
#menu {
    position: fixed; left: 260px; bottom: 12px; z-index: 40; width: 300px; background: rgba(9, 22, 40, 0.98);
    border: 1px solid rgba(143, 180, 232, 0.3); border-radius: 12px; box-shadow: 0 10px 30px rgba(3, 10, 22, 0.6); padding: 14px;
}
.m-head b { display: block; font-size: 14px; } .m-head span { font-size: 12px; color: #9fb3cc; }
.m-actions { display: flex; gap: 8px; margin: 12px 0; }
.m-btn { flex: 1; padding: 8px; border-radius: 8px; border: 1px solid rgba(143, 180, 232, 0.2); background: rgba(255,255,255,.04);
    color: #e6eef8; font: inherit; font-size: 12.5px; cursor: pointer; }
.m-btn:hover { background: rgba(31, 111, 235, 0.2); }
.m-status { border-top: 1px solid rgba(143, 180, 232, 0.16); padding-top: 10px; font-size: 12px; color: #9fb3cc; line-height: 1.7; }
.m-status b { color: #e6eef8; font-weight: 600; }
.m-status .ok { color: #4ade80; } .m-status .warn { color: #fbbf24; }

#toast {
    position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 99; padding: 10px 16px; border-radius: 10px;
    font-size: 13px; background: rgba(9, 22, 40, 0.97); border: 1px solid rgba(143, 180, 232, 0.3); border-left: 3px solid #3b82f6;
}

/* ─── Licence (v7.0-rc14.0 ; habillage rc16.14) ──────────── */
#lic { z-index: 50; }
.l-card { max-width: 500px; }
.l-step { font-size: 13px; margin: 14px 0 7px; color: var(--ink-dim); }
.l-step b { color: var(--signal); font-family: var(--f-data); }
.l-step code { font-family: var(--f-data); color: var(--ink); }
.l-fp { display: flex; gap: 8px; align-items: center; }
.l-fp code { flex: 1; font-family: var(--f-data); font-size: 16px; letter-spacing: .5px; text-align: center;
    background: rgba(5, 13, 26, .7); border: 1px solid rgba(143, 180, 232, .24); border-radius: 6px; padding: 9px 6px; color: var(--ink); user-select: all; }
.l-copy { width: auto !important; margin-top: 0 !important; padding: 0 14px; height: 40px !important; font-size: 13px !important; }
.l-file { display: block; border: 1px dashed rgba(143, 180, 232, .35); border-radius: 6px; padding: 11px; text-align: center; cursor: pointer;
    font-size: 13px; color: var(--ink-dim); background: rgba(5, 13, 26, .45); }
.l-file:hover { border-color: var(--signal); color: var(--signal); }
.l-file input { display: none; }
.l-paste summary { font-size: 12px; color: var(--ink-faint); cursor: pointer; margin: 8px 0 4px; }
.l-paste textarea { width: 100%; font-family: var(--f-data); font-size: 11px; border: 1px solid rgba(143, 180, 232, .24);
    border-radius: 6px; padding: 8px; background: rgba(5, 13, 26, .7); color: var(--ink); resize: vertical; }
.l-note { font-size: 11.5px; color: var(--ink-faint); margin-top: 14px; line-height: 1.5; }
#lic-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: #7c2d12; color: #ffedd5;
    font-size: 12.5px; padding: 6px 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
#lic-banner button { margin-left: auto; background: transparent; border: 1px solid rgba(255,237,213,.5); color: inherit;
    border-radius: 6px; padding: 2px 9px; cursor: pointer; font: inherit; }

/* v7.0-rc16.9 : choix de la cartographie */
.m-pref { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #9fb3cc; margin-bottom: 10px; }
.m-pref select { background: #0f2747; color: #e6eef8; border: 1px solid rgba(143, 180, 232, 0.25); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; }

/* v7.0-rc16.19 : instance web — double facteur, demande d'accès */
.a-field textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line);
    background: rgba(5, 13, 26, .6); color: var(--ink); font: inherit; font-size: 14px; resize: vertical; }
.a-field textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px rgba(56, 189, 248, .18); }
.a-field input.a-code { font: 500 22px/1 var(--f-data); letter-spacing: .3em; text-align: center; }
.a-links { display: flex; justify-content: flex-end; margin: -4px 0 12px; font-size: 13px; }
.a-links a { color: var(--signal); }
.a-check { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--ink-dim); margin: 0 0 14px; line-height: 1.45; }
.a-check input { margin-top: 2px; accent-color: var(--signal); }
.a-enrol { margin-bottom: 12px; }
.a-steps { margin: 0 0 12px; padding-left: 18px; font-size: 12.5px; color: var(--ink-dim); line-height: 1.55; }
.a-qr { width: 168px; margin: 0 auto 10px; padding: 8px; background: #fff; border-radius: 8px; }
.a-qr svg { display: block; width: 100%; height: auto; }
.a-secret { font-size: 12px; color: var(--ink-faint); text-align: center; word-break: break-all; }
.a-secret code { font-family: var(--f-data); color: var(--ink); }
.a-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; padding: 12px; margin-bottom: 12px;
    border: 1px dashed var(--line); border-radius: 8px; }
.a-codes code { font: 500 14px/1.4 var(--f-data); color: var(--ink); text-align: center; }
