/* ==========================================================================
   NovaPOS — système de design
   Aucune dépendance externe : la feuille est autonome et fonctionne hors ligne,
   ce qui est indispensable pour un poste de caisse.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Jetons */

:root {
    --brand-50:  #EEF2FF;
    --brand-100: #E0E7FF;
    --brand-200: #C7D2FE;
    --brand-300: #A5B4FC;
    --brand-400: #818CF8;
    --brand-500: #6366F1;
    --brand-600: #4F46E5;
    --brand-700: #4338CA;
    --brand-800: #3730A3;
    --brand-900: #312E81;

    --slate-50:  #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-300: #CBD5E1;
    --slate-400: #94A3B8;
    --slate-500: #64748B;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1E293B;
    --slate-900: #0F172A;
    --slate-950: #020617;

    --success: #059669;
    --success-bg: #ECFDF5;
    --success-border: #A7F3D0;
    --warning: #B45309;
    --warning-bg: #FFFBEB;
    --warning-border: #FDE68A;
    --danger: #DC2626;
    --danger-bg: #FEF2F2;
    --danger-border: #FECACA;
    --info: #0369A1;
    --info-bg: #F0F9FF;
    --info-border: #BAE6FD;

    --bg: var(--slate-50);
    --surface: #FFFFFF;
    --surface-alt: var(--slate-50);
    --surface-sunken: var(--slate-100);
    --border: var(--slate-200);
    --border-strong: var(--slate-300);
    --text: var(--slate-900);
    --text-muted: var(--slate-500);
    --text-subtle: var(--slate-400);
    --text-inverse: #FFFFFF;

    --sidebar-bg: var(--slate-900);
    --sidebar-text: #CBD5E1;
    --sidebar-text-active: #FFFFFF;
    --sidebar-hover: rgba(255, 255, 255, .07);
    --sidebar-active: var(--brand-600);

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow: 0 4px 12px rgba(15, 23, 42, .08), 0 1px 3px rgba(15, 23, 42, .05);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12), 0 4px 8px rgba(15, 23, 42, .06);
    --shadow-xl: 0 24px 56px rgba(15, 23, 42, .18);

    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Mono", Consolas, monospace;

    --header-h: 60px;
    --sidebar-w: 248px;
    --sidebar-w-collapsed: 68px;

    --transition: 140ms cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
    --bg: var(--slate-950);
    --surface: #111827;
    --surface-alt: #0B1220;
    --surface-sunken: #0A0F1A;
    --border: #1F2937;
    --border-strong: #334155;
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --text-subtle: #64748B;

    --sidebar-bg: #080D17;
    --success-bg: rgba(5, 150, 105, .12);
    --success-border: rgba(5, 150, 105, .35);
    --warning-bg: rgba(180, 83, 9, .12);
    --warning-border: rgba(180, 83, 9, .35);
    --danger-bg: rgba(220, 38, 38, .12);
    --danger-border: rgba(220, 38, 38, .35);
    --info-bg: rgba(3, 105, 161, .12);
    --info-border: rgba(3, 105, 161, .35);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .45);
    --shadow: 0 4px 12px rgba(0, 0, 0, .5);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
    --shadow-xl: 0 24px 56px rgba(0, 0, 0, .6);
}

/* --------------------------------------------------------------- 2. Reset */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; line-height: 1.25; letter-spacing: -.011em; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 14px; }

p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
[data-theme="dark"] a { color: var(--brand-300); }

img, svg { max-width: 100%; vertical-align: middle; }

hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }

code, kbd, pre { font-family: var(--font-mono); font-size: .875em; }

:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

::selection { background: var(--brand-200); color: var(--slate-900); }

/* Barres de défilement discrètes */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--slate-400); background-clip: content-box; }

