/* =============================================================
   DDS Factures PDP — Direction artistique
   Sobre, dense, premium, B2B.
   ============================================================= */

@import url('https://rsms.me/inter/inter.css');

:root {
    /* Palette */
    --bg-app: #FAFAF7;
    --bg-surface: #FFFFFF;
    --bg-surface-alt: #F5F5F1;
    --bg-row-hover: #F5F5F1;
    --bg-row-selected: #EFF2F7;

    --border-fine: #E6E4DE;
    --border-strong: #D4D1C8;

    --text-primary: #1A1A1A;
    --text-secondary: #5C5A55;
    --text-tertiary: #8B8780;

    --accent: #1F3A5F;
    --accent-hover: #182E4B;
    --accent-soft: #EAF0F7;
    --accent-border: #C7D4E4;

    --brass: #7A6A4F;

    --success: #2F6F4E;
    --success-bg: #E8F1EC;
    --warning: #A66A1E;
    --warning-bg: #F6EEE0;
    --danger: #9B2C2C;
    --danger-bg: #F4E4E4;
    --info: #5C6B7A;
    --info-bg: #ECEFF2;

    /* Type */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Source Serif Pro', 'Charter', 'Georgia', serif;

    /* Spacing scale (resserré) */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-12: 48px;

    /* Radius */
    --r-sm: 4px;
    --r-md: 6px;
    --r-lg: 8px;

    /* Layout */
    --sidebar-w: 224px;
    --topbar-h: 48px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-app);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv11', 'ss01';
}

/* Tabular nums everywhere it matters */
.num,
td.num,
.amount,
.kpi-value,
[data-tabular] {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* =============================================================
   Layout général
   ============================================================= */

.app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background: var(--bg-surface);
    border-right: 1px solid var(--border-fine);
    display: flex;
    flex-direction: column;
    padding: var(--sp-3) var(--sp-2);
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3);
    margin-bottom: var(--sp-4);
}

.sidebar__brand-mark {
    width: 22px;
    height: 22px;
    border-radius: var(--r-sm);
    background: var(--accent);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.sidebar__brand-name {
    font-weight: 600;
    font-size: 13px;
    letter-spacing: -0.01em;
}

.sidebar__brand-sub {
    font-size: 10.5px;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 1px;
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar__section {
    font-size: 10.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    padding: var(--sp-3) var(--sp-3) var(--sp-2);
    margin-top: var(--sp-2);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 6px var(--sp-3);
    border-radius: var(--r-sm);
    color: var(--text-secondary);
    font-size: 13px;
    transition: background 0.08s, color 0.08s;
}

.nav-item:hover {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
}

.nav-item.is-active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 500;
}

.nav-item .icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.nav-item__count {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

.nav-item.is-active .nav-item__count {
    color: var(--accent);
}

.sidebar__footer {
    margin-top: auto;
    padding: var(--sp-2) var(--sp-3);
    border-top: 1px solid var(--border-fine);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: 12px;
    color: var(--text-secondary);
}

.sidebar__footer .avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brass);
    color: white;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 600;
}

/* Main */
.main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Topbar */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-fine);
    display: flex;
    align-items: center;
    padding: 0 var(--sp-6);
    gap: var(--sp-4);
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar__breadcrumb {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.topbar__breadcrumb strong {
    color: var(--text-primary);
    font-weight: 500;
}

.topbar__breadcrumb .sep {
    color: var(--text-tertiary);
}

.topbar__search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 5px 10px;
    border: 1px solid var(--border-fine);
    border-radius: var(--r-sm);
    background: var(--bg-app);
    color: var(--text-tertiary);
    font-size: 12px;
    min-width: 280px;
    cursor: pointer;
    transition: border-color 0.08s;
}

.topbar__search:hover {
    border-color: var(--border-strong);
}

.topbar__search .kbd {
    margin-left: auto;
}

