/* =====================================================================
   SébiStock — charte du back-office
   Palette tirée du logo : encre bleu nuit, orange d'action, gris page.
   Archivo pour l'interface, IBM Plex Mono pour les libellés techniques
   (codes, étiquettes, chiffres). Un seul thème, clair.
   ===================================================================== */

@font-face { font-family: 'Archivo'; font-weight: 400; font-display: swap; src: url("../fonts/archivo-400-StE8AAs.woff2") format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 500; font-display: swap; src: url("../fonts/archivo-500-StE8AAs.woff2") format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 600; font-display: swap; src: url("../fonts/archivo-600-StE8AAs.woff2") format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 700; font-display: swap; src: url("../fonts/archivo-700-StE8AAs.woff2") format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 800; font-display: swap; src: url("../fonts/archivo-800-StE8AAs.woff2") format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-400--Imvmox.woff2") format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-500-J35NZ7_.woff2") format('woff2'); }

:root {
    color-scheme: light only;

    --ink: #13212e;          /* bleu nuit du logo : textes, barre latérale */
    --ink-2: #2a3f4f;        /* face claire du cube */
    --ink-deep: #09131b;     /* face sombre du cube */
    --orange: #f07e1d;       /* "Stock" : l'action */
    --orange-dark: #d26a0f;
    --orange-soft: #fdeedf;
    --page: #edf1f2;         /* fond gris du logo */
    --surface: #ffffff;
    --muted: #4a5b67;
    --muted-2: #7b8a95;
    --line: #d9e0e5;
    --line-strong: #c3ccd3;
    --ok: #1f8a5b;
    --ok-soft: #e3f4ec;
    --danger: #c23b2a;
    --danger-soft: #fbe7e4;
    --warn: #b7791f;
    --warn-soft: #fbf1dc;
    --info-soft: #e4ecf3;

    --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(19, 33, 46, .06), 0 4px 16px rgba(19, 33, 46, .05);
    --sidebar: 252px;
    --focus: 0 0 0 3px rgba(240, 126, 29, .32);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--orange-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0 0 .75rem; }