/* ------------------------------------------------------------ 3. Utilitaires */

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.strong { font-weight: 600; }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.lg { font-size: 16px; }
.xl { font-size: 20px; }
.uppercase { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 600; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.block { display: block; }
.grow { flex: 1 1 auto; min-width: 0; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-brand { color: var(--brand-700); }
[data-theme="dark"] .text-brand { color: var(--brand-300); }

.row { display: flex; align-items: center; gap: .5rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.row-end { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.col { display: flex; flex-direction: column; gap: .5rem; }
.wrap { flex-wrap: wrap; }
.gap-0 { gap: 0; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.mt-0 { margin-top: 0; } .mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.ml-auto { margin-left: auto; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-auto--compact { grid-template-columns: repeat(auto-fill, minmax(122px, 138px)); gap: .5rem; }

@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 780px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ 4. Structure */

.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: width var(--transition), flex-basis var(--transition);
    z-index: 40;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: .625rem;
    height: var(--header-h);
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    flex: 0 0 auto;
}

.sidebar__logo {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    flex: 0 0 auto;
}
.sidebar__logo img { width: 100%; height: 100%; object-fit: contain; }

.sidebar__name { font-weight: 650; color: #fff; font-size: 15px; letter-spacing: -.01em; }
.sidebar__nav { flex: 1 1 auto; overflow-y: auto; padding: .75rem .625rem 1.5rem; }

.sidebar__group { margin-top: 1rem; }
.sidebar__group:first-child { margin-top: 0; }
.sidebar__group-label {
    padding: 0 .625rem .375rem;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .38);
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .5rem .625rem;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}
.sidebar__link:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.sidebar__link.is-active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.sidebar__link .icon { flex: 0 0 18px; opacity: .85; }
.sidebar__link.is-active .icon { opacity: 1; }
.sidebar__badge {
    margin-left: auto;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    border-radius: var(--radius-full);
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 600;
}

.sidebar__footer { flex: 0 0 auto; padding: .75rem; border-top: 1px solid rgba(255, 255, 255, .07); }

.sidebar__pos {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    width: 100%;
    padding: .625rem;
    border-radius: var(--radius);
    background: var(--brand-600);
    color: #fff;
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    transition: background var(--transition);
}
.sidebar__pos:hover { background: var(--brand-500); text-decoration: none; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: var(--header-h);
    flex: 0 0 auto;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar__title { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.topbar__crumb { font-size: 12px; color: var(--text-muted); }

.content { flex: 1 1 auto; padding: 1.25rem; max-width: 1600px; width: 100%; }
.content--wide { max-width: none; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head h1 { margin-bottom: .125rem; }
.page-head__desc { color: var(--text-muted); font-size: 13px; }

/* ------------------------------------------------------------- 5. Boutons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    height: 36px;
    padding: 0 .875rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13.5px;
    font-weight: 550;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
    user-select: none;
}
.btn:hover { background: var(--surface-alt); border-color: var(--slate-400); text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn--primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn--primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

.btn--success { background: var(--success); border-color: var(--success); color: #fff; }
.btn--success:hover { background: #047857; border-color: #047857; color: #fff; }

.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { background: #B91C1C; border-color: #B91C1C; color: #fff; }

.btn--ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn--ghost:hover { background: var(--surface-sunken); color: var(--text); border-color: transparent; }

.btn--subtle { background: var(--surface-sunken); border-color: transparent; }
.btn--subtle:hover { background: var(--border); }

.btn--sm { height: 30px; padding: 0 .625rem; font-size: 12.5px; }
.btn--lg { height: 44px; padding: 0 1.25rem; font-size: 15px; }
.btn--xl { height: 46px; padding: 0 1.25rem; font-size: 15px; font-weight: 650; border-radius: var(--radius-sm); }
.btn--block { width: 100%; }
.btn--icon { width: 36px; padding: 0; }
.btn--icon.btn--sm { width: 30px; }

.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group .btn.is-active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; z-index: 1; }

/* --------------------------------------------------------------- 6. Cartes */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}
.card__head {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .875rem 1rem;
    border-bottom: 1px solid var(--border);
}
.card__title { font-size: 14px; font-weight: 650; }
.card__body { padding: 1rem; }
.card__body--flush { padding: 0; }
.card__foot { padding: .75rem 1rem; border-top: 1px solid var(--border); background: var(--surface-alt); border-radius: 0 0 var(--radius) var(--radius); }

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.125rem;
    box-shadow: var(--shadow-xs);
}
.stat__label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.stat__value { font-size: 26px; font-weight: 680; letter-spacing: -.02em; margin-top: .375rem; font-variant-numeric: tabular-nums; }
.stat__meta { font-size: 12px; color: var(--text-muted); margin-top: .25rem; }
.stat--accent { border-left: 3px solid var(--brand-600); }
.stat--success { border-left: 3px solid var(--success); }
.stat--warning { border-left: 3px solid var(--warning); }
.stat--danger { border-left: 3px solid var(--danger); }

/* -------------------------------------------------------------- 7. Badges */

.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 18px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge--neutral { background: var(--surface-sunken); color: var(--text-muted); border-color: var(--border); }
.badge--success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge--warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge--danger  { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge--info    { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.badge--brand   { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
[data-theme="dark"] .badge--brand { background: rgba(99, 102, 241, .15); color: var(--brand-300); border-color: rgba(99, 102, 241, .35); }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot--success { background: var(--success); }
.dot--warning { background: var(--warning); }
.dot--danger { background: var(--danger); }
.dot--muted { background: var(--slate-400); }

/* ------------------------------------------------------------ 8. Formulaires */

.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .875rem; }
.field:last-child { margin-bottom: 0; }
.field__label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.field__label .req { color: var(--danger); margin-left: 2px; }
.field__hint { font-size: 11.5px; color: var(--text-muted); }
.field__error { font-size: 11.5px; color: var(--danger); font-weight: 500; }

.input, .select, .textarea {
    width: 100%;
    min-height: 36px;
    padding: .4rem .625rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13.5px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .16);
}
.input[readonly], .input[disabled], .select[disabled], .textarea[disabled] {
    background: var(--surface-sunken);
    color: var(--text-muted);
    cursor: not-allowed;
}
.input.is-invalid, .select.is-invalid { border-color: var(--danger); }
.textarea { min-height: 84px; resize: vertical; line-height: 1.5; }

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .55rem center;
    padding-right: 1.75rem;
}

.input--money, .input--num { text-align: right; font-variant-numeric: tabular-nums; }

.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group__addon {
    display: flex; align-items: center;
    padding: 0 .625rem;
    border: 1px solid var(--border-strong);
    border-left: 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--surface-sunken);
    color: var(--text-muted);
    font-size: 12.5px;
    white-space: nowrap;
}

.check { display: inline-flex; align-items: flex-start; gap: .5rem; cursor: pointer; font-size: 13.5px; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand-600); flex: 0 0 auto; cursor: pointer; }
.check span { line-height: 1.4; }

.switch { display: inline-flex; align-items: center; gap: .625rem; cursor: pointer; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
    width: 38px; height: 22px;
    border-radius: 999px;
    background: var(--border-strong);
    position: relative;
    transition: background var(--transition);
    flex: 0 0 auto;
}
.switch__track::after {
    content: "";
    position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition);
}
.switch input:checked + .switch__track { background: var(--brand-600); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: 1 / -1; }
@media (max-width: 780px) { .form-grid, .form-grid--3 { grid-template-columns: 1fr; } .form-grid .span-2, .form-grid .span-3 { grid-column: auto; } }

fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
fieldset:last-child { margin-bottom: 0; }
legend { padding: 0; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .75rem; }

/* -------------------------------------------------------------- 9. Tableaux */

.table-wrap { overflow-x: auto; border-radius: var(--radius); }

.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th, .table td { padding: .625rem .875rem; text-align: left; vertical-align: middle; }
.table thead th {
    position: sticky; top: 0; z-index: 2;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}
.table thead th a { color: inherit; display: inline-flex; align-items: center; gap: .25rem; }
.table thead th a:hover { color: var(--text); text-decoration: none; }
.table tbody td { border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-alt); }
.table tbody tr.is-selected td { background: var(--brand-50); }
[data-theme="dark"] .table tbody tr.is-selected td { background: rgba(99, 102, 241, .12); }
.table .num, .table .right { text-align: right; font-variant-numeric: tabular-nums; }
.table tfoot td { padding: .625rem .875rem; border-top: 2px solid var(--border-strong); font-weight: 650; background: var(--surface-alt); font-variant-numeric: tabular-nums; }
.table--compact th, .table--compact td { padding: .4rem .625rem; }
.table--fixed { table-layout: fixed; }
.table td.actions { text-align: right; white-space: nowrap; }

.table-toolbar {
    display: flex; align-items: center; gap: .625rem; flex-wrap: wrap;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
}
.table-toolbar .input { max-width: 280px; }

.empty { padding: 3rem 1.5rem; text-align: center; color: var(--text-muted); }
.empty__icon { font-size: 30px; opacity: .35; margin-bottom: .5rem; }
.empty__title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: .25rem; }
.empty__text { font-size: 13px; max-width: 420px; margin: 0 auto .875rem; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.pagination__pages { display: flex; gap: .25rem; }
.pagination__page {
    min-width: 30px; height: 30px; padding: 0 .5rem;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); font-size: 13px; text-decoration: none;
}
.pagination__page:hover { background: var(--surface-alt); text-decoration: none; }
.pagination__page.is-active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; font-weight: 600; }