.kbd {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: 3px;
    font-family: var(--font-sans);
    font-size: 10.5px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Content area */
.content {
    padding: var(--sp-6) var(--sp-8);
    flex: 1;
    overflow-x: auto;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-6);
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.page-actions {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
}

/* =============================================================
   Boutons
   ============================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background 0.08s, border-color 0.08s, color 0.08s;
    white-space: nowrap;
}

.btn .icon {
    width: 14px;
    height: 14px;
}

.btn--primary {
    background: var(--accent);
    color: white;
}

.btn--primary:hover {
    background: var(--accent-hover);
}

.btn--secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-fine);
}

.btn--secondary:hover {
    border-color: var(--border-strong);
    background: var(--bg-surface);
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn--ghost:hover {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
}

.btn--danger {
    background: var(--bg-surface);
    color: var(--danger);
    border-color: var(--border-fine);
}

.btn--danger:hover {
    background: var(--danger-bg);
    border-color: var(--danger-bg);
}

.btn--sm {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

.btn--icon {
    width: 32px;
    padding: 0;
    justify-content: center;
}

.btn--icon.btn--sm {
    width: 28px;
}

/* =============================================================
   Badges de statut
   ============================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 20px;
    padding: 0 7px;
    border-radius: 3px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
    line-height: 1;
}

.badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.8;
}

.badge--draft   { color: var(--info);    background: var(--info-bg); }
.badge--sent    { color: var(--accent);  background: var(--accent-soft); }
.badge--paid    { color: var(--success); background: var(--success-bg); }
.badge--partial { color: var(--warning); background: var(--warning-bg); }
.badge--late    { color: var(--danger);  background: var(--danger-bg); }
.badge--cancel  { color: var(--text-tertiary); background: var(--bg-surface-alt); }
.badge--accepted { color: var(--success); background: var(--success-bg); }
.badge--expired { color: var(--text-tertiary); background: var(--bg-surface-alt); }

.badge--soft {
    background: var(--bg-surface-alt);
    color: var(--text-secondary);
}

.badge--soft::before { display: none; }

/* =============================================================
   Tableaux
   ============================================================= */

.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: var(--r-md);
    overflow: hidden;
}

.panel__header {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border-fine);
    background: var(--bg-surface);
}

.panel__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel__sub {
    font-size: 12px;
    color: var(--text-tertiary);
}

.panel__actions {
    margin-left: auto;
    display: flex;
    gap: var(--sp-2);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table thead th {
    text-align: left;
    font-weight: 500;
    font-size: 11.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding: 9px var(--sp-4);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-fine);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.table thead th.num {
    text-align: right;
}

.table tbody td {
    padding: 10px var(--sp-4);
    border-bottom: 1px solid var(--border-fine);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.table tbody tr:hover {
    background: var(--bg-row-hover);
}

.table tbody tr.is-selected {
    background: var(--bg-row-selected);
}

.table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.table td.muted {
    color: var(--text-tertiary);
}

.table td.strong {
    font-weight: 500;
}

.table .row-actions {
    display: flex;
    gap: 2px;
    justify-content: flex-end;
}

/* Estompe légèrement les actions secondaires au repos, accentue au hover.
   Pas d'opacity sur le conteneur car ça écraserait les menus en position:fixed. */
.table .row-actions .btn--ghost { color: var(--text-tertiary); }
.table tbody tr:hover .row-actions .btn--ghost { color: var(--text-primary); }

.table tfoot td {
    padding: 10px var(--sp-4);
    background: var(--bg-surface-alt);
    font-weight: 600;
    color: var(--text-primary);
    border-top: 1px solid var(--border-strong);
}

.table tfoot td.muted-label {
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11.5px;
}

.table-checkbox {
    width: 24px;
}

.checkbox {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    background: var(--bg-surface);
    cursor: pointer;
    position: relative;
    transition: all 0.08s;
}

.checkbox:hover {
    border-color: var(--accent);
}

.checkbox:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 4px;
    width: 4px;
    height: 7px;
    border-right: 1.5px solid white;
    border-bottom: 1.5px solid white;
    transform: rotate(45deg);
}

/* =============================================================
   Tabs (filter views)
   ============================================================= */

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-fine);
    margin-bottom: var(--sp-4);
}

.tab {
    padding: 10px var(--sp-4);
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.08s, border-color 0.08s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.is-active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
    font-weight: 500;
}

.tab__count {
    font-size: 11px;
    color: var(--text-tertiary);
    background: var(--bg-surface-alt);
    padding: 1px 6px;
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.tab.is-active .tab__count {
    color: var(--accent);
    background: var(--accent-soft);
}

/* =============================================================
   Filter bar
   ============================================================= */

.filter-bar {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-4);
    flex-wrap: wrap;
}

