:root {
    --bg: #f4efe6;
    --surface: rgba(255, 252, 247, 0.9);
    --surface-strong: #fffdf8;
    --ink: #1f2933;
    --muted: #5f6c76;
    --placeholder: #c5cdd4;
    --line: rgba(31, 41, 51, 0.12);
    --coral: #e76f51;
    --gold: #e9c46a;
    --mint: #61c0a8;
    --ink-accent: #264653;
    --shadow: 0 24px 60px rgba(38, 70, 83, 0.12);
    --shadow-list-block: 0 4px 18px rgba(38, 70, 83, 0.09);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --border: rgba(31, 41, 51, 0.18);
    --border-light: rgba(31, 41, 51, 0.08);
    /* Empilement UI (modales > dropdowns > sticky > listes) */
    --z-list-card: 1;
    --z-toolbar-widget: 30;
    --z-filter-card: 25;
    --z-filter-card-open: 120;
    --z-sticky-actions: 80;
    --sticky-actions-reserve: calc(var(--sticky-actions-offset, 10px) + var(--sticky-actions-bar-size, 34px) + var(--list-page-block-gap));
    --sticky-actions-offset: 10px;
    --sticky-actions-bar-size: 34px;
    --list-page-block-gap: 22px;
    --z-dropdown: 5000;
    --z-modal: 9000;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(233, 196, 106, 0.28), transparent 28%),
        radial-gradient(circle at top right, rgba(97, 192, 168, 0.24), transparent 32%),
        linear-gradient(180deg, #fcf9f2 0%, var(--bg) 100%);
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: auto;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(18px);
    opacity: 0.6;
}

body::before {
    width: 240px;
    height: 240px;
    top: 52px;
    right: 4%;
    background: rgba(231, 111, 81, 0.15);
}

body::after {
    width: 200px;
    height: 200px;
    bottom: 40px;
    left: 6%;
    background: rgba(97, 192, 168, 0.16);
}

.app-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.app-layout.is-sidebar-collapsed {
    grid-template-columns: 92px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
    padding: 16px 14px;
    border-radius: 28px;
    background: rgba(17, 23, 30, 0.96);
    box-shadow: 0 28px 60px rgba(10, 14, 18, 0.28);
    color: rgba(255, 255, 255, 0.78);
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.sidebar-brand-mark {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.06em;
    line-height: 1;
}

.sidebar-brand-copy {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.62);
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    align-content: flex-start;
    gap: 0;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.sidebar-section::-webkit-scrollbar {
    width: 5px;
}

.sidebar-section::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 0 0 auto;
}

.sidebar-group + .sidebar-group {
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-group-title {
    margin: 0;
    padding: 0 8px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.42);
}

.sidebar-label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-nav-compact {
    gap: 0;
}

.sidebar-link,
.sidebar-login-link,
.sidebar-logout {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 0;
    padding: 6px 10px;
    border-radius: 9px;
    font-size: 0.875rem;
    line-height: 1.25;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.78);
    border: 1px solid transparent;
    background: transparent;
    transition: background-color 180ms ease, color 180ms ease;
}

.sidebar-link-icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    opacity: 0.62;
}

.sidebar-link-icon svg {
    width: 18px;
    height: 18px;
}

.sidebar-link-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-badge {
    flex-shrink: 0;
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(97, 192, 168, 0.22);
    color: #9ee4d2;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.sidebar-sub-link {
    padding: 8px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.62);
    transition: background-color 180ms ease, color 180ms ease;
}

.sidebar-link:hover,
.sidebar-login-link:hover,
.sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-link:hover .sidebar-link-icon,
.sidebar-link.is-active .sidebar-link-icon {
    opacity: 1;
}

.sidebar-sub-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-link.is-active {
    background: rgba(97, 192, 168, 0.12);
    color: #fff;
    border-color: transparent;
    box-shadow: none;
}

.sidebar-link.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #61c0a8;
}

.sidebar-collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.62);
    font: inherit;
    font-size: 0.84rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.sidebar-collapse-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-collapse-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.sidebar-footer {
    display: grid;
    gap: 0;
    margin-top: auto;
    flex-shrink: 0;
}

.sidebar-footer-card {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer-dossier {
    display: grid;
    gap: 2px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.sidebar-footer-dossier-name {
    color: #fff;
    font-size: 0.95rem;
    word-break: break-word;
}

.sidebar-footer-dossier-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sidebar-footer-dossier-link {
    font-size: 0.82rem;
    color: rgba(97, 192, 168, 0.92);
    text-decoration: none;
}

.sidebar-footer-dossier-link:hover {
    color: #9ee4d2;
}

.sidebar-footer-user {
    display: grid;
    gap: 2px;
}

.sidebar-footer-user strong {
    color: #fff;
    font-size: 0.92rem;
}

.sidebar-footer-user span {
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.8rem;
}

.sidebar-footer-logout-form {
    width: 100%;
}

.sidebar-footer-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.58);
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sidebar-footer-logout-icon {
    display: none;
    width: 20px;
    height: 20px;
}

.sidebar-footer-logout-icon svg {
    width: 20px;
    height: 20px;
}

.is-sidebar-collapsed .sidebar-footer-card {
    padding: 8px;
}

.is-sidebar-collapsed .sidebar-footer-logout {
    justify-content: center;
    text-decoration: none;
    min-height: 36px;
}

.is-sidebar-collapsed .sidebar-footer-logout-icon {
    display: inline-flex;
}

.sidebar-footer-logout:hover {
    color: #fff;
}

.is-sidebar-collapsed .sidebar-brand-copy,
.is-sidebar-collapsed .sidebar-group-title,
.is-sidebar-collapsed .sidebar-link-label,
.is-sidebar-collapsed .sidebar-collapse-label,
.is-sidebar-collapsed .sidebar-footer-dossier,
.is-sidebar-collapsed .sidebar-footer-user,
.is-sidebar-collapsed .sidebar-footer-logout-label,
.is-sidebar-collapsed .sidebar-badge {
    display: none;
}

.is-sidebar-collapsed .sidebar-brand-mark {
    font-size: 1.35rem;
    text-align: center;
}

.is-sidebar-collapsed .sidebar-brand {
    align-items: center;
}

.is-sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 6px 0;
    min-width: 32px;
}

.is-sidebar-collapsed .sidebar-link.is-active::before {
    top: 5px;
    bottom: 5px;
}

.is-sidebar-collapsed .sidebar-link[data-badge]::after,
.is-sidebar-collapsed .sidebar-link:has(.sidebar-badge)::after {
    content: '';
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #61c0a8;
    box-shadow: 0 0 0 2px rgba(17, 23, 30, 0.96);
}

.is-sidebar-collapsed .sidebar-collapse-toggle {
    padding: 0;
    min-height: 36px;
}

.sidebar-admin .sidebar-section {
    margin-top: 4px;
}

.sidebar-admin .sidebar-footer {
    gap: 10px;
}

.sidebar-dossier-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-dossier-card .sidebar-label {
    margin: 0;
}

.sidebar-dossier-form {
    width: 100%;
}

.sidebar-dossier-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
    font: inherit;
}

.sidebar-dossier-select option {
    color: #111;
}

.sidebar-dossier-new {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    text-decoration: none;
}

.sidebar-dossier-new:hover {
    color: #fff;
}

.sidebar-user-card {
    display: grid;
    gap: 4px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user-card strong {
    color: #fff;
}

.sidebar-user-card span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.92rem;
}

.sidebar-logout-form {
    width: 100%;
}

.sidebar-logout {
    width: 100%;
    justify-content: center;
    cursor: pointer;
    font: inherit;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-login-link {
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
}

.app-main {
    min-width: 0;
}

.shell {
    width: calc(100% - 32px);
    margin: 0 auto;
    padding: 32px 0 56px;
}

.hero-card,
.table-card,
.side-card,
.stat-card {
    background: var(--surface);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow);
}

.hero-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 24px;
    overflow: hidden;
    padding: 34px;
    border-radius: var(--radius-xl);
}

.hero-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(38, 70, 83, 0.04), transparent 44%, rgba(231, 111, 81, 0.08));
    pointer-events: none;
}

.eyebrow,
.section-label,
.highlight-label {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

h1,
h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1;
}

h1 {
    max-width: 11ch;
    font-size: clamp(2.3rem, 4vw, 4.5rem);
}

h2 {
    font-size: 1.45rem;
}

.hero-text,
.highlight-panel p,
.risk-item span,
.action-list {
    color: var(--muted);
}

