/* Medera Commerce — interface mobile d'abord, utilisable au toucher, montants en FCFA. */

:root {
    --bg: #f5f4f0;
    --surface: #ffffff;
    --surface-2: #f0efea;
    --ink: #1b1f1d;
    --ink-2: #4b524e;
    --muted: #7a817c;
    --line: #e2e0d9;
    --accent: #0f5f4f;
    --accent-ink: #ffffff;
    --accent-soft: #e2f0eb;
    --warn: #b45309;
    --warn-soft: #fdf1e1;
    --danger: #b42318;
    --danger-soft: #fdeceb;
    --ok: #15703d;
    --ok-soft: #e6f4ea;
    --info: #1d4f91;
    --info-soft: #e7eef9;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(20, 24, 22, .06), 0 4px 14px rgba(20, 24, 22, .05);
    --nav-h: 64px;
    --top-h: 56px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.45;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.num, .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.strong { font-weight: 650; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* ---------- Structure ---------- */

.app { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 20;
    height: var(--top-h);
    display: flex; align-items: center; gap: .5rem;
    padding: 0 1rem;
    background: var(--accent);
    color: var(--accent-ink);
}
.topbar .brand { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; color: inherit; }
.topbar .brand small { display: block; font-weight: 500; font-size: .72rem; opacity: .8; letter-spacing: 0; }
.topbar .spacer { flex: 1; }
.topbar .icon-btn { color: var(--accent-ink); }
.topbar select {
    max-width: 46vw;
    background: rgba(255,255,255,.14); color: var(--accent-ink);
    border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
    padding: .35rem .7rem; font: inherit; font-size: .85rem;
}
.topbar select option { color: var(--ink); }

.main {
    flex: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1rem 1rem calc(var(--nav-h) + 1.5rem + env(safe-area-inset-bottom));
}

.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--surface);
    border-top: 1px solid var(--line);
}
.bottom-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--muted); font-size: .72rem; font-weight: 600; text-decoration: none;
    min-height: 48px;
}
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a.sell {
    color: var(--accent-ink);
}
.bottom-nav a.sell .sell-dot {
    width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--accent); box-shadow: 0 4px 12px rgba(15,95,79,.35);
    margin-top: -18px;
}
.bottom-nav a.sell span { color: var(--accent); }
/* L'icône reste blanche sur le rond vert, y compris quand l'onglet « Vendre » est actif. */
.bottom-nav a.sell .sell-dot, .bottom-nav a.sell .sell-dot svg { color: var(--accent-ink); }

@media (min-width: 900px) {
    .app { flex-direction: row; flex-wrap: wrap; }
    .topbar { width: 100%; }
    .bottom-nav {
        position: sticky; top: var(--top-h); align-self: flex-start;
        width: 220px; height: calc(100dvh - var(--top-h));
        grid-template-columns: 1fr; grid-auto-rows: 52px; align-content: start;
        border-top: 0; border-right: 1px solid var(--line); padding: .75rem .5rem;
    }
    .bottom-nav a { flex-direction: row; justify-content: flex-start; gap: .75rem; padding: 0 .9rem; font-size: .95rem; border-radius: 10px; }
    .bottom-nav a.active { background: var(--accent-soft); }
    .bottom-nav a.sell .sell-dot { width: 24px; height: 24px; margin: 0; background: none; box-shadow: none; }
    .bottom-nav a.sell .sell-dot svg { color: var(--accent); }
    .main { flex: 1; width: auto; padding: 1.5rem 2rem 3rem; }
}

.page-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; }
.page-head .grow { flex: 1; min-width: 0; }
.page-head p { margin: .1rem 0 0; color: var(--muted); font-size: .9rem; }
.back { display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); font-size: .9rem; margin-bottom: .5rem; }

/* ---------- Surfaces ---------- */

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
}
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.card-title h2, .card-title h3 { margin: 0; }
.section-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.25rem 0 .5rem; }

