/* ==========================================================================
   HopCall — back-office
   Suite de brand.css : mêmes couleurs, même typo (Sora), même accent orange.
   Le back-office est toujours en thème sombre (data-theme="dark" sur <html>).

   Les noms de classes sont ceux d'origine : les vues Blade n'ont pas bougé.
   ========================================================================== */

:root {
    /* Alias des anciens tokens du thème « Grand Hôtel ». Plusieurs vues les
       référencent encore en style inline (var(--gold), var(--panel)…) : les
       faire pointer sur la palette HopCall évite de toucher 20 fichiers. */
    --gold: var(--accent);
    --gold-2: var(--accent);
    --gold-3: var(--accent);
    --gold-dim: var(--muted);
    --text: var(--ink);
    --panel: var(--surface);
    --panel-2: var(--surface);
    --panel-3: var(--surface-2);
    /* Fond des champs : clair par défaut (légèrement teinté sur panneau blanc),
       sombre en thème sombre. Sans ça, tous les inputs/selects/zones d'upload
       restaient noirs en mode clair. */
    --field-bg: #EFEBE1;
    --ease-lux: var(--ease);
}

:root[data-theme="dark"] { --field-bg: #0C0F17; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --field-bg: #0C0F17; }
}

html, body { height: 100%; }

body {
    font-weight: 400;
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-pill); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------- shell -- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    padding: 26px 16px 20px;
    border-right: 1px solid var(--line);
    background: var(--surface);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand { padding: 2px 10px 4px; }

.brand-name {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.04em;
    color: var(--ink);
    line-height: 1;
}

.brand-name em { font-style: normal; color: var(--accent); }

.brand-sub {
    margin-top: 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

/* L'environnement : discret en production, criard partout ailleurs — on doit
   voir immédiatement qu'on n'est pas sur la machine des vrais clients. */
.env-tag {
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 5px;
    border: 1px solid;
}

.env-tag.env-production { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.env-tag.env-preprod { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.env-tag.env-local { color: var(--muted); border-color: var(--line-strong); }

.version-tag {
    font-family: var(--mono);
    font-size: .58rem;
    color: var(--faint);
    letter-spacing: .02em;
}

.brand-rule { height: 1px; margin: 18px 10px 14px; background: var(--line); }

/* ----------------------------------------------------------------- nav -- */

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-section {
    font-size: .58rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--faint);
    padding: 18px 12px 8px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    color: var(--muted);
    text-decoration: none;
    font-size: .87rem;
    font-weight: 500;
    position: relative;
    transition: background .16s ease, color .16s ease;
}

.nav a svg { width: 17px; height: 17px; flex: none; opacity: .8; }

.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a:hover svg { opacity: 1; }

.nav a.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.nav a.active svg { opacity: 1; }

/* ------------------------------------------------------------ pied de nav -- */

/* Le bouton passe sous l'identité : côte à côte, il rognait les noms longs. */
.sidebar-foot {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.sidebar-foot form { flex: 1 0 100%; }
.sidebar-foot .logout-btn { width: 100%; justify-content: center; }

.whoami-mark {
    width: 34px;
    height: 34px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: .82rem;
    font-weight: 700;
}

.whoami { font-size: .82rem; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whoami-role { font-size: .68rem; color: var(--muted); }

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--sans);
    font-size: .68rem;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 7px 9px;
    cursor: pointer;
    transition: color .16s ease, border-color .16s ease;
}

.logout-btn:hover { color: var(--red); border-color: var(--red); }

/* Bascule de thème : icône compacte (pas pleine largeur comme Déconnexion). */
.sidebar-foot .theme-toggle { width: auto; padding: 7px 8px; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: inline; }

/* ------------------------------------------------------------- contenu -- */

.content { flex: 1; min-width: 0; padding: 36px 44px 64px; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    animation: rise .45s var(--ease) both;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.045em;
    margin: 0;
    line-height: 1.08;
}

.page-sub { margin: 8px 0 0; color: var(--muted); font-size: .88rem; }

.page-head::after {
    content: "";
    flex-basis: 100%;
    height: 1px;
    margin-top: 18px;
    background: var(--line);
}

.page-head + .panel, .page-head + .kpis, .page-head + .service-grid, .page-head + form .panel { margin-top: 22px; }

.hotel-picker { display: flex; flex-direction: column; gap: 6px; min-width: 220px; }

.hotel-picker label {
    font-size: .58rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
}

/* -------------------------------------------------------------- panneaux -- */

.panel {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
    padding: 24px 26px;
    margin: 22px 0;
    animation: rise .5s var(--ease) both;
}

.panel:nth-of-type(2) { animation-delay: .06s; }
.panel:nth-of-type(3) { animation-delay: .12s; }
.panel:nth-of-type(4) { animation-delay: .18s; }

.panel-title {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.panel-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.panel-head .panel-title { margin: 0; flex: 1; }

.filter-input { flex: 0 0 auto; width: 230px; max-width: 40vw; padding: 8px 13px; font-size: .82rem; }

/* ------------------------------------------------------------------ kpi -- */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 22px 0; }

.kpi {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 20px 22px 18px;
    box-shadow: var(--shadow);
    animation: rise .5s var(--ease) both;
    transition: border-color .2s ease, transform .2s var(--ease);
}

.kpi:hover { border-color: var(--accent-line); transform: translateY(-2px); }

.kpi::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-soft), transparent 70%);
}

