/* Jarvis — feuille de style commune (étape 8).
   Palette dérivée de sphereStyle.js (WAKE_BG_HEX + accent bleu #4A9EFF). */

/* ── Fonts self-host ─────────────────────────────────────────── */
@font-face {
    font-family: 'Inter';
    src: url("../fonts/Inter-Gz7AlRl.woff2") format('woff2-variations'),
         url("../fonts/Inter-Gz7AlRl.woff2") format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Fraunces';
    src: url("../fonts/Fraunces-cHejlgP.woff2") format('woff2-variations'),
         url("../fonts/Fraunces-cHejlgP.woff2") format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url("../fonts/JetBrainsMono-qI6BF9f.woff2") format('woff2-variations'),
         url("../fonts/JetBrainsMono-qI6BF9f.woff2") format('woff2');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg:        #06080D;
    --surface:   #0E1219;
    --border:    #1F2A3E;
    --text:      #E4E9F2;
    --muted:     #6B7590;
    --accent:    #4A9EFF;
    --signal:    #E8B34A;
    --danger:    #C25450;
    --success:   #7ED9A3;

    --sans:  'Inter', system-ui, -apple-system, sans-serif;
    --serif: 'Fraunces', Georgia, serif;
    --mono:  'JetBrains Mono', ui-monospace, monospace;

    --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    background: var(--bg);
    color: var(--text);
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -0.01em;
    margin: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono { font-family: var(--mono); }

button { font-family: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius);
}
:focus:not(:focus-visible) { outline: none; }

/* ── Formulaire — champs communs ──────────────────────────────── */
.field { margin-bottom: 1rem; }
.field label {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}
.field input,
.field textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
}
.field input:focus, .field textarea:focus {
    border-color: var(--accent);
    outline: none;
}
.field .help {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}
.field .error {
    margin: 0.35rem 0 0;
    color: var(--signal);
    font-size: 0.9rem;
}
.field.field--code input {
    width: 200px;
    text-align: center;
    font-family: var(--mono);
    font-size: 1.2rem;
    letter-spacing: 0.2em;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: var(--accent);
    border: none;
    color: var(--bg);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn--full { width: 100%; }
.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn--danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin: 0 0 1rem;
    font-size: 0.95rem;
}
.alert--error   { color: var(--signal); }
.alert--success { background: rgba(126, 217, 163, 0.06); border: 1px solid rgba(126, 217, 163, 0.25); color: var(--success); }

/* ── Layout d'accueil — deux colonnes ────────────────────────── */
.home {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 0 3rem;
    gap: 2rem;
}
.home__intro {
    max-width: 380px;
    justify-self: end;
    width: 100%;
}
.home__product {
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 400;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}
.home__pitch {
    color: var(--muted);
    margin: 0 0 2rem;
    font-size: 1.05rem;
}
.home__form label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
}
.home__form input {
    width: 100%;
    padding: 0.65rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.home__error { color: var(--signal); margin: 0 0 1rem; }
.home__signup { margin-top: 1.5rem; font-size: 0.9rem; color: var(--muted); }

.home__orb {
    justify-self: start;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 1 / 1;
    position: relative;
}
.home__orb canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

/* ── Container standard (inner pages) ────────────────────────── */
.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem;
}
.page--wide { max-width: 960px; }

.page__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}
.page__title { font-size: 1.6rem; margin: 0; }
.page__nav { color: var(--muted); font-size: 0.9rem; }

.section-title {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
    margin: 2rem 0 1rem;
    text-transform: none;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
}
.card__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.card__name { font-size: 1.05rem; }
.card__email { color: var(--muted); font-size: 0.9rem; font-family: var(--mono); }
.card__meta { color: var(--muted); font-size: 0.85rem; text-align: right; }
.card__meta .ip { font-family: var(--mono); }
.card__reason { color: var(--text); margin: 0.75rem 0; line-height: 1.5; }
.card__reason--empty { color: var(--muted); font-style: italic; }
.card__actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
.card__actions form { flex: 1; }
.card__hint { color: var(--muted); font-size: 0.8rem; margin: 0.75rem 0 0; }
.card__ua { margin: 0.5rem 0 0.75rem; color: var(--muted); font-size: 0.85rem; }
.card__ua summary { cursor: pointer; }
.card__ua p { font-family: var(--mono); font-size: 0.8rem; word-break: break-all; margin: 0.5rem 0 0; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 1rem;
}
.table th {
    color: var(--muted);
    font-weight: 400;
    text-align: left;
    padding: 0.5rem 0.5rem 0.5rem 0;
}
.table td {
    padding: 0.6rem 0.5rem;
    border-top: 1px solid var(--border);
}
.table td .mono { color: var(--muted); font-size: 0.85rem; }

.status--approved { color: var(--success); }
.status--rejected { color: var(--danger); }
.status--pending  { color: var(--muted); }

/* ── Activation ──────────────────────────────────────────────── */
.activation-totp {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.activation-totp__qr {
    background: #fff;
    padding: 0.5rem;
    border-radius: 4px;
    flex: 0 0 auto;
}
.activation-totp__manual {
    flex: 1;
    min-width: 200px;
}
.activation-totp__manual code {
    display: block;
    background: var(--surface);
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    word-break: break-all;
    border-radius: var(--radius);
}
.backup-codes {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin: 1rem 0 2rem;
}
.backup-codes ol {
    margin: 0;
    padding-left: 1.5rem;
    font-family: var(--mono);
    font-size: 1.05rem;
    line-height: 2;
    letter-spacing: 0.05em;
}

/* ── Responsive : mobile ─────────────────────────────────────── */
@media (max-width: 800px) {
    .home {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }
    .home__intro { justify-self: center; max-width: 100%; }
    .home__product { font-size: 2.2rem; text-align: center; }
    .home__pitch { text-align: center; }
    .home__orb {
        order: -1;
        justify-self: center;
        max-width: 200px;
    }
    .home__signup { text-align: center; }
    .page { padding: 2rem 1.25rem; }
    .card__head { flex-direction: column; gap: 0.5rem; }
    .card__meta { text-align: left; }
    .card__actions { flex-direction: column; }
}

/* ── Motion : respecte prefers-reduced-motion ─────────────────── */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0ms !important; transition-duration: 0ms !important; }
}