.grid { display: grid; gap: .75rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) {
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.kpi { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: .85rem 1rem; min-width: 0; }
.kpi .label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: .15rem; }
.kpi .hint { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.kpi.warn .value { color: var(--warn); }
.kpi.danger .value { color: var(--danger); }
.kpi.ok .value { color: var(--ok); }

/* ---------- Listes ---------- */

.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1rem; }
.list-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .8rem 1rem; min-height: 56px;
    border-bottom: 1px solid var(--line);
    color: inherit; text-decoration: none;
    background: none; width: 100%; text-align: left; font: inherit; border-left: 0; border-right: 0; border-top: 0;
}
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); text-decoration: none; cursor: pointer; }
.list-item .main-col { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .sub { font-size: .85rem; color: var(--muted); }
.list-item .end { text-align: right; flex-shrink: 0; }
.list-item > svg { flex-shrink: 0; color: var(--accent); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.kv .total { font-weight: 700; font-size: 1.05rem; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.table td { padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }

/* ---------- Formulaires ---------- */

.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; min-width: 0; }
.field > label, .label { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .req { color: var(--danger); }

.input, select.input, textarea.input {
    width: 100%;
    min-height: 48px;
    padding: .65rem .8rem;
    font: inherit; font-size: 16px; /* évite le zoom automatique sur iPhone */
    color: var(--ink);
    background: var(--surface);
    border: 1px solid #cfccc3;
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,95,79,.15); }
.input:disabled { background: var(--surface-2); color: var(--muted); }
.input.money { text-align: right; font-weight: 600; }
.input.invalid { border-color: var(--danger); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .addon { display: grid; place-items: center; padding: 0 .75rem; background: var(--surface-2); border: 1px solid #cfccc3; border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); font-weight: 600; }

.check { display: flex; align-items: center; gap: .6rem; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

details.more { border: 1px dashed #cfccc3; border-radius: var(--radius-sm); padding: .25rem .9rem; margin-bottom: 1rem; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--accent); min-height: 44px; display: flex; align-items: center; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: .5rem; border-radius: 50%; background: var(--accent-soft); font-weight: 700; }
details.more[open] > summary::before { content: "−"; }

.segmented { display: flex; background: var(--surface-2); padding: 4px; border-radius: 12px; gap: 4px; overflow-x: auto; }
.segmented button, .segmented a {
    flex: 1; min-height: 40px; border: 0; background: none; border-radius: 9px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink-2);
    white-space: nowrap; padding: 0 .75rem; cursor: pointer; display: grid; place-items: center; text-decoration: none;
}
.segmented .on { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
    display: inline-flex; align-items: center; gap: .3rem;
    min-height: 36px; padding: 0 .8rem; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
    font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.search { position: relative; }
.search .input { padding-left: 2.6rem; }
.search svg { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }

/* ---------- Boutons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 48px; padding: 0 1.1rem;
    font: inherit; font-weight: 650; font-size: .98rem;
    border-radius: 12px; border: 1px solid transparent; cursor: pointer;
    background: var(--surface-2); color: var(--ink);
    text-decoration: none; white-space: nowrap;
    transition: filter .15s, transform .05s;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.outline { background: var(--surface); border-color: #cfccc3; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-outline { background: var(--surface); color: var(--danger); border-color: #efc5c1; }
.btn.ghost { background: none; color: var(--accent); }
.btn.whatsapp { background: #128c4b; color: #fff; }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 .8rem; font-size: .88rem; border-radius: 10px; }
.btn.lg { min-height: 56px; font-size: 1.05rem; }
.btn svg { width: 20px; height: 20px; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 auto; }

.icon-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    border: 0; background: none; color: var(--ink-2); cursor: pointer; position: relative;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .dot { position: absolute; top: 6px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #f59e0b; color: #1b1f1d; font-size: .68rem; font-weight: 800; display: grid; place-items: center; }

.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
@media (min-width: 700px) { .action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.action-tile {
    display: flex; flex-direction: column; gap: .4rem; padding: .9rem; min-height: 88px;
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
    color: var(--ink); font-weight: 650; text-decoration: none;
}
.action-tile:hover { text-decoration: none; background: var(--surface-2); }
.action-tile svg { width: 26px; height: 26px; color: var(--accent); }
.action-tile.primary { background: var(--accent); color: var(--accent-ink); }
.action-tile.primary svg { color: var(--accent-ink); }

/* ---------- États ---------- */

.badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .15rem .55rem; border-radius: 999px;
    font-size: .75rem; font-weight: 700; white-space: nowrap;
    background: var(--surface-2); color: var(--ink-2);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .95rem; border: 1px solid transparent; }
.alert.error { background: var(--danger-soft); color: var(--danger); border-color: #f4c7c3; }
.alert.success { background: var(--ok-soft); color: var(--ok); border-color: #bfe3cb; }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: #f5d7ad; }
.alert.info { background: var(--info-soft); color: var(--info); border-color: #c8d8f0; }
.alert strong { display: block; margin-bottom: .15rem; }

.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .5; margin-bottom: .5rem; }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 2rem; color: var(--muted); }

/* ---------- Feuille modale (bas d'écran sur téléphone) ---------- */

.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15, 20, 18, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.sheet {
    width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
    background: var(--surface); border-radius: 20px 20px 0 0;
    padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    animation: up .2s ease-out;
}
.sheet .grabber { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto .75rem; }
.sheet-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.sheet-head h2 { flex: 1; margin: 0; }
@media (min-width: 700px) {
    .sheet-backdrop { align-items: center; }
    .sheet { border-radius: 18px; }
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toast {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--nav-h) + 1rem + env(safe-area-inset-bottom)); z-index: 60;
    max-width: calc(100% - 2rem); padding: .75rem 1rem; border-radius: 12px;
    background: var(--ink); color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2);
    animation: up .2s ease-out;
}
.toast.error { background: var(--danger); }

/* ---------- Vente ---------- */

.cart-line { display: grid; grid-template-columns: 1fr auto; gap: .35rem .75rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .controls {
    grid-column: 1 / -1; display: grid; gap: .5rem; align-items: end;
    grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas: "qty price discount remove";
}
.cart-line .controls .qty { grid-area: qty; }
.cart-line .controls .price { grid-area: price; }
.cart-line .controls .discount { grid-area: discount; }
.cart-line .controls .remove { grid-area: remove; }
.cart-line .controls .field { margin: 0; min-width: 0; }
.cart-line .controls .input { min-height: 42px; padding: .45rem .6rem; min-width: 0; }
.cart-line .controls .input-group .addon { padding: 0 .5rem; }

/* Téléphone : quantité et suppression sur une ligne, prix et remise sur la suivante (montants lisibles en entier). */
@media (max-width: 600px) {
    .cart-line .controls {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas: "qty remove" "price discount";
    }
    .cart-line .controls .qty .stepper { width: 132px; }
    .cart-line .controls .remove { justify-self: end; }
}

.stepper { display: flex; align-items: center; border: 1px solid #cfccc3; border-radius: 10px; overflow: hidden; height: 42px; }
.stepper button { width: 34px; height: 100%; border: 0; background: var(--surface-2); font-size: 1.1rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.stepper input { width: 40px; height: 100%; border: 0; text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.total-bar {
    position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 10;
    margin: 0 -1rem; padding: .75rem 1rem;
    background: var(--surface); border-top: 1px solid var(--line);
    display: flex; align-items: center; gap: .75rem;
}
.total-bar .amount { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .total-bar { bottom: 0; margin: 0; border-radius: var(--radius); box-shadow: var(--shadow); } }

.balance-callout { border-radius: var(--radius-sm); padding: .75rem 1rem; background: var(--warn-soft); color: var(--warn); font-weight: 650; margin-bottom: 1rem; }
.balance-callout.done { background: var(--ok-soft); color: var(--ok); }

/* ---------- Graphique simple ---------- */

.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: .5rem; }
.bars .bar { flex: 1; min-width: 3px; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; position: relative; }
.bars .bar.paid { background: #6aa894; }
.bars-legend { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: .3rem; }

/* ---------- Authentification ---------- */

.auth { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem 1rem; background: linear-gradient(180deg, var(--accent) 0, var(--accent) 34%, var(--bg) 34%); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,.12); padding: 1.5rem; }
.auth-brand { color: #fff; text-align: center; margin-bottom: 1.25rem; }
.auth-brand .logo { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.15); display: inline-grid; place-items: center; margin-bottom: .5rem; }
.auth-brand h1 { color: #fff; margin: 0; font-size: 1.4rem; }
.auth-brand p { margin: .2rem 0 0; opacity: .85; font-size: .9rem; }

/* ---------- Administration du service ---------- */

/* Bandeau sombre : l'administrateur voit toujours qu'il est dans l'espace MederaTech, pas chez un commerçant. */
.app.admin .topbar { background: #1f2a27; }
.app.admin .topbar .brand small { color: #9fd3c4; opacity: 1; }
.bottom-nav .desk { display: none; }
@media (min-width: 900px) {
    .bottom-nav .desk { display: flex; }
    .bottom-nav .mob { display: none; }
}
.stat-line { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.meter { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: .3rem; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter.warn > span { background: var(--warn); }
.meter.danger > span { background: var(--danger); }
.secret { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.05rem; letter-spacing: .04em; background: var(--surface-2); padding: .5rem .75rem; border-radius: var(--radius-sm); user-select: all; }
.list-item.dim { opacity: .6; }
a.kpi { display: block; color: inherit; text-decoration: none; }
a.kpi:hover { background: var(--surface-2); text-decoration: none; }

/* ---------- Divers ---------- */

.pager { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .5rem 0 1rem; color: var(--muted); font-size: .88rem; }
.divider-label { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .8rem; margin: .75rem 0; }
.divider-label::before, .divider-label::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 .9rem 1.2rem; border-left: 2px solid var(--line); margin-left: .35rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline li:last-child { padding-bottom: 0; }

#blazor-error-ui {
    background: var(--warn-soft); color: var(--ink);
    bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none; left: 0; padding: .75rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

.blazor-error-boundary { background: var(--danger-soft); padding: 1rem; color: var(--danger); border-radius: var(--radius-sm); }
.blazor-error-boundary::after { content: "Une erreur est survenue. Rechargez la page."; }

@media print {
    .topbar, .bottom-nav, .no-print { display: none !important; }
    .main { padding: 0; }
    body { background: #fff; }
}

/* Renouvellement de l'abonnement : choix de la durée */
.list-item.renewal-option,
.list-item.renewal-option:last-child { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .5rem; cursor: pointer; }
.list-item.renewal-option.on { border-color: var(--accent); background: var(--accent-soft); }
.renewal-option .title .badge { margin-left: .4rem; }