.input,
.select {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border-fine);
    border-radius: var(--r-sm);
    background: var(--bg-surface);
    font-size: 13px;
    color: var(--text-primary);
    transition: border-color 0.08s, box-shadow 0.08s;
}

.input:hover,
.select:hover {
    border-color: var(--border-strong);
}

.input:focus,
.select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.08);
}

.input--search {
    padding-left: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238B8780' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    min-width: 240px;
}

.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 24 24' fill='none' stroke='%235C5A55' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 26px;
    cursor: pointer;
}

.filter-divider {
    width: 1px;
    height: 18px;
    background: var(--border-fine);
    margin: 0 var(--sp-1);
}

/* =============================================================
   Dashboard
   ============================================================= */

.alert {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--danger-bg);
    border: 1px solid #EBC9C9;
    border-radius: var(--r-md);
    color: var(--danger);
    margin-bottom: var(--sp-6);
    font-size: 13px;
}

.alert .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.alert strong {
    font-weight: 600;
}

.alert__action {
    margin-left: auto;
    font-weight: 500;
    color: var(--danger);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: var(--sp-6);
}

.kpi {
    padding: var(--sp-4) var(--sp-5);
    border-right: 1px solid var(--border-fine);
}

.kpi:last-child {
    border-right: none;
}

.kpi__label {
    font-size: 11.5px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
    margin-bottom: var(--sp-2);
}

.kpi__value {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.kpi__sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.kpi__delta--up {
    color: var(--success);
}

.kpi__delta--down {
    color: var(--danger);
}

.kpi--alert .kpi__value {
    color: var(--danger);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
}

.dashboard-grid--full {
    grid-column: 1 / -1;
}

/* Todo list (À faire) */

.todo-list {
    display: flex;
    flex-direction: column;
}

.todo-item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border-fine);
    cursor: pointer;
    transition: background 0.08s;
}

.todo-item:hover {
    background: var(--bg-surface-alt);
}

.todo-item:last-child {
    border-bottom: none;
}

.todo-item__icon {
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    background: var(--bg-surface-alt);
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.todo-item__icon .icon {
    width: 14px;
    height: 14px;
}

.todo-item__icon--danger { background: var(--danger-bg); color: var(--danger); }
.todo-item__icon--warning { background: var(--warning-bg); color: var(--warning); }
.todo-item__icon--info { background: var(--accent-soft); color: var(--accent); }

.todo-item__main {
    flex: 1;
    min-width: 0;
}

.todo-item__title {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.45;
}

.todo-item__title b {
    font-weight: 600;
}

.todo-item__meta {
    font-size: 11.5px;
    color: var(--text-tertiary);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.todo-item__amount {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    text-align: right;
}

.todo-item__amount.is-danger { color: var(--danger); }

/* Activity timeline */

.activity {
    padding: var(--sp-2) var(--sp-4) var(--sp-3);
}

.activity-item {
    display: flex;
    gap: var(--sp-3);
    padding: var(--sp-2) 0;
    position: relative;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 18px;
    bottom: -8px;
    width: 1px;
    background: var(--border-fine);
}

.activity-item:last-child::before { display: none; }

.activity-item__dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-strong);
    margin-top: 4px;
    flex-shrink: 0;
    z-index: 1;
}

.activity-item__dot--success { border-color: var(--success); background: var(--success); }
.activity-item__dot--info    { border-color: var(--accent); background: var(--accent); }
.activity-item__dot--warning { border-color: var(--warning); background: var(--warning); }

.activity-item__main {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
    padding-bottom: 2px;
}

.activity-item__main b {
    font-weight: 600;
}

.activity-item__meta {
    font-size: 11.5px;
    color: var(--text-tertiary);
    margin-top: 1px;
}

/* Chart sparkline placeholder */
.sparkline {
    height: 36px;
    margin-top: var(--sp-3);
    display: block;
    width: 100%;
}

/* =============================================================
   Édition facture (split view)
   ============================================================= */

.editor {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0;
    height: calc(100vh - var(--topbar-h));
    border-top: 1px solid var(--border-fine);
}