.hero-text {
    max-width: 62ch;
    margin: 16px 0 0;
    font-size: 1rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

button,
a,
select,
input {
    font: inherit;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 13px 20px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.primary-action {
    background: linear-gradient(135deg, var(--ink-accent), #3f6d78);
    color: #fff;
    box-shadow: 0 16px 30px rgba(38, 70, 83, 0.2);
}

.secondary-action {
    background: linear-gradient(135deg, var(--ink-accent), #3f6d78);
    color: #fff;
    border: 0;
    box-shadow: 0 16px 30px rgba(38, 70, 83, 0.2);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    background: linear-gradient(135deg, var(--ink-accent), #3f6d78);
    color: #fff;
    box-shadow: 0 16px 30px rgba(38, 70, 83, 0.2);
}

.ghost-danger,
.toolbar-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(231, 111, 81, 0.24);
    background: rgba(231, 111, 81, 0.08);
    color: #9c3e28;
    cursor: pointer;
}

.toolbar-submit {
    border-color: transparent;
    background: linear-gradient(135deg, var(--ink-accent), #3f6d78);
    color: #fff;
    box-shadow: 0 16px 30px rgba(38, 70, 83, 0.2);
}

.primary-action.is-compact,
.secondary-action.is-compact {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(38, 70, 83, 0.16);
}

.primary-action:hover,
.secondary-action:hover,
.ghost-danger:hover,
.toolbar-submit:hover {
    transform: translateY(-2px);
}

.flash-banner {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(97, 192, 168, 0.16);
    border: 1px solid rgba(97, 192, 168, 0.28);
    color: #1e6755;
    box-shadow: var(--shadow);
}

.highlight-panel {
    align-self: end;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(233, 196, 106, 0.22), rgba(255, 255, 255, 0.78));
    border: 1px solid rgba(233, 196, 106, 0.24);
}

.highlight-panel strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.6rem;
}

.stats-grid,
.workspace-grid {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
    padding: 22px;
    border-radius: var(--radius-lg);
}

.stat-card span,
.stat-card small {
    display: block;
}

.stat-card strong {
    display: block;
    margin: 10px 0 8px;
    font-size: 2rem;
}

.accent-coral { border-top: 6px solid var(--coral); }
.accent-gold { border-top: 6px solid var(--gold); }
.accent-ink { border-top: 6px solid var(--ink-accent); }
.accent-mint { border-top: 6px solid var(--mint); }

.workspace-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.8fr);
    align-items: start;
}

.table-card,
.side-card {
    border-radius: var(--radius-xl);
}

.table-card {
    padding: 24px;
}

.table-toolbar,
.toolbar-actions,
.search-box {
    display: flex;
}

.table-toolbar {
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.table-toolbar-stack {
    align-items: stretch;
    min-width: 0;
    width: 100%;
}

.toolbar-copy {
    display: grid;
    gap: 10px;
}

.toolbar-leading-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.has-sticky-toolbar.has-sticky-scroll {
    padding-bottom: calc(var(--sticky-actions-reserve) + 20px);
}

/* Listes avec barre d'actions fixe : pas de scroll page, scroll dans la grille */
.has-sticky-toolbar:not(.has-sticky-scroll) {
    display: flex;
    flex-direction: column;
    gap: var(--list-page-block-gap);
    box-sizing: border-box;
    height: calc(100dvh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: hidden;
    padding-bottom: var(--sticky-actions-reserve);
}

.has-sticky-toolbar:not(.has-sticky-scroll) > .page-heading,
.has-sticky-toolbar:not(.has-sticky-scroll) > .flash-banner {
    flex: 0 0 auto;
    margin-top: 0;
}

.has-sticky-toolbar:not(.has-sticky-scroll) > .filter-card {
    flex: 0 0 auto;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-list-block);
}

.has-sticky-toolbar:not(.has-sticky-scroll) > .article-list-card,
.has-sticky-toolbar:not(.has-sticky-scroll) > .customer-list-card,
.has-sticky-toolbar:not(.has-sticky-scroll) > .prospect-list-card,
.has-sticky-toolbar:not(.has-sticky-scroll) > .document-list-card,
.has-sticky-toolbar:not(.has-sticky-scroll) > .website-list-card,
.has-sticky-toolbar:not(.has-sticky-scroll) > .document-grid-shell.document-list-empty {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    max-height: none;
    margin-top: 0;
    margin-bottom: 0;
    align-self: stretch;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-list-block);
}

.filter-card + .table-card:not(.article-list-card):not(.customer-list-card):not(.prospect-list-card):not(.document-list-card):not(.website-list-card) {
    margin-top: var(--list-page-block-gap, 22px);
}

.toolbar-actions {
    flex: 1 1 380px;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    justify-content: flex-end;
    min-width: 0;
}

.toolbar-actions-wide {
    flex: 1 1 auto;
    justify-content: stretch;
}

.toolbar-actions-wide .search-box {
    flex: 2 1 420px;
}

.toolbar-actions-wide .select-box {
    flex: 0 1 240px;
}

.search-box {
    flex-direction: column;
    gap: 8px;
    flex: 1 1 240px;
    min-width: 0;
}

.select-box {
    display: flex;
    flex: 1 1 220px;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

input[type='checkbox'],
input[type='radio'] {
    width: 1rem;
    height: 1rem;
    min-height: 0;
    min-width: 1rem;
    max-width: 1rem;
    padding: 0;
    border-radius: 4px;
    flex: 0 0 1rem;
    box-sizing: border-box;
    accent-color: var(--ink-accent);
}

input:not(:disabled):not([readonly]),
select:not(:disabled),
textarea:not(:disabled):not([readonly]) {
    color: var(--ink);
    -webkit-text-fill-color: var(--ink);
}

textarea {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    font: inherit;
    color: var(--ink);
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--placeholder);
    -webkit-text-fill-color: var(--placeholder);
    opacity: 1;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: var(--placeholder);
    -webkit-text-fill-color: var(--placeholder);
    opacity: 1;
}

select option,
select optgroup {
    color: var(--ink);
    -webkit-text-fill-color: var(--ink);
}

select.is-empty-value {
    color: var(--placeholder);
    -webkit-text-fill-color: var(--placeholder);
}

select.is-empty-value:focus,
select:focus option,
select:focus optgroup {
    color: var(--ink);
    -webkit-text-fill-color: var(--ink);
}

.form-grid input::placeholder,
.form-grid textarea::placeholder,
.form-field input::placeholder,
.form-field textarea::placeholder,
.settings-form input::placeholder,
.settings-form textarea::placeholder,
.form-field input:not(:disabled):not([readonly])::placeholder,
.form-field textarea:not(:disabled):not([readonly])::placeholder,
input:not(:disabled):not([readonly])::placeholder,
textarea:not(:disabled):not([readonly])::placeholder {
    color: var(--placeholder);
    -webkit-text-fill-color: var(--placeholder);
    opacity: 1;
}

input:disabled,
select:disabled,
textarea:disabled,
input[readonly],
textarea[readonly] {
    color: #8a94a0;
    background: #f3f4f6;
    border-color: rgba(31, 41, 51, 0.2);
    -webkit-text-fill-color: #8a94a0;
}

.form-field input:not(:disabled):not([readonly]),
.form-field select:not(:disabled),
.form-field textarea:not(:disabled):not([readonly]) {
    color: var(--ink);
    -webkit-text-fill-color: var(--ink);
}

.form-field input:disabled,
.form-field select:disabled,
.form-field textarea:disabled,
.form-field input[readonly],
.form-field textarea[readonly] {
    color: #8a94a0;
    background: #f3f4f6;
    border-color: rgba(31, 41, 51, 0.2);
    -webkit-text-fill-color: #8a94a0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 2px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(31, 41, 51, 0.08);
}

th {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--surface);
    box-shadow: inset 0 -1px 0 rgba(31, 41, 51, 0.1);
}

tbody tr {
    transition: background-color 160ms ease, transform 160ms ease;
}

tbody tr:hover {
    background: rgba(38, 70, 83, 0.42);
}

.column-picker-slot {
    display: inline-flex;
    position: relative;
    z-index: var(--z-toolbar-widget, 30);
}

.column-picker {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
    z-index: var(--z-toolbar-widget, 30);
}

/* Le filtre doit passer au-dessus de la liste quand le panneau Colonnes est ouvert */
.filter-card,
.table-card:has(.column-picker),
.table-card:has(.column-picker-slot) {
    position: relative;
    z-index: var(--z-filter-card, 25);
}

.filter-card:has(.column-picker-panel:not([hidden])),
.table-card:has(.column-picker-panel:not([hidden])),
.filter-card:has(.column-picker.is-open),
.table-card:has(.column-picker.is-open) {
    z-index: var(--z-filter-card-open, 120);
}

.edit-section-card {
    position: relative;
    padding: 14px 16px;
}

.edit-section-card:has(.column-picker) {
    z-index: var(--z-filter-card, 25);
}

.edit-section-card:has(.column-picker-panel:not([hidden])),
.edit-section-card:has(.column-picker.is-open) {
    z-index: var(--z-filter-card-open, 120);
}

.toolbar-actions .column-picker {
    margin-bottom: 0;
    justify-content: initial;
    flex: 0 0 auto;
}

.column-picker-toggle {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(38, 70, 83, 0.22);
    background: #fff;
    color: var(--ink-accent);
    cursor: pointer;
    font-weight: 700;
}

.column-picker-toggle:hover {
    border-color: rgba(38, 70, 83, 0.4);
    background: rgba(38, 70, 83, 0.04);
}

.column-picker-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: var(--z-dropdown, 5000);
    min-width: 230px;
    max-height: min(320px, 70vh);
    overflow: auto;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(38, 70, 83, 0.2);
    background: #fff;
    box-shadow: 0 14px 28px rgba(38, 70, 83, 0.18);
}

.column-picker-panel.is-ported {
    position: fixed;
    right: auto;
    top: auto;
    margin: 0;
}

.column-picker-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 2px;
    color: var(--ink);
}

.column-picker-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    color: rgba(38, 70, 83, 0.5);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.column-picker-option input[type='checkbox'] {
    min-height: 18px;
    width: 18px;
    margin: 0;
}

.column-picker-move {
    display: inline-flex;
    gap: 4px;
}

.column-move-btn {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(38, 70, 83, 0.25);
    border-radius: 6px;
    background: #fff;
    color: var(--ink-accent);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.column-move-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.column-picker-label {
    white-space: nowrap;
}

thead th.is-column-draggable {
    cursor: grab;
    user-select: none;
}

thead th.is-column-draggable.is-dragging {
    opacity: 0.45;
    cursor: grabbing;
}

thead th.is-column-draggable.is-drop-target {
    background: rgba(97, 192, 168, 0.16);
    box-shadow: inset 0 -2px 0 rgba(38, 70, 83, 0.3);
}

.clickable-row {
    cursor: pointer;
}

thead th.is-column-draggable::after {
    content: ' ?';
    font-size: 0.82em;
    opacity: 0.4;
}

thead th.is-column-draggable.is-sorted-asc::after {
    content: ' ?';
    opacity: 0.85;
}

thead th.is-column-draggable.is-sorted-desc::after {
    content: ' ?';
    opacity: 0.85;
}

.clickable-row.is-selected {
    background: rgba(97, 192, 168, 0.2);
}

.clickable-row.is-selected td {
    border-top: 2px solid rgba(38, 70, 83, 0.55);
    border-bottom: 2px solid rgba(38, 70, 83, 0.55);
}

.clickable-row.is-selected td:first-child {
    border-left: 3px solid rgba(38, 70, 83, 0.78);
}

.clickable-row.is-paid td {
    background: rgba(97, 192, 168, 0.18);
}

.clickable-row.is-paid td:first-child {
    box-shadow: inset 4px 0 0 #1a7d67;
}

.clickable-row.is-paid.is-selected td {
    background: rgba(97, 192, 168, 0.32);
}

.clickable-row.is-paid:hover td {
    background: rgba(97, 192, 168, 0.28);
}

.doc-amount-paid {
    white-space: nowrap;
}

.clickable-row:focus-visible {
    outline: 2px solid rgba(38, 70, 83, 0.7);
    outline-offset: -2px;
    background: rgba(97, 192, 168, 0.15);
}

.row-link,
.row-actions a,
.action-list a {
    color: var(--ink-accent);
    text-decoration: none;
}

.row-actions a,
.row-actions .link-btn,
.row-actions .btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, var(--ink-accent), #3f6d78);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(38, 70, 83, 0.2);
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.row-actions .danger-link,
.row-actions .btn-link.danger-link {
    border-color: rgba(231, 111, 81, 0.26);
    background: rgba(231, 111, 81, 0.1);
    color: #9c3e28;
}

.row-actions a:hover,
.row-actions .link-btn:hover,
.row-actions .btn-link:hover {
    transform: translateY(-1px);
}

.row-actions a.is-disabled,
.row-actions a[aria-disabled='true'],
.row-actions .link-btn.is-disabled,
.row-actions .btn-link.is-disabled,
.row-actions .link-btn[aria-disabled='true'],
.row-actions .btn-link[aria-disabled='true'],
.row-actions .link-btn:disabled,
.row-actions .btn-link:disabled {
    pointer-events: none;
    transform: none;
    box-shadow: none;
    background: #9eb2b9;
    color: #edf2f4;
    border-color: transparent;
    -webkit-text-fill-color: #edf2f4;
}

.inline-contact-link {
    color: var(--ink-accent);
    text-decoration: none;
    font-weight: 700;
}

.inline-contact-link:hover {
    text-decoration: underline;
}

.row-link strong {
    color: inherit;
}

.row-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.empty-state {
    color: var(--muted);
    text-align: center;
}

.list-progress {
    display: flex;
    justify-content: center;
    padding: 14px 18px 2px;
    color: var(--muted);
    font-size: 0.92rem;
}

.list-progress.is-hidden {
    display: none;
}

.list-progress.is-loading::after {
    content: ' ...';
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-actif,
.status-vip {
    background: rgba(97, 192, 168, 0.16);
    color: #1a7d67;
}

.status-relance,
.status-en-attente,
.status-a-verifier {
    background: rgba(233, 196, 106, 0.2);
    color: #8b6400;
}

.status-bloque {
    background: rgba(231, 111, 81, 0.16);
    color: #9c3e28;
}

.side-panel {
    display: grid;
    gap: 18px;
}

.side-card {
    padding: 24px;
}

.warm-tone {
    background: linear-gradient(180deg, rgba(231, 111, 81, 0.13), rgba(255, 252, 247, 0.94));
}

.action-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 18px 0 0;
    list-style: none;
}

.action-list li,
.risk-item {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(31, 41, 51, 0.06);
}

.risk-item + .risk-item {
    margin-top: 12px;
}

.risk-item strong {
    display: block;
    margin-bottom: 6px;
}

.shell-narrow {
    width: min(1080px, calc(100% - 32px));
}

.hero-card-compact h1 {
    max-width: none;
    font-size: clamp(2rem, 3vw, 3.2rem);
}

.form-card,
.detail-card {
    background: var(--surface);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.form-card {
    margin-top: 22px;
    padding: 24px;
    overflow: visible;
}

.filter-card,
.article-grid-shell,
.document-grid-shell {
    margin-top: 22px;
}

.customer-form,
.inline-form {
    margin: 0;
}

.inline-form {
    display: inline;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.field-wide {
    grid-column: 1 / -1;
}

.form-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink-base);
    margin: 0.25rem 0 0.5rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-light);
    grid-column: 1 / -1;
}