.kpi:nth-child(2) { animation-delay: .06s; }
.kpi:nth-child(3) { animation-delay: .12s; }
.kpi:nth-child(4) { animation-delay: .18s; }

.kpi-label { font-size: .6rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.kpi-value {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
    margin-top: 6px;
    color: var(--accent);
}

.kpi-hint { font-size: .74rem; color: var(--faint); margin-top: 2px; }

/* --------------------------------------------------------------- formes -- */

.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }

.field { display: flex; flex-direction: column; gap: 7px; }

.field > label {
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], textarea, select, .filter-input {
    font-family: var(--sans);
    font-size: .88rem;
    color: var(--ink);
    background: var(--field-bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    padding: 10px 13px;
    min-width: 0;
    transition: border-color .16s ease, box-shadow .16s ease;
}

input::placeholder, textarea::placeholder { color: var(--faint); }

input:focus, textarea:focus, select:focus, .filter-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23EE5F3C' fill='none' stroke-width='1.6' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

.error { color: var(--red); font-size: .78rem; margin-top: 6px; }

/* -------------------------------------------------------------- boutons -- */

.btn {
    font-family: var(--sans);
    font-size: .82rem;
    font-weight: 700;
    color: var(--accent-ink);
    background: var(--accent);
    border: 0;
    border-radius: var(--r-pill);
    padding: 12px 24px;
    cursor: pointer;
    transition: transform .15s var(--ease), box-shadow .15s ease, filter .15s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -12px var(--accent); }
.btn:active { transform: none; filter: brightness(.95); }

.btn-ghost {
    font-family: var(--sans);
    font-size: .78rem;
    font-weight: 600;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    padding: 8px 16px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.btn-ghost:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.btn-ghost.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn-ghost.danger:hover { background: color-mix(in srgb, var(--red) 12%, transparent); border-color: var(--red); color: var(--red); }

.btn-xs { padding: 5px 12px; font-size: .7rem; }

/* -------------------------------------------------------------- tableaux -- */

.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }

table.lux { width: 100%; border-collapse: collapse; }

table.lux th {
    text-align: left;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 6px 14px 12px;
    border-bottom: 1px solid var(--line-strong);
    white-space: nowrap;
}

table.lux td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    font-size: .88rem;
    vertical-align: middle;
}

table.lux tbody tr { transition: background .16s ease, box-shadow .16s ease; }

table.lux tbody tr:hover {
    background: var(--accent-soft);
    box-shadow: inset 2px 0 0 var(--accent);
}

table.lux tbody tr:last-child td { border-bottom: 0; }

.cell-strong { font-weight: 600; color: var(--ink); }
.cell-muted { color: var(--muted); font-size: .82rem; }

.mono {
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: 6px;
    padding: 2px 8px;
}

.empty-row td { color: var(--faint); padding: 30px 14px; text-align: center; }

/* --------------------------------------------------------------- pilules -- */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: var(--r-pill);
    padding: 4px 12px;
    border: 1px solid;
    white-space: nowrap;
}

.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pill.ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.pill.off { color: var(--faint); border-color: var(--line-strong); background: var(--surface-2); }
.pill.bad { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }
.pill.warn { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 10%, transparent); }
.pill.gold { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

/* ------------------------------------------------------ posture sécurité -- */

.posture-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 6px; }

.posture-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 17px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
    transition: border-color .2s ease;
}

.posture-item:hover { border-color: var(--accent-line); }

.posture-label { font-size: .84rem; color: var(--muted); }

/* ---------------------------------------------------------- cartes service -- */

.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 18px; margin-top: 22px; }

.service-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    animation: rise .5s var(--ease) both;
    transition: border-color .2s ease, transform .2s var(--ease);
}

.service-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }

.service-card:nth-child(2) { animation-delay: .06s; }
.service-card:nth-child(3) { animation-delay: .12s; }
.service-card:nth-child(4) { animation-delay: .18s; }
.service-card:nth-child(5) { animation-delay: .24s; }

/* Les trois boutons d'action écrasaient le nom du service sur les cartes
   étroites : on leur permet de passer à la ligne plutôt que de le rogner. */
