/* Espace des soignants (inscription, connexion, double authentification, « Mon compte »,
   lancement, téléchargement) — mêmes codes que la vitrine (index.php) : fond papier à
   halos céruléens, encre #0F2830, accent #2B5F8E, boutons « pilule », surtitres à trait
   dégradé. Feuille autonome : ne dépend plus de admin.css (palette du back-office). */
:root {
    --ink: #0F2830;
    --text: #2E4651;
    --muted: #5C7280;
    --paper: #F5F4EF;
    --line: #E5E1D8;
    --border: #E5E1D8;
    --surface: #FFFFFF;
    --accent: #2B5F8E;
    --accent-dark: #1C3F66;
    --accent-400: #5E8FBF;
    --accent-soft: #DCE9F5;
    --accent-50: #F0F6FB;
    --grad: linear-gradient(100deg, #2B5F8E 0%, #5E8FBF 100%);
    --ok: #1E7A52;
    --ok-soft: #E3F4EC;
    --warn: #8A5A00;
    --warn-soft: #FFF4D6;
    --danger: #B42335;
    --danger-soft: #FDE7EA;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --shadow: 0 1px 2px rgba(15, 40, 48, 0.04), 0 12px 32px rgba(15, 40, 48, 0.06);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(ellipse 55% 50% at 92% -10%, rgba(94, 143, 191, 0.16) 0%, transparent 62%),
        radial-gradient(ellipse 50% 45% at -8% 15%, rgba(43, 95, 142, 0.10) 0%, transparent 60%),
        var(--paper);
}
::selection { background: var(--accent-soft); color: var(--ink); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
    outline: 2px solid var(--accent-400); outline-offset: 3px; border-radius: 6px;
}
.skip-link { position: absolute; left: -9999px; padding: 12px 18px; background: var(--ink); color: #fff; font-weight: 700; border-radius: 0 0 10px 0; z-index: 100; }
.skip-link:focus { left: 0; top: 0; }

/* ── En-tête (même identité que la vitrine) ───────────────────────────── */
.site-head {
    position: sticky; top: 0; z-index: 40;
    background: rgba(253, 253, 251, 0.88);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-head-inner { max-width: 1240px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 34px; height: 34px; }
.brand-word { font-size: 17px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.brand-word span { font-weight: 300; color: var(--accent); }
.brand-badge { display: none; border-radius: 999px; padding: 2px 8px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; background: var(--accent-soft); color: var(--accent-dark); }
.head-nav { display: none; align-items: center; gap: 4px; margin-left: 8px; }
.head-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color .2s ease, background-color .2s ease; }
.head-nav a:hover, .head-nav a[aria-current="page"] { color: var(--ink); background: var(--accent-50); }
.head-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.head-user { display: none; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.head-actions form { margin: 0; }
@media (min-width: 640px) { .brand-badge { display: inline-block; } .head-user { display: inline; } .head-nav { display: flex; } }
.head-nav a, .head-actions .btn { white-space: nowrap; }
@media (min-width: 1024px) { .site-head-inner { padding: 16px 32px; } }

.site-main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 20px 56px; }
@media (min-width: 1024px) { .site-main { padding: 56px 32px 72px; } }
.site-foot { border-top: 1px solid var(--line); padding: 22px 20px; text-align: center; font-size: 13px; color: var(--muted); }
.site-foot a { color: var(--muted); }

/* ── Typographie ──────────────────────────────────────────────────────── */
h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; color: var(--ink); margin: 0 0 10px; }
h2 { font-size: 19px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 14px; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ''; display: inline-block; width: 30px; height: 2px; background: var(--grad); }
.lead { font-size: 16px; line-height: 1.65; color: var(--muted); margin: 0 0 28px; max-width: 62ch; }
.hint { font-size: 13px; line-height: 1.55; color: var(--muted); margin-top: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
p { line-height: 1.6; }

/* ── Cartes, grilles ──────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; margin-bottom: 24px; box-shadow: var(--shadow); }
@media (max-width: 520px) { .card { padding: 22px; border-radius: 20px; } }
.grid { display: grid; gap: 24px; }
.grid > .card { margin-bottom: 0; }
.grid + .card, .grid + section { margin-top: 24px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.page-head { margin-bottom: 32px; }
.page-head .lead { margin-bottom: 0; }

/* ── Pages d'authentification ─────────────────────────────────────────── */
.auth { max-width: 460px; margin: 8px auto 24px; padding: 36px; }
@media (max-width: 520px) { .auth { padding: 26px 22px; } }
.auth h1 { font-size: clamp(26px, 3vw, 32px); }
.auth .lead { margin-bottom: 24px; font-size: 15px; }
.auth form .btn-primary { width: 100%; margin-top: 6px; }
.auth-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-50); color: var(--accent); margin-bottom: 18px; }
.auth-foot { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.auth-foot > * { white-space: nowrap; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--accent-dark); }
.trust-note { max-width: 460px; margin: 0 auto; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.55; color: var(--muted); }
.trust-note svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.qr-frame { display: flex; justify-content: center; padding: 18px; margin: 0 0 14px; border: 1px dashed var(--accent-400); border-radius: 20px; background: var(--accent-50); }
.qr { display: block; border-radius: 12px; background: #fff; padding: 8px; }
.otp-input { text-align: center; font-size: 26px !important; font-weight: 700; letter-spacing: 0.4em; padding: 14px 13px !important; }
.otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.otp-boxes input.otp-box { min-height: 60px; padding: 0 !important; text-align: center; font-size: 26px; font-weight: 700; color: var(--ink); border-radius: 14px; caret-color: var(--accent); }
.otp-boxes input.otp-box.filled { border-color: var(--accent-400); background: var(--accent-50); }
@media (max-width: 380px) { .otp-boxes { gap: 6px; } .otp-boxes input.otp-box { min-height: 52px; font-size: 22px; } }
.secret-key { display: inline-block; padding: 4px 8px; border-radius: 8px; background: var(--paper); color: var(--ink); user-select: all; word-break: break-all; }

/* ── Formulaires ──────────────────────────────────────────────────────── */
label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], select {
    width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
    font: inherit; font-size: 16px; color: var(--ink); background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}
/* <select> sans JavaScript : même allure que les champs (chevron dessiné). */
select { -webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%235C7280' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; }
.field-role { flex: 0 1 220px !important; min-width: 180px; }
@media (max-width: 640px) { .field-role { flex: 1 1 100% !important; } }
/* Menu déroulant (assets/js/compte.js) */
.dd { position: relative; }
.dd-native { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.dd-btn { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 12px 16px;
    border: 1px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-size: 16px; color: var(--ink); text-align: left; cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease; }
.dd-btn:hover { border-color: #CFC9BC; }
.dd-btn:focus-visible, .dd.open .dd-btn { outline: none; border-color: var(--accent-400); box-shadow: 0 0 0 4px rgba(94, 143, 191, 0.18); }
.dd-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-chevron { display: inline-flex; color: var(--muted); transition: transform .2s var(--ease-out); }
.dd.open .dd-chevron { transform: rotate(180deg); color: var(--accent); }
.dd-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
    background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(15, 40, 48, 0.14);
    max-height: 260px; overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s var(--ease-out), visibility .15s; }
.dd.open .dd-menu { visibility: visible; opacity: 1; transform: none; }
.dd-menu:focus { outline: none; }
.dd-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px;
    font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; }
.dd-option.is-active { background: var(--accent-50); color: var(--ink); }
.dd-option .dd-tick { color: var(--accent); visibility: hidden; flex-shrink: 0; }
.dd-option[aria-selected="true"] { color: var(--accent); }
.dd-option[aria-selected="true"] .dd-tick { visibility: visible; }
html.hc .dd-btn, html.hc .dd-menu { border-color: #000; box-shadow: none; }
html.hc .dd-option.is-active { background: #000; color: #fff; }
input:hover, select:hover { border-color: #CFC9BC; }
input:focus, select:focus { outline: none; border-color: var(--accent-400); box-shadow: 0 0 0 4px rgba(94, 143, 191, 0.18); }
input:focus-visible, select:focus-visible { outline: none; }
input[readonly] { background: var(--paper); color: var(--muted); }
.field { margin-bottom: 18px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.row > .field { flex: 1; min-width: 160px; }
.row > .field:has(> .btn) { flex: 0 0 auto !important; min-width: 0; align-self: flex-end; }
.inline { display: inline; margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }

/* ── Boutons « pilule » (comme la vitrine) ───────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
    font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap;
    cursor: pointer; transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(43, 95, 142, 0.22); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--accent); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent-400); background: var(--accent-50); color: var(--accent); }
.btn-danger { background: #fff; color: var(--danger); border-color: #F2C2C9; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn[aria-disabled="true"] { opacity: .7; cursor: progress; }
.btn-os .os-ico { flex-shrink: 0; }
.launch { min-height: 54px; padding: 0 30px; font-size: 16px; }
.btn-arrow { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); transition: transform .3s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ── États, alertes, badges ───────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-active { background: var(--ok-soft); color: var(--ok); }
.badge-suspendue, .badge-revoquee { background: var(--danger-soft); color: var(--danger); }
.badge-expiree { background: var(--warn-soft); color: var(--warn); }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.alert { padding: 13px 16px; border-radius: 14px; margin-bottom: 18px; font-size: 14px; line-height: 1.55; border: 1px solid; }
.alert-success { background: var(--ok-soft); border-color: #B8E2CC; color: var(--ok); }
.alert-error { background: var(--danger-soft); border-color: #F2C2C9; color: var(--danger); }
.alert-warn { background: var(--warn-soft); border-color: #F0DCA0; color: var(--warn); }
.alert-update { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; background: var(--accent-50, #F0F6FB); border-color: #C9DCEE; color: var(--ink, #0F2830); }
.alert-update > div:first-child { flex: 1 1 360px; min-width: 0; }
.alert-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.alert-link { font-size: 13px; font-weight: 600; color: var(--accent, #2B5F8E); text-decoration: underline; text-underline-offset: 3px; }
html.hc .alert-update { background: #fff; border-color: #000; color: #000; }
.code-reveal, .key-reveal { display: inline-block; font-size: 26px; font-weight: 800; letter-spacing: 0.18em; color: var(--ink); background: var(--accent-soft); padding: 14px 18px; border-radius: 14px; user-select: all; }

/* ── Tableaux ─────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text); }
tr:last-child td { border-bottom: 0; }

/* ── « Mon compte » : en-tête de carte avec icône ─────────────────────── */
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.card-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-50); color: var(--accent); flex-shrink: 0; }
.card-feature { background: linear-gradient(160deg, #FFFFFF 0%, var(--accent-50) 100%); }

/* ── Choix (mur de téléchargement), fenêtres ──────────────────────────── */
.choice-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .choice-grid { grid-template-columns: 1fr 1fr; } }
.choice { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; }
a.choice:hover, a.choice:focus-visible { border-color: var(--accent-400); box-shadow: 0 10px 28px rgba(43, 95, 142, 0.12); }
.choice h2 { margin-bottom: 6px; }
.choice p { margin: 0; color: var(--muted); }
.modal { border: 1px solid var(--line); border-radius: 24px; padding: 28px; max-width: 480px; width: calc(100% - 32px); color: var(--text); box-shadow: 0 24px 64px rgba(15, 40, 48, 0.18); }
.modal::backdrop { background: rgba(15, 40, 48, 0.45); backdrop-filter: blur(3px); }
.modal h2 { margin-bottom: 8px; }
.modal p { margin: 0; line-height: 1.6; }
.modal .steps { margin: 14px 0; padding-left: 20px; line-height: 1.6; }
.modal .steps li { margin-bottom: 12px; }
.modal .code-reveal { font-size: 22px; }

/* ── Indicateur « Ouverture en cours » (lancer.php) ─────────────────── */
.launch-status { display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 999px; background: var(--accent-50); color: var(--accent-dark); font-weight: 700; font-size: 15px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .9s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Fort contraste, mouvement réduit ─────────────────────────────────── */
html.hc body { background: #fff; color: #000; }
html.hc .site-head { background: #fff; border-color: #000; }
html.hc .card, html.hc .choice, html.hc .modal, html.hc input, html.hc select, html.hc .btn-ghost { border-color: #000; box-shadow: none; }
html.hc .btn-primary { background: #000; box-shadow: none; }
html.hc .lead, html.hc .hint, html.hc .eyebrow, html.hc td { color: #000; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Vérification d'ordonnance (verification.php) ─────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: 0.02em; }
.verif { max-width: 640px; margin: 0 auto; }
.verif-head { margin-bottom: 8px; }
.verif-result { border-width: 1.5px; }
.verif-status { display: flex; gap: 16px; align-items: flex-start; }
.verif-status h2 { margin: 2px 0 6px; font-size: 22px; }
.verif-status p { margin: 0; line-height: 1.6; }
.verif-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0; }
.verif-ok { border-color: #B8E2CC; }
.verif-ok .verif-icon { background: var(--ok-soft); color: var(--ok); }
.verif-ok h2 { color: var(--ok); }
.verif-danger { border-color: #F2C2C9; }
.verif-danger .verif-icon { background: var(--danger-soft); color: var(--danger); }
.verif-danger h2 { color: var(--danger); }
.verif-warn { border-color: #F0DCA0; }
.verif-warn .verif-icon { background: var(--warn-soft); color: var(--warn); }
.verif-warn h2 { color: var(--warn); }
.verif-details { display: grid; gap: 0; margin: 22px 0 0; border-top: 1px solid var(--line); }
.verif-details > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.verif-details dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.verif-details dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.verif-note { margin: 16px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.verif-actions { margin-bottom: 20px; }
.verif-actions .btn { width: 100%; }
@media (min-width: 640px) { .verif-actions .btn { width: auto; } }
.verif-reader label { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.verif-reader input { width: 100%; }
.verif-reader .hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.verif-camera { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 40, 48, 0.82); }
.verif-camera[hidden] { display: none; }
.verif-camera-inner { position: relative; width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.verif-camera video { width: 100%; max-height: 70vh; border-radius: 20px; background: #000; object-fit: cover; }
.verif-camera-frame { position: absolute; top: 0; left: 50%; width: 64%; aspect-ratio: 1; transform: translate(-50%, 0); margin-top: min(12%, 60px); border: 3px solid #fff; border-radius: 20px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.18); pointer-events: none; }
@media (min-width: 640px) { .verif-camera-frame { width: 44%; } }
.verif-camera-status { margin: 0; color: #fff; font-size: 14px; text-align: center; }
html.hc .verif-result, html.hc .verif-icon { border-color: #000; }
html.hc .verif-details dt, html.hc .verif-note, html.hc .verif-reader .hint { color: #000; }

/* Pastilles de validation en direct (data-check, assets/js/compte.js) */
.field-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.5; border: 1px solid transparent; transition: background-color .15s ease, color .15s ease; }
.field-pill[hidden] { display: none; }
.field-pill.is-ok { background: var(--ok-soft); color: var(--ok); border-color: #BFE3D0; }
.field-pill.is-wait { background: #F3F1EC; color: #4A5C66; border-color: var(--line); }
.field-pill.is-bad { background: var(--danger-soft); color: var(--danger); border-color: #F2C2C9; }
.field-pill + .hint { margin-top: 4px; }
input[aria-invalid="true"] { border-color: var(--danger) !important; }
html.hc .field-pill { background: #fff !important; color: #000 !important; border: 2px solid #000 !important; }
@media (prefers-reduced-motion: reduce) { .field-pill { transition: none; } }

/* ── Pages d'authentification : écran partagé (compte_page_start(..., $aside)) ── */
.auth-layout { background: var(--surface); }
.auth-split { flex: 1; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; min-height: 100vh; }
.auth-brand {
    position: relative; overflow: hidden; color: #E8F0F8;
    background:
        radial-gradient(ellipse 70% 55% at 110% -10%, rgba(94, 143, 191, 0.55) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at -10% 110%, rgba(94, 143, 191, 0.35) 0%, transparent 60%),
        linear-gradient(160deg, #1C3F66 0%, #2B5F8E 100%);
}
.auth-brand::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px); background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%); mask-image: linear-gradient(180deg, #000 0%, transparent 70%); }
.auth-brand-inner { position: sticky; top: 0; z-index: 1; min-height: 100vh; max-height: 100vh; display: flex; flex-direction: column; gap: 32px; padding: 40px 48px; }
.auth-brand-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.auth-brand-logo img { filter: brightness(0) invert(1); }
.auth-brand-logo .brand-word { color: #fff; font-size: 18px; }
.auth-brand-logo .brand-word span { color: #BBD3EA; }
.auth-brand-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; max-width: 520px; }
.auth-brand-title { margin: 0; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.12; font-weight: 800; letter-spacing: -0.025em; color: #fff; }
.auth-brand-text { margin: 0; font-size: 16px; line-height: 1.65; color: #C9DBEC; max-width: 46ch; }
.auth-points { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.45; color: #E8F0F8; }
.auth-points b { color: #fff; font-weight: 700; }
.auth-check { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 10px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); color: #fff; }
.auth-preview { margin: 14px 0 0; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 30px 60px rgba(8, 24, 40, .45); transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); transform-origin: left center; max-width: 480px; }
.auth-preview img { display: block; width: 100%; height: auto; }
.auth-brand-foot { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #BBD3EA; }

.auth-pane { display: flex; flex-direction: column; min-width: 0; background: var(--surface); }
.auth-pane-top { display: flex; justify-content: flex-end; padding: 24px 32px 0; }
.auth-main { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 520px; margin: 0 auto; padding: 32px 32px 40px; }
.auth-main > .alert { margin-bottom: 16px; }
.auth-layout .auth.card { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.auth-layout .auth-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-50); box-shadow: inset 0 0 0 1px var(--accent-soft); }
.auth-layout .auth h1 { font-size: clamp(28px, 2.4vw, 36px); }
.auth-layout .trust-note { display: none; }
.auth-pane-foot { padding: 18px 32px 24px; text-align: center; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.auth-pane-foot a { color: var(--muted); }

/* Inscription : sections titrées + avancement */
.form-section { margin: 22px 0 0; padding: 4px 0 0; border: 0; border-top: 1px solid var(--line); }
.form-section:first-of-type { margin-top: 8px; }
.form-section legend { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 0; margin: 0 0 6px; font-size: 15px; font-weight: 800; color: var(--ink); }
.form-section legend .step { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; background: var(--accent-50); color: var(--accent); font-size: 13px; font-weight: 800; box-shadow: inset 0 0 0 1px var(--accent-soft); transition: background-color .2s ease, color .2s ease; }
.form-section.is-done legend .step { background: var(--ok); color: #fff; box-shadow: none; }
.form-progress { position: sticky; top: 0; z-index: 2; margin: 0 0 6px; padding: 10px 0; background: var(--surface); }
.form-progress-row { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.form-progress-bar { height: 6px; border-radius: 999px; background: var(--accent-50); overflow: hidden; }
.form-progress-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .3s var(--ease-out); }

@media (max-width: 960px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-brand-inner { position: relative; min-height: 0; max-height: none; padding: 22px 22px 26px; gap: 16px; }
    .auth-brand-body { gap: 8px; }
    .auth-brand-title { font-size: 22px; }
    .auth-brand-text { font-size: 14px; }
    .auth-points, .auth-preview, .auth-brand-foot { display: none; }
    .auth-pane-top { position: absolute; top: 18px; right: 16px; padding: 0; }
    .auth-pane-top .btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }
    .auth-main { padding: 28px 20px 36px; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .auth-preview { transform: none; } .form-progress-bar span, .form-section legend .step { transition: none; } }
html.hc .auth-brand { background: #000; }
html.hc .auth-brand::after { display: none; }
html.hc .auth-brand-text, html.hc .auth-brand-foot, html.hc .auth-points li { color: #fff; }
html.hc .form-progress-bar span { background: #000; }

/* Pro Santé Connect (charte graphique ANS) : bouton officiel non modifié, largeur standard
   220 px, ratio conservé, 20 px de marge autour, formule centrée au-dessus. */
.psc{display:flex;flex-direction:column;align-items:center;margin:26px 0 4px}
.psc-label{margin:0;font-size:14px;font-weight:600;color:var(--ink,#0F2830);text-align:center}
.psc-button{display:block;padding:20px;line-height:0}
.psc-button img{display:block;width:220px;max-width:100%;height:auto}
.auth-or{display:flex;align-items:center;gap:14px;margin:0 0 22px;font-size:13px;color:var(--muted,#5C7280)}
.auth-or::before,.auth-or::after{content:"";flex:1;height:1px;background:var(--line,#E5E1D8)}

/* ── « Mon compte » (compte.php) : bandeau d'accueil, mise en route, rangées, centre d'aide ── */
.acct-hero {
    position: relative; overflow: hidden; isolation: isolate;
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px 40px;
    padding: 40px 44px; border-radius: 28px; color: #E8F0F8;
    background:
        radial-gradient(ellipse 60% 80% at 105% -20%, rgba(94, 143, 191, 0.6) 0%, transparent 60%),
        radial-gradient(ellipse 50% 70% at -10% 120%, rgba(94, 143, 191, 0.35) 0%, transparent 60%),
        linear-gradient(150deg, #1C3F66 0%, #2B5F8E 100%);
    box-shadow: 0 24px 48px rgba(28, 63, 102, 0.22);
}
.acct-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
    background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 100%); mask-image: linear-gradient(100deg, transparent 30%, #000 100%); }
.acct-kicker { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #BBD3EA; }
.acct-hero h1 { margin: 0; color: #fff; font-size: clamp(26px, 3.2vw, 38px); }
.acct-hero-sub { margin: 8px 0 0; font-size: 15px; color: #C9DBEC; }
.acct-chips { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 14px 6px 10px; border-radius: 999px;
    font-size: 13px; font-weight: 600; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.acct-chip a { color: #fff; font-weight: 700; }
.acct-chip-ok svg { color: #8FE0B5; }
.acct-chip-warn svg { color: #FFD98A; }
.acct-chip-bad svg { color: #FFB3BD; }
.acct-chip-off svg { color: #BBD3EA; }
.acct-chip-info { background: rgba(255,255,255,.2); }
.acct-chip-info svg { color: #fff; }
.acct-hero-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; }
.acct-hero-cta p { margin: 0; font-size: 13px; color: #BBD3EA; }
.acct-launch { min-height: 58px; padding: 0 30px; gap: 10px; font-size: 17px; background: #fff; color: var(--accent-dark); box-shadow: 0 12px 28px rgba(8, 24, 40, .28); }
.acct-launch:hover { background: #F0F6FB; color: var(--accent-dark); }
.acct-launch svg { color: var(--accent); }

.acct-steps { margin: 24px 0 0; padding: 22px 26px 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.acct-steps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.acct-steps-head h2 { margin: 0; font-size: 17px; }
.acct-steps-count { font-size: 13px; font-weight: 700; color: var(--muted); }
.acct-steps-bar { height: 6px; margin: 14px 0 18px; border-radius: 999px; background: var(--accent-50); overflow: hidden; }
.acct-steps-bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.acct-steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.acct-steps-list li { flex: 1 1 200px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.acct-step-dot { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 999px;
    font-size: 13px; font-weight: 800; background: var(--accent-50); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-soft); }
.is-done .acct-step-dot { background: var(--ok); color: #fff; box-shadow: none; }
.acct-step-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; color: var(--muted); }
.acct-step-text strong { font-size: 14px; color: var(--ink); }
.is-done .acct-step-text strong { color: var(--muted); }
.acct-step-go { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; color: var(--accent); }
.acct-step-go:hover { background: var(--accent-50); }

.acct-rows { margin-top: 40px; }
.acct-row { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 20px 56px; padding: 36px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.acct-row-head { align-self: start; position: sticky; top: 96px; }
.acct-row-ico { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 13px; margin-bottom: 14px; background: var(--accent-50); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-soft); }
.acct-row-head h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.acct-row-head > p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.acct-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--accent-50); color: var(--accent-dark); font-size: 12px; font-weight: 800; }
.acct-help-link { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 2px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--accent); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent-soft); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.acct-help-link:hover { color: var(--accent-dark); text-decoration-color: var(--accent-400); }
.acct-row-body { min-width: 0; }
.acct-row-body > :first-child { margin-top: 0; }
.acct-row-body h3 { margin: 0 0 4px; font-size: 15px; font-weight: 800; color: var(--ink); }
.acct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; }
.acct-block { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--line); }
.acct-block .hint { margin: 0 0 12px; }

.acct-device { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.acct-device-ico { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: var(--paper); color: var(--ink); }
.acct-device-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.acct-device-main strong { color: var(--ink); font-size: 15px; }
.acct-device-main .mono { color: var(--muted); overflow-wrap: anywhere; }
.acct-state { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.acct-state-ok { background: var(--ok-soft); color: var(--ok); }
.acct-state-off { background: #EEF1F4; color: #4A5C66; }
.acct-facts { display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 16px 0 0; padding: 0 4px; }
.acct-facts div { display: flex; flex-direction: column; gap: 2px; }
.acct-facts dt { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.acct-facts dd { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.acct-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.acct-tag-ok { background: var(--ok-soft); color: var(--ok); }
.acct-tag-warn { background: var(--warn-soft); color: var(--warn); }
.acct-update { display: flex; gap: 14px; margin-top: 18px; padding: 18px 20px; border-radius: 18px; background: var(--accent-50); border: 1px solid #C9DCEE; color: var(--ink); }
.acct-update-ico { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; }
.acct-update p { margin: 4px 0 0; font-size: 14px; color: var(--text); }
.acct-update .acct-actions { margin-top: 10px; }
.acct-empty { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 18px; border: 1px dashed #CFC9BC; background: rgba(255,255,255,.6); }
.acct-empty > svg { flex-shrink: 0; color: var(--muted); margin-top: 2px; }
.acct-empty p { margin: 0; font-size: 14.5px; color: var(--text); }
.acct-empty strong { color: var(--ink); }
.acct-code { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.acct-code-value { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 26px; font-weight: 800; letter-spacing: 0.18em; color: var(--ink);
    padding: 12px 18px; border-radius: 14px; background: var(--surface); border: 1.5px dashed var(--accent-400); user-select: all; }

.acct-status { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.acct-status > svg { flex-shrink: 0; margin-top: 1px; }
.acct-status div { display: flex; flex-direction: column; gap: 4px; }
.acct-status strong { color: var(--ink); font-size: 15px; }
.acct-status span { font-size: 14px; color: var(--muted); }
.acct-status-ok > svg { color: var(--ok); }
.acct-status-warn > svg { color: var(--warn); }
.acct-status-bad > svg { color: var(--danger); }
.acct-row-body form .btn { margin-top: 4px; }

.acct-team { list-style: none; margin: 0; padding: 0; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.acct-team li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto 44px; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
.acct-team li:first-child { border-top: 0; }
.acct-avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 14px; font-weight: 800; }
.acct-team-who { display: flex; flex-direction: column; min-width: 0; }
.acct-team-who strong { color: var(--ink); font-size: 15px; }
.acct-team-who > span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-you { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.acct-team-role { font-size: 13.5px; color: var(--text); white-space: nowrap; }
.acct-team-act { margin: 0; grid-column: 5; }
.acct-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.acct-icon-btn:hover { background: var(--danger-soft); color: var(--danger); }
.help-head .acct-icon-btn:hover { background: var(--accent-50); color: var(--ink); }
.acct-invite { margin-top: 24px; }
.acct-invite h3 { margin-bottom: 12px; }
.acct-invite-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.acct-invite-fields .field { flex: 1 1 240px; margin: 0; }
.acct-invite-fields .field-role { flex: 0 1 200px !important; }
.acct-invite-fields .btn { min-height: 48px; }
.acct-invite .hint { margin-top: 10px; }

/* Abonnement non actif : bandeau sous l'accueil ; « Détails et outils » repliés */
.acct-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 0; padding: 8px 8px 8px 16px; border-radius: 14px; border: 1px solid; }
.acct-alert > svg { flex-shrink: 0; }
.acct-alert-warn { background: var(--warn-soft); border-color: #F0DCA0; color: var(--warn); }
.acct-alert-bad { background: var(--danger-soft); border-color: #F2C2C9; color: var(--danger); }
.acct-alert-text { flex: 1 1 280px; margin: 0; font-size: 14px; line-height: 1.5; min-width: 0; }
.acct-alert-text strong { color: inherit; }
.acct-alert-text span { color: var(--text); }
.acct-alert form { margin: 0; }
.acct-alert-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 700; color: #fff; text-decoration: none; cursor: pointer; transition: background-color .15s ease; }
.acct-alert-warn .acct-alert-btn { background: #8A5A00; }
.acct-alert-warn .acct-alert-btn:hover { background: #6E4800; color: #fff; }
.acct-alert-bad .acct-alert-btn { background: var(--danger); }
.acct-alert-bad .acct-alert-btn:hover { background: #8F1B2A; color: #fff; }
.acct-uptodate { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.acct-uptodate-ico { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); }
.acct-uptodate div { display: flex; flex-direction: column; gap: 2px; }
.acct-uptodate strong { font-size: 15px; color: var(--ink); }
.acct-uptodate span { font-size: 13.5px; color: var(--muted); }
.acct-more { margin-top: 14px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .55); }
.acct-more > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 52px; padding: 10px 18px; list-style: none; cursor: pointer; border-radius: 18px; }
.acct-more > summary::-webkit-details-marker { display: none; }
.acct-more > summary:hover { background: var(--surface); }
.acct-more-title { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.acct-more-hint { flex: 1; font-size: 13px; color: var(--muted); }
.acct-more > summary .help-chevron { margin-left: auto; }
.acct-more[open] > summary .help-chevron { transform: rotate(180deg); color: var(--accent); }
.acct-more[open] > summary { border-bottom: 1px solid var(--line); border-radius: 18px 18px 0 0; }
.acct-more-body { padding: 18px; }
html.hc .acct-alert, html.hc .acct-uptodate, html.hc .acct-more { border-color: #000; background: #fff; }
html.hc .acct-alert-text span, html.hc .acct-more-hint { color: #000; }

.btn-version { padding: 2px 8px; border-radius: 999px; background: var(--accent-50); color: var(--accent-dark); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.acct-locked { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; border-radius: 16px; background: var(--paper); border: 1px dashed #CFC9BC; }
.acct-locked > svg { flex-shrink: 0; color: var(--muted); }
.acct-locked p { flex: 1 1 260px; margin: 0; font-size: 14px; line-height: 1.55; color: var(--text); }
.acct-locked form { margin: 0; }
html.hc .acct-locked { border-color: #000; background: #fff; }
html.hc .btn-version { background: #fff; color: #000; border: 1px solid #000; }

/* Centre d'aide : bouton flottant + panneau */
.help-fab { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 22px 0 18px;
    border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
    box-shadow: 0 14px 34px rgba(15, 40, 48, 0.28); transition: background-color .2s ease, transform .2s var(--ease-out); }
.help-fab:hover { background: var(--accent-dark); }
.help-fab[aria-expanded="true"] { background: var(--accent); }
.help-panel { position: fixed; right: 24px; bottom: 92px; z-index: 61; width: 400px; max-height: min(640px, calc(100vh - 120px)); display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 28px 70px rgba(15, 40, 48, 0.22); overflow: hidden;
    animation: help-in .2s var(--ease-out); }
.help-panel[hidden] { display: none; }
@keyframes help-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.help-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 16px 12px 22px; }
.help-kicker { margin: 0 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.help-head h2 { margin: 0; font-size: 18px; }
.help-search { position: relative; margin: 0 22px 10px; }
.help-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.help-search input { padding-left: 42px; min-height: 46px; background: var(--paper); border-color: transparent; }
.help-list { flex: 1; overflow-y: auto; padding: 4px 12px 12px; overscroll-behavior: contain; }
.help-item { border-radius: 14px; }
.help-item[hidden] { display: none; }
.help-item summary { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 14px; list-style: none; cursor: pointer; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary:hover { background: var(--paper); }
.help-item summary > span:nth-child(2) { flex: 1; }
.help-item-ico { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-50); color: var(--accent); }
.help-chevron { flex-shrink: 0; color: var(--muted); transition: transform .2s var(--ease-out); }
.help-item[open] summary { background: var(--accent-50); }
.help-item[open] .help-chevron { transform: rotate(180deg); color: var(--accent); }
.help-body { padding: 8px 12px 14px 56px; font-size: 14px; line-height: 1.6; color: var(--text); }
.help-body p { margin: 8px 0; }
.help-body ol, .help-body ul { margin: 6px 0; padding-left: 18px; }
.help-body li { margin-bottom: 6px; }
.help-body strong { color: var(--ink); }
.help-empty { margin: 12px 10px; font-size: 14px; color: var(--muted); }
.help-foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--paper); font-size: 13.5px; color: var(--muted); }
.help-foot svg { flex-shrink: 0; color: var(--accent); }

@media (max-width: 900px) {
    .acct-hero { grid-template-columns: 1fr; padding: 30px 24px; border-radius: 24px; }
    .acct-hero-cta { align-items: stretch; text-align: left; }
    .acct-launch { width: 100%; }
    .acct-row { grid-template-columns: 1fr; padding: 30px 0; }
    .acct-row-head { position: static; }
}
@media (max-width: 640px) {
    .acct-team li { grid-template-columns: 40px minmax(0, 1fr) 44px; }
    .acct-team-role, .acct-team-state { grid-column: 2; }
    .acct-team-act { grid-column: 3; grid-row: 1; }
    .acct-device { flex-wrap: wrap; }
    .acct-state { margin-left: 60px; }
    .acct-invite-fields .field-role { flex: 1 1 100% !important; }
    .acct-invite-fields .btn { width: 100%; }
    .help-panel { right: 0; left: 0; bottom: 0; width: auto; max-height: 85vh; border-radius: 24px 24px 0 0; }
    html.help-open .help-fab { display: none; }
    .help-fab { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { .help-panel { animation: none; } .help-chevron, .help-fab { transition: none; } }
html.hc .acct-hero { background: #000; box-shadow: none; }
html.hc .acct-hero::after { display: none; }
html.hc .acct-chip { border-color: #fff; }
html.hc .acct-steps, html.hc .acct-device, html.hc .acct-team, html.hc .acct-status, html.hc .acct-update, html.hc .acct-empty, html.hc .help-panel { border-color: #000; box-shadow: none; }
html.hc .acct-row { border-color: #000; }
html.hc .acct-row-head > p, html.hc .acct-team-who > span, html.hc .acct-facts dt, html.hc .help-body { color: #000; }
html.hc .help-fab { background: #000; box-shadow: none; outline: 2px solid #fff; }