.editor__left {
    overflow-y: auto;
    padding: var(--sp-6) var(--sp-8);
    background: var(--bg-app);
}

.editor__right {
    background: var(--bg-surface-alt);
    border-left: 1px solid var(--border-fine);
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-8);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-fine);
}

.editor-header__left {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.editor-header__title {
    font-size: 15px;
    font-weight: 600;
}

.editor-header__title .num {
    color: var(--text-tertiary);
    font-weight: 500;
    margin-left: 4px;
}

.editor-header__save {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.editor-header__save .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

.editor-header__actions {
    display: flex;
    gap: var(--sp-2);
}

/* Form blocks */

.form-section {
    margin-bottom: var(--sp-8);
}

.form-section__head {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: var(--sp-3);
    padding-bottom: var(--sp-2);
    border-bottom: 1px solid var(--border-fine);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
    margin-bottom: var(--sp-3);
}

.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }

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

.field__label {
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.field__hint {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Client picker */

.client-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: var(--r-md);
    padding: var(--sp-3) var(--sp-4);
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
}

.client-card__avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.client-card__main {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.5;
}

.client-card__name {
    font-weight: 600;
}

.client-card__meta {
    color: var(--text-secondary);
    font-size: 12.5px;
}

.client-card__actions {
    display: flex;
    gap: 2px;
    margin-left: auto;
}

/* Lines table */

.lines-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: var(--r-md);
    overflow: hidden;
    font-size: 13px;
}

.lines-table thead th {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    text-align: left;
    padding: 9px 10px;
    background: var(--bg-surface-alt);
    border-bottom: 1px solid var(--border-fine);
    white-space: nowrap;
}

.lines-table thead th.num { text-align: right; }
.lines-table thead th.center { text-align: center; }

.lines-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-fine);
    vertical-align: top;
}

.lines-table tbody tr:last-child td {
    border-bottom: none;
}

.lines-table .drag-handle {
    width: 18px;
    color: var(--text-tertiary);
    cursor: grab;
    text-align: center;
    padding-top: 12px;
}

.line-input {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 13px;
    color: var(--text-primary);
}

.line-input:hover {
    background: var(--bg-app);
}

.line-input:focus {
    outline: none;
    background: var(--bg-app);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(31, 58, 95, 0.08);
}

.line-input--num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.line-desc {
    min-height: 22px;
    font-size: 13px;
    line-height: 1.45;
}

.line-desc small {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.lines-add {
    padding: 8px 10px;
    background: var(--bg-surface);
    border-top: 1px dashed var(--border-fine);
    color: var(--text-tertiary);
    font-size: 12.5px;
    display: flex;
    gap: var(--sp-3);
    align-items: center;
}

.lines-add a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
}

.lines-add a:hover {
    text-decoration: underline;
}

/* Totals */

.totals {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--sp-4);
}

.totals__inner {
    width: 320px;
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: var(--r-md);
    padding: var(--sp-3) var(--sp-4);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    font-size: 13px;
}

.total-row__label {
    color: var(--text-secondary);
}

.total-row__value {
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    font-weight: 500;
}

.total-row--final {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border-strong);
    font-size: 15px;
    font-weight: 600;
}

.total-row--final .total-row__value {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
}

/* PDF preview */

.pdf-preview {
    background: white;
    box-shadow: 0 1px 0 var(--border-fine), 0 8px 24px -12px rgba(0,0,0,0.08);
    border: 1px solid var(--border-fine);
    border-radius: var(--r-md);
    padding: 36px 40px;
    font-family: var(--font-serif);
    color: #1a1a1a;
    font-size: 11px;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 540px;
}

.pdf__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid #d4d1c8;
}

.pdf__brand {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--accent);
}

