/* SL panels — monochrome take on the BannerOps layout: same type scale, card
   surfaces, hairline borders and uppercase micro-labels, with white as the
   only accent on near-black. No build step: plain CSS, no Tailwind. */

:root {
    --bg: #08090a;
    --card: #101113;
    --card-2: #0b0c0e;
    --border: #232528;
    --border-strong: #35383d;
    --text: #f2f3f4;
    --muted: #8b8e94;
    --muted-2: #5f636a;
    --ok: #d6ffe4;
    --warn: #ffe9c7;
    --bad: #ffd4d6;

    /* --ok/--warn/--bad are pale tints meant for small text on near-black.
       A status has to be readable at a glance from across the page, so it
       uses these instead: same hues, enough saturation to register. */
    --green: #46d07f;
    --amber: #ffc46b;
    --red: #ff5c60;
    --heading: 'Sora', sans-serif;
    --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }
/* `hidden` must win over any display a class sets (.btn is inline-flex), or a
   hidden button stays on screen. */
[hidden] { display: none !important; }

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 15% -10%, rgba(255,255,255,0.05), transparent 45%),
        radial-gradient(circle at 90% 5%, rgba(255,255,255,0.03), transparent 40%);
    background-attachment: fixed;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display { font-family: var(--heading); color: var(--text); margin: 0; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 600; }
a { color: var(--text); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.mono { font-family: var(--mono); }
.center { text-align: center; }

/* ---------- header ---------- */
.topbar {
    border-bottom: 1px solid var(--border);
    background: rgba(8,9,10,0.9);
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 50;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--heading); font-weight: 800; color: var(--text); letter-spacing: 0.08em; font-size: 15px; }
.brand { display: flex; align-items: center; }
.brand img { height: 28px; width: auto; display: block; }
.brand span { color: var(--muted-2); font-weight: 600; margin-left: 10px; letter-spacing: 0.16em; font-size: 10px; text-transform: uppercase; }

/* ---------- cards ---------- */
.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    transition: border-color .3s cubic-bezier(.4,0,.2,1), transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s;
}
.card.hoverable:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: 0 18px 50px -24px rgba(255,255,255,0.18);
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 14px; }

.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

/* ---------- labels / values ---------- */
.label {
    display: block; font-size: 10.5px; text-transform: uppercase;
    letter-spacing: .16em; color: var(--muted-2); font-weight: 700; margin-bottom: 9px;
}
.stat { font-family: var(--mono); font-size: 26px; color: var(--text); line-height: 1.2; }
.stat.good { color: var(--green); }
.stat.alert { color: var(--amber); }
.stat.bad { color: var(--red); }
.stat small { font-size: 12px; color: var(--muted-2); margin-left: 6px; font-family: 'Manrope', sans-serif; }

.summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.summary-row:last-child { border-bottom: none; }
.summary-row .k { color: var(--muted-2); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 700; align-self: center; }
.summary-row .v { color: var(--text); font-family: var(--mono); font-size: 12.5px; text-align: right; word-break: break-all; }

/* ---------- status ---------- */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; background: var(--muted-2); }
.dot.on { background: var(--green); box-shadow: 0 0 10px rgba(70,208,127,.8); }
.dot.off { background: #4a4d53; }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    padding: 5px 10px; border-radius: 999px;
    border: 1px solid var(--border-strong); color: var(--muted);
}
.pill.live { color: var(--green); border-color: rgba(70,208,127,.42); background: rgba(70,208,127,.1); }
.pill.warn { color: var(--amber); border-color: rgba(255,196,107,.42); background: rgba(255,196,107,.1); }
.pill.bad { color: var(--red); border-color: rgba(255,92,96,.42); background: rgba(255,92,96,.1); }

/* ---------- buttons ---------- */
button, .btn { font-family: inherit; cursor: pointer; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 10px; padding: 11px 18px; font-size: 13px; font-weight: 700;
    border: 1px solid transparent; text-decoration: none; transition: all .2s ease;
}
.btn-white { background: #fff; color: #0a0a0b; box-shadow: 0 8px 24px -12px rgba(255,255,255,.55); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(255,255,255,.7); }
.btn-ghost { background: rgba(255,255,255,.03); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); }
.btn-danger { background: rgba(255,255,255,.02); color: var(--bad); border-color: rgba(255,212,214,.3); }
/* Leaving is the one destructive thing in the header, so it is the one red
   control there: --bad is a pale tint for text and would not read as red. */