.form-subsection {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-subsection-title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted, #6b7280);
}

.form-subsection-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.form-grid-tight {
    gap: 12px;
}

.field-hint {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.82rem;
    color: var(--ink-muted, #6b7280);
    line-height: 1.35;
}

.field-required {
    color: #c0392b;
}

.address-geo-block {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
}

.address-geo-block--nested {
    margin-top: 0.15rem;
}

.address-geo-block--nested .address-geo-row {
    gap: 12px;
}

.address-geo-block--vat-only .address-geo-row-country-vat {
    grid-template-columns: minmax(0, 280px);
}

.address-geo-block--doc-inline {
    width: 100%;
}

.address-geo-block--doc-inline .address-geo-row-zip-city {
    grid-template-columns: minmax(110px, 0.45fr) minmax(0, 1fr);
}

.address-geo-row {
    display: grid;
    gap: 16px;
    align-items: start;
}

.address-geo-row-zip-city {
    grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
}

.address-geo-row-country-vat {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.address-geo-block label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.address-geo-vat-field.is-field-muted select,
.address-geo-vat-field.is-field-muted input {
    opacity: 0.55;
    background: #f3f4f6;
    cursor: not-allowed;
}

.address-geo-hint {
    display: block;
    margin: 0;
    color: #6b7280;
    font-size: 0.82rem;
    line-height: 1.35;
}

.address-geo-hint[hidden] {
    display: none !important;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.detail-grid > .detail-card {
    margin-top: 0;
}

.detail-grid > .detail-card:only-child {
    grid-column: 1 / -1;
}

.detail-card {
    margin-top: 22px;
    padding: 24px;
}

.detail-card > .detail-list,
.detail-card > .detail-bullet-list,
.detail-card > .notes-copy,
.detail-card > .marketing-timeline,
.detail-card > pre.notes-copy,
.detail-card .tab-panel > .detail-list,
.detail-card .tab-panel > .notes-copy {
    width: 100%;
    max-width: none;
}

.detail-card-wide {
    margin-top: 22px;
}

.customer-sheet-heading {
    align-items: start;
}

.customer-sheet-summary {
    margin-top: 10px;
    max-width: 72ch;
}

.customer-sheet-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
    align-items: start;
}

.customer-sheet-hero {
    display: grid;
    gap: 18px;
}

.customer-sheet-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.customer-hero-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin: 0;
    width: 100%;
}

.customer-hero-list div {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
}

.customer-hero-list dt {
    margin-bottom: 6px;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.customer-hero-list dd {
    margin: 0;
    color: var(--ink);
    line-height: 1.6;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin: 16px 0 0;
    width: 100%;
}

.detail-list div {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.74);
}

.detail-list dt {
    margin-bottom: 6px;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.detail-list dd,
.notes-copy {
    margin: 0;
    color: var(--ink);
    line-height: 1.6;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.metric-tile {
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow);
}

.metric-tile span,
.metric-tile small {
    display: block;
}

.metric-tile strong {
    display: block;
    margin: 8px 0 6px;
    font-size: 1.8rem;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.empty-panel {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.76);
    border: 1px dashed rgba(38, 70, 83, 0.16);
    color: var(--muted);
}

.table-summary {
    color: var(--muted);
    margin: 6px 0 0;
}

.filter-card-compact {
    padding: 16px 18px;
}

.filter-card .toolbar-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.filter-card-compact .table-toolbar {
    margin-bottom: 0;
    gap: 12px;
    min-width: 0;
}

.filter-card-compact .section-label {
    margin-bottom: 4px;
}

.filter-card-compact .table-summary {
    margin-top: 0;
    font-size: 0.92rem;
}

.filter-card-compact input,
.filter-card-compact select {
    min-height: 40px;
}

.filter-card-compact .toolbar-submit {
    min-height: 40px;
}

.table-subcopy {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.settings-tabs {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
    overflow-x: auto;
}
.settings-tab {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.settings-tab:hover {
    color: #111827;
    border-bottom-color: #d1d5db;
}
.settings-tab.is-active {
    color: #111827;
    border-bottom-color: #111827;
}

.mail-subtabs {
    margin: 0 0 1.5rem;
}

.mail-tab-panel {
    min-height: 12rem;
}

.mail-templates-grid {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.mail-templates-grid #mail-template-selector {
    min-height: 220px;
}

.mail-save-bar {
    display: flex;
    gap: 12px;
    margin-top: 2rem;
}

.mail-info-box {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    padding: 16px;
    border-radius: 8px;
}

.mail-info-box-neutral {
    background: #f8fafc;
    border-color: #cbd5e1;
    margin-top: 16px;
}

.mail-info-box ul {
    margin: 12px 0 0 20px;
}

.mail-info-box ul li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.mail-info-box a {
    color: #1d4ed8;
    font-weight: 600;
}

.mail-info-box code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.85em;
}

.mail-test-result {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.mail-test-result.is-success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.mail-test-result.is-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.mail-test-result p {
    margin: 0 0 0.65rem;
}

.mail-test-result p:last-child {
    margin-bottom: 0;
}

.mail-test-help-link {
    display: inline-block;
    font-weight: 700;
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 720px) {
    .mail-templates-grid {
        grid-template-columns: 1fr;
    }
}

.access-admin-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.access-admin-page .access-hero {
    margin-bottom: 20px;
}

.access-hero-actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(38, 70, 83, 0.1);
}

.access-hero-actions-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.access-hero-stats {
    display: grid;
    grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.access-stat-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(38, 70, 83, 0.12);
    background: rgba(255, 255, 255, 0.72);
}

.access-stat-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.access-stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.access-stat-value {
    font-size: 1.35rem;
    line-height: 1.2;
    color: var(--ink-accent);
}

.access-stat-card-wide .access-stat-value {
    font-size: 0.98rem;
    word-break: break-word;
}

.access-workspace {
    padding: 18px 20px 22px;
}

.access-tabs {
    margin-bottom: 18px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(38, 70, 83, 0.1);
}

.access-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(38, 70, 83, 0.1);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.6;
}

.tab-btn.is-active .access-tab-count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.access-tab-panel {
    animation: access-tab-in 0.18s ease;
}

.access-tab-panel[hidden] {
    display: none !important;
}

@keyframes access-tab-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.access-panel-intro {
    margin-bottom: 18px;
}

.access-panel-intro h2 {
    margin: 0 0 6px;
    font-size: 1.2rem;
    color: var(--ink-accent);
}

.access-panel-form {
    max-width: 760px;
}

.access-form-grid {
    gap: 14px 16px;
}

.access-form-grid-compact {
    max-width: 560px;
}

.access-table-wrap {
    border: 1px solid rgba(38, 70, 83, 0.1);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.55);
}

.access-users-table th {
    background: rgba(38, 70, 83, 0.04);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.access-users-table td {
    vertical-align: middle;
}

.access-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.access-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(38, 70, 83, 0.14), rgba(38, 70, 83, 0.06));
    color: var(--ink-accent);
    font-weight: 800;
    flex-shrink: 0;
}

.access-user-meta {
    display: grid;
    gap: 2px;
}

.access-user-meta strong {
    font-size: 0.98rem;
}

.access-user-email {
    font-size: 0.84rem;
    color: var(--muted);
}

.access-dossier-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 280px;
}

.access-dossier-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(38, 70, 83, 0.08);
    color: var(--ink-accent);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.access-role-pill {
    white-space: nowrap;
}

.access-role-pill-super-admin {
    background: rgba(124, 58, 237, 0.12);
    color: #5b21b6;
}

.access-role-pill-admin {
    background: rgba(13, 148, 136, 0.12);
    color: #0f766e;
}

.access-role-pill-user {
    background: rgba(38, 70, 83, 0.1);
    color: var(--ink-accent);
}

.access-role-pill-readonly {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.access-row-actions {
    text-align: right;
    white-space: nowrap;
}

.access-row-actions-inner {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.access-delete-inline-form {
    margin: 0;
}

.access-delete-btn {
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.25);
}

.access-delete-btn:hover {
    background: rgba(185, 28, 28, 0.06);
}

.access-delete-hint {
    margin-top: 10px;
    max-width: 52ch;
}

.access-edit-page {
    padding-top: 4px;
}

.access-edit-header {
    margin-bottom: 12px;
}

.access-edit-back {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--ink-accent);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.access-edit-back:hover {
    text-decoration: underline;
}

.access-edit-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.access-edit-page h1 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.2;
    max-width: none;
}

.access-edit-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.access-edit-card {
    margin-top: 0;
    padding: 16px 18px 14px;
}

.access-edit-grid {
    gap: 12px 14px;
}

.access-edit-grid label span,
.access-edit-grid .field-label {
    font-size: 0.82rem;
}

.access-edit-grid input,
.access-edit-grid select {
    min-height: 38px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.access-edit-toggle-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
}

.access-edit-dossiers {
    margin-top: 2px;
}

.access-dossier-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 8px;
}

.access-dossier-option-compact {
    padding: 8px 10px;
    border-radius: 12px;
    gap: 2px 8px;
}

.access-dossier-option-compact span {
    font-size: 0.92rem;
}

.access-dossier-option-compact small {
    font-size: 0.75rem;
}

.access-edit-new-dossier small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
}

.access-edit-actions {
    margin-top: 14px;
    padding-top: 0;
}

.access-edit-danger {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(38, 70, 83, 0.1);
}

.access-edit-danger .access-delete-hint {
    margin: 0;
    max-width: none;
    font-size: 0.84rem;
}

.access-edit-danger .access-delete-form {
    margin-top: 0;
}

.access-empty-panel {
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: 28px 8px;
}

.access-hero {
    margin-bottom: 24px;
}

.access-existing-dossier-card {
    margin-bottom: 24px;
}

.access-existing-dossier-grid {
    max-width: 640px;
}

.access-card-head {
    margin-bottom: 18px;
}

.access-dossier-grid {
    display: grid;
    gap: 10px;
}

.access-dossier-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #faf9f7;
    cursor: pointer;
}

.access-dossier-option input {
    margin: 0;
}

.access-dossier-option small {
    grid-column: 2;
    color: var(--muted);
}

.access-new-dossier-block {
    padding: 16px;
    border-radius: 16px;
    border: 1px dashed #c9bfb0;
    background: #fffdf8;
}

.access-new-dossier-block small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.access-delete-form {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #ece8e1;
}

.ui-toggle-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.ui-toggle-field.is-compact {
    gap: 8px 10px;
}

.ui-toggle-label {
    font-weight: 600;
    color: var(--ink);
}

.ui-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 46px;
    height: 26px;
}

.ui-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ui-toggle-track {
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: #d8d2c8;
    transition: background 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ui-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
}

.ui-toggle-input:checked + .ui-toggle-track {
    background: #61c0a8;
}

.ui-toggle-input:checked + .ui-toggle-track::after {
    transform: translateX(20px);
}

.ui-toggle-input:focus-visible + .ui-toggle-track {
    outline: 2px solid #61c0a8;
    outline-offset: 2px;
}

.ui-toggle-state {
    font-size: 0.92rem;
    color: var(--muted);
    min-width: 4.5rem;
}

.ui-toggle-field.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.dossier-pick-hero {
    margin-bottom: 20px;
}

.dossier-pick-grid {
    display: grid;
    gap: 12px;
}

.dossier-pick-item {
    margin: 0;
}

.dossier-pick-btn {
    width: 100%;
    display: grid;
    gap: 4px;
    text-align: left;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dossier-pick-btn:hover {
    border-color: #61c0a8;
    box-shadow: 0 10px 24px rgba(97, 192, 168, 0.14);
    transform: translateY(-1px);
}

.dossier-pick-btn strong {
    font-size: 1.05rem;
}

.dossier-pick-btn .mono {
    color: var(--muted);
    font-size: 0.88rem;
}

.dossier-pick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #ece8e1;
}

.sidebar-dossier-current strong {
    color: #fff;
    font-size: 0.98rem;
}

.customer-status-toggle {
    margin: 0;
}