.service-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.service-head > *:nth-child(2) { flex: 1 1 200px; min-width: 0; }

.service-icon {
    width: 50px;
    height: 50px;
    flex: none;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: 14px;
    color: var(--accent);
}

.service-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.service-meta { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.service-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }

.targets { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

.targets-title { font-size: .58rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

.target-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.target-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    background: var(--field-bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    padding: 5px 6px 5px 12px;
    transition: border-color .16s ease;
}

.target-chip:hover { border-color: var(--accent-line); }

.target-chip .t-type { color: var(--accent); font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.target-chip .t-val { color: var(--ink); }
.target-chip .t-prio { color: var(--faint); font-size: .68rem; }

.chip-x {
    background: none;
    border: 0;
    color: var(--faint);
    cursor: pointer;
    font-size: .9rem;
    line-height: 1;
    padding: 3px 7px;
    border-radius: var(--r-pill);
    transition: color .15s, background .15s;
}

.chip-x:hover { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }

.target-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.target-add select, .target-add input { padding: 7px 11px; font-size: .8rem; }

/* ------------------------------------------------------------- standard -- */

.sb-state {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface-2);
    margin-bottom: 4px;
}

.sb-lamp {
    width: 46px;
    height: 46px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    font-size: 1.1rem;
}

.sb-lamp.on {
    color: var(--green);
    border-color: color-mix(in srgb, var(--green) 50%, transparent);
    background: color-mix(in srgb, var(--green) 12%, transparent);
    box-shadow: 0 0 18px -4px color-mix(in srgb, var(--green) 60%, transparent);
}

.sb-lamp.off { color: var(--faint); }

.sb-state-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.sb-state-sub { color: var(--muted); font-size: .8rem; margin-top: 2px; }

/* La carte d'appel : l'instant où ça sonne au poste. */
.sb-call {
    margin-top: 20px;
    padding: 26px;
    border: 1px solid var(--accent-line);
    border-radius: var(--r-lg);
    background: var(--surface-2);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    animation: rise .35s var(--ease) both;
}

.sb-call-icon {
    position: relative;
    width: 62px;
    height: 62px;
    flex: none;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    color: var(--accent);
    border: 1px solid var(--accent-line);
    border-radius: 50%;
    background: var(--accent-soft);
}

.sb-call-icon.ringing::before, .sb-call-icon.ringing::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    animation: sb-ring 1.6s var(--ease) infinite;
}

.sb-call-icon.ringing::after { animation-delay: .8s; }

@keyframes sb-ring {
    from { transform: scale(1); opacity: .7; }
    to { transform: scale(1.7); opacity: 0; }
}

.sb-call-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }

.sb-call-state {
    color: var(--muted);
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sb-timer { font-family: var(--mono); font-size: .8rem; color: var(--accent); letter-spacing: .08em; }

.sb-call-actions { margin-left: auto; display: flex; gap: 10px; flex: none; }

.sb-answer {
    font-family: var(--sans);
    font-size: .82rem;
    font-weight: 700;
    color: #fff;
    background: var(--green);
    border: 0;
    border-radius: var(--r-pill);
    padding: 13px 26px;
    cursor: pointer;
    box-shadow: 0 12px 28px -12px var(--green);
    transition: transform .15s var(--ease), filter .15s ease;
}

.sb-answer:hover { transform: translateY(-1px); filter: brightness(1.06); }

.sb-hangup {
    font-family: var(--sans);
    font-size: .8rem;
    font-weight: 600;
    color: var(--red);
    background: color-mix(in srgb, var(--red) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--red) 45%, transparent);
    border-radius: var(--r-pill);
    padding: 12px 22px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.sb-hangup:hover { background: color-mix(in srgb, var(--red) 18%, transparent); border-color: var(--red); }

.sb-idle { color: var(--muted); font-size: .86rem; margin: 20px 0 0; display: flex; align-items: center; gap: 10px; }

.sb-idle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: sb-breathe 2.4s ease-in-out infinite;
}

@keyframes sb-breathe { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

/* -------------------------------------------------------- établissement -- */

.est-media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }

.est-media input[type="file"] { margin-top: 10px; font-size: .78rem; color: var(--muted); width: 100%; }

.est-media input[type="file"]::file-selector-button {
    font-family: var(--sans);
    font-size: .74rem;
    font-weight: 600;
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent-line);
    border-radius: var(--r-pill);
    padding: 6px 14px;
    margin-right: 10px;
    cursor: pointer;
}

.est-preview {
    height: 120px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background-color: var(--field-bg);
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
    overflow: hidden;
}

.est-preview-logo img { max-height: 80px; max-width: 85%; }
.est-empty { color: var(--faint); font-size: .76rem; padding: 0 16px; text-align: center; }