small { font-size: 13px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

/* ---------- Typo utilitaire ---------- */
.eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted-2);
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.text-ok { color: var(--ok); }
.text-danger { color: var(--danger); }
.text-orange { color: var(--orange); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; }
.brand:hover { color: inherit; }
.brand-icon { width: 40px; height: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 800; font-size: 24px; letter-spacing: -.03em; color: #fff; }
.brand-name em { font-style: normal; color: var(--orange); }
.brand-tag {
    margin-top: 5px;
    font-family: var(--mono);
    font-size: 8.5px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #8da0b0;
    white-space: nowrap;
}
.brand--dark .brand-name { color: var(--ink); }
.brand--dark .brand-tag { color: var(--muted); }

/* ---------- Ossature ---------- */
.shell { min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar {
    background: var(--ink);
    color: #c9d3db;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
}
.sidebar-brand { padding: 22px 22px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sidebar-brand .brand-tag { font-size: 7.5px; letter-spacing: .1em; }
.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-heading { padding: 14px 12px 6px; }
.nav-heading .eyebrow { color: #6f8291; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: #c9d3db;
    font-weight: 500;
    position: relative;
    min-height: 42px;
}
.nav-item svg { width: 20px; height: 20px; flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.is-active { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.is-active::before {
    content: '';
    position: absolute;
    left: -12px; top: 8px; bottom: 8px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--orange);
}
.sidebar-foot { margin-top: auto; padding: 14px 12px 18px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: #c9d3db; }
.sidebar-user .avatar { background: var(--ink-2); color: #fff; }
.sidebar-user b { display: block; color: #fff; font-weight: 600; font-size: 14px; }
.sidebar-user small { color: #8da0b0; font-size: 12px; }

.topbar { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 32px 48px; flex: 1; }
.foot { padding: 14px 32px; color: var(--muted-2); font-size: 12px; }

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.page-head h1 { font-size: 28px; font-weight: 800; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Cartes ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card + .card, .card + .grid, .grid + .card { margin-top: 18px; }
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 16px; font-weight: 700; }
.card-body { padding: 20px; }
.card-body--flush { padding: 0; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: #f8fafb; border-radius: 0 0 var(--radius) var(--radius); }

.grid { display: grid; gap: 18px; }
.grid > .card { margin-top: 0; display: flex; flex-direction: column; }
.grid > .card > .card-body { flex: 1; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-aside { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---------- Indicateurs ---------- */
.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi::after {
    content: ''; position: absolute; left: 20px; right: 20px; bottom: 0;
    height: 3px; border-radius: 3px 3px 0 0; background: var(--line);
}
.kpi--orange::after { background: var(--orange); }
.kpi--ink::after { background: var(--ink); }
.kpi--ok::after { background: var(--ok); }
.kpi--danger::after { background: var(--danger); }
.kpi-value { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi-hint { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font: 600 15px/1 var(--sans);
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s, transform .05s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-deep); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(19, 33, 46, .06); color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #e8b4ad; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 40px; }
.btn-icon.btn-sm { width: 34px; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: 14px; color: var(--ink); }
.help { color: var(--muted-2); font-size: 13px; }
.input, .select, .textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: 400 16px/1.4 var(--sans);
    transition: border-color .12s, box-shadow .12s;
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--orange); box-shadow: var(--focus); }
.input--mono { font-family: var(--mono); font-size: 15px; }
.select {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5b67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.input-group { display: flex; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); }

/* Sélecteur Entrée / Sortie */
.seg { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.seg label { position: relative; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; font-weight: 600; cursor: pointer; color: var(--muted); border-left: 1px solid var(--line-strong); }
.seg label:first-child { border-left: 0; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg label:has(input:checked) { background: var(--ink); color: #fff; }
.seg label.seg--in:has(input:checked) { background: var(--ok); }
.seg label.seg--out:has(input:checked) { background: var(--danger); }
.seg label:has(input:focus-visible) { box-shadow: inset var(--focus); }

/* Combobox articles */
.combo { position: relative; }
.combo-list {
    position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
    max-height: 280px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow);
    margin: 0; padding: 4px; list-style: none;
}
.combo-list[hidden] { display: none; }
.combo-item { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.combo-item:hover, .combo-item.is-focus { background: var(--orange-soft); }
.combo-item small { color: var(--muted-2); font-family: var(--mono); font-size: 12px; }
.combo-empty { padding: 10px; color: var(--muted-2); font-size: 14px; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th {
    text-align: left;
    padding: 10px 14px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted-2);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f8fafb; }
.table th.num, .table td.num { text-align: right; }
.table .cell-title { font-weight: 600; }
.table .cell-sub { font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.table-empty { padding: 36px 20px; text-align: center; color: var(--muted-2); }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--page); border: 1px solid var(--line); }
.thumb--ph { display: grid; place-items: center; color: var(--muted-2); }
.thumb--ph svg { width: 20px; height: 20px; }
.thumb--lg { width: 100%; height: 200px; object-fit: contain; }

/* ---------- Pastilles ---------- */
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.pill svg { width: 14px; height: 14px; }
.pill-in { background: var(--ok-soft); color: var(--ok); }
.pill-out { background: var(--danger-soft); color: var(--danger); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-muted { background: var(--page); color: var(--muted); }
.pill-ink { background: var(--ink); color: #fff; }
.pill-orange { background: var(--orange-soft); color: var(--orange-dark); }
.tag { font-family: var(--mono); font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--page); color: var(--muted); border: 1px solid var(--line); }

/* ---------- Messages ---------- */
.flashes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--line); border-left-width: 4px; background: var(--surface);
}
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert-success { border-left-color: var(--ok); } .alert-success svg { color: var(--ok); }
.alert-error, .alert-danger { border-left-color: var(--danger); } .alert-error svg, .alert-danger svg { color: var(--danger); }
.alert-warning { border-left-color: var(--warn); } .alert-warning svg { color: var(--warn); }
.alert-info { border-left-color: var(--ink-2); } .alert-info svg { color: var(--ink-2); }
.alert .close { margin-left: auto; background: none; border: 0; color: var(--muted-2); cursor: pointer; padding: 2px; }
.notice { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--info-soft); color: var(--ink); font-size: 14px; }
.notice--warn { background: var(--warn-soft); }
.notice--ok { background: var(--ok-soft); }
.notice--danger { background: var(--danger-soft); }
.notice code { font-family: var(--mono); font-size: 13px; background: rgba(255,255,255,.7); padding: 1px 6px; border-radius: 4px; }

/* ---------- Divers ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 36px; height: 36px; color: var(--line-strong); margin: 0 auto 10px; }
.steps { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-2); font-weight: 500; }
.step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--page); font-family: var(--mono); font-size: 11px; }
.step.is-active { color: var(--ink); } .step.is-active i { background: var(--orange); color: #fff; }
.step.is-done i { background: var(--ok); color: #fff; }
.step-sep { width: 20px; height: 1px; background: var(--line-strong); }
.source-list { list-style: none; margin: 0; padding: 0; }
.source-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.source-list li:last-child { border-bottom: 0; }
.source-list .ic { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--page); color: var(--ink-2); flex: none; }
.source-list .ic svg { width: 18px; height: 18px; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; text-align: center; background: #fafbfc; }
.dropzone input[type=file] { display: none; }
.preview-table td, .preview-table th { font-size: 13px; padding: 6px 10px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-table th.is-mapped { color: var(--orange-dark); }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plan-cell { padding: 14px; border-radius: var(--radius-sm); background: var(--page); }
.plan-cell b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.plan-cell span { font-size: 13px; color: var(--muted); }

/* ---------- Connexion ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-panel {
    background: var(--ink); color: #c9d3db;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 40px 48px;
    background-image: radial-gradient(circle at 80% 20%, rgba(240, 126, 29, .18), transparent 40%),
                      radial-gradient(circle at 10% 90%, rgba(42, 63, 80, .9), transparent 50%);
}
.auth-panel .brand-icon { width: 56px; }
.auth-panel .brand-name { font-size: 34px; }
.auth-panel .brand-tag { font-size: 10px; }
.auth-hero { max-width: 460px; }
.auth-hero h2 { color: #fff; font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.auth-hero p { color: #b4c1cb; font-size: 16px; }
.auth-hero ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.auth-hero li { display: flex; gap: 10px; align-items: center; color: #dde5eb; }
.auth-hero li svg { width: 18px; height: 18px; color: var(--orange); flex: none; }
.auth-foot { color: #6f8291; font-size: 12px; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.auth-mobile-brand { display: none; margin-bottom: 22px; }

/* ---------- Réactif ---------- */
@media (max-width: 1100px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .shell { grid-template-columns: 1fr; }
    .topbar {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        position: sticky; top: 0; z-index: 30;
        background: var(--ink); color: #fff; padding: 10px 14px;
    }
    .topbar .brand-icon { width: 30px; }
    .topbar .brand-name { font-size: 19px; }
    .topbar .brand-tag { display: none; }
    .burger { background: none; border: 0; color: #fff; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; cursor: pointer; }
    .burger svg { width: 24px; height: 24px; }
    .sidebar {
        position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(84vw, 300px);
        transform: translateX(-100%); transition: transform .2s ease;
        box-shadow: 0 0 40px rgba(0, 0, 0, .35);
    }
    .backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(9, 19, 27, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
    body.menu-open .sidebar { transform: none; }
    body.menu-open .backdrop { opacity: 1; pointer-events: auto; }
    body.menu-open { overflow: hidden; }
    .content { padding: 18px 14px 36px; }
    .foot { padding: 12px 14px; }
    .page-head h1 { font-size: 23px; }
    .grid-2, .grid-3, .grid-aside { grid-template-columns: minmax(0, 1fr); }
    .span-8, .span-6, .span-4, .span-3 { grid-column: span 12; }
    .card-body { padding: 16px; }
    .card-head { padding: 12px 16px; }
    .table th, .table td { padding: 10px; }
    /* Tableaux denses : on garde des colonnes lisibles et on laisse défiler. */
    .table-wrap .table { min-width: 640px; }
    .preview-table { min-width: 0; }
    .auth { grid-template-columns: 1fr; }
    .auth-panel { display: none; }
    .auth-mobile-brand { display: flex; justify-content: center; }
}
@media (min-width: 961px) { .backdrop { display: none; } }
@media (max-width: 520px) {
    .plan-grid { grid-template-columns: 1fr 1fr; }
    .page-actions .btn { flex: 1; }
    .seg { display: grid; grid-auto-flow: row; width: 100%; }
    .seg label { border-left: 0; border-top: 1px solid var(--line-strong); }
    .seg label:first-child { border-top: 0; }
}

/* ---------- Impression ---------- */
@media print {
    .sidebar, .topbar, .page-actions, .foot, .backdrop, .btn { display: none !important; }
    .shell { display: block; }
    .card { box-shadow: none; }
}