.status-pill-ok {
    background: rgba(97, 192, 168, 0.16);
    color: #1a7d67;
}

.status-pill-muted {
    background: rgba(107, 114, 128, 0.14);
    color: #4b5563;
}

.text-muted {
    color: var(--muted);
}

@media (max-width: 1080px) {
    .access-admin-layout {
        grid-template-columns: 1fr;
    }

    .access-hero-stats {
        grid-template-columns: 1fr;
    }
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
}

.page-heading h1 {
    max-width: none;
    font-size: clamp(2rem, 3vw, 3rem);
}

.page-heading-inline {
    flex-wrap: wrap;
}

.page-heading-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mono {
    font-family: Consolas, 'Courier New', monospace;
}

.pill-flag {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(38, 70, 83, 0.08);
    color: var(--ink-accent);
    font-size: 0.85rem;
    font-weight: 700;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.article-grid.is-list {
    grid-template-columns: 1fr;
}

.article-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    padding: 22px;
    border-radius: var(--radius-xl);
    background: var(--surface);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow);
}

.article-card-head,
.article-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.article-code {
    color: var(--muted);
    font-size: 0.88rem;
}

.article-card-body {
    display: grid;
    gap: 14px;
}

.article-title {
    font-size: 1.15rem;
}

.article-subtitle {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.article-meta-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin: 0;
    width: 100%;
}

.article-meta-list div {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.74);
}

.article-meta-list dt {
    margin-bottom: 6px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.article-meta-list dd {
    margin: 0;
    color: var(--ink);
    line-height: 1.5;
}

.article-list-card,
.customer-list-card,
.prospect-list-card,
.document-list-card,
.website-list-card {
    margin-top: var(--list-page-block-gap, 22px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    z-index: var(--z-list-card, 1);
}

.article-list-card .table-wrap,
.customer-list-card .table-wrap,
.prospect-list-card .table-wrap,
.document-list-card .table-wrap,
.website-list-card .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 0 0 calc(var(--radius-xl) - 6px) calc(var(--radius-xl) - 6px);
}

.article-list-card .list-progress,
.customer-list-card .list-progress,
.prospect-list-card .list-progress,
.document-list-card .list-progress,
.website-list-card .list-progress {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 1);
    z-index: 40;
    padding: 6px 0;
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.document-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    padding: 22px;
    border-radius: var(--radius-xl);
    background: var(--surface);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow);
}

.document-card-head,
.document-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.document-code {
    color: var(--muted);
    font-size: 0.88rem;
}

.document-card-body {
    display: grid;
    gap: 14px;
}

.document-title {
    font-size: 1.15rem;
}

.document-subtitle {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.document-meta-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin: 0;
    width: 100%;
}

.document-meta-list div {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.74);
}

.document-meta-list dt {
    margin-bottom: 6px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.document-meta-list dd {
    margin: 0;
    color: var(--ink);
    line-height: 1.5;
}

.document-header-grid,
.document-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.document-footer-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
}

.document-lines-card {
    margin-top: 22px;
}

.document-sticky-actions,
.sticky-actions {
    position: fixed;
    left: calc(280px + 16px);
    right: 16px;
    bottom: 10px;
    z-index: var(--z-sticky-actions, 80);
    margin-top: 0;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(38, 70, 83, 0.22);
    background: rgba(255, 253, 248, 1);
    box-shadow: 0 -8px 20px rgba(31, 41, 51, 0.12);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.document-sticky-actions-buttons,
.sticky-actions-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 100%;
}

.is-disabled {
    pointer-events: none;
}

a.primary-action.is-disabled,
a.secondary-action.is-disabled,
button.primary-action.is-disabled,
button.secondary-action.is-disabled,
a.btn-primary.is-disabled,
button.btn-primary.is-disabled,
button.toolbar-submit.is-disabled,
a.primary-action[aria-disabled='true'],
a.secondary-action[aria-disabled='true'],
button.primary-action:disabled,
button.secondary-action:disabled,
button.btn-primary:disabled,
button.toolbar-submit:disabled {
    opacity: 1;
    box-shadow: none;
    transform: none;
    background: #9eb2b9;
    color: #edf2f4;
    border-color: transparent;
    -webkit-text-fill-color: #edf2f4;
}

a.primary-action.is-disabled:hover,
a.secondary-action.is-disabled:hover,
button.primary-action.is-disabled:hover,
button.secondary-action.is-disabled:hover,
a.btn-primary.is-disabled:hover,
button.btn-primary.is-disabled:hover,
button.toolbar-submit.is-disabled:hover,
a.primary-action[aria-disabled='true']:hover,
a.secondary-action[aria-disabled='true']:hover,
button.primary-action:disabled:hover,
button.secondary-action:disabled:hover,
button.btn-primary:disabled:hover,
button.toolbar-submit:disabled:hover {
    transform: none;
}

.doc-edit-summary {
    margin-top: 14px;
    padding: 12px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.doc-edit-section-title {
    margin-bottom: 10px;
}

.form-row-spaced {
    margin-top: 10px;
}

/* ?? Compact document detail (Odoo-style) ????????????????????? */
.doc-header-card {
    margin-top: 16px;
    padding: 18px 22px;
}

.doc-header-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

.doc-header-client {
    flex: 1 1 220px;
    min-width: 0;
}

.doc-header-info {
    flex: 0 1 160px;
    min-width: 0;
}

.doc-header-amount {
    flex: 0 1 160px;
    min-width: 0;
}

.doc-header-badges {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: center;
    margin-left: auto;
}

.doc-header-name {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.doc-header-addr {
    margin: 2px 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.4;
}

.doc-header-code {
    margin: 2px 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.doc-amount-value {
    display: block;
    font-size: 1.4rem;
    color: var(--ink-accent);
    margin-bottom: 2px;
}

.doc-footer-card {
    margin-top: 16px;
    padding: 14px 22px;
}

.doc-footer-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
}

.doc-footer-note {
    flex: 1;
    color: var(--muted);
    font-size: 0.92rem;
    margin: 0;
}

.doc-totals {
    display: flex;
    gap: 28px;
    margin: 0;
    align-items: baseline;
}

.doc-totals div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.doc-totals dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.doc-totals dd {
    margin: 0;
    font-weight: 700;
    color: var(--ink);
}

.doc-total-main {
    font-size: 1.2rem;
    color: var(--ink-accent);
}

.document-lines-card {
    margin-top: 16px;
    padding: 16px 22px;
}

/* ?? Boutton edit dans bandeau doc ????????????????????? */
.btn-edit-doc {
    display: inline-block;
    margin-top: 6px;
    padding: 5px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1.5px solid var(--ink-accent);
    color: var(--ink-accent);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.btn-edit-doc:hover {
    background: var(--ink-accent);
    color: #fff;
}

/* ?? Formulaire d'?dition document ????????????????????? */
.edit-form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.doc-edit-primary-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 18px;
    align-items: start;
}

.doc-edit-primary-card {
    padding: 14px 16px;
}

.doc-edit-subsection {
    flex: 1 1 0;
    max-width: calc((100% - 36px) / 3);
    min-width: 0;
}

.doc-readonly-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.doc-readonly-field {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
}

.doc-readonly-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}

.doc-readonly-value {
    color: var(--ink);
    font-size: 0.95rem;
}

.third-picker-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.doc-edit-subsection .form-row-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.doc-edit-subsection .form-row-2,
.doc-edit-subsection .form-row-3 {
    gap: 8px;
}

.doc-edit-subsection .form-row-2 {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
}

.doc-edit-subsection .form-row-zip-city {
    grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
}

.doc-edit-subsection .form-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.doc-edit-subsection .form-field input,
.doc-edit-subsection .form-field select {
    min-height: 32px;
    padding: 4px 8px;
    font-size: 0.88rem;
}

.doc-edit-subsection + .doc-edit-subsection {
    border-left: 1px solid var(--border);
    padding-left: 16px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    align-items: start;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: start;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-field.form-field-wide {
    grid-column: span 1;
}

.form-field label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.form-field input,
.form-field select,
.form-field textarea {
    min-height: 38px;
    padding: 5px 9px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    transition: border-color 0.15s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--ink-accent);
}

.edit-form-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 2px 0 10px;
    flex-wrap: wrap;
}

.edit-form-actions .js-dirty-only[hidden],
.edit-form-actions:not(.is-dirty) .js-dirty-only {
    display: none !important;
}

.edit-form-actions.is-dirty .js-dirty-only {
    display: inline-flex !important;
}

.edit-form-actions kbd {
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.12);
    font-size: 0.72em;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.doc-audit-list {
    margin: 0;
    padding-left: 18px;
    color: var(--ink-muted, #5b6b73);
    font-size: 0.92rem;
    line-height: 1.45;
}

.doc-audit-list li + li {
    margin-top: 4px;
}

.article-ac-table .ac-stock {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.article-stock-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(38, 70, 83, 0.14);
    background: rgba(42, 157, 143, 0.06);
}

.article-stock-summary-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    flex: 1 1 280px;
}

.article-stock-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 4.5rem;
}

.article-stock-metric-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-muted, #5b6b73);
}

.article-stock-metric-value {
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink, #264653);
}

.article-stock-metric.is-term .article-stock-metric-label,
.article-stock-metric.is-term .article-stock-metric-value {
    color: var(--ink-accent, #2a9d8f);
}

.stock-breakdown-card {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(38, 70, 83, 0.14);
    background: rgba(38, 70, 83, 0.04);
}

.stock-breakdown-list {
    display: grid;
    gap: 8px;
    margin: 10px 0 8px;
}

.stock-breakdown-list > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
}

.stock-breakdown-list dt {
    color: var(--ink-muted, #5b6b73);
    font-weight: 600;
}

.stock-breakdown-list dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.stock-breakdown-list .is-emphasis {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(38, 70, 83, 0.16);
}

.stock-breakdown-list .is-emphasis dt,
.stock-breakdown-list .is-emphasis dd {
    color: var(--ink-accent);
}

/* ?? Lines edit table ?????????????????????????????????? */
.lines-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.print-hide {
    display: flex;
}

.lines-edit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.lines-edit-table th {
    text-align: left;
    padding: 7px 8px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    border-bottom: 1.5px solid var(--border);
    white-space: nowrap;
}

.lines-edit-table td {
    padding: 2px 3px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light, #f0f0f0);
    background: #fff;
}

.lines-edit-table th.col-drag  { width: 28px; }
.lines-edit-table th.col-artid { width: 130px; }
.lines-edit-table th.col-num   { width: 90px; }
.lines-edit-table th.col-vat   { width: 68px; }
.lines-edit-table th.col-amt   { width: 110px; text-align: right; }
.lines-edit-table th.col-del   { width: 36px; }

.line-drag-cell {
    text-align: center;
    width: 28px;
    padding-left: 2px !important;
    padding-right: 2px !important;
}

.line-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #9aa3af;
    cursor: grab;
    font-size: 0.75rem;
    letter-spacing: -2px;
    line-height: 1;
    user-select: none;
}

.line-drag-handle:hover {
    background: rgba(38, 70, 83, 0.08);
    color: var(--ink-accent);
}

.line-drag-handle:active {
    cursor: grabbing;
}

.lines-edit-table tr.line-row.is-dragging {
    opacity: 0.55;
    background: #f0f7fa;
}

.lines-edit-table tr.line-row.is-drag-over {
    box-shadow: inset 0 2px 0 0 var(--ink-accent);
}

.lines-edit-table td.line-computed {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    padding-right: 8px;
    white-space: nowrap;
}

.line-in {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 31px;
    height: 31px;
    padding: 2px 6px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
    line-height: 1.2;
}

.line-in:focus {
    outline: none;
    border-color: var(--ink-accent);
}

.line-in-num {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 31px;
    height: 31px;
    padding: 2px 4px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    font-size: 0.85rem;
    font-family: inherit;
    text-align: right;
    background: #fff;
    color: var(--ink);
    line-height: 1.2;
}

.line-in-num:focus {
    outline: none;
    border-color: var(--ink-accent);
}