.pdf__brand-sub {
    font-family: var(--font-sans);
    font-size: 9.5px;
    color: var(--text-tertiary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 4px;
}

.pdf__doc-title {
    text-align: right;
}

.pdf__doc-title h1 {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    margin: 0;
}

.pdf__doc-title .num {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.pdf__addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 24px;
}

.pdf__addr h3 {
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.pdf__addr p {
    font-size: 11px;
    line-height: 1.55;
    color: #1a1a1a;
}

.pdf__addr p strong {
    font-weight: 600;
}

.pdf__meta {
    display: flex;
    gap: 24px;
    margin-bottom: 18px;
    font-family: var(--font-sans);
    font-size: 10.5px;
}

.pdf__meta dt {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 2px;
}

.pdf__meta dd {
    font-weight: 500;
    color: #1a1a1a;
    font-variant-numeric: tabular-nums;
}

.pdf__lines {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}

.pdf__lines th {
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    text-align: left;
    padding: 8px 6px;
    border-bottom: 1px solid #d4d1c8;
}

.pdf__lines th.num { text-align: right; }

.pdf__lines td {
    padding: 8px 6px;
    border-bottom: 1px solid #ECEAE3;
    vertical-align: top;
    font-size: 10.5px;
}

.pdf__lines td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pdf__lines td small {
    color: var(--text-tertiary);
    font-size: 9.5px;
    display: block;
    margin-top: 2px;
}

.pdf__totals {
    margin-left: auto;
    width: 250px;
    font-family: var(--font-sans);
}

.pdf__total-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 10.5px;
}

.pdf__total-row--final {
    border-top: 1px solid #1a1a1a;
    padding-top: 8px;
    margin-top: 4px;
    font-weight: 700;
    font-size: 13px;
}

.pdf__footer {
    margin-top: 32px;
    padding-top: 14px;
    border-top: 1px solid #ECEAE3;
    font-family: var(--font-sans);
    font-size: 9px;
    color: var(--text-tertiary);
    text-align: center;
    line-height: 1.5;
}

/* Preview head */
.preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-4);
}

.preview-head__title {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-head__zoom {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Maquettes index */

.maquettes-index {
    max-width: 720px;
    margin: 80px auto;
    padding: 0 var(--sp-6);
}

.maquettes-index h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--sp-2);
}

.maquettes-index .lead {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: var(--sp-8);
    line-height: 1.6;
}

.maquettes-list {
    display: grid;
    gap: var(--sp-3);
}

.maquettes-link {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: var(--r-md);
    transition: border-color 0.1s, transform 0.1s;
}

.maquettes-link:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.maquettes-link__num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 13px;
}

.maquettes-link__main {
    flex: 1;
}

.maquettes-link__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.maquettes-link__sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.maquettes-link__arrow {
    color: var(--text-tertiary);
}

/* Utility */

.muted { color: var(--text-tertiary); }
.right { text-align: right; }
.flex  { display: flex; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.mb-3  { margin-bottom: var(--sp-3); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-6  { margin-bottom: var(--sp-6); }
.mt-4  { margin-top: var(--sp-4); }

/* =============================================================
   Login page
   ============================================================= */

body.auth-page {
    background: var(--bg-app);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--sp-6);
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: var(--r-md);
    padding: var(--sp-8) var(--sp-8) var(--sp-6);
    box-shadow: 0 1px 0 var(--border-fine), 0 14px 40px -16px rgba(0,0,0,0.06);
}

.auth-card__brand {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding-bottom: var(--sp-6);
    border-bottom: 1px solid var(--border-fine);
    margin-bottom: var(--sp-6);
}

.auth-card__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--sp-5);
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.auth-card__form {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.auth-card__error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #EBC9C9;
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-sm);
    margin-bottom: var(--sp-4);
    font-size: 13px;
}

.auth-card__legal {
    margin-top: var(--sp-6);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border-fine);
    text-align: center;
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

/* =============================================================
   Toasts (flash messages)
   ============================================================= */

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 50;
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: var(--r-md);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 28px -8px rgba(0,0,0,0.18);
    border-left-width: 3px;
    max-width: 480px;
    animation: toast-in 0.18s ease-out;
}

.toast--success { border-left-color: var(--success); color: var(--success); }
.toast--error   { border-left-color: var(--danger);  color: var(--danger); }
.toast--info    { border-left-color: var(--accent);  color: var(--accent); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   Form blocks (réutilisables)
   ============================================================= */

.form-grid {
    display: grid;
    gap: var(--sp-4);
}

.form-grid--2 { grid-template-columns: 1fr 1fr; }
.form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }

.input--full { width: 100%; }

textarea.input {
    height: auto;
    padding: 8px 10px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
}