/* --------------------------------------------------------------- 10. Onglets */

.tabs { display: flex; gap: .125rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs__item {
    padding: .625rem .875rem;
    font-size: 13.5px;
    font-weight: 550;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    background: none; border-top: 0; border-left: 0; border-right: 0;
    cursor: pointer;
    font-family: inherit;
}
.tabs__item:hover { color: var(--text); text-decoration: none; }
.tabs__item.is-active { color: var(--brand-700); border-bottom-color: var(--brand-600); font-weight: 650; }
[data-theme="dark"] .tabs__item.is-active { color: var(--brand-300); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ------------------------------------------------------ 11. Modales & tiroirs */

.overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(2px);
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
    animation: fade-in 120ms ease-out;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 3rem);
    display: flex; flex-direction: column;
    animation: pop-in 140ms cubic-bezier(.2, .8, .3, 1);
}
.modal--lg { max-width: 820px; }
.modal--xl { max-width: 1100px; }
.modal--sm { max-width: 400px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal__title { font-size: 16px; font-weight: 650; }
.modal__body { padding: 1.25rem; overflow-y: auto; flex: 1 1 auto; }
.modal__foot { padding: .875rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; background: var(--surface-alt); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 460px; max-width: 100vw;
    background: var(--surface);
    box-shadow: var(--shadow-xl);
    z-index: 110;
    display: flex; flex-direction: column;
    animation: slide-in 160ms cubic-bezier(.2, .8, .3, 1);
}
.drawer--wide { width: 640px; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.drawer__body { padding: 1.25rem; overflow-y: auto; flex: 1 1 auto; }
.drawer__foot { padding: .875rem 1.25rem; border-top: 1px solid var(--border); display: flex; gap: .5rem; flex: 0 0 auto; background: var(--surface-alt); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* -------------------------------------------------------------- 12. Alertes */

.alert {
    display: flex; align-items: flex-start; gap: .625rem;
    padding: .75rem .875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 1rem;
}
.alert--success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.alert--warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.alert--danger  { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.alert--info    { background: var(--info-bg); border-color: var(--info-border); color: var(--info); }

.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 200; display: flex; flex-direction: column; gap: .5rem; max-width: 380px; }
.toast {
    display: flex; align-items: flex-start; gap: .625rem;
    padding: .75rem .875rem;
    border-radius: var(--radius);
    background: var(--slate-900);
    color: #fff;
    box-shadow: var(--shadow-lg);
    font-size: 13.5px;
    animation: pop-in 140ms cubic-bezier(.2, .8, .3, 1);
}
.toast--success { background: #065F46; }
.toast--danger { background: #991B1B; }
.toast--warning { background: #92400E; }
.toast__close { margin-left: auto; background: none; border: 0; color: rgba(255,255,255,.65); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 0 0 .5rem; }
.toast__close:hover { color: #fff; }

/* ----------------------------------------------------------------- 13. Divers */

.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--brand-100);
    color: var(--brand-700);
    display: grid; place-items: center;
    font-size: 12px; font-weight: 700;
    flex: 0 0 auto;
}
[data-theme="dark"] .avatar { background: rgba(99,102,241,.2); color: var(--brand-300); }
.avatar--lg { width: 44px; height: 44px; font-size: 15px; }

.kbd {
    display: inline-block;
    min-width: 20px;
    padding: 1px 5px;
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: var(--radius-xs);
    background: var(--surface-alt);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    text-align: center;
    line-height: 16px;
}

.divider { height: 1px; background: var(--border); margin: 1rem 0; }
.divider--vert { width: 1px; height: 22px; background: var(--border); }

.meter { height: 6px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; }
.meter__fill { height: 100%; border-radius: 999px; background: var(--brand-600); transition: width var(--transition); }
.meter__fill--success { background: var(--success); }
.meter__fill--warning { background: var(--warning); }
.meter__fill--danger { background: var(--danger); }

.chart { width: 100%; height: 240px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { fill: var(--text-muted); font-size: 10.5px; }
.chart .bar { fill: var(--brand-600); }
.chart .bar:hover { fill: var(--brand-500); }
.chart .line { fill: none; stroke: var(--brand-600); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#novapos-area); opacity: .18; }
.chart .point { fill: var(--brand-600); }

.spinner {
    width: 16px; height: 16px;
    border: 2px solid var(--border-strong);
    border-top-color: var(--brand-600);
    border-radius: 50%;
    animation: spin 620ms linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, var(--surface-sunken) 25%, var(--border) 37%, var(--surface-sunken) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease-in-out infinite; border-radius: var(--radius-xs); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ==========================================================================
   14. Écran de caisse
   ========================================================================== */

.pos {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
}

.pos__bar {
    flex: 0 0 auto;
    height: 58px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 .875rem;
}

.pos__search { position: relative; flex: 1 1 auto; max-width: 620px; }
.pos__search input {
    width: 100%;
    height: 40px;
    padding: 0 2.5rem 0 2.375rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-alt);
    font-size: 14.5px;
    color: var(--text);
}
.pos__search input:focus { outline: none; background: var(--surface); border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(99, 102, 241, .16); }
.pos__search__icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--text-subtle); pointer-events: none; }
.pos__search__hint { position: absolute; right: .625rem; top: 50%; transform: translateY(-50%); }

.pos__suggestions {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 420px;
    overflow-y: auto;
    z-index: 60;
}
.pos__suggestion {
    display: flex; align-items: center; gap: .75rem;
    padding: .5rem .75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}
.pos__suggestion:last-child { border-bottom: 0; }
.pos__suggestion:hover, .pos__suggestion.is-active { background: var(--brand-50); }
[data-theme="dark"] .pos__suggestion:hover, [data-theme="dark"] .pos__suggestion.is-active { background: rgba(99,102,241,.12); }
.pos__suggestion__name { font-weight: 550; font-size: 13.5px; }
.pos__suggestion__meta { font-size: 11.5px; color: var(--text-muted); }
.pos__suggestion__price { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.pos__body { flex: 1 1 auto; display: flex; min-height: 0; }

.pos__catalog { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.pos__catalog__head {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    padding: .625rem .875rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.chip {
    display: inline-flex; align-items: center; gap: .35rem;
    height: 30px; padding: 0 .75rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    background: var(--surface);
    color: var(--text);
    font-size: 12.5px; font-weight: 550;
    cursor: pointer; white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
    transition: background var(--transition), border-color var(--transition);
}
.chip:hover { background: var(--surface-alt); text-decoration: none; }
.chip.is-active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.pos__grid {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: .75rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(122px, 138px));
    justify-content: start;
    gap: .5rem;
    align-content: start;
}

.tile {
    position: relative;
    display: flex; flex-direction: column;
    min-height: 88px;
    padding: .5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    box-shadow: var(--shadow-xs);
}
.tile:hover { border-color: var(--brand-400); box-shadow: var(--shadow-sm); }
.tile:active { transform: scale(.985); }
.tile__image { width: 100%; height: 44px; object-fit: cover; border-radius: var(--radius-xs); margin-bottom: .3rem; }
.tile__name { font-size: 12.5px; font-weight: 600; line-height: 1.3; margin-bottom: .2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile__meta { font-size: 10.5px; color: var(--text-muted); margin-top: auto; }
.tile__price { font-size: 13.5px; font-weight: 680; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.tile__price s { font-size: 12px; font-weight: 500; color: var(--text-subtle); margin-right: .25rem; }
.tile__flag { position: absolute; top: .375rem; right: .375rem; }
.tile.is-out { opacity: .62; }
.tile--category { background: linear-gradient(140deg, var(--brand-600), var(--brand-800)); border-color: transparent; color: #fff; min-height: 84px; justify-content: center; }
.tile--category .tile__name { font-size: 14px; color: #fff; }
.tile--category .tile__meta { color: rgba(255,255,255,.75); }

/* --- Ticket ------------------------------------------------------------ */

.pos__ticket {
    flex: 0 0 372px;
    width: 372px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ticket__head { flex: 0 0 auto; padding: .75rem .875rem; border-bottom: 1px solid var(--border); }

.ticket__customer {
    display: flex; align-items: center; gap: .625rem;
    width: 100%;
    padding: .5rem .625rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
}
.ticket__customer:hover { border-color: var(--brand-400); }
.ticket__customer.is-set { border-style: solid; background: var(--brand-50); border-color: var(--brand-200); }
[data-theme="dark"] .ticket__customer.is-set { background: rgba(99,102,241,.1); border-color: rgba(99,102,241,.3); }

.ticket__lines { flex: 1 1 auto; overflow-y: auto; min-height: 0; }

.line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .125rem .5rem;
    padding: .625rem .875rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
}
.line:hover { background: var(--surface-alt); }
.line.is-active { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand-600); }
[data-theme="dark"] .line.is-active { background: rgba(99,102,241,.1); }
.line__name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.line__total { font-size: 14px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.line__meta { font-size: 11.5px; color: var(--text-muted); grid-column: 1; display: flex; align-items: center; gap: .375rem; flex-wrap: wrap; }
.line__sub { font-size: 11.5px; color: var(--text-subtle); text-align: right; text-decoration: line-through; }
.line__promo { font-size: 11.5px; color: var(--success); font-weight: 600; grid-column: 1 / -1; }
.line__qty {
    display: inline-flex; align-items: center; gap: .125rem;
    border: 1px solid var(--border); border-radius: var(--radius-xs);
    background: var(--surface);
}
.line__qty button { width: 22px; height: 22px; border: 0; background: none; color: var(--text-muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.line__qty button:hover { background: var(--surface-sunken); color: var(--text); }
.line__qty span { min-width: 30px; text-align: center; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

.ticket__empty { padding: 3rem 1.5rem; text-align: center; color: var(--text-subtle); }

.ticket__totals { flex: 0 0 auto; border-top: 1px solid var(--border); padding: .75rem .875rem; background: var(--surface-alt); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; padding: .1rem 0; }
.total-row span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.total-row--discount span:last-child { color: var(--success); }
.total-row--grand {
    margin-top: .5rem; padding-top: .5rem;
    border-top: 1px solid var(--border-strong);
    font-size: 15px; font-weight: 650;
}
.total-row--grand span:last-child { font-size: 21px; font-weight: 720; letter-spacing: -.02em; }

.ticket__actions { flex: 0 0 auto; padding: .75rem .875rem; border-top: 1px solid var(--border); display: grid; gap: .5rem; }
.ticket__actions__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .375rem; }

/* --- Caisse : vue liste (ajout par recherche uniquement) ---------------- */

.pos__lines-panel { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: .875rem; }

.table--pos-lines { width: 100%; }
.table--pos-lines th:first-child, .table--pos-lines td:first-child { width: 32px; padding-right: 0; }
.table--pos-lines__row { cursor: pointer; }
.table--pos-lines__row:hover td { background: var(--surface-alt); }
.table--pos-lines__row.is-active td { background: var(--brand-50); }
[data-theme="dark"] .table--pos-lines__row.is-active td { background: rgba(99,102,241,.1); }

/* --- Paiement ---------------------------------------------------------- */

.pay { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; }
@media (max-width: 900px) {
    .pay { grid-template-columns: 1fr; }
    /* Montant/clavier/bouton avant la liste des modes de paiement, pour rester visibles sans défiler. */
    .pay > div:first-child { order: 2; }
    .pay > div:last-child { order: 1; }
}

.pay__currencies { display: flex; flex-wrap: wrap; gap: .375rem; }
.pay__currency {
    padding: .375rem .625rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 12.5px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: border-color var(--transition), background var(--transition);
}
.pay__currency.is-active { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-700); }
[data-theme="dark"] .pay__currency.is-active { background: rgba(99,102,241,.12); }

.pay__methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.pay__method {
    display: flex; flex-direction: column; align-items: flex-start; gap: .125rem;
    min-width: 0;
    width: 100%;
    padding: .75rem .875rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer; font-family: inherit; text-align: left;
    transition: border-color var(--transition), background var(--transition);
}
.pay__method:hover { border-color: var(--brand-400); background: var(--surface-alt); }
.pay__method.is-active { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-600) inset; }
[data-theme="dark"] .pay__method.is-active { background: rgba(99,102,241,.12); }
.pay__method__name { font-size: 14px; font-weight: 600; overflow-wrap: break-word; word-break: break-word; }
.pay__method__hint { font-size: 11.5px; color: var(--text-muted); }

.pay__due { text-align: center; padding: 1rem; border-radius: var(--radius); background: var(--surface-sunken); }
.pay__due__label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.pay__due__value { font-size: 36px; font-weight: 720; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: .25rem; }
.pay__due--change { background: var(--success-bg); }
.pay__due--change .pay__due__value { color: var(--success); }
.pay__due__exchange { font-size: 14px; color: var(--text-muted); margin-top: .25rem; }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .375rem; }
.keypad button {
    height: 48px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: inherit; font-size: 17px; font-weight: 600;
    cursor: pointer; color: var(--text);
    font-variant-numeric: tabular-nums;
}
.keypad button:hover { background: var(--surface-alt); }
.keypad button:active { transform: scale(.97); }
.keypad button.is-wide { grid-column: span 2; }
.keypad button.is-action { background: var(--surface-sunken); font-size: 14px; }

.quick-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .375rem; }
.quick-amounts button {
    height: 36px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; color: var(--text);
    font-variant-numeric: tabular-nums;
}
.quick-amounts button:hover { background: var(--brand-50); border-color: var(--brand-400); }

.pay__list { display: flex; flex-direction: column; gap: .375rem; }
.pay__entry {
    display: flex; align-items: center; gap: .625rem;
    padding: .5rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    font-size: 13px;
}
.pay__entry__amount { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; }

@media (max-width: 1180px) {
    .pos__ticket { flex-basis: 330px; width: 330px; }
}
@media (max-width: 900px) {
    .pos__body { flex-direction: column; }
    .pos__ticket { flex: 1 1 auto; width: auto; border-left: 0; border-top: 1px solid var(--border); }
}

/* ==========================================================================
   15. Reçu et impression
   ========================================================================== */

.receipt {
    background: #fff;
    color: #000;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.45;
    width: 300px;
    margin: 0 auto;
    padding: 12px;
}
.receipt--wide { width: 420px; font-size: 13px; }
.receipt__center { text-align: center; }
.receipt__title { font-size: 15px; font-weight: 700; }
.receipt__rule { border-top: 1px solid #000; margin: 6px 0; }
.receipt__row { display: flex; justify-content: space-between; gap: 8px; }
.receipt__row--total { font-weight: 700; font-size: 14px; }
.receipt__line { margin: 3px 0; }
.receipt__line__name { font-weight: 600; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 1px 0; vertical-align: top; }
.receipt th { padding: 0 0 3px; font-size: .85em; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; border-bottom: 1px solid #000; }

@media print {
    body { background: #fff; }
    .sidebar, .topbar, .pos__bar, .pos__catalog, .ticket__actions, .no-print, .toasts { display: none !important; }
    .content, .main, .shell { padding: 0; margin: 0; display: block; }
    .receipt { width: auto; max-width: 100%; box-shadow: none; }
    .card { border: 0; box-shadow: none; }
    a[href]::after { content: ""; }
    @page { margin: 8mm; }
}

/* ==========================================================================
   16. Écrans d'authentification et d'installation
   ========================================================================== */

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 460px;
    background: var(--slate-900);
}
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth__aside { display: none; } }

.auth__aside {
    padding: 3rem;
    display: flex; flex-direction: column; justify-content: space-between;
    color: #fff;
    background:
        radial-gradient(1000px 500px at 15% 10%, rgba(99, 102, 241, .38), transparent 62%),
        radial-gradient(760px 460px at 85% 85%, rgba(56, 189, 248, .22), transparent 60%),
        var(--slate-900);
}
.auth__aside h2 { font-size: 30px; letter-spacing: -.025em; max-width: 15ch; line-height: 1.15; }
.auth__aside p { color: rgba(255,255,255,.72); max-width: 46ch; margin-top: .875rem; font-size: 14.5px; }
.auth__features { display: grid; gap: .625rem; margin-top: 2rem; }
.auth__feature { display: flex; align-items: flex-start; gap: .625rem; color: rgba(255,255,255,.82); font-size: 13.5px; }

.auth__panel { background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth__form { width: 100%; max-width: 340px; }
.auth__brand { display: flex; align-items: center; gap: .625rem; margin-bottom: 1.75rem; }

.setup { max-width: 720px; margin: 3rem auto; padding: 0 1.5rem; }
.setup__steps { display: flex; gap: .5rem; margin-bottom: 2rem; }
.setup__step { flex: 1; height: 4px; border-radius: 999px; background: var(--border); }
.setup__step.is-done { background: var(--brand-600); }

/* ------------------------------------------------------- Tuiles de liens */

.tile-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
    padding: .85rem .95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tile-link:hover {
    border-color: var(--brand-400);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.tile-link__title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.tile-link__desc { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.tile-link[hidden] { display: none; }

/* ------------------------------------------------- Vue détaillée rapport */

.report-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.report-toolbar .field { display: flex; flex-direction: column; gap: .2rem; }
.report-toolbar .field > label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.report-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; padding: .7rem 1rem; background: var(--surface-alt); border-bottom: 1px solid var(--border); font-size: 12px; }
.report-meta__item strong { display: block; font-size: 13px; color: var(--text); }
.report-meta__item span { color: var(--text-muted); }

/* ------------------------------------------------------------- Fil d'Ariane */

.breadcrumb { display: flex; align-items: center; gap: .4rem; font-size: 12px; color: var(--text-muted); margin-bottom: .2rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-600); text-decoration: underline; }

/* ------------------------------------------------------- Liste d'étapes */

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .875rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.25rem; }
.steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: 0;
    width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full);
    background: var(--brand-50); color: var(--brand-700);
    font-size: 12px; font-weight: 700;
}
[data-theme="dark"] .steps li::before { background: rgba(99, 102, 241, .18); color: var(--brand-300); }
.steps li strong { display: block; font-size: 13.5px; margin-bottom: .1rem; }
.steps li span { display: block; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