.lines-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add-line,
.btn-del-last-line {
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-add-line {
    border: 1.5px dashed var(--ink-accent);
    color: var(--ink-accent);
}

.btn-add-line kbd {
    display: inline-block;
    padding: 1px 5px;
    font-size: 0.75rem;
    font-family: inherit;
    border: 1px solid currentColor;
    border-radius: 4px;
    opacity: 0.7;
}

.btn-add-line:hover {
    background: color-mix(in srgb, var(--ink-accent) 8%, transparent);
}

.btn-del-last-line {
    border: 1.5px dashed #b91c1c;
    color: #b91c1c;
}

.btn-del-last-line:hover {
    background: #fee2e2;
}

.article-create-prompt {
    position: fixed;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-strong);
    border: 2px solid var(--ink-accent);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    z-index: 2000;
    font-size: 0.9rem;
    white-space: nowrap;
}

.article-create-prompt[hidden] {
    display: none !important;
}

.article-ac-wrap {
    position: relative;
}

.article-ac-dropdown {
    position: fixed;
    left: 0;
    top: 0;
    min-width: min(520px, 80vw);
    max-height: 260px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
    z-index: var(--z-dropdown, 5000);
}

.article-ac-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.article-ac-table th,
.article-ac-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.article-ac-table th {
    position: sticky;
    top: 0;
    background: #f6f8f9;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.article-ac-table tbody tr {
    cursor: pointer;
}

.article-ac-table tbody tr:hover,
.article-ac-table tbody tr.is-focused {
    background: #f1f8ff;
}

.article-ac-table .ac-price {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.article-ac-table .ac-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--ink-accent);
}

.third-picker-table tbody tr:not(.third-picker-empty-row) {
    cursor: pointer;
}

.third-picker-table tbody tr:not(.third-picker-empty-row):hover {
    background: #f5faf8;
}

.btn-del-line {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 4px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-del-line:hover {
    background: #fca5a5;
}

.lines-total-bar {
    margin-top: 12px;
    text-align: right;
    padding: 10px 8px 4px;
    font-size: 0.92rem;
    color: var(--muted);
    border-top: 1.5px solid var(--border);
}

.lines-total-bar strong {
    font-size: 1.15rem;
    color: var(--ink-accent);
    margin-left: 6px;
}

/* KBO/BCE Search Modal */
.kbo-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal, 9000);
    background: rgba(0, 0, 0, 0.3);
}

.kbo-modal[hidden] {
    display: none !important;
}

.kbo-backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.kbo-panel {
    position: relative;
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    max-width: 900px;
    width: calc(100% - 32px);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kbo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

.kbo-head h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.kbo-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kbo-close:hover {
    color: var(--ink);
}

.kbo-search-box {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.4);
}

.kbo-search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
}

.kbo-search-box button {
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
}

.kbo-results {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.kbo-loading,
.kbo-error,
.kbo-empty {
    padding: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.kbo-loading {
    color: var(--muted);
}

.kbo-error {
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 6px;
}

.kbo-empty {
    color: var(--muted);
}

.kbo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.kbo-table thead {
    background: rgba(38, 70, 83, 0.06);
    border-bottom: 1px solid var(--line);
}

.kbo-table th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: var(--ink-accent);
}

.kbo-table td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
}

.kbo-table td button {
    padding: 6px 12px;
    font-size: 0.85rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.kbo-table td button:hover {
    background: var(--mint);
    color: #fff;
    border-color: var(--mint);
}

.company-autocomplete-wrap {
    position: relative;
    z-index: 1;
}

.company-autocomplete-wrap:focus-within {
    z-index: var(--z-dropdown, 5000);
}

.company-autocomplete {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: var(--z-dropdown, 5000);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
    max-height: 280px;
    overflow-y: auto;
}

/* Empêche la carte suivante (ex. Message) de recouvrir la liste déroulante */
.detail-card:has(.company-autocomplete-wrap:focus-within),
.detail-card:has(.company-autocomplete:not([hidden])) {
    position: relative;
    z-index: var(--z-dropdown, 5000);
}

.company-ac-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border-light);
    background: #fff;
    text-align: left;
    padding: 9px 10px;
    cursor: pointer;
}

.company-ac-item:last-child {
    border-bottom: none;
}

.company-ac-item:hover,
.company-ac-item.is-selected {
    background: color-mix(in srgb, var(--mint) 16%, #fff);
}

.company-ac-name {
    font-weight: 700;
    color: var(--ink-accent);
}

.company-ac-meta {
    font-size: 0.82rem;
    color: var(--muted);
}

.ticket-customer-ac-empty {
    margin: 0;
    padding: 10px 12px;
    font-size: 0.88rem;
    color: var(--muted);
}

.third-picker-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 9000);
}

.third-picker-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 30, 40, 0.45);
}

.third-picker-panel {
    position: relative;
    width: min(940px, calc(100% - 32px));
    margin: 42px auto;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 84px);
}

.third-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.third-picker-head h2 {
    margin: 0;
    font-size: 1.1rem;
}

.third-picker-close {
    border: 0;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
}

.third-picker-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.third-picker-results-wrap {
    overflow: auto;
    padding: 0 16px 12px;
}

.third-picker-table th,
.third-picker-table td {
    background: #fff;
}

.third-picker-actions {
    text-align: right;
}

.third-picker-empty .primary-action.is-compact {
    margin-top: 10px;
}

.third-picker-table tbody tr.is-focused {
    background: #f1f8ff;
    outline: 2px solid var(--ink-accent);
    outline-offset: -2px;
}

.third-picker-table tbody tr.is-focused .third-picker-use {
    transform: translateY(-1px);
}

.transform-qty-hint {
    margin: 0;
    padding: 0 16px 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.transform-qty-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
}

#transform-qty-modal .transform-qty-input {
    width: 5.5rem;
    min-height: 31px;
    text-align: right;
}

.pill-flag-link {
    text-decoration: none;
    color: inherit;
    border-color: var(--ink-accent, #4a9a45);
    background: rgba(74, 154, 69, 0.08);
}

.pill-flag-link:hover {
    background: rgba(74, 154, 69, 0.16);
}

.doc-linked-card .doc-linked-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.line-in-num.is-readonly-qty {
    background: #f3f5f7;
    color: #3e4c59;
    font-weight: 600;
}

.pill-flag-warn {
    background: rgba(180, 120, 20, 0.14);
    border-color: rgba(180, 120, 20, 0.35);
    color: #8a5a10;
}

.edit-form-grid.is-locked input:not([name="status"]):not([type="hidden"]),
.edit-form-grid.is-locked textarea,
.edit-form-grid.is-locked select:not([name="status"]) {
    opacity: 0.85;
    cursor: default;
}

#transform-qty-modal .transform-supplier-select {
    min-width: 10rem;
    max-width: 16rem;
}

.third-picker-empty {
    text-align: center;
    color: var(--muted);
    padding: 14px;
}

@media (max-width: 720px) {
    .address-geo-row-zip-city,
    .address-geo-row-country-vat {
        grid-template-columns: 1fr;
    }

    .form-grid.form-grid-tight {
        grid-template-columns: 1fr;
    }

    .address-geo-block--vat-only .address-geo-row-country-vat {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .doc-edit-primary-grid {
        display: flex;
        flex-direction: column;
    }

    .doc-edit-subsection + .doc-edit-subsection {
        border-left: 0;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 12px;
    }

    .doc-edit-subsection {
        max-width: none;
    }

    .doc-readonly-grid {
        grid-template-columns: 1fr;
    }

    .third-picker-panel {
        width: min(940px, calc(100% - 16px));
        margin: 12px auto;
        max-height: calc(100vh - 24px);
    }

    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .document-sticky-actions,
    .sticky-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

.document-detail-stack {
    margin-top: 22px;
}

.document-detail-stack.is-embedded {
    padding-top: 4px;
}

.mobile-topbar,
.mobile-nav-overlay {
    display: none;
}

@media (max-width: 1080px) {
    .app-layout,
    .app-layout.is-sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 90;
        margin: -4px -4px 12px;
        padding: 8px 4px 10px;
        background: rgba(252, 249, 242, 0.94);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-light);
    }

    .mobile-topbar-title {
        font-family: 'Space Grotesk', sans-serif;
        font-size: 1rem;
        font-weight: 700;
        color: var(--ink-accent);
    }

    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface-strong);
        color: var(--ink-accent);
        cursor: pointer;
        flex-shrink: 0;
    }

    .mobile-nav-toggle-icon,
    .mobile-nav-toggle-icon::before,
    .mobile-nav-toggle-icon::after {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .mobile-nav-toggle-icon {
        position: relative;
    }

    .mobile-nav-toggle-icon::before,
    .mobile-nav-toggle-icon::after {
        content: '';
        position: absolute;
        left: 0;
    }

    .mobile-nav-toggle-icon::before {
        top: -6px;
    }

    .mobile-nav-toggle-icon::after {
        top: 6px;
    }

    .is-mobile-nav-open .mobile-nav-toggle-icon {
        background: transparent;
    }

    .is-mobile-nav-open .mobile-nav-toggle-icon::before {
        transform: translateY(6px) rotate(45deg);
    }

    .is-mobile-nav-open .mobile-nav-toggle-icon::after {
        transform: translateY(-6px) rotate(-45deg);
    }

    .mobile-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 200;
        background: rgba(12, 18, 24, 0.52);
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms ease;
    }

    .app-layout.is-mobile-nav-open .mobile-nav-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(292px, 88vw);
        height: 100dvh;
        z-index: 210;
        padding: 12px;
        transform: translateX(-108%);
        transition: transform 220ms ease;
    }

    .app-layout.is-mobile-nav-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-inner {
        height: 100%;
        max-height: 100dvh;
    }

    .sidebar-collapse-toggle {
        display: none;
    }

    .is-sidebar-collapsed .sidebar-brand-copy,
    .is-sidebar-collapsed .sidebar-group-title,
    .is-sidebar-collapsed .sidebar-link-label,
    .is-sidebar-collapsed .sidebar-footer-card,
    .is-sidebar-collapsed .sidebar-badge {
        display: revert;
    }

    .is-sidebar-collapsed .sidebar-link {
        justify-content: flex-start;
        padding: 0 12px;
    }

    .is-sidebar-collapsed .sidebar-link:has(.sidebar-badge)::after {
        content: none;
    }

    body.is-mobile-nav-open {
        overflow: hidden;
    }

    .has-sticky-toolbar:not(.has-sticky-scroll) {
        height: auto;
        max-height: none;
        overflow: visible;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .has-sticky-toolbar:not(.has-sticky-scroll) > .article-list-card,
    .has-sticky-toolbar:not(.has-sticky-scroll) > .customer-list-card,
    .has-sticky-toolbar:not(.has-sticky-scroll) > .prospect-list-card,
    .has-sticky-toolbar:not(.has-sticky-scroll) > .document-list-card,
    .has-sticky-toolbar:not(.has-sticky-scroll) > .website-list-card,
    .has-sticky-toolbar:not(.has-sticky-scroll) > .document-grid-shell.document-list-empty {
        flex: 1 1 auto;
        min-height: 280px;
        max-height: min(72vh, 760px);
    }

    .stats-grid,
    .workspace-grid,
    .hero-card,
    .customer-sheet-grid,
    .detail-grid,
    .metric-strip,
    .meta-grid,
    .document-header-grid,
    .document-footer-grid {
        grid-template-columns: 1fr;
    }

    .table-toolbar,
    .toolbar-actions,
    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar-actions-wide .search-box,
    .toolbar-actions-wide .select-box {
        flex: 1 1 100%;
    }

    .toolbar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .table-wrap {
        -webkit-overflow-scrolling: touch;
    }

    .article-list-card .table-wrap table,
    .customer-list-card .table-wrap table,
    .prospect-list-card .table-wrap table,
    .document-list-card .table-wrap table,
    .website-list-card .table-wrap table {
        min-width: 720px;
    }

    .website-list-card .table-wrap table {
        min-width: 980px;
    }

    .document-sticky-actions,
    .sticky-actions {
        left: 10px;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom, 0px));
    }

    .website-show-hero,
    .ticket-show-hero,
    .page-heading-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .website-show-hero-actions,
    .page-heading-actions {
        width: 100%;
    }

    .website-document-picker-row {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 720px) {
    .shell {
        width: min(100% - 16px, 1280px);
        padding-top: 12px;
        padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    }

    .shell.shell-narrow {
        width: min(100% - 16px, 720px);
    }

    .sidebar {
        padding: 10px;
    }

    .sidebar-inner {
        padding: 16px 14px;
        border-radius: 22px;
    }

    .hero-card,
    .table-card,
    .side-card,
    .stat-card {
        padding: 16px;
        border-radius: 20px;
    }

    h1 {
        max-width: none;
        line-height: 1.08;
        font-size: clamp(1.65rem, 7vw, 2.35rem);
    }

    .page-heading h1 {
        font-size: clamp(1.45rem, 6.5vw, 2rem);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 10px 8px;
        font-size: 0.88rem;
    }

    .primary-action,
    .secondary-action {
        min-height: 44px;
    }

    .primary-action.is-compact,
    .secondary-action.is-compact {
        min-height: 38px;
    }

    .filter-card-compact {
        padding: 14px;
    }

    .table-actions-inline {
        min-width: 148px;
    }

    .website-updates-cell,
    .website-contract-cell {
        min-width: 108px;
        max-width: none;
    }

    .company-autocomplete {
        max-width: none;
    }

    .doc-edit-summary {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pill-flag {
        max-width: 100%;
        white-space: normal;
        text-align: left;
    }

    .tab-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .tab-btn {
        flex: 0 0 auto;
    }
}

.tabs {
    display: grid;
    gap: 14px;
}

.tabs-nav-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
}