/* Empty state */
.empty {
    text-align: center;
    padding: var(--sp-12) var(--sp-6);
    color: var(--text-secondary);
}
.empty__title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: var(--sp-2); }
.empty__sub { font-size: 13px; margin-bottom: var(--sp-4); }

/* =============================================================
   Fiche client / fournisseur (en-tête riche)
   ============================================================= */

.fiche-header {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-4);
    padding: var(--sp-5) 0 var(--sp-2);
    border-bottom: 1px solid var(--border-fine);
    margin-bottom: var(--sp-4);
}

.fiche-header__avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--r-md);
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
    letter-spacing: 0.04em;
}

.fiche-header__main {
    flex: 1;
    min-width: 0;
}

.fiche-header__title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-wrap: wrap;
}

.fiche-header__sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.fiche-header__actions {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
    flex-shrink: 0;
}

/* =============================================================
   Recherche d'entreprise (panneau résultats sous le champ)
   ============================================================= */

.recherche-resultats { margin-top: 4px; }

.recherche-list {
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-top: var(--sp-2);
    box-shadow: 0 4px 14px -8px rgba(0,0,0,0.08);
}

.recherche-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 10px var(--sp-4);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-fine);
    cursor: pointer;
    text-align: left;
    transition: background 0.08s;
    font-family: inherit;
    color: inherit;
}
.recherche-item:last-child { border-bottom: none; }
.recherche-item:hover { background: var(--bg-surface-alt); }

.recherche-item__main { flex: 1; min-width: 0; }
.recherche-item__name { font-size: 13px; font-weight: 500; color: var(--text-primary); display: flex; align-items: center; gap: var(--sp-2); }
.recherche-item__meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; font-variant-numeric: tabular-nums; }

.htmx-indicator { opacity: 0; transition: opacity 0.15s; }
.htmx-request .htmx-indicator,
.htmx-indicator.htmx-request { opacity: 1; }

/* Sep utilitaire pour breadcrumb */
.topbar__breadcrumb .sep { color: var(--text-tertiary); margin: 0 4px; }
.topbar__breadcrumb a { color: var(--text-secondary); transition: color 0.08s; }
.topbar__breadcrumb a:hover { color: var(--text-primary); }

/* =============================================================
   Édition facture (split view)
   ============================================================= */

.editor-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0;
    margin: calc(var(--sp-6) * -1) calc(var(--sp-8) * -1) 0;
    border-top: 1px solid var(--border-fine);
    min-height: calc(100vh - var(--topbar-h) - 100px);
}

.editor-grid__left {
    padding: var(--sp-6) var(--sp-8);
    background: var(--bg-app);
    overflow-y: auto;
    border-right: 1px solid var(--border-fine);
}

.editor-grid__right {
    background: var(--bg-surface-alt);
    padding: var(--sp-6);
    overflow-y: auto;
}

/* =============================================================
   Modale (encaisser, etc.)
   ============================================================= */

.modale-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
    backdrop-filter: blur(2px);
}

.modale {
    background: var(--bg-surface);
    border-radius: var(--r-md);
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px -16px rgba(0,0,0,0.25);
    overflow: hidden;
}

.modale__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-5);
    border-bottom: 1px solid var(--border-fine);
}

.modale__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.modale__body {
    padding: var(--sp-5);
}

/* =============================================================
   Palette de commandes (⌘K)
   ============================================================= */

.palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 22, 28, 0.42);
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    backdrop-filter: blur(2px);
}

.palette {
    background: var(--bg-surface);
    border-radius: var(--r-md);
    width: 100%;
    max-width: 560px;
    box-shadow: 0 24px 80px -20px rgba(0,0,0,0.32);
    border: 1px solid var(--border-fine);
    overflow: hidden;
}

.palette__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border-fine);
}

.palette__header input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    color: var(--text-primary);
}

.palette__results {
    max-height: 60vh;
    overflow-y: auto;
}

.palette__hint {
    padding: var(--sp-2) 0;
}

.palette__section,
.recherche-section__title {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--text-tertiary);
    padding: var(--sp-3) var(--sp-4) 6px;
}

.recherche-section { padding-bottom: var(--sp-2); }
.recherche-section + .recherche-section { border-top: 1px solid var(--border-fine); }

/* =============================================================
   Menu déroulant (dropdowns) — actions de ligne / fiche
   ============================================================= */