/* ================================================================ login == */
/* La porte du back-office : fond navy profond, halo orange, la frise qui
   raconte le produit (on scanne → l'onde voyage → ça sonne). */

.login-scene {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
    position: relative;
    overflow: hidden;
    background: var(--navy);
}

/* Deux halos qui dérivent lentement : la lumière d'un hall, pas un dégradé figé. */
.login-scene::before {
    content: "";
    position: absolute;
    inset: -30%;
    pointer-events: none;
    background:
        radial-gradient(680px 420px at 22% 18%, rgba(238, 95, 60, .22), transparent 62%),
        radial-gradient(560px 420px at 82% 84%, rgba(238, 95, 60, .12), transparent 60%);
    animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
    from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
    to { transform: translate3d(1.5%, 1.5%, 0) scale(1.06); }
}

.login-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* -------------------------------------------------------------- la frise -- */

.frieze {
    width: 100%;
    max-width: 320px;
    height: auto;
    margin-bottom: 6px;
    opacity: 0;
    animation: rise .8s var(--ease) .1s both;
}

.frieze .fz-qr, .frieze .fz-phone { color: var(--accent); }

/* Le faisceau balaie le QR. */
.frieze .fz-beam { animation: fzScan 4.8s var(--ease) infinite; }

@keyframes fzScan {
    0%, 4% { transform: translateY(6px); opacity: 0; }
    8% { opacity: 1; }
    26% { transform: translateY(92px); opacity: 1; }
    30%, 100% { transform: translateY(96px); opacity: 0; }
}

/* La bille court le long du fil : le scan devient un appel. */
.frieze .fz-bead { animation: fzTravel 4.8s var(--ease) infinite; }

@keyframes fzTravel {
    0%, 30% { transform: translateX(0); opacity: 0; }
    34% { opacity: 1; }
    54% { transform: translateX(286px); opacity: 1; }
    58%, 100% { transform: translateX(286px); opacity: 0; }
}

/* Le combiné tressaille, puis ouvre ses ondes.
   Le groupe porte déjà transform="translate(420 26)" dans le SVG : une règle
   CSS `transform` l'écraserait et ramènerait le combiné sur le QR. On répète
   donc la translation dans chaque étape. */
.frieze .fz-phone { animation: fzRing 4.8s var(--ease) infinite; transform-origin: 40px 40px; }

@keyframes fzRing {
    0%, 56% { transform: translate(420px, 26px) rotate(0deg); }
    60% { transform: translate(420px, 26px) rotate(-9deg); }
    64% { transform: translate(420px, 26px) rotate(7deg); }
    68% { transform: translate(420px, 26px) rotate(-5deg); }
    72% { transform: translate(420px, 26px) rotate(3deg); }
    76%, 100% { transform: translate(420px, 26px) rotate(0deg); }
}

.frieze .fz-waves { animation: fzWaves 4.8s var(--ease) infinite; }

@keyframes fzWaves {
    0%, 58% { opacity: 0; transform: translateX(-6px); }
    66% { opacity: 1; transform: translateX(0); }
    88% { opacity: 1; }
    92%, 100% { opacity: 0; }
}

/* ------------------------------------------------------------- la carte -- */

.login-card {
    width: 100%;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 24px;
    padding: 34px 32px 28px;
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    animation: rise .7s var(--ease) .2s both;
}

/* Le filet orange en tête de carte — la ligne de lumière du hall. */
.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.login-card > * { position: relative; }

.login-mark {
    align-self: center;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.04em;
    color: #fff;
}

.login-mark .hop, .login-mark .dot { color: var(--accent); }

.login-title {
    margin: 4px 0 0;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.035em;
    color: var(--ink);
}

.login-sub {
    margin: 0;
    text-align: center;
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--muted);
}

/* La signature, posée comme un cartouche entre deux filets. */
.login-tagline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 4px;
}

.login-tagline::before, .login-tagline::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.login-tagline span {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--accent);
    white-space: nowrap;
}

.login-card .field { gap: 6px; }

.login-card input { width: 100%; padding: 12px 14px; }

.login-card .btn { margin-top: 8px; width: 100%; padding: 14px; font-size: .88rem; }

.login-link {
    text-align: center;
    font-size: .8rem;
    color: var(--muted);
    text-decoration: none;
    transition: color .16s ease;
}

.login-link:hover { color: var(--accent); }

.login-foot {
    margin-top: 6px;
    text-align: center;
    font-size: .58rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--faint);
}

/* Bandeau de statut (« e-mail envoyé »…) : un message long doit passer à la
   ligne DANS la carte. La pilule, elle, est en white-space:nowrap et débordait. */
.login-status {
    margin: 4px 0;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: .82rem;
    line-height: 1.5;
    text-align: center;
    color: var(--green);
    background: color-mix(in srgb, var(--green) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
}