.tabs-nav-row .tabs-nav {
    flex: 1 1 auto;
    min-width: 0;
}

.prospect-nav-adjacent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}

.prospect-nav-btn {
    min-width: 38px;
    padding: 0 10px;
}

.prospect-nav-position {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(38, 70, 83, 0.65);
    min-width: 3.5rem;
    text-align: center;
}

.tabs-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    min-height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(38, 70, 83, 0.2);
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink-accent);
    font-weight: 700;
    padding: 0 14px;
    cursor: pointer;
}

.tab-btn.is-active {
    background: linear-gradient(135deg, var(--ink-accent), #3f6d78);
    color: #fff;
    border-color: transparent;
}

.tab-panel {
    border: 1px solid rgba(38, 70, 83, 0.12);
    border-radius: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.58);
}

.prospect-tab-section + .prospect-tab-section,
.prospect-tab-section + .detail-grid,
.detail-grid + .prospect-tab-section {
    margin-top: 18px;
}

.detail-card.tabs .detail-grid {
    margin-top: 0;
}

.detail-grid > .prospect-tab-section {
    margin-top: 0;
}

.prospect-tab-subheading {
    margin-top: 16px;
}

.prospect-tab-form {
    margin-top: 16px;
}

.form-grid input[type='checkbox'],
.form-grid input[type='radio'] {
    width: 1rem;
    height: 1rem;
    min-height: 0;
    margin-top: 0;
}

@media print {
    .sidebar,
    .print-hide,
    .document-sticky-actions,
    .sticky-actions,
    .edit-form-actions,
    .btn-edit-doc,
    .column-picker,
    .toolbar-actions {
        display: none !important;
    }

    .app-layout,
    .app-main,
    .shell,
    .table-card {
        width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: 0;
        background: #fff;
    }

    body {
        background: #fff;
    }
}

.flash-banner-error {
    background: rgba(220, 53, 69, 0.12);
    border-color: rgba(220, 53, 69, 0.28);
    color: #8a1f2d;
}

.app-flash-error {
    margin: 16px 24px 0;
}

.readonly-badge {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: rgba(120, 130, 140, 0.12);
    color: var(--muted);
    font-weight: 700;
}

.mt-section {
    margin-top: 18px;
}

.mt-lg {
    margin-top: 2rem;
}

.mt-sm {
    margin-top: 8px;
}

.mt-md {
    margin-top: 14px;
}

.mb-sm {
    margin-bottom: 8px;
}

.w-full {
    width: 100%;
}

.is-hidden-form {
    display: none;
}

.field-row-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.grid-span-full {
    grid-column: 1 / -1;
}

.settings-assign-block {
    grid-column: 1 / -1;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.settings-assign-block .table-summary {
    margin: 0 0 8px;
}

.badge-default-yes {
    background: #f0f9ff;
    color: #1e40af;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-warn-inline {
    margin-left: 6px;
    color: #c2410c;
    font-size: 0.75rem;
    font-weight: 600;
}

.settings-table tr.is-warn {
    background: #fff7ed;
}

.settings-table .muted {
    color: #6b7280;
}

.toggle-switch {
    display: inline-block;
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: '';
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #7ec945;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.form-sticky-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 0;
    z-index: 100;
    border-top: 1px solid rgba(31, 41, 51, 0.12);
}

.inline-form-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 600;
}

.input-uppercase {
    text-transform: uppercase;
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.875rem;
}

.is-disabled-look {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Modale générique */
.app-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 9000);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-modal[hidden] {
    display: none !important;
}

.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.app-modal-panel {
    position: relative;
    width: min(640px, 92vw);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 0;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.app-modal-panel-sm {
    width: min(420px, 92vw);
}

.app-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.app-modal-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.app-modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.app-modal-body,
#journal-picker-form {
    padding: 16px 18px;
}

.app-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 4px;
}

.jp-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 55vh;
    overflow-y: auto;
}

.jp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1.5px solid #e2e8ed;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
    user-select: none;
}

.jp-row:hover {
    background: #f4f8fa;
    border-color: #b0c8d4;
}

.jp-row input[type='radio'] {
    display: none;
}

.jp-row.is-selected {
    border-color: var(--ink-accent);
    background: #f1f9f0;
}

.jp-code {
    font-weight: 700;
    font-size: 0.92rem;
    min-width: 70px;
    color: #1f2933;
}

.jp-label {
    flex: 1;
    color: #444;
    font-size: 0.92rem;
}

.jp-type {
    font-size: 0.72rem;
    background: #e8f0f3;
    color: #567;
    border-radius: 3px;
    padding: 2px 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* éditeur templates impression — layout */
.print-editor-layout {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    align-items: start;
}

.print-editor-sidebar {
    padding: 14px;
}

.print-editor-sidebar .section-label {
    margin-bottom: 10px;
}

.print-field-group {
    margin-bottom: 12px;
}

.print-field-group strong {
    display: block;
    margin-bottom: 6px;
}

.print-field-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.secondary-action.chip-btn {
    border-radius: 4px;
    padding: 3px 9px;
    font-size: 0.78rem;
    line-height: 1.4;
    min-height: 0;
}

.print-editor-sep {
    margin: 12px 0;
    border: 0;
    border-top: 1px solid rgba(31, 41, 51, 0.12);
}

.print-editor-main-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 14px;
    margin-top: 14px;
    align-items: start;
}

.print-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
    flex-wrap: wrap;
}

.print-editor-toolbar .section-label {
    margin: 0;
}

.print-zoom-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.print-zoom-controls .secondary-action {
    padding: 2px 10px;
    font-size: 1.1rem;
    line-height: 1;
    min-height: 0;
}

.print-zoom-controls .is-compact-text {
    padding: 2px 8px;
    font-size: 0.78rem;
    min-height: 0;
}

#zoom-label {
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 38px;
    text-align: center;
}

.print-option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.print-option-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

#editor-stage {
    padding: 12px;
    border: 1px solid rgba(31, 41, 51, 0.14);
    border-radius: 14px;
    background: linear-gradient(145deg, #f7f9fa, #f1f4f6);
    overflow: auto;
}

.editor-debug {
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid rgba(31, 41, 51, 0.14);
    border-radius: 8px;
    padding: 6px 8px;
}

.editor-debug summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    color: #1f2933;
}

.editor-debug-content {
    margin-top: 6px;
    font-family: Consolas, monospace;
    font-size: 12px;
    color: #3e4c59;
    white-space: pre-wrap;
}

#editor-page {
    position: relative;
    background: #fff;
    box-shadow: 0 6px 20px rgba(31, 41, 51, 0.12);
}

.print-inspector {
    padding: 12px;
}

.print-inspector .section-label {
    margin-bottom: 8px;
}

.print-inspector > label {
    display: block;
    margin-bottom: 6px;
}

.print-inspector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.print-inspector-grid.is-spaced {
    margin-top: 6px;
}

.print-inspector .field-mt {
    display: block;
    margin-top: 6px;
}

.expr-builder {
    margin-top: 6px;
    padding: 8px;
    border: 1px solid rgba(31, 41, 51, 0.12);
    border-radius: 8px;
    background: #f8fafb;
}

.expr-builder-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.expr-builder-stack label {
    display: block;
}

.expr-builder-stack label > span {
    display: block;
    margin-bottom: 4px;
}

.expr-builder-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

#expr-token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

#expr-preview {
    margin-top: 8px;
    padding: 8px;
    border-radius: 6px;
    background: #fff;
    border: 1px dashed rgba(36, 70, 84, 0.25);
    font-size: 12px;
    color: #3e4c59;
}

.print-inspector-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.print-schema-details {
    margin-top: 12px;
}

.print-schema-details summary {
    cursor: pointer;
    font-weight: 700;
}

.print-schema-details label {
    display: block;
    margin-top: 8px;
}

#schema-json {
    font-family: Consolas, monospace;
    font-size: 13px;
}

.settings-warn-box {
    grid-column: 1 / -1;
    padding: 12px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 6px;
    color: #9a3412;
    font-size: 0.875rem;
}

.settings-muted-box {
    grid-column: 1 / -1;
    padding: 12px;
    background: #f9fafb;
    border-radius: 4px;
    color: #6b7280;
    font-size: 0.875rem;
}

.settings-table {
    width: 100%;
    border-collapse: collapse;
}

.settings-table th,
.settings-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.settings-table th {
    font-weight: 600;
}

.settings-table .num,
.settings-table .text-right {
    text-align: right;
}

.settings-table .text-center {
    text-align: center;
}

@media (max-width: 1100px) {
    .print-editor-layout,
    .print-editor-main-grid {
        grid-template-columns: 1fr;
    }
}

.detail-bullet-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-bullet-list li {
    position: relative;
    min-width: 0;
    padding: 12px 14px 12px 2rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(31, 41, 51, 0.06);
    line-height: 1.5;
}

.detail-bullet-list li::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 1.15rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ink-accent);
}

.detail-bullet-list li + li {
    margin-top: 0;
}

.marketing-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 0.75rem;
    align-items: start;
}