[x-cloak] { display: none !important; }

/* Le positionnement est géré par JS (position:fixed appliqué à l'ouverture)
   pour pouvoir déborder par dessus les panels avec overflow:hidden. */
.menu-dropdown {
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: var(--r-md);
    box-shadow: 0 12px 40px -12px rgba(0,0,0,0.22);
    min-width: 220px;
    padding: 4px 0;
    z-index: 200;
    text-align: left;
    /* Petit retour visuel à l'apparition */
    animation: menu-in 0.12s ease-out;
}

@keyframes menu-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.menu-dropdown form { margin: 0; }

.menu-item {
    display: block;
    width: 100%;
    padding: 7px 14px;
    background: transparent;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.08s;
    white-space: nowrap;
    text-decoration: none;
}

.menu-item:hover {
    background: var(--bg-surface-alt);
}

.menu-item--warn  { color: var(--warning); }
.menu-item--warn:hover  { background: var(--warning-bg); }

.menu-item--danger { color: var(--danger); }
.menu-item--danger:hover { background: var(--danger-bg); }

.menu-sep {
    height: 1px;
    background: var(--border-fine);
    margin: 4px 0;
}

/* =============================================================
   MODALE DE CONFIRMATION (remplace window.confirm natif)
   ============================================================= */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 22, 26, 0.42);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    animation: modal-fade-in 0.12s ease-out forwards;
}

@keyframes modal-fade-in {
    to { opacity: 1; }
}

.modal-confirm {
    background: var(--bg-surface);
    border: 1px solid var(--border-fine);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    animation: modal-pop-in 0.14s ease-out 0.02s forwards;
}

@keyframes modal-pop-in {
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-confirm__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 22px 4px 22px;
}

.modal-confirm__icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}

.modal-confirm__icon--danger  { background: var(--danger-bg);  color: var(--danger); }
.modal-confirm__icon--warning { background: var(--warning-bg); color: var(--warning); }
.modal-confirm__icon--info    { background: var(--accent-soft); color: var(--accent); }
.modal-confirm__icon--success { background: var(--success-bg); color: var(--success); }

.modal-confirm__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    padding-top: 8px;
}

.modal-confirm__body {
    padding: 8px 22px 20px 72px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-line;
}

.modal-confirm__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 18px;
    background: var(--bg-surface-alt);
    border-top: 1px solid var(--border-fine);
}

.modal-confirm__foot .btn {
    min-width: 96px;
    justify-content: center;
}

.modal-confirm__ok--danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.modal-confirm__ok--danger:hover {
    background: #7d2222;
    border-color: #7d2222;
    color: #fff;
}

.modal-confirm__ok--warning {
    background: var(--warning);
    color: #fff;
    border-color: var(--warning);
}

.modal-confirm__ok--warning:hover {
    background: #8a5717;
    border-color: #8a5717;
    color: #fff;
}

/* =============================================================
   PROPOSITIONS — composants spécifiques
   ============================================================= */

.grid-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--sp-4);
}

@media (max-width: 1024px) {
    .grid-split { grid-template-columns: 1fr; }
}

.info-list {
    margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 8px;
}

.info-list > div {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    font-size: 13px;
    align-items: start;
}

.info-list dt {
    color: var(--text-tertiary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
    margin: 0;
}

.info-list dd {
    margin: 0;
    color: var(--text-primary);
}

.table--sub {
    font-size: 12.5px;
}

.table--sub thead th {
    font-size: 10.5px;
    padding: 8px 10px;
}

.table--sub tbody td {
    padding: 10px;
}

/* Sélecteur de formules dans l'édition de proposition */
.formules-pick {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.formules-pick__row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--border-fine);
    border-radius: 8px;
    background: var(--bg-surface);
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}

.formules-pick__row:hover {
    border-color: var(--border-strong);
}

.formules-pick__row.is-off {
    background: var(--bg-surface-alt);
    opacity: 0.65;
}

.formules-pick__row > input[type="checkbox"] {
    margin-top: 3px;
    flex: 0 0 auto;
}

.formules-pick__main {
    flex: 1;
    min-width: 0;
}

.formules-pick__name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 2px;
}

.formules-pick__prices {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.formules-pick__desc {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.5;
    white-space: pre-line;
}