.btn-exit { background: rgba(255,92,96,.08); color: #ff5c60; border-color: rgba(255,92,96,.35); }
.btn-exit:hover { background: rgba(255,92,96,.18); border-color: #ff5c60; }

/* Every control in the header is the same height, whatever is inside it, so
   the row reads as one row instead of four things that nearly line up. */
.topbar .btn { height: 34px; padding-top: 0; padding-bottom: 0; }
/* Both classes, because .btn.icon.sm sets its own size and would otherwise
   out-specify the height above and leave the icon buttons 2px short. */
.topbar .btn.icon, .topbar .btn.icon.sm { width: 34px; height: 34px; padding: 0; }
.topbar .who { height: 34px; }

/* ---------- secret key field ---------- */
/* The key is the credential the customer bought: shown as dots until they
   ask for it, so a screenshot or a stream does not hand it to anyone. */
.key-field { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.key-text { font-family: var(--mono); font-size: 18px; color: var(--text); }
.key-text.masked { color: var(--muted); letter-spacing: .12em; user-select: none; }
.key-btn {
    width: 28px; height: 28px; padding: 0; flex: none; line-height: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid var(--border-strong);
    background: rgba(255,255,255,.03); color: var(--muted-2); cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.key-btn:hover { color: var(--text); border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08); }
.btn-danger:hover { background: rgba(255,212,214,.08); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.sm { padding: 7px 12px; font-size: 11.5px; border-radius: 8px; }
.btn.icon { padding: 0; width: 42px; height: 46px; flex: none; }
/* Beside a row of sm buttons rather than an input, so it matches their height. */
.btn.icon.sm { width: 32px; height: 32px; }

/* ---------- inputs ---------- */
.input, select.input {
    width: 100%; background: linear-gradient(180deg, #121316 0%, #0c0d0f 100%);
    border: 1px solid #272a2e; border-radius: 11px; padding: 13px 15px;
    color: var(--text); font-size: 14px; font-family: inherit; outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
/* The open list of a select is drawn by the browser: without this it is the
   system's white panel, and the options inherit the field's white text. */
select.input { color-scheme: dark; cursor: pointer; }
select.input option { background-color: #121316; color: var(--text); }
.input::placeholder { color: #4e525a; }
.input:hover { border-color: #343840; }
.input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.1); }

/* ---------- modal ---------- */
.modal {
    width: min(420px, calc(100vw - 32px)); padding: 24px;
    background: var(--card); color: var(--muted);
    border: 1px solid var(--border-strong); border-radius: 14px;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.9);
}
.modal::backdrop { background: rgba(4,5,6,.72); backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in .18s ease; }
/* A settings sheet holds a client's whole file, not one question. */
.modal.wide { width: min(560px, calc(100vw - 32px)); }
.modal.wide .summary-row { padding: 9px 0; }
.modal-head { display: flex; align-items: center; gap: 12px; }
.modal-head .avatar { width: 40px; height: 40px; }
.modal-head b { color: var(--text); font-family: var(--heading); font-size: 16px; font-weight: 700; }
.modal-section { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; margin: 4px 0 2px; }

/* One licence inside the sheet: name on the left, state and controls right. */
.mini-key { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.mini-key:last-of-type { border-bottom: none; }
.mini-key .k { min-width: 0; }
.mini-key .k b { display: block; color: var(--text); font-family: var(--mono); font-size: 12.5px; font-weight: 500; }
.mini-key .k span { color: var(--muted-2); font-size: 11.5px; }
.modal-actions.spread-actions { justify-content: space-between; flex-wrap: wrap; }
.modal p { margin: 0; font-size: 13.5px; }
.modal label { display: block; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- table ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
    text-align: left; font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted-2); font-weight: 700; padding: 0 14px 12px; border-bottom: 1px solid var(--border);
}
td { padding: 14px; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: rgba(255,255,255,.025); }
td.key { font-family: var(--mono); color: var(--text); font-size: 12.5px; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted-2); font-size: 13.5px; }
.toast {
    position: fixed; right: 22px; bottom: 22px; z-index: 100;
    background: var(--card); border: 1px solid var(--border-strong); border-radius: 12px;
    padding: 14px 18px; color: var(--text); font-size: 13px; max-width: 360px;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,.9); opacity: 0; transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.sep { height: 1px; background: var(--border); margin: 22px 0; }
.page { padding: 34px 0 70px; }
/* Top padding clears the fixed bar the hero sits under, and then some. */
.hero { padding: 140px 0 60px; text-align: center; position: relative; }
.hero p { max-width: 520px; margin: 14px auto 28px; font-size: 15px; }

/* ---------- discord identity ---------- */
.avatar {
    /* Sized to the line box of the name beside it, and never stretched or
       squashed by the flex row it sits in. */
    width: 20px; height: 20px; flex: none; aspect-ratio: 1 / 1;
    border-radius: 50%; object-fit: cover; display: block;
    border: 1px solid var(--border-strong); background: var(--card-2);
}
.avatar.lg { width: 30px; height: 30px; }
.who { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.who b { color: var(--text); font-weight: 600; }

/* ---------- subscription ---------- */
.sub-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pill.paid { color: var(--green); border-color: rgba(70,208,127,.42); background: rgba(70,208,127,.1); }
.pill.lapsed { color: var(--red); border-color: rgba(255,92,96,.42); background: rgba(255,92,96,.1); }

/* ---------- landing navbar ---------- */
/* Three parts on one row: the brand, the links taking the middle, the actions
   pushed to the end. The links are centred by their own auto margins rather
   than by space-between, so they stay centred whatever the brand is called. */
:root { --nav-h: 68px; }

.nav { display: flex; align-items: center; gap: 6px; margin: 0 auto; }
.nav a {
    font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none;
    padding: 8px 13px; border-radius: 9px; transition: color .2s ease, background .2s ease;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav a.active { color: var(--text); font-weight: 600; }
.topbar .wrap.nav-wrap { gap: 24px; }
/* nowrap: the name, the avatar and the actions belong on one line, never
   stacked on top of each other when the bar gets tight. */
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: nowrap; }
.nav-right .btn, .nav-right .who { white-space: nowrap; }

/* The brand: a small marque beside the wordmark, in place of a logo file. */
.brand-mark {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; flex: none;
}
.brand-mark i {
    width: 32px; height: 32px; border-radius: 9px; font-style: normal;
    display: grid; place-items: center;
    font-family: var(--heading); font-weight: 800; font-size: 12px; letter-spacing: .04em;
    color: #0a0a0b; background: #fff;
}
/* The logo: white on transparent, sized by its height. */
.brand-mark img { height: 32px; width: auto; display: block; }
.brand-mark b {
    font-family: var(--heading); font-weight: 800; font-size: 17px;
    letter-spacing: -0.02em; color: var(--text);
}

/* Over the hero the bar is invisible; it only draws itself once the page has
   moved, so the top of the site is the page and not a chrome strip. */
.topbar.landing {
    position: fixed; inset: 0 0 auto; height: var(--nav-h);
    background: transparent; border-bottom: 1px solid transparent;
    backdrop-filter: none;
    transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.topbar.landing .wrap { height: var(--nav-h); }
.topbar.landing.scrolled {
    background: rgba(8,9,10,.9);
    border-bottom-color: rgba(255,255,255,.08);
    backdrop-filter: blur(24px);
}

/* The burger only exists below the breakpoint, where .nav collapses. */
.burger {
    display: none; background: rgba(255,255,255,.03); color: var(--text);
    border: 1px solid var(--border-strong); border-radius: 10px;
    width: 40px; height: 40px; align-items: center; justify-content: center; line-height: 0;
    transition: border-color .2s ease;
}
.burger:hover { border-color: rgba(255,255,255,.35); }

@media (max-width: 1024px) {
    .nav {
        display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 24px 16px;
        /* Opaque, not translucent: the hero sits right behind it. */
        background: var(--bg); border-bottom: 1px solid var(--border);
        box-shadow: 0 22px 40px -28px rgba(0,0,0,.95);
    }
    .nav.open { display: flex; }
    .nav a { padding: 12px; font-size: 14px; }
    .burger { display: inline-flex; }
    .nav-right .btn-ghost { display: none; }
}

/* ---------- admin shell ---------- */
/* The nav and the staff actions only exist once an admin is signed in: before
   that the page is just the Discord button, so an empty nav would be noise. */
body.admin:not(.authed) .nav,
body.admin:not(.authed) .nav-right { display: none; }

/* Longer labels than the landing page's, so they need real room between
   them: at 12px "Vue d'ensemble Licences Clients" reads as one run of text. */
body.admin .nav { gap: 28px; }

/* Below the breakpoint the landing page hides its ghost CTA to make room. The
   admin panel's ghost buttons are "Nouvelle cle" and "Deconnexion", so hide the
   signed-in name instead and keep the actions reachable on a phone. */
@media (max-width: 1024px) {
    body.admin .nav-right .btn-ghost { display: inline-flex; }
    body.admin #whoami b { display: none; }
    body.admin.authed .nav {
        display: flex; position: static; flex-direction: row; flex-wrap: wrap;
        gap: 8px; padding: 0; background: none; border: none; box-shadow: none;
    }
    body.admin.authed .nav { gap: 18px; }
    body.admin .nav a { padding: 8px 4px; font-size: 13px; }
    body.admin .topbar .wrap.nav-wrap { gap: 14px; }
}

/* The customer panel shares the admin's navbar. */
body.panel .nav { gap: 28px; }
@media (max-width: 1024px) {
    body.panel .nav {
        display: flex; position: static; flex-direction: row; flex-wrap: wrap;
        gap: 18px; padding: 0; background: none; border: none; box-shadow: none;
    }
    body.panel .nav a { padding: 8px 4px; font-size: 13px; }
    body.panel #me b { display: none; }
    body.panel .topbar .wrap.nav-wrap { gap: 14px; }
}

/* Links inside the summary rows of the overview lists. */
.summary-row .k a { color: var(--text); text-decoration: none; font-weight: 600; }
.summary-row .k a:hover { text-decoration: underline; }

/* ---------- sections ---------- */
.section { padding: 74px 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: none; }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 38px; }
.section-head h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.section-head p { margin: 12px 0 0; font-size: 14.5px; }
/* Anchors land below the fixed header instead of under it. */
.section, .hero { scroll-margin-top: var(--nav-h); }

/* ---------- pricing ---------- */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); max-width: 820px; margin: 0 auto; }
@media (max-width: 820px) { .plans { grid-template-columns: 1fr; } }
.price-card { padding: 30px; text-align: center; display: flex; flex-direction: column; }
.price-card .price-list { flex: 1; }
/* The recommended plan: a white hairline is the whole accent in this palette. */
.price-card.featured { border-color: rgba(255,255,255,.45); }
.plan-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 9px; }
.plan-head .label { margin-bottom: 0; }
.price-note { font-size: 12px; color: var(--muted-2); margin: 8px 0 0; min-height: 18px; }
.price {
    font-family: var(--mono); font-size: 46px; color: var(--text);
    line-height: 1.1; letter-spacing: -0.03em;
}
.price small { font-family: 'Manrope', sans-serif; font-size: 14px; color: var(--muted-2); letter-spacing: 0; }
.price-list { list-style: none; margin: 26px 0 28px; padding: 0; text-align: left; }
.price-list li {
    display: flex; gap: 11px; align-items: flex-start;
    font-size: 13.5px; padding: 9px 0; border-bottom: 1px solid var(--border);
}
.price-list li:last-child { border-bottom: none; }
.price-list svg { flex: none; margin-top: 3px; color: var(--text); }

/* ---------- faq ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
    border: 1px solid var(--border); border-radius: 16px; background-color: var(--card);
    padding: 0 24px; margin-bottom: 12px; transition: border-color .2s ease, background-color .2s ease;
}
.faq details[open], .faq details:hover { border-color: var(--border-strong); }
.faq summary {
    cursor: pointer; list-style: none; padding: 21px 0;
    font-family: var(--heading); font-weight: 700; color: var(--text); font-size: 15px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }

/* The chevron is a background image rather than markup, so every question in
   the page stays a plain <summary> with nothing but its text inside. */
.faq summary::after {
    content: ''; flex: none; width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid var(--border-strong); background-color: var(--card-2);
    background-repeat: no-repeat; background-position: center; background-size: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f3f4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    transition: transform .25s cubic-bezier(.4,0,.2,1), border-color .2s ease;
}
.faq summary:hover::after { border-color: rgba(255,255,255,.4); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { margin: 0 0 22px; font-size: 13.5px; }

/* ---------- footer ---------- */
.footer {
    border-top: 1px solid var(--border); padding: 26px 0;
    font-size: 12.5px; color: var(--muted-2);
}
.footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---------- ip reset requests ---------- */
/* What the customer wrote, shown as a quote rather than as a field: it is
   their words, and staff read it before deciding. */
.demande {
    margin-top: 14px; padding: 13px 16px;
    background: var(--card-2); border: 1px solid var(--border);
    border-left: 2px solid var(--border-strong); border-radius: 0 10px 10px 0;
    font-size: 13px; color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.request-row { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--border); }
.request-row:last-child { border-bottom: none; }
.request-row .grow { min-width: 0; }
.request-actions { display: flex; gap: 8px; flex: none; }

/* Accept and refuse: the only two coloured controls in the panel, because
   they are the only pair where picking the wrong one has to be hard. The
   palette's --ok and --bad are pale tints meant for text on dark, and at icon
   size they read as off-white rather than as green and red, so these two get
   real colour of their own. */
.btn-yes { background: rgba(70,208,127,.1); color: #46d07f; border-color: rgba(70,208,127,.45); }
.btn-yes:hover { background: rgba(70,208,127,.2); border-color: #46d07f; }
.btn-no { background: rgba(255,92,96,.1); color: #ff5c60; border-color: rgba(255,92,96,.42); }
.btn-no:hover { background: rgba(255,92,96,.2); border-color: #ff5c60; }

/* ---------- logs ---------- */
.log-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.log-toolbar .input, .log-toolbar select.input { width: auto; min-width: 150px; padding: 9px 12px; font-size: 13px; }
.log-toolbar .grow { flex: 1 1 200px; min-width: 150px; }

td.log-when { white-space: nowrap; color: var(--muted-2); font-family: var(--mono); font-size: 11.5px; }
td.log-ip { font-family: var(--mono); font-size: 11.5px; color: var(--muted); word-break: break-all; }
td.log-summary { color: var(--muted); font-size: 12.5px; }
td.log-summary b { color: var(--text); font-weight: 600; }
td.log-summary .pill { margin-left: 8px; padding: 3px 8px; }

/* The clip of a server log line, under its details. */
.log-clip { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 8px 0 4px; }
.log-clip video { width: 100%; max-width: 640px; border-radius: 10px; border: 1px solid var(--border); background: #000; }
.log-user { display: flex; align-items: center; gap: 9px; }
.log-user b { color: var(--text); font-size: 12.5px; font-weight: 600; display: block; }
.log-user .sub { color: var(--muted-2); font-family: var(--mono); font-size: 10.5px; }

/* Categories carry a colour because the eye picks a refusal out of a hundred
   rows faster than it reads one. Tints only: the page stays monochrome. */
.cat {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 7px;
    border: 1px solid var(--border-strong); color: var(--muted);
}
.cat svg { flex: none; }
.cat.connexion { color: #46d07f; border-color: rgba(70,208,127,.32); background: rgba(70,208,127,.08); }
.cat.refus     { color: #ff5c60; border-color: rgba(255,92,96,.32);  background: rgba(255,92,96,.08); }
.cat.demande   { color: #63a9ff; border-color: rgba(99,169,255,.32); background: rgba(99,169,255,.08); }
.cat.paiement  { color: #f2f3f4; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.06); }
.cat.licence   { color: #b58cff; border-color: rgba(181,140,255,.32); background: rgba(181,140,255,.08); }
.cat.staff     { color: #ffc46b; border-color: rgba(255,196,107,.32); background: rgba(255,196,107,.08); }

/* ---------- landing: the base ---------- */
/* The landing page sells the server base; the licence panel is a perk of it.
   Same monochrome palette as the panels, with a display size up top. */
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; line-height: 1.06; letter-spacing: -0.035em; }
.hero p { max-width: 600px; font-size: 16px; }
/* .hero sets its own vertical padding and would otherwise drop .wrap's gutters. */
.wrap.hero { padding-left: 24px; padding-right: 24px; }
@media (max-width: 600px) { .hero h1 br { display: none; } }
.pill.eyebrow { margin-bottom: 22px; color: var(--text); background: rgba(255,255,255,.04); }

/* What the base contains: a heading and a plain list per family of modules. */
.feature h3 { font-size: 17px; margin-bottom: 14px; }
.feature ul { list-style: none; margin: 0; padding: 0; }
.feature li {
    position: relative; padding: 8px 0 8px 18px; font-size: 13.5px;
    border-top: 1px solid var(--border);
}
.feature li::before {
    content: ''; position: absolute; left: 2px; top: 17px;
    width: 5px; height: 5px; border-radius: 50%; background: var(--muted-2);
}

/* Configuration: the argument on the left, the file that proves it on the right. */
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: 44px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.point h3 { font-size: 15.5px; margin-bottom: 5px; }
.point p { margin: 0; font-size: 13.5px; }
.code-card { padding: 0; overflow: hidden; min-width: 0; }
.code-head {
    padding: 12px 18px; border-bottom: 1px solid var(--border);
    font-size: 11.5px; color: var(--muted-2); background: var(--card-2);
}
.code {
    margin: 0; padding: 20px 18px; overflow-x: auto;
    font-family: var(--mono); font-size: 12.5px; line-height: 1.75; color: var(--text);
}
.code .c { color: var(--muted-2); }
.code .s { color: var(--ok); }
.code .n { color: var(--warn); }
.code .k { color: var(--amber); }

/* Steps: the number is the label. */
.step {
    display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 14px;
    border-radius: 9px; border: 1px solid var(--border-strong);
    font-family: var(--mono); font-size: 13px; color: var(--text);
}
.steps h3 { font-size: 15.5px; }
.steps p { margin: 8px 0 0; font-size: 13.5px; }


/* ---------- legal pages ---------- */
/* Long-form text: one readable column, headings that separate without shouting. */
.legal { max-width: 760px; padding-top: 56px; padding-bottom: 80px; color: var(--muted); font-size: 14.5px; }
.legal h1 { font-size: 30px; margin-bottom: 6px; }
.legal h2 { font-size: 18px; margin: 38px 0 10px; }
.legal h3 { font-size: 14.5px; margin: 22px 0 6px; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal b { color: var(--text); font-weight: 600; }
/* A blank the owner still has to fill in before the page goes live. */
.todo { color: var(--amber); background: rgba(255,196,107,.1); border-radius: 4px; padding: 1px 5px; }

/* ---------- licence list ---------- */
/* Fixed columns that share the card's width, so the list never needs to
   scroll sideways on a desktop. A cell that runs out of room ends in an
   ellipsis and keeps its full text in a tooltip. Below 900px the table keeps
   a workable minimum width and the wrapper scrolls instead. */
.table-fit { overflow-x: auto; }
table.licences { table-layout: fixed; min-width: 860px; }
table.licences th { padding: 0 10px 12px; }
table.licences td { padding: 13px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.licences td.key { font-size: 12px; }
table.licences td.small { font-size: 12px; }
/* The second line of a cell: a note, a description, a country, a last contact. */
table.licences .sub {
    display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis;
    font-family: 'Manrope', sans-serif; font-size: 11.5px; color: var(--muted-2);
}
table.licences .log-user { min-width: 0; }
table.licences .log-user > span { min-width: 0; overflow: hidden; }
table.licences .log-user b, table.licences .log-user .sub { overflow: hidden; text-overflow: ellipsis; }

/* ---------- status ---------- */
/* A dot and a word. The colour carries the state; there is no outline. */
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.state i { width: 7px; height: 7px; border-radius: 50%; background: #4a4d53; flex: none; }
.state.live { color: var(--green); }
.state.live i { background: var(--green); box-shadow: 0 0 0 3px rgba(70,208,127,.16); }
.state.warn { color: var(--amber); }
.state.warn i { background: var(--amber); }
.state.bad { color: var(--red); }
.state.bad i { background: var(--red); }

/* A key inside a table row or a list: same control, smaller. */
.key-field.sm { display: inline-flex; flex-wrap: nowrap; gap: 6px; vertical-align: middle; max-width: 100%; }
.key-field.sm .key-text { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.key-field.sm .key-text.masked { letter-spacing: .06em; }
.key-field.sm .key-btn { width: 22px; height: 22px; border-radius: 6px; }
.key-field.sm .key-btn svg { width: 12px; height: 12px; }

/* ---------- admin overview ---------- */
.overview-row { margin-top: 18px; }
.overview-2 { grid-template-columns: 2fr 1fr; margin-top: 18px; }
@media (max-width: 900px) { .overview-2 { grid-template-columns: 1fr; } }
.overview-2 .card, .overview-row .card { min-width: 0; }

/* A figure, what it compares to, and its last 30 days as a line. */
.kpi .stat { font-size: 30px; }
.kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 11.5px; color: var(--muted-2); }
.kpi-foot b.up { color: var(--green); font-weight: 700; }
.kpi-foot b.down { color: var(--red); font-weight: 700; }
.spark { width: 96px; height: 30px; flex: none; }

.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--mono); font-size: 10px; fill: var(--muted-2); }
/* One transparent column per day: hovering it shows that day's figures. */
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: rgba(255,255,255,.05); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .donut-legend i { width: 8px; height: 8px; border-radius: 2px; flex: none; }

.donut { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.donut svg { width: 150px; height: 150px; }
.donut-n { font-family: var(--mono); font-size: 26px; fill: var(--text); }
.donut-l { font-size: 9px; fill: var(--muted-2); text-transform: uppercase; letter-spacing: .12em; }
.donut-legend { width: 100%; font-size: 12.5px; }
.donut-legend div { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-top: 1px solid var(--border); }
.donut-legend span { flex: 1; color: var(--muted); }
.donut-legend b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.donut-legend em { font-style: normal; color: var(--muted-2); font-family: var(--mono); font-size: 11px; width: 38px; text-align: right; }

/* A ranked list: the bar sits behind the label rather than beside it. */
.ranks { display: flex; flex-direction: column; gap: 6px; }
.rank { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 12.5px; border-radius: 7px; overflow: hidden; background: rgba(255,255,255,.02); }
.rank-bar { position: absolute; inset: 0 auto 0 0; opacity: .16; border-radius: 7px; }
.rank-label { position: relative; color: var(--text); }
.rank b { position: relative; font-family: var(--mono); font-weight: 500; color: var(--text); }

/* The history tables of a licence: identities, environments, refusals, owners. */
table.history { margin-top: 10px; font-size: 12.5px; }
table.history th { padding: 0 10px 10px; }
table.history td { padding: 10px; }
table.history td.small { font-size: 12px; white-space: nowrap; }
table.history .state { margin-left: 8px; font-size: 11px; }

/* ---------- folded sections ---------- */
.folds { margin-top: 22px; border-top: 1px solid var(--border); }
.fold { border-bottom: 1px solid var(--border); }
.fold summary {
    display: flex; align-items: center; gap: 12px; padding: 15px 4px; cursor: pointer; list-style: none;
    font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2);
    transition: color .15s ease;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary:hover, .fold[open] summary { color: var(--text); }
.fold summary i { font-size: 10px; width: 10px; transition: transform .2s ease; }
.fold[open] summary i { transform: rotate(90deg); }
.fold summary span { flex: 1; }
/* How many lines are inside, so an empty section need not be opened to find out. */
.fold summary b {
    font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0; color: var(--muted);
    padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-strong);
}
.fold-body { padding: 2px 4px 20px; }
.fold-body table.history { margin-top: 0; }

/* What is published, above the list of versions actually running. */
.release { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.release div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; }
.release .k { color: var(--muted-2); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 700; }
.release b { color: var(--text); font-weight: 500; }
.release p { margin: 8px 0 0; font-size: 12.5px; }
.release .state { margin-left: 8px; font-size: 11px; }

/* ---------- server log filters ---------- */
.log-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.log-bar .input { min-width: 0; }
.log-field { position: relative; display: flex; align-items: center; }
.log-field.grow { flex: 1 1 260px; }
.log-field > span { position: absolute; left: 14px; display: flex; color: var(--muted-2); pointer-events: none; }
.log-field .input { padding-left: 40px; width: 100%; }
.log-bar > .grow { flex: 1 1 160px; }
tr.log-detail td { background: var(--card-2); }


/* ---------- publishing the base ---------- */
.dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 38px 20px; text-align: center; cursor: pointer;
    border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--card-2);
    transition: border-color .2s ease, background .2s ease;
}
.dropzone:hover, .dropzone.over { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.04); }
.dropzone i { font-size: 26px; color: var(--muted-2); }
.dropzone b { color: var(--text); font-family: var(--heading); font-size: 14.5px; }
.dropzone span { font-size: 12px; color: var(--muted-2); }
.upload { margin-top: 16px; font-size: 12px; }
.progress { height: 6px; margin-top: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--green); transition: width .15s linear; }

/* ---------- installation guide ---------- */
.inst { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 56px; align-items: start; padding: 0 24px; }
.inst-main { min-width: 0; max-width: 760px; padding-bottom: 60px; }
.inst-title { margin: 0 0 10px; font-size: 32px; }
.inst-lead { font-size: 17px; color: var(--muted); margin: 0 0 28px; }
.inst-main p { font-size: 14.5px; line-height: 1.7; color: var(--muted); margin: 0 0 12px; }
.inst-main a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.inst-main a.btn { text-decoration: none; }
.inst-main a.btn-white { color: #08090a; }
.inst-main code { font: 500 12.5px var(--mono); color: var(--text); background: var(--card-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; }
.inst-main ul { margin: 0 0 14px; padding-left: 20px; color: var(--muted); font-size: 14.5px; line-height: 1.8; }
.inst-steps { list-style: none; margin: 36px 0 0; padding: 0; position: relative; }
.inst-steps::before { content: ""; position: absolute; left: 15px; top: 12px; bottom: 12px; width: 1px; background: var(--border); }
.inst-step { position: relative; padding: 0 0 38px 54px; scroll-margin-top: 90px; }
.inst-step h2 { margin: 3px 0 14px; font-size: 22px; }
.inst-num { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--border); font: 600 13px var(--mono); color: var(--text); }
.inst-tree { border: 1px solid var(--border); border-radius: 12px; background: var(--card-2); padding: 14px 18px; font-size: 13.5px; color: var(--text); }
.inst-tree-child { margin: 10px 0 0 18px; padding-left: 16px; border-left: 1px solid var(--border); }
.inst-code { position: relative; border: 1px solid var(--border); border-radius: 12px; background: var(--card-2); margin: 0 0 14px; }
.inst-code pre { margin: 0; padding: 16px 52px 16px 18px; overflow-x: auto; }
.inst-code pre { scrollbar-width: thin; scrollbar-color: #3a3d44 transparent; }
.inst-code code { background: none; border: 0; padding: 0; font: 500 12.5px/1.7 var(--mono); white-space: pre; }
.inst-copy { position: absolute; top: 10px; right: 10px; display: flex; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--muted); cursor: pointer; }
.inst-copy:hover { color: var(--text); }
.inst-toc { position: sticky; top: 90px; display: flex; flex-direction: column; border-left: 1px solid var(--border); padding-left: 16px; }
.inst-toc-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px -17px; padding-left: 0; font-size: 12.5px; color: var(--muted); }
.inst-toc a { padding: 6px 0; font-size: 13px; color: var(--muted-2); text-decoration: none; }
.inst-toc a:hover, .inst-toc a.on { color: var(--text); }
.inst-toc a.on { font-weight: 600; }
@media (max-width: 900px) {
    .inst { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .inst-toc { display: none; }
}

/* The download offered to customers at the top of their panel. */
.download { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.download b { display: block; color: var(--text); font-family: var(--heading); font-size: 16px; }
.download span { font-size: 12.5px; color: var(--muted-2); }

/* ---------- page reveal ---------- */
/* A page paints itself invisible until it is ready, then appears once,
   complete — no elements popping in as their data arrives, no text swapping
   to its real value on screen. The class sits on <html> from the start;
   each page's script removes it once its content is ready, and the safety
   timeout + noscript style in every page guarantee it never stays hidden.
   Visibility rather than display: the page still lays out and its fonts
   still load behind the curtain. */
html.preload body { visibility: hidden; }
html:not(.preload) body { animation: page-in .18s ease; }
@keyframes page-in { from { opacity: 0; } }