.timeline-marker {
    width: 10px;
    height: 10px;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: var(--accent, #0d9488);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.timeline-header time {
    color: #64748b;
    font-size: 0.875rem;
}

.timeline-summary {
    margin: 0.35rem 0 0;
    color: #334155;
}

.timeline-meta {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
}

.email-draft-body {
    white-space: pre-wrap;
    font-family: inherit;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}

.email-draft-presentation-image {
    margin: 0.75rem 0 1rem;
}

.email-draft-presentation-image img {
    display: block;
    width: min(100%, 640px);
    height: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.email-draft-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.email-draft-header .section-label {
    margin: 0;
}

.email-draft-header .email-draft-edit-link {
    margin-left: auto;
}

.email-draft-meta {
    margin-bottom: 1rem;
}

.email-draft-bcc-me {
    margin-top: 0.75rem;
}

.email-draft-bcc-me-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    max-width: 100%;
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
}

.email-draft-bcc-me-label input[type='checkbox'] {
    margin: 0;
}

.email-draft-bcc-me-email {
    font-size: 0.8125rem;
    color: #64748b;
}

.email-draft-status-draft {
    background: #e0f2fe;
    color: #0369a1;
}

.email-draft-status-edited {
    background: #fef3c7;
    color: #b45309;
}

.email-draft-status-approved {
    background: #d1fae5;
    color: #047857;
}

.email-draft-status-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.email-draft-status-sent {
    background: #bbf7d0;
    color: #15803d;
}

.email-draft-status-failed {
    background: #fecaca;
    color: #dc2626;
}

.prospect-list-card .status-pill.email-draft-status {
    min-width: 88px;
}

.prospect-list-card .prospect-status-pill {
    min-width: 88px;
}

.prospect-campaign-cell {
    max-width: 220px;
}

.prospect-campaign-link {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.25;
}

.prospect-campaign-query {
    color: rgba(38, 70, 83, 0.72);
    font-size: 0.82rem;
    font-weight: 500;
}

.prospect-campaign-empty {
    color: rgba(38, 70, 83, 0.45);
}

.prospect-status-new {
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
}

.prospect-status-review {
    background: rgba(233, 196, 106, 0.22);
    color: #8b6400;
}

.prospect-status-qualified {
    background: rgba(97, 192, 168, 0.16);
    color: #1a7d67;
}

.prospect-status-rejected {
    background: rgba(248, 113, 113, 0.16);
    color: #b91c1c;
}

.prospect-status-linked_customer {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.prospect-row-email-sent {
    background: rgba(34, 197, 94, 0.06);
}

.prospect-row-email-sent td:first-child {
    box-shadow: inset 3px 0 0 #22c55e;
}

.prospect-row-email-failed {
    background: rgba(239, 68, 68, 0.05);
}

.prospect-row-email-failed td:first-child {
    box-shadow: inset 3px 0 0 #ef4444;
}

.prospect-row-email-rejected {
    background: rgba(239, 68, 68, 0.1);
}

.prospect-row-email-rejected td:first-child {
    box-shadow: inset 3px 0 0 #dc2626;
}

.prospect-row-email-rejected:hover {
    background: rgba(239, 68, 68, 0.14);
}

.prospect-email-empty {
    color: #94a3b8;
}

.email-reject-inline {
    margin-top: 1rem;
}

.visually-hidden-form {
    display: none;
}

/* --- Tickets / Kanban --- */
.shell.ticket-kanban-shell {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding-left: 16px;
    padding-right: 16px;
}

.shell.ticket-kanban-shell > .filter-card,
.shell.ticket-kanban-shell > .ticket-summary-bar,
.shell.ticket-kanban-shell > .ticket-page-heading,
.shell.ticket-kanban-shell > .ticket-kanban {
    width: 100%;
    max-width: none;
}

.ticket-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ticket-view-switch {
    display: flex;
    gap: 0.5rem;
}

.ticket-view-switch .is-active {
    background: #0f766e;
    color: #fff;
    border-color: #0f766e;
}

.ticket-summary-bar {
    display: flex;
    gap: 1.5rem;
    margin: 0 0 1rem;
    color: #475569;
    font-size: 0.95rem;
    flex-wrap: wrap;
    align-items: center;
}

.ticket-archived-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    font-size: 0.92rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.ticket-archived-toggle input {
    width: 1rem;
    height: 1rem;
}

.ticket-kanban-column.is-archived-column {
    opacity: 0.92;
    background: #f8fafc;
}

.ticket-context-menu {
    min-width: 12.5rem;
    max-height: min(70vh, 420px);
    overflow-y: auto;
}

.ticket-context-menu .ticket-context-label {
    display: block;
    padding: 6px 12px 2px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.ticket-context-menu .ticket-context-sep {
    height: 1px;
    margin: 4px 8px;
    background: #e2e8f0;
    list-style: none;
    padding: 0;
}

.ticket-context-menu button.is-current {
    font-weight: 600;
    color: #0f766e;
    background: color-mix(in srgb, var(--mint, #14b8a6) 12%, #fff);
}

.ticket-context-menu button:disabled {
    opacity: 0.55;
    cursor: default;
}

.ticket-kanban {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.ticket-kanban-column {
    flex: 1 1 0;
    min-width: 200px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    min-height: 320px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.ticket-kanban-column.is-drop-target {
    border-color: #14b8a6;
    background: #f0fdfa;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.ticket-kanban.is-kanban-dragging .ticket-card.is-draggable {
    cursor: grabbing;
}

.ticket-kanban.is-kanban-dragging .ticket-card.is-draggable:not(.is-dragging) {
    cursor: grab;
}

.ticket-kanban-column-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.ticket-kanban-column-head h2 {
    margin: 0;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ticket-kanban-count {
    color: #64748b;
    font-weight: 600;
}

.ticket-kanban-dropzone {
    padding: 0.75rem;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: background-color 0.15s ease;
}

.ticket-kanban-dropzone.is-drag-over {
    background: #ecfeff;
}

.ticket-kanban-placeholder {
    min-height: 72px;
    border: 2px dashed #14b8a6;
    border-radius: 10px;
    background: rgba(20, 184, 166, 0.08);
    pointer-events: none;
    flex-shrink: 0;
}

.ticket-kanban-empty {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.ticket-kanban-empty[hidden] {
    display: none;
}

.ticket-card {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 0.75rem 0.75rem 1.35rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.ticket-card.is-draggable {
    cursor: grab;
}

.ticket-card.is-draggable:active {
    cursor: grabbing;
}

.ticket-card.is-draggable:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.ticket-card-drag-handle {
    position: absolute;
    left: 0.35rem;
    top: 0;
    bottom: 0;
    width: 0.65rem;
    cursor: grab;
    opacity: 0.35;
    background: radial-gradient(circle, #64748b 1px, transparent 1.5px) center / 4px 4px repeat-y;
}

.ticket-card.is-draggable:hover .ticket-card-drag-handle {
    opacity: 0.75;
}

.ticket-card.is-dragging {
    opacity: 0.35;
    transform: scale(0.98);
    box-shadow: none;
}

.ticket-card-ghost {
    position: fixed;
    top: -9999px;
    left: -9999px;
    opacity: 0.92;
    transform: rotate(2deg);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    pointer-events: none;
}

.ticket-card.is-priority-alert {
    border-left: 4px solid #f59e0b;
}

.ticket-card.is-priority-alert .ticket-card-drag-handle {
    left: 0.55rem;
}

.ticket-card-number {
    font-family: ui-monospace, monospace;
    font-size: 0.82rem;
    color: #0f766e;
    font-weight: 700;
}

.ticket-card-customer {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
}

.ticket-card-title {
    margin: 0.25rem 0 0.5rem;
    font-size: 0.95rem;
    line-height: 1.35;
}

.ticket-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ticket-card-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
    font-size: 0.78rem;
    color: #64748b;
}

.ticket-pill-new {
    background: #dbeafe;
    color: #1d4ed8;
}

.ticket-group-focus-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.85rem;
    padding: 0.75rem 1rem;
    border: 1px solid #99f6e4;
    border-radius: 10px;
    background: #f0fdfa;
}

.ticket-group-focus-label {
    display: inline-block;
    margin-right: 0.35rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0f766e;
    font-weight: 700;
}

.ticket-group-focus-hint {
    color: #64748b;
    font-size: 0.9rem;
}

.ticket-kanban-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.15rem;
    padding: 0.45rem 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f1f5f9;
}

.ticket-kanban-group-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.35rem;
    cursor: pointer;
    user-select: none;
    border-radius: 6px;
}

.ticket-kanban-group-head:hover {
    background: rgba(15, 118, 110, 0.08);
}

.ticket-kanban-group-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.ticket-kanban-group-count {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}

.ticket-kanban-group-body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.ticket-card.is-grouped,
.ticket-kanban-group-body > .ticket-card {
    margin-left: 20px;
}

.ticket-kanban-group-empty {
    margin: 0 0 0 20px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.ticket-context-menu [data-ticket-context-group-list] {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ticket-context-menu [data-ticket-context-group-list] button {
    width: 100%;
}
    background: #dbeafe;
    color: #1d4ed8;
}

.ticket-priority-urgent,
.ticket-priority-high {
    background: #fef3c7;
    color: #b45309;
}

.ticket-priority-normal {
    background: #e2e8f0;
    color: #334155;
}

.ticket-priority-low {
    background: #f1f5f9;
    color: #64748b;
}

.ticket-contract-yes {
    background: #d1fae5;
    color: #047857;
}

.ticket-contract-no {
    background: #fee2e2;
    color: #b91c1c;
}

.ticket-original-request,
.ticket-timeline-item div {
    white-space: pre-wrap;
    line-height: 1.5;
}

.ticket-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ticket-timeline-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: #fff;
}

.ticket-timeline-item header {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
}

.ticket-timeline-ai_analysis,
.ticket-timeline-technical_report {
    border-left: 4px solid #6366f1;
}

.ticket-timeline-response_draft {
    border-left: 4px solid #0ea5e9;
}

.ticket-inline-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.ticket-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ticket-comment-item {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.ticket-comment-item header {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.ticket-comment-form {
    border-top: 1px solid #e2e8f0;
}

.ticket-time-table {
    width: 100%;
    border-collapse: collapse;
}

.ticket-time-table th,
.ticket-time-table td {
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.ticket-show-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.ticket-show-tabs .ticket-show-tab-panel {
    max-height: min(42vh, 420px);
    overflow-y: auto;
}

.ticket-show-tabs .ticket-inline-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.field-optional {
    font-style: normal;
    font-weight: 400;
    color: #64748b;
    font-size: 0.85em;
}

.install-body {
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 32%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    min-height: 100vh;
}

.install-shell {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.install-hero {
    margin-bottom: 1rem;
}

.install-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 1rem;
}

.install-step {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #dbe4ee;
    color: #64748b;
    font-size: 0.82rem;
}

.install-step.is-active {
    border-color: #14b8a6;
    background: #ecfeff;
    color: #0f766e;
}

.install-step.is-done {
    border-color: #99f6e4;
    color: #115e59;
}

.install-step-number {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.install-card h2 {
    margin: 0 0 0.35rem;
}

.install-lead {
    margin: 0 0 1rem;
    color: #475569;
}

.install-checklist {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: grid;
    gap: 8px;
}

.install-check-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.install-check-item.is-ok {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.install-check-item.is-ko {
    border-color: #fecaca;
    background: #fef2f2;
}

.install-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.install-summary {
    display: grid;
    grid-template-columns: minmax(140px, 180px) 1fr;
    gap: 8px 14px;
    margin: 0 0 1rem;
}

.install-summary dt {
    font-weight: 600;
    color: #334155;
}

.install-summary dd {
    margin: 0;
    color: #0f172a;
    word-break: break-word;
}

.install-module-list {
    display: grid;
    gap: 10px;
}

.install-module-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.install-module-item small {
    display: block;
    color: #64748b;
}

.install-hint {
    display: block;
    margin-top: 4px;
    color: #64748b;
}

@media (max-width: 900px) {
    .install-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ticket-form-card {
    padding: 1.1rem 1.25rem;
}

.ticket-form-grid {
    gap: 12px 14px;
}

.ticket-form-grid textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.ticket-form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.ticket-form-actions {
    margin: 0;
    display: flex;
    gap: 10px;
}

.ticket-show-hero {
    align-items: flex-start;
    gap: 1rem;
}

.ticket-show-hero .hero-copy h1 {
    margin-bottom: 0.55rem;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.ticket-show-hero-side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    min-width: 9.5rem;
}

.ticket-show-hero-side .highlight-panel {
    margin: 0;
    padding: 0.75rem 0.9rem;
}

.ticket-show-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
    gap: 1rem;
    align-items: start;
}

.ticket-show-main,
.ticket-show-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.ticket-show-main > .detail-card,
.ticket-show-side > .detail-card {
    margin: 0;
}

.ticket-timeline-add-grid,
.ticket-time-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin-bottom: 0.75rem;
}

.ticket-timeline-add-grid .field-wide,
.ticket-time-form-grid .field-wide {
    grid-column: 1 / -1;
}

.ticket-audit-list {
    max-height: 220px;
    overflow-y: auto;
    margin: 0;
    font-size: 0.9rem;
}

.ticket-prestations-card .ticket-time-table th,
.ticket-prestations-card .ticket-time-table td {
    padding: 0.4rem 0.5rem;
    font-size: 0.9rem;
}

@media (max-width: 960px) {
    .ticket-show-layout {
        grid-template-columns: 1fr;
    }

    .ticket-show-hero-side {
        flex-direction: row;
        align-items: center;
        min-width: 0;
    }
}

@media (min-width: 900px) {
    .ticket-form-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ticket-form-grid > label:nth-child(1),
    .ticket-form-grid > label:nth-child(2) {
        grid-column: span 2;
    }

    .ticket-form-grid > .field-wide {
        grid-column: 1 / -1;
    }
}

/* --- Boîte de réception --- */
.inbox-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.inbox-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.inbox-category-tabs {
    margin: 0 0 1rem;
}

.inbox-filters .is-active {
    background: #0f766e;
    color: #fff;
    border-color: #0f766e;
}

.inbox-row-unseen td {
    font-weight: 700;
}

.inbox-email-muted {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

.inbox-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.inbox-body {
    max-width: 52rem;
    line-height: 1.55;
    font-size: 0.95rem;
    color: #1e293b;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.inbox-body-text {
    white-space: pre-wrap;
}

.inbox-body-html p {
    margin: 0 0 0.85rem;
}

.inbox-body-html blockquote,
.inbox-body-html .gmail_quote,
.inbox-body-html .gmail_attr {
    margin: 0.75rem 0;
    padding: 0.25rem 0 0.25rem 1rem;
    border-left: 3px solid #cbd5e1;
    color: #475569;
}

.inbox-body-html blockquote blockquote,
.inbox-body-html .gmail_quote .gmail_quote {
    border-left-color: #94a3b8;
    margin-top: 0.5rem;
}

.inbox-body-html a {
    color: #0f766e;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.inbox-body-html img {
    max-width: 100%;
    height: auto;
}

.inbox-body-html table {
    border-collapse: collapse;
    max-width: 100%;
}

.inbox-body-html td,
.inbox-body-html th {
    padding: 0.25rem 0.5rem;
    vertical-align: top;
}

.inbox-body-html hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 1rem 0;
}

.inbox-body-html pre {
    white-space: pre-wrap;
    font-family: inherit;
}

.inbox-resync-hint {
    margin-top: 1rem;
    font-size: 0.82rem;
}

.inbox-status-pending {
    background: #fff7ed;
    color: #9a3412;
}

.inbox-status-analyzed {
    background: #f1f5f9;
    color: #334155;
}

.inbox-status-ticket_created {
    background: #ecfdf5;
    color: #047857;
}

.inbox-status-no_customer {
    background: #fef3c7;
    color: #92400e;
}

.inbox-status-error {
    background: #fef2f2;
    color: #991b1b;
}

.inbox-associate {
    margin-top: 16px;
}

.inbox-associate-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}

.inbox-associate-row .company-autocomplete-wrap {
    flex: 1 1 280px;
    min-width: 220px;
    position: relative;
    z-index: var(--z-dropdown, 5000);
}

.inbox-associate .company-autocomplete {
    z-index: var(--z-dropdown, 5000);
}

.inbox-associate-row input[type="search"] {
    width: 100%;
}

.inbox-layout {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.inbox-folder-panel {
    position: sticky;
    top: 12px;
}

.inbox-folder-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.inbox-folder-item {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--ink-accent);
    border: 1px solid transparent;
}

.inbox-folder-item:hover,
.inbox-folder-item.is-active,
.inbox-folder-item.is-drop-target {
    background: color-mix(in srgb, var(--mint) 14%, #fff);
    border-color: color-mix(in srgb, var(--mint) 35%, #fff);
}

.inbox-row.is-dragging {
    opacity: 0.55;
}

.inbox-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    white-space: nowrap;
}

.grid-context-menu,
.inbox-context-menu {
    position: fixed;
    z-index: 120;
    min-width: 200px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.grid-context-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grid-context-menu button {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.grid-context-menu button:hover {
    background: color-mix(in srgb, var(--mint) 14%, #fff);
}

.inbox-context-menu li {
    margin: 0;
}

.inbox-context-menu button {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.inbox-context-menu button:hover {
    background: color-mix(in srgb, var(--mint) 14%, #fff);
}

.inbox-context-submenu {
    border-top: 1px solid var(--border-light);
    margin-top: 4px;
    padding-top: 4px;
}

.inbox-context-submenu > span {
    display: block;
    padding: 6px 10px 4px;
    font-size: 0.82rem;
    color: var(--muted);
}

.inbox-context-submenu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 900px) {
    .inbox-layout {
        grid-template-columns: 1fr;
    }

    .inbox-folder-panel {
        position: static;
    }
}

.customer-emails {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.customer-emails-label {
    font-weight: 600;
}

.customer-email-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.customer-email-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.customer-email-row input[type="email"] {
    flex: 1 1 240px;
    min-width: 180px;
}

.form-grid .customer-email-billing-flag {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 0.9rem;
}

.website-audit-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
}

.website-audit-ok {
    background: rgba(97, 192, 168, 0.18);
    color: #2f6f61;
}

.website-audit-warning,
.website-audit-unknown {
    background: rgba(233, 196, 106, 0.28);
    color: #7a5b12;
}

.website-audit-critical,
.website-audit-error {
    background: rgba(231, 111, 81, 0.18);
    color: #9a3f2d;
}

.website-link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.website-connector-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
}

.website-connector-connected {
    background: #2e7d32;
    color: #fff;
    box-shadow: 0 0 0 1px rgba(46, 125, 50, 0.35);
}

.website-connector-disconnected {
    background: rgba(231, 111, 81, 0.18);
    color: #9a3f2d;
}

.website-contract-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
}

.website-contract-active {
    background: rgba(97, 192, 168, 0.18);
    color: #2f6f61;
}

.website-contract-draft,
.website-contract-unknown {
    background: rgba(233, 196, 106, 0.28);
    color: #7a5b12;
}

.website-contract-expired,
.website-contract-closed,
.website-contract-missing {
    background: rgba(231, 111, 81, 0.18);
    color: #9a3f2d;
}

.website-contract-cell {
    min-width: 92px;
}

.website-document-picker-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.website-document-picker-row input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
}

.website-connector-unknown {
    background: rgba(120, 130, 140, 0.16);
    color: #5c6670;
}

.website-cms-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    background: rgba(33, 150, 243, 0.12);
    color: #1565c0;
}

.website-cms-version-head {
    margin: 0 0 12px;
}

.website-connector-banner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
}

.website-connector-banner-connected {
    background: linear-gradient(90deg, rgba(46, 125, 50, 0.14), rgba(46, 125, 50, 0.06));
    border-color: rgba(46, 125, 50, 0.45);
    color: #1b5e20;
}

.website-connector-banner-connected strong {
    color: #2e7d32;
}

.website-connector-banner-disconnected {
    background: rgba(231, 111, 81, 0.08);
    border-color: rgba(231, 111, 81, 0.24);
    color: #7a2e1f;
}

.website-connector-banner-unknown {
    background: rgba(120, 130, 140, 0.08);
    border-color: rgba(120, 130, 140, 0.2);
    color: #4a5560;
}

.website-audit-tabs .tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.website-audit-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px 20px;
}

.website-show-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-top: 0;
}

.website-show-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 10px;
    font-size: 0.92rem;
}

.website-show-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.website-show-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
    gap: 16px;
    align-items: start;
    margin-top: 16px;
}

.website-show-main,
.website-show-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.website-show-main > .detail-card,
.website-show-side > .detail-card {
    margin-top: 0;
}

.website-show-side-card {
    padding: 16px 18px;
}

.website-show-side-card h2 {
    margin-bottom: 10px;
}

.detail-list-compact {
    gap: 6px;
}

.detail-list-compact div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    font-size: 0.9rem;
}

.detail-list-compact dt {
    color: var(--ink-muted, #6b7280);
    font-weight: 600;
}

.detail-list-compact dd {
    margin: 0;
    word-break: break-word;
}

.website-connector-hint {
    margin: 12px 0 0;
    font-size: 0.88rem;
    line-height: 1.4;
}

.website-connector-hint-ok {
    color: #2e7d32;
    font-weight: 600;
}

.website-connector-hint-update {
    color: #7a5b12;
    font-weight: 600;
}

.website-show-notes {
    padding: 12px 16px;
}

.website-show-notes summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
}

.website-show-notes p {
    margin: 10px 0 0;
    font-size: 0.9rem;
}

.website-show-delete {
    margin: 0;
}

.website-audit-tabs {
    padding: 18px 20px;
}

.website-audit-tabs-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.website-audit-tabs-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.website-audit-tab-bar {
    margin-bottom: 12px;
}

.website-audit-panels {
    min-height: 0;
}

.website-audit-scroll {
    max-height: min(52vh, 420px);
    overflow: auto;
    padding-right: 4px;
}

.website-audit-scroll-tall {
    max-height: min(62vh, 520px);
}

.website-audit-scroll table {
    font-size: 0.88rem;
}

.website-audit-scroll th,
.website-audit-scroll td {
    padding: 0.45rem 0.5rem;
}

.website-connector-facts {
    margin-bottom: 10px;
}

.website-audit-alerts-list {
    margin: 0 0 10px;
    font-size: 0.9rem;
}

@media (max-width: 960px) {
    .website-show-layout {
        grid-template-columns: 1fr;
    }

    .website-show-hero-actions {
        justify-content: flex-start;
    }
}

.table-select-col {
    width: 42px;
    text-align: center;
    vertical-align: middle;
}

.table-select-col input[type='checkbox'] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.website-updates-cell {
    min-width: 220px;
    max-width: 360px;
}

.website-updates-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}

.website-updates-list li {
    font-size: 0.82rem;
    line-height: 1.35;
}

.website-updates-list .website-audit-pill {
    margin-right: 6px;
    vertical-align: middle;
}

.website-comment-cell {
    min-width: 180px;
    max-width: 280px;
}

.website-comment-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.84rem;
    line-height: 1.4;
    color: var(--ink-base);
    white-space: pre-line;
}

.website-comment-body {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.5;
}

.module-dossier-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--border-light);
}

.module-dossier-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.module-dossier-head {
    display: grid;
    gap: 2px;
}

.module-dossier-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.module-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.table-actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.utilities-backup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 14rem;
}

.import-content-block {
    margin-top: 2rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 70%);
}

.import-content-head {
    margin-bottom: 1rem;
}

.import-content-head .form-section-title {
    margin: 0 0 0.35rem;
}

.import-content-head .table-summary {
    margin: 0;
}

.import-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.import-content-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #d8e0ea;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.import-content-card:hover {
    border-color: color-mix(in srgb, var(--mint) 45%, #d8e0ea);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.import-content-card:has(input:checked) {
    border-color: color-mix(in srgb, var(--mint) 55%, #94a3b8);
    background: color-mix(in srgb, var(--mint) 8%, #fff);
}

.import-content-card input[type="checkbox"] {
    margin-top: 3px;
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
}

.import-content-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.import-content-card-body strong {
    color: var(--ink-accent, #0f172a);
    font-size: 0.98rem;
}

.import-content-card-body .table-subline {
    line-height: 1.35;
}

/* Manager NageoConcept — layout central dédié */
.nageo-manager-body {
    background:
        radial-gradient(circle at top left, rgba(97, 192, 168, 0.2), transparent 32%),
        linear-gradient(180deg, #f8faf9 0%, var(--bg) 100%);
}

.nageo-manager-layout .nageo-manager-sidebar .sidebar-brand-copy {
    font-size: 0.92rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.72);
}

.nageo-manager-sidebar-erp-link {
    margin-top: auto;
    padding-top: 8px;
}

.nageo-manager-back-erp {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.nageo-manager-main .shell {
    padding: 28px 32px 40px;
}

.nageo-manager-page .hero-text {
    max-width: 52ch;
}


.inline-field-with-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inline-field-with-action input {
    flex: 1 1 auto;
    min-width: 0;
}
