/* === ADMIN LAYOUT === */
.admin-layout { display: flex; min-height: 100vh; background: #f4f6fb; }

.admin-sidebar {
    width: 272px;
    background: #0f172a;
    color: #e2e8f0;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 200;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,.06);
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, .45) rgba(255, 255, 255, .04);
}

/* Barre de défilement sidebar (Chrome, Edge, Safari) */
.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}
.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}
.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .25);
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
}
.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, .55);
}
.admin-sidebar::-webkit-scrollbar-thumb:active {
    background: rgba(99, 102, 241, .75);
}

.admin-sidebar-brand {
    padding: 1.35rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-sidebar-brand .app-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.admin-sidebar-brand .app-sub {
    font-size: .72rem;
    color: #94a3b8;
    margin-top: .2rem;
}

.sidebar-section {
    padding: 1rem 1rem .35rem;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
}

.admin-sidebar nav { flex: 1; padding: .25rem 0 1rem; }

.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .62rem 1rem;
    margin: 2px .65rem;
    border-radius: 10px;
    color: #cbd5e1;
    font-size: .875rem;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.admin-sidebar nav a:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
}
.admin-sidebar nav a.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99,102,241,.35);
}
.admin-sidebar nav a .nav-icon {
    width: 1.25rem;
    text-align: center;
    font-size: 1rem;
    opacity: .9;
}
.admin-sidebar nav a .nav-label {
    flex: 1;
    min-width: 0;
}
.admin-sidebar nav a .nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: #f59e0b;
    color: #111827;
    font-size: .65rem;
    font-weight: 800;
    line-height: 1;
}
.admin-sidebar nav a.active .nav-badge {
    background: #fff;
    color: #4f46e5;
}

/* Sous-menus dropdown sidebar */
.admin-sidebar .nav-group {
    margin: 2px .65rem;
}
.admin-sidebar .nav-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .62rem 1rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #cbd5e1;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background .15s, color .15s;
}
.admin-sidebar .nav-group-toggle:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
}
.admin-sidebar .nav-group.is-active > .nav-group-toggle,
.admin-sidebar .nav-group-toggle.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99,102,241,.35);
}
.admin-sidebar .nav-group-toggle .nav-icon {
    width: 1.25rem;
    text-align: center;
    font-size: 1rem;
    opacity: .9;
}
.admin-sidebar .nav-group-toggle .nav-label { flex: 1; min-width: 0; }
.admin-sidebar .nav-group-toggle .nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: #f59e0b;
    color: #111827;
    font-size: .65rem;
    font-weight: 800;
    line-height: 1;
}
.admin-sidebar .nav-group.is-active > .nav-group-toggle .nav-badge {
    background: #fff;
    color: #4f46e5;
}
.admin-sidebar .nav-caret {
    display: inline-flex;
    transition: transform .2s ease;
    opacity: .85;
    font-size: .85rem;
}
.admin-sidebar .nav-group.is-open > .nav-group-toggle .nav-caret {
    transform: rotate(180deg);
}
.admin-sidebar .nav-submenu {
    padding: .2rem 0 .35rem .55rem;
    margin: .15rem 0 .35rem .55rem;
    border-left: 1px solid rgba(148, 163, 184, .22);
}
.admin-sidebar .nav-submenu[hidden] {
    display: none !important;
}
.admin-sidebar .nav-sublink {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .48rem .75rem;
    margin: 1px 0;
    border-radius: 8px;
    color: #94a3b8;
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.admin-sidebar .nav-sublink:hover {
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
}
.admin-sidebar .nav-sublink.active {
    background: rgba(99, 102, 241, .22);
    color: #fff;
    box-shadow: none;
}
.admin-sidebar .nav-sublink .nav-icon {
    width: 1rem;
    font-size: .9rem;
    text-align: center;
    opacity: .85;
}
.admin-sidebar .nav-sublink .nav-label { flex: 1; }
.admin-sidebar .nav-sublink .nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: #f59e0b;
    color: #111827;
    font-size: .62rem;
    font-weight: 800;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem;
    background: rgba(255,255,255,.04);
    border-radius: 12px;
}
.sidebar-user .avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8rem; color: #fff;
}
.sidebar-user .info { flex: 1; min-width: 0; }
.sidebar-user .info strong { display: block; font-size: .8rem; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .info small { font-size: .68rem; color: #94a3b8; }

.admin-main {
    flex: 1;
    margin-left: 272px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e8edf5;
    padding: .85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.admin-topbar-left { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.admin-topbar h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-topbar .breadcrumb {
    font-size: .75rem;
    color: #64748b;
}
.admin-topbar-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

.admin-content { padding: 1.25rem 1.5rem 2rem; flex: 1; font-size: .875rem; }

.menu-toggle {
    display: none;
    width: 40px; height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 1.15rem;
    color: #334155;
    flex-shrink: 0;
}

/* === PAGE HEADER === */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.page-header .desc {
    font-size: .85rem;
    color: #64748b;
    margin-top: .25rem;
    max-width: 520px;
}

/* === CARDS === */
.admin-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
    margin-bottom: 1rem;
    overflow: hidden;
}
.admin-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfe;
}
.admin-card-header h3 {
    font-size: .95rem;
    font-weight: 600;
    color: #0f172a;
}
.admin-card-body { padding: 1.25rem; }
.admin-card-body.compact { padding: 0; }

/* === FORMS === */
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}
.form-grid .col-12 { grid-column: span 12; }
.form-grid .col-10 { grid-column: span 10; }
.form-grid .col-9 { grid-column: span 9; }
.form-grid .col-8 { grid-column: span 8; }
.form-grid .col-7 { grid-column: span 7; }
.form-grid .col-6 { grid-column: span 6; }
.form-grid .col-5 { grid-column: span 5; }
.form-grid .col-4 { grid-column: span 4; }
.form-grid .col-3 { grid-column: span 3; }
.form-grid .col-2 { grid-column: span 2; }
.form-grid .col-1 { grid-column: span 1; }
.form-grid > .form-field { min-width: 0; }
.form-grid .form-control,
.form-grid .form-select { min-width: 0; max-width: 100%; }

.form-field { display: flex; flex-direction: column; gap: .35rem; }
.form-field label {
    font-size: .8rem;
    font-weight: 600;
    color: #475569;
}
.form-field label .req { color: #ef4444; }
.form-field .hint { font-size: .72rem; color: #94a3b8; }

.form-control, .form-select {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    font-size: .9rem;
    background: #fff;
    color: #0f172a;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.form-control:disabled, .btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}
textarea.form-control { min-height: 90px; resize: vertical; }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    padding-top: .5rem;
    border-top: 1px solid #f1f5f9;
    margin-top: .5rem;
}

/* Collapsible form on mobile */
.form-toggle {
    display: none;
    width: 100%;
    padding: .75rem 1rem;
    background: #f8fafc;
    border: none;
    border-bottom: 1px solid #e8edf5;
    text-align: left;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    color: #334155;
}
.form-toggle::after { content: ' ▾'; float: right; }
.form-toggle.collapsed::after { content: ' ▸'; }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .62rem 1.1rem;
    border: none;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, background .12s;
    white-space: nowrap;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-primary { background: #6366f1; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #4f46e5; box-shadow: 0 4px 12px rgba(99,102,241,.3); }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-ghost {
    background: #fff;
    border: 1px solid #dbe3ef;
    color: #334155;
}
.btn-ghost:hover:not(:disabled) { background: #f8fafc; }
.btn-sm { padding: .4rem .75rem; font-size: .78rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* === TABLES === */
.data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.data-table th {
    padding: .75rem 1rem;
    text-align: left;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e8edf5;
    white-space: nowrap;
}
.data-table td {
    padding: .85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.data-table tbody tr:hover td { background: #fafbfe; }
.data-table .actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

/* Mobile card view for tables */
.table-cards { display: none; }
.table-card-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}
.table-card-item:last-child { border-bottom: none; }
.table-card-row {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding: .25rem 0;
    font-size: .85rem;
}
.table-card-row .lbl { color: #64748b; font-size: .75rem; }
.table-card-row .val { font-weight: 500; text-align: right; }

/* === STATS === */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.stat-tile {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.stat-tile .label { font-size: .75rem; color: #64748b; font-weight: 500; margin-bottom: .35rem; }
.stat-tile .value { font-size: 1.6rem; font-weight: 700; color: #6366f1; line-height: 1.2; }
.stat-tile .value.sm { font-size: 1.1rem; }
.stat-tile.accent-success .value { color: #10b981; }
.stat-tile.accent-warning .value { color: #f59e0b; }

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .22rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.2;
}
.badge-success { background: #ecfdf5; color: #047857; }
.badge-warning { background: #fffbeb; color: #b45309; }
.badge-danger { background: #fef2f2; color: #b91c1c; }
.badge-info { background: #eef2ff; color: #4338ca; }
.badge-muted { background: #f1f5f9; color: #64748b; }

/* === MODAL === */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.5);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}
.modal-backdrop.show { display: flex; }
.modal-backdrop[hidden] { display: none !important; }
/* Confirmation vente (modules) au-dessus du page-loader « Traitement… » */
#modalConfirmVenteModules {
    z-index: 100050;
}
.modal-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0,0,0,.2);
    animation: modalIn .2s ease;
}
.modal-box.lg { max-width: 720px; }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfe;
}
.modal-header h4 { font-size: 1rem; font-weight: 600; }
.modal-close {
    width: 32px; height: 32px;
    border: none; background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    color: #64748b;
}
.modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }

/* Permission checklist */
.check-list { display: flex; flex-direction: column; gap: .5rem; max-height: 360px; overflow-y: auto; }
.check-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .75rem;
    border: 1px solid #e8edf5;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s ease;
    background: #fff;
}
.check-item:hover { background: #f8fafc; border-color: #cbd5e1; }
.check-item input { width: 18px; height: 18px; accent-color: #6366f1; flex: none; }
.check-item .meta { flex: 1; }
.check-item .meta strong { display: block; font-size: .85rem; color: #1e293b; }
.check-item .meta small { color: #94a3b8; font-size: .72rem; }
.check-item:has(input:checked) {
    background: #eef2ff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}
.check-item:has(input:checked) .meta strong { color: #4338ca; }
.check-item:has(input:checked) .meta small { color: #6366f1; }

/* Progress bar for role coverage */
.progress-bar {
    height: 6px;
    background: #e8edf5;
    border-radius: 99px;
    overflow: hidden;
    margin-top: .35rem;
}
.progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 99px;
}

/* Overlay sidebar mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 150;
}
.sidebar-overlay.show { display: block; }

.hidden { display: none !important; }

/* === TYPOGRAPHY === */
.admin-body, .admin-content { font-family: 'Inter', system-ui, sans-serif; }
.text-sm { font-size: .875rem !important; line-height: 1.5; }
.text-xs { font-size: .75rem !important; line-height: 1.45; }
.text-muted { color: #64748b !important; }

/* === VIEWPORT SCALE === */
:root {
    --admin-fs: clamp(0.75rem, 0.68rem + 0.2vw, 0.875rem);
    --admin-fs-sm: clamp(0.6875rem, 0.62rem + 0.15vw, 0.8125rem);
    --admin-fs-xs: clamp(0.625rem, 0.58rem + 0.1vw, 0.75rem);
    --admin-pad: clamp(0.65rem, 1.5vw, 1.15rem);
    --admin-radius: clamp(12px, 1.5vw, 18px);
    --admin-sidebar-w: clamp(220px, 18vw, 272px);
}

.admin-body, .admin-content { font-size: var(--admin-fs); }
.admin-sidebar { width: var(--admin-sidebar-w); }
.admin-main { margin-left: var(--admin-sidebar-w); }
.admin-content { padding: var(--admin-pad) clamp(0.85rem, 2.5vw, 1.5rem) clamp(1rem, 3vh, 2rem); }
.admin-topbar { padding: clamp(0.55rem, 1.5vh, 0.85rem) clamp(0.85rem, 2.5vw, 1.5rem); }
.admin-topbar h1 { font-size: clamp(0.9rem, 1.2vw, 1.1rem); }

.text-sm { font-size: var(--admin-fs) !important; }
.text-xs { font-size: var(--admin-fs-xs) !important; }
.text-muted { color: #64748b !important; }

/* === PAGE TOOLBAR (shop_systeme style) === */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.5rem, 2vw, 1rem);
    margin-bottom: clamp(0.65rem, 1.5vh, 1rem);
    flex-wrap: wrap;
}
.page-toolbar-title {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.page-toolbar-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

.btn-add {
    padding: clamp(0.45rem, 1vh, 0.55rem) clamp(0.85rem, 2vw, 1.15rem);
    font-size: var(--admin-fs-sm);
}

/* === TABLE CARD === */
.table-card {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
    overflow: hidden;
}
.table-card .table-card-body { padding: 0; }

/* Boutons d'action compacts dans les tableaux */
table .btn-sm,
.actions-cell .btn {
    padding: .28rem .6rem;
    font-size: var(--admin-fs-xs);
    border-radius: 8px;
    box-shadow: none;
}
table .btn-sm .bi { font-size: .8rem; }

/* === TABLES — rendu moderne & compact === */
table.datatable,
table.table-sm,
table.example {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0;
    font-size: var(--admin-fs-sm) !important;
}
table.datatable thead th,
table.table-sm thead th,
table.example thead th {
    font-size: var(--admin-fs-xs) !important;
    padding: .6rem .85rem !important;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
    background: #fff;
    border: none !important;
    border-bottom: 1px solid #eef1f6 !important;
    white-space: nowrap;
}
table.datatable tbody td,
table.table-sm tbody td,
table.example tbody td {
    padding: .58rem .85rem !important;
    vertical-align: middle;
    color: #334155;
    background: transparent;
    border: none !important;
    border-bottom: 1px solid #f4f6fa !important;
}
table.datatable tbody tr:last-child td,
table.table-sm tbody tr:last-child td,
table.example tbody tr:last-child td { border-bottom: none !important; }
table.datatable tbody tr,
table.table-sm tbody tr,
table.example tbody tr { transition: background .12s ease; }
table.datatable tbody tr:hover td,
table.table-sm tbody tr:hover td,
table.example tbody tr:hover td { background: #f7f8fc !important; }

/* Pas de zébrage : rendu épuré */
table.datatable tbody tr:nth-child(even) td,
table.table-striped tbody tr:nth-child(even) td { background: transparent; }
table.table-striped tbody tr:hover td { background: #f7f8fc !important; }

/* Première colonne un peu plus douce, dernière (actions) alignée à droite */
table.datatable tbody td:first-child,
table.example tbody td:first-child { color: #64748b; }
.actions-cell { display: flex; flex-wrap: wrap; gap: .35rem; }

/* Hide split layout — modals only */
.page-split { display: block; }
.page-split-side { display: none !important; }
.page-split-main { width: 100%; }

/* Modal viewport */
.modal-backdrop { padding: clamp(0.5rem, 2vw, 1rem); }
.modal-box {
    max-width: min(480px, 94vw);
    max-height: min(90vh, 720px);
    border-radius: var(--admin-radius);
}
.modal-box.lg { max-width: min(720px, 96vw); }

.produit-fiche-block {
    margin: .85rem 0 1rem;
    padding: .9rem 1rem;
    border-radius: 12px;
    border: 1px solid #e8edf5;
    background: #f8fafc;
}
.produit-fiche-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: .75rem;
}
.produit-fiche-block .form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: .75rem;
}
.produit-fiche-block .col-6 { grid-column: span 6; }
.produit-fiche-block .col-12 { grid-column: span 12; }
@media (max-width: 640px) {
    .produit-fiche-block .col-6,
    .produit-fiche-block .col-12 { grid-column: span 12; }
}
.modal-header { padding: clamp(0.65rem, 1.5vh, 0.85rem) var(--admin-pad); }
.modal-header .modal-title { font-size: var(--admin-fs); font-weight: 700; margin: 0; }
.modal-body { padding: var(--admin-pad); }
.modal-body .form-field { margin-bottom: 0; }
.modal-body .form-grid { gap: .85rem; }
.modal-body .form-field label { font-size: var(--admin-fs-xs); font-weight: 600; color: #475569; }
.modal-body .form-control,
.modal-body .form-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: var(--admin-fs-sm);
    padding: clamp(0.5rem, 1.2vh, 0.65rem) clamp(0.65rem, 1.5vw, 0.85rem);
    border-radius: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
}
.modal-body .form-control::placeholder { color: #94a3b8; font-size: var(--admin-fs-xs); }
.modal-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px solid #f1f5f9;
}

/* DataTables compact */
.dataTables_wrapper { font-size: var(--admin-fs-sm) !important; padding: clamp(0.5rem, 1.2vw, 0.85rem) !important; }
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    font-size: var(--admin-fs-sm) !important;
    padding: .3rem .55rem !important;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate { font-size: var(--admin-fs-xs) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: .2rem .5rem !important;
    font-size: var(--admin-fs-xs) !important;
    min-width: auto !important;
}
.dt-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.dt-left, .dt-right { display: flex; align-items: center; }
table.datatable tbody tr:nth-child(even) td,
table.table-striped tbody tr:nth-child(even) td { background: #fafbfc; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }

/* === MODERN PANELS === */
.panel-modern {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(15, 23, 42, .06);
    overflow: hidden;
}
.panel-modern .panel-head {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}
.panel-modern .panel-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.panel-icon.indigo { background: linear-gradient(135deg, #eef2ff, #e0e7ff); }
.panel-icon.emerald { background: linear-gradient(135deg, #ecfdf5, #d1fae5); }
.panel-icon.amber { background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.panel-icon.blue { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.panel-icon.violet { background: linear-gradient(135deg, #f5f3ff, #ede9fe); }
.panel-icon.slate { background: linear-gradient(135deg, #f8fafc, #e2e8f0); }
.panel-icon.indigo .bi { color: #4f46e5; }
.panel-icon.emerald .bi { color: #059669; }
.panel-icon.amber .bi { color: #d97706; }
.panel-icon.blue .bi { color: #2563eb; }
.panel-icon.violet .bi { color: #7c3aed; }
.panel-icon.slate .bi { color: #475569; }
.panel-icon.rose .bi { color: #e11d48; }
.admin-sidebar nav a .nav-icon .bi { font-size: 1rem; opacity: .95; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.08); margin: .65rem 1rem; }
.btn .btn-ico .bi { font-size: 1rem; }

/* Bouton actualiser */
.btn-refresh {
    gap: .4rem;
    flex-shrink: 0;
}
.btn-refresh .bi { font-size: .95rem; transition: transform .35s ease; }
.btn-refresh:hover .bi { transform: rotate(-30deg); }
.btn-refresh.is-refreshing .bi { animation: refresh-spin .6s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }

/* Interrupteur (switch) activer/désactiver */
.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 40px;
    height: 22px;
    vertical-align: middle;
    cursor: pointer;
    margin: 0;
}
.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.switch-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background .2s ease;
}
.switch-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .3);
    transition: transform .2s ease;
}
.switch input:checked + .switch-slider {
    background: #22c55e;
}
.switch input:checked + .switch-slider::before {
    transform: translateX(18px);
}

/* Filtre radio membre (formulaire vente) */
.member-filter-radios {
    display: flex;
    gap: .5rem;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}
.member-filter-radio {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .65rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
}
.member-filter-radio input { accent-color: #6366f1; }
.member-filter-radio:has(input:checked) {
    background: #eef2ff;
    border-color: #6366f1;
    color: #4338ca;
}
.member-checkbox {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-right: 1.25rem;
    font-size: .82rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    user-select: none;
}
.member-checkbox input { accent-color: #6366f1; width: 16px; height: 16px; }
.form-field.is-disabled { opacity: .55; }
.form-field.is-disabled label { color: #94a3b8; }
.form-field.is-disabled .select2-container { pointer-events: none; }

/* Select2 dans les modales ventes : liste complète scrollable */
#modalAddVente.modal-backdrop,
#modalAddVente .modal-box {
    overflow: visible;
}
#modalAddVente .modal-body {
    overflow-y: auto;
    max-height: min(70vh, 640px);
}
.select2-container--open {
    z-index: 100060;
}
.select2-dropdown.select2-dropdown--vente,
#modalAddVente .select2-dropdown,
body > .select2-container .select2-dropdown {
    z-index: 100061;
}
.select2-dropdown.select2-dropdown--vente .select2-results__options,
#modalAddVente .select2-results__options,
body > .select2-container--open .select2-results__options {
    max-height: min(50vh, 320px);
}

/* Liste déroulante recherchable */
.searchable-select { position: relative; }
.searchable-control { position: relative; }
.searchable-control .form-control { padding-right: 2rem; }
.searchable-caret {
    position: absolute;
    right: .6rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: transform .2s ease;
}
.searchable-select.open .searchable-caret { transform: translateY(-50%) rotate(180deg); }
.searchable-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
    padding: .35rem;
}
.searchable-option {
    padding: .5rem .6rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: .1rem;
    line-height: 1.2;
}
.searchable-option strong { font-size: .82rem; font-weight: 600; color: #1e293b; }
.searchable-option small { font-size: .7rem; color: #64748b; }
.searchable-option:hover { background: #f1f5f9; }
.searchable-option.selected { background: #eef2ff; }
.searchable-empty {
    padding: .75rem .6rem;
    text-align: center;
    font-size: .78rem;
    color: #94a3b8;
}
.panel-modern .panel-head h3 {
    font-size: .95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.panel-modern .panel-head p {
    font-size: .8rem;
    color: #64748b;
    margin: .2rem 0 0;
}
.panel-modern .panel-body { padding: 1.35rem; }
.panel-modern .panel-body.flush { padding: 0; }

.panel-form .form-field { margin-bottom: 1rem; }
.panel-form .form-field:last-of-type { margin-bottom: 0; }
.panel-form .form-control, .panel-form .form-select {
    border-radius: 12px;
    padding: .72rem 1rem;
    font-size: .875rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
}
.panel-form .form-control:focus, .panel-form .form-select:focus {
    background: #fff;
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .1);
}
.panel-form .form-control::placeholder { color: #94a3b8; }

/* === MODERN BUTTONS === */
.btn {
    border-radius: 12px;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .01em;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border: 1px solid transparent;
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 6px 20px rgba(79, 70, 229, .35);
    transform: translateY(-1px);
}
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}
.btn-success:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(16, 185, 129, .3);
    transform: translateY(-1px);
}
.btn-danger {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: #fff;
}
.btn-outline-light {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    color: #475569;
}
.btn-outline-light:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.btn-soft-primary {
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #e0e7ff;
    box-shadow: none;
}
.btn-soft-primary:hover:not(:disabled) { background: #e0e7ff; }
.btn-soft-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    box-shadow: none;
}
.btn-soft-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    box-shadow: none;
}
.btn-soft-success:hover:not(:disabled) { background: #d1fae5; }
.btn-soft-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    box-shadow: none;
}
tr.row-inactive td {
    opacity: .72;
}
.btn-block { width: 100%; }
.btn-lg { padding: .78rem 1.35rem; font-size: .875rem; }
.btn .btn-ico { font-size: 1rem; line-height: 1; }

/* === DATATABLES === */
.dataTables_wrapper { font-size: .875rem; color: #334155; padding: 1rem 1.25rem 1.25rem; }
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter { margin-bottom: .85rem; }
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-size: .8125rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #eef1f6;
    border-radius: 999px;
    padding: .4rem .9rem;
    font-size: var(--admin-fs-sm);
    background: #f8fafc;
    margin-left: .5rem;
    min-width: 200px;
}
.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #818cf8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}
.dataTables_wrapper .dataTables_info { font-size: .8125rem; color: #64748b; padding-top: .75rem; }
.dataTables_wrapper .dataTables_paginate { padding-top: .75rem; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    padding: .35rem .65rem !important;
    margin: 0 2px !important;
    font-size: .8125rem !important;
    background: #fff !important;
    color: #475569 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #fff !important;
    border-color: transparent !important;
}
/* Hide old table-cards when datatable present */
.panel-modern .dataTables_wrapper ~ .table-cards { display: none !important; }

/* === PRODUIT IMAGES === */
.produit-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #eef1f6;
    display: inline-block;
    vertical-align: middle;
    background: #f8fafc;
}
.produit-thumb--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1.1rem;
}
.img-upload-form .btn { margin-top: .5rem; }
.img-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .75rem;
}
.img-card {
    position: relative;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}
.img-card.is-primary {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, .25);
}
.img-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}
.img-badge {
    position: absolute;
    top: .35rem;
    left: .35rem;
    background: rgba(99, 102, 241, .95);
    color: #fff;
    font-size: .6rem;
    font-weight: 600;
    padding: .15rem .45rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}
.img-actions {
    position: absolute;
    bottom: .35rem;
    right: .35rem;
    display: flex;
    gap: .3rem;
}
.img-actions .btn {
    padding: .25rem .45rem;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .2);
}
.img-actions form { display: inline; margin: 0; }

/* ============================================================
   RESPONSIVE — Admin (consolidé)
   ============================================================ */
html { -webkit-text-size-adjust: 100%; }
.admin-body { overflow-x: hidden; }
.admin-body.sidebar-open { overflow: hidden; }

/* Tablette et mobile */
@media (max-width: 1024px) {
    .admin-main { margin-left: 0 !important; width: 100%; }
    .admin-sidebar {
        transform: translateX(-100%);
        width: min(280px, 88vw) !important;
        box-shadow: none;
    }
    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, .35);
    }
    .menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    .form-grid .col-8,
    .form-grid .col-7,
    .form-grid .col-5,
    .form-grid .col-4,
    .form-grid .col-3,
    .form-grid .col-2 { grid-column: span 6; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .btn-refresh .btn-refresh-label { display: none; }
    .btn-refresh { padding: .45rem .55rem; min-width: 36px; }
    .admin-content {
        padding: .85rem !important;
    }
    .admin-topbar {
        padding: .65rem .85rem !important;
        gap: .5rem;
    }
    .admin-topbar h1 {
        font-size: .95rem !important;
        max-width: 55vw;
    }
    .hide-mobile { display: none !important; }

    .page-header {
        flex-direction: column;
        gap: .75rem;
        margin-bottom: 1rem;
    }
    .page-header-actions { width: 100%; }
    .page-header-actions .btn { flex: 1; justify-content: center; }

    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: .65rem;
    }
    .page-toolbar-title { font-size: 1.05rem; }
    .page-toolbar-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .page-toolbar-actions .btn span:not(.btn-ico) { display: none; }
    .btn-add {
        width: 100%;
        justify-content: center;
    }
    .btn-add span:not(.btn-ico) { display: inline !important; }

    .form-grid .col-10,
    .form-grid .col-9,
    .form-grid .col-8,
    .form-grid .col-7,
    .form-grid .col-6,
    .form-grid .col-5,
    .form-grid .col-4,
    .form-grid .col-3,
    .form-grid .col-2,
    .form-grid .col-1 { grid-column: span 12; }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: .65rem;
    }
    .stat-tile { padding: .85rem 1rem; }
    .stat-tile .value { font-size: 1.35rem; }
    .stat-tile .value.sm { font-size: .95rem; }

    .panel-modern { border-radius: 14px; }
    .panel-modern .panel-head {
        flex-direction: column;
        padding: 1rem;
        gap: .5rem;
    }
    .panel-modern .panel-body { padding: 1rem; }

    .table-card { border-radius: 12px; }
    .table-card .table-card-body { padding: 0; }

    .table-responsive {
        margin: 0;
        border-radius: 0;
    }

    .dataTables_wrapper {
        padding: .65rem !important;
    }
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        width: 100%;
        margin-bottom: .5rem;
    }
    .dataTables_wrapper .dataTables_length label,
    .dataTables_wrapper .dataTables_filter label {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: .35rem;
    }
    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        margin-left: 0 !important;
    }
    .dt-row {
        flex-direction: column;
        align-items: stretch;
    }
    .dt-left, .dt-right { width: 100%; }
    .dataTables_wrapper .dataTables_paginate {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: .25rem;
    }

    table.datatable thead th,
    table.table-sm thead th {
        white-space: nowrap;
        font-size: .65rem !important;
    }

    .actions-cell {
        flex-direction: column;
        align-items: stretch;
    }
    .actions-cell .btn { width: 100%; justify-content: center; }

    .modal-backdrop { padding: .5rem; align-items: flex-end; }
    .modal-box {
        max-width: 100% !important;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }
    .modal-footer-actions {
        flex-direction: column;
    }
    .modal-footer-actions .btn { width: 100%; }

    .form-collapsible .admin-card-body { display: none; }
    .form-collapsible.open .admin-card-body { display: block; }
    .form-toggle { display: block; }

    .data-table-wrap.desktop-only { display: none; }
    .table-cards { display: block; }

    .member-accordion summary {
        flex-wrap: wrap;
        padding: .75rem;
    }
    .member-accordion-badges {
        width: 100%;
        padding-left: 0;
        margin-top: .35rem;
    }
    .member-detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .admin-topbar h1 { max-width: 42vw; }
    .member-detail-grid { grid-template-columns: 1fr; }
    .member-gen-grid { grid-template-columns: repeat(4, 1fr); }
    .network-roots-tabs { flex-direction: column; }
    .network-root-pill { width: 100%; text-align: center; }

    table.datatable tbody td,
    table.table-sm tbody td {
        font-size: .75rem !important;
        padding: .35rem .45rem !important;
    }
}

@media (min-width: 1025px) {
    .menu-toggle { display: none !important; }
    .sidebar-overlay { display: none !important; }
}

@media (min-width: 769px) {
    .form-collapsible .admin-card-body { display: block !important; }
}

/* === MENUS HUBS (cards professionnelles) === */
.dash-hubs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.dash-hub {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    padding: 1.25rem;
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    min-height: 170px;
    position: relative;
    overflow: hidden;
}
.dash-hub::after {
    content: '';
    position: absolute;
    inset: auto -20% -40% auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,.08), transparent 70%);
    pointer-events: none;
}
.dash-hub:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .10);
    border-color: #c7d2fe;
}
.dash-hub-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}
.dash-hub--emerald .dash-hub-icon { background: linear-gradient(135deg, #10b981, #059669); }
.dash-hub--violet .dash-hub-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.dash-hub--slate .dash-hub-icon { background: linear-gradient(135deg, #64748b, #334155); }
.dash-hub--amber .dash-hub-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.dash-hub--indigo .dash-hub-icon { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.dash-hub--teal .dash-hub-icon { background: linear-gradient(135deg, #14b8a6, #0d9488); }

.dash-hub-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}
.dash-hub-content p {
    margin: .35rem 0 0;
    font-size: .82rem;
    color: #64748b;
    line-height: 1.45;
}
.dash-hub-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .78rem;
    font-weight: 700;
    color: #4f46e5;
}

/* —— Dashboard page —— */
.dash-page {
    display: grid;
    gap: 1.15rem;
    margin-top: .15rem;
}
.dash-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: stretch;
    padding: 1.35rem 1.4rem;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, .16), transparent 45%),
        radial-gradient(ellipse at 100% 100%, rgba(16, 185, 129, .08), transparent 40%),
        linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
    border: none;
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}
.dash-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .45rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, .85);
}
.dash-hero-title {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
}
.dash-hero-desc {
    margin: .45rem 0 0;
    max-width: 42rem;
    font-size: .86rem;
    color: rgba(226, 232, 240, .82);
    line-height: 1.45;
}
.dash-hero-roles {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .9rem;
}
.dash-chip {
    display: inline-flex;
    align-items: center;
    padding: .28rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 650;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
}
.dash-hero-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem;
    min-width: 160px;
}
.dash-hero-date {
    text-align: right;
}
.dash-hero-day {
    display: block;
    font-size: .78rem;
    color: rgba(226, 232, 240, .75);
}
.dash-hero-time {
    display: block;
    margin-top: .15rem;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}
.dash-hero .btn-refresh {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .22);
    color: #fff;
}
.dash-hero .btn-refresh:hover {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.dash-admin-link {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.15rem 1.25rem;
}
.dash-admin-link-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: rgba(99, 102, 241, .12);
    color: #4f46e5;
    font-size: 1.15rem;
}
.dash-admin-link-main {
    flex: 1;
    min-width: 0;
}
.dash-admin-link-main h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}
.dash-admin-link-main > p {
    margin: .3rem 0 .85rem;
    font-size: .86rem;
    color: var(--text-muted, #64748b);
}
.dash-admin-link-row {
    display: flex;
    gap: .55rem;
    align-items: stretch;
    flex-wrap: wrap;
}
.dash-admin-link-row .form-control {
    flex: 1 1 220px;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .82rem;
    background: #f8fafc;
}
.dash-admin-link-row .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}
.dash-admin-link-row .btn.is-copied {
    background: #059669;
    border-color: #059669;
}

@media (max-width: 640px) {
    .dash-admin-link {
        flex-direction: column;
        gap: .75rem;
    }
    .dash-admin-link-row .btn {
        width: 100%;
        justify-content: center;
    }
}

.dash-section-head {
    margin-bottom: .75rem;
}
.dash-section-head h2 {
    margin: 0;
    font-size: .95rem;
    font-weight: 800;
    color: #0f172a;
}
.dash-section-head p {
    margin: .2rem 0 0;
    font-size: .78rem;
    color: #64748b;
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
}
.dash-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-height: 148px;
    padding: 1.15rem 1.15rem 1rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e8edf5;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 28px rgba(15, 23, 42, .05);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.dash-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .1);
}
.dash-stat-glow {
    position: absolute;
    top: -40px;
    right: -30px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    opacity: .55;
    pointer-events: none;
}
.dash-stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    position: relative;
    z-index: 1;
}
.dash-stat-label {
    font-size: .75rem;
    font-weight: 650;
    color: #64748b;
}
.dash-stat-ico {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex: none;
}
.dash-stat-value {
    position: relative;
    z-index: 1;
    margin-top: .25rem;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: #0f172a;
}
.dash-stat-value.sm { font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
.dash-stat-hint {
    position: relative;
    z-index: 1;
    font-size: .72rem;
    color: #94a3b8;
    line-height: 1.35;
}
.dash-stat-link {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: .55rem;
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    font-size: .72rem;
    font-weight: 700;
    color: #6366f1;
}

.dash-stat.accent-indigo .dash-stat-ico { background: #eef2ff; color: #4f46e5; }
.dash-stat.accent-indigo .dash-stat-glow { background: radial-gradient(circle, rgba(99,102,241,.22), transparent 70%); }
.dash-stat.accent-indigo .dash-stat-value { color: #4f46e5; }
.dash-stat.accent-indigo:hover { border-color: #c7d2fe; }

.dash-stat.accent-success .dash-stat-ico { background: #ecfdf5; color: #059669; }
.dash-stat.accent-success .dash-stat-glow { background: radial-gradient(circle, rgba(16,185,129,.2), transparent 70%); }
.dash-stat.accent-success .dash-stat-value { color: #059669; }
.dash-stat.accent-success .dash-stat-link { color: #059669; }
.dash-stat.accent-success:hover { border-color: #a7f3d0; }

.dash-stat.accent-violet .dash-stat-ico { background: #f5f3ff; color: #7c3aed; }
.dash-stat.accent-violet .dash-stat-glow { background: radial-gradient(circle, rgba(139,92,246,.2), transparent 70%); }
.dash-stat.accent-violet .dash-stat-value { color: #7c3aed; }
.dash-stat.accent-violet .dash-stat-link { color: #7c3aed; }
.dash-stat.accent-violet:hover { border-color: #ddd6fe; }

.dash-stat.accent-warning .dash-stat-ico { background: #fffbeb; color: #d97706; }
.dash-stat.accent-warning .dash-stat-glow { background: radial-gradient(circle, rgba(245,158,11,.22), transparent 70%); }
.dash-stat.accent-warning .dash-stat-value { color: #d97706; }
.dash-stat.accent-warning .dash-stat-link { color: #d97706; }
.dash-stat.accent-warning:hover { border-color: #fde68a; }

.dash-hubs-section .panel-head p {
    margin: .2rem 0 0;
    font-size: .75rem;
    color: #64748b;
}

@media (max-width: 1100px) {
    .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-hubs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .dash-hero {
        grid-template-columns: 1fr;
        padding: 1.15rem 1.1rem;
    }
    .dash-hero-aside {
        align-items: flex-start;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    .dash-hero-date { text-align: left; }
    .dash-stats { grid-template-columns: 1fr; }
    .dash-hubs { grid-template-columns: 1fr; }
    .dash-hub { min-height: auto; }
}

.hub-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .9rem;
}
.hub-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.05rem 1.1rem;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
    border-color: #c7d2fe;
}
.hub-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}
.hub-card--emerald .hub-card-icon { background: linear-gradient(135deg, #10b981, #059669); }
.hub-card--blue .hub-card-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.hub-card--amber .hub-card-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.hub-card--violet .hub-card-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.hub-card--slate .hub-card-icon { background: linear-gradient(135deg, #64748b, #334155); }
.hub-card--indigo .hub-card-icon { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.hub-card--rose .hub-card-icon { background: linear-gradient(135deg, #f43f5e, #e11d48); }

/* Rapports commerciaux — modèle Garden Shop col-lg-4 / col-lg-8 */
.rapport-row{
    display:flex;
    flex-wrap:wrap;
    margin:0 -6px;
    width:100%;
    gap:0;
}
.rapport-row > .rapport-col{
    padding:0 6px;
    box-sizing:border-box;
    width:100%;
    margin-bottom:.75rem;
}
.rapport-row > .rapport-col-criteres{
    flex:0 0 100%;
    max-width:100%;
}
.rapport-row > .rapport-col-resultat{
    flex:0 0 100%;
    max-width:100%;
}
@media (min-width:992px){
    .rapport-row > .rapport-col-criteres{
        flex:0 0 33.333333%;
        max-width:33.333333%;
    }
    .rapport-row > .rapport-col-resultat{
        flex:0 0 66.666667%;
        max-width:66.666667%;
    }
    .rapport-row > .rapport-col{
        margin-bottom:0;
    }
}
.rapport-criteres,
.rapport-resultat{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:14px;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
    height:100%;
}
.rapport-criteres-head{
    padding:.85rem 1rem;
    border-bottom:1px solid #e2e8f0;
}
.rapport-criteres-head h6{
    margin:0;
    font-size:.9rem;
    font-weight:800;
    color:#0f172a;
}
.rapport-criteres-body{padding:1rem;}
.rapport-criteres .form-field{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    margin-bottom:.75rem;
    gap:.35rem .5rem;
}
.rapport-criteres .form-field > label{
    flex:0 0 38%;
    max-width:38%;
    font-size:.72rem;
    font-weight:700;
    color:#64748b;
    text-transform:uppercase;
    letter-spacing:.02em;
    margin:0;
}
.rapport-criteres .form-field > .form-control,
.rapport-criteres .form-field > .rapport-dates-row,
.rapport-criteres .form-field > .select2-container{
    flex:1 1 58%;
    min-width:0;
}
.rapport-criteres .select2-container{width:100% !important;}
.rapport-dates-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:.4rem;
}
.rapport-criteres-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:.5rem;
    margin-top:1rem;
    padding-top:.85rem;
    border-top:1px solid #e2e8f0;
}
.rapport-criteres-actions .btn{width:100%;justify-content:center;}
.rapport-totaux{
    display:flex;
    flex-wrap:wrap;
    border-bottom:1px solid #e2e8f0;
    background:#f8fafc;
}
.rapport-totaux > div{padding:.85rem 1rem;}
.rapport-totaux .critere-box{flex:1 1 160px;min-width:0;}
.rapport-totaux .meta-box{flex:0 0 auto;}
.rapport-totaux .total-box{
    flex:0 0 auto;
    min-width:130px;
    background:#2563eb;
    color:#fff;
    margin-left:auto;
}
.rapport-totaux .lbl{
    margin:0;
    font-size:.7rem;
    color:#64748b;
    text-transform:uppercase;
    font-weight:700;
}
.rapport-totaux .val{
    margin:.15rem 0 0;
    font-size:1rem;
    font-weight:800;
    color:#0f172a;
}
.rapport-totaux .critere-box .val{
    font-size:.78rem;
    font-weight:600;
    color:#475569;
    line-height:1.35;
}
.rapport-totaux .total-box .lbl,
.rapport-totaux .total-box .val{color:#fff;}
.rapport-resultat-body{padding:.75rem;}
.rapport-resultat-body .table-responsive{
    width:100%;
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}
.rapport-resultat-body table.table{
    width:100% !important;
    min-width:640px;
    margin-bottom:0;
}
.rapport-resultat-body table.table th,
.rapport-resultat-body table.table td{
    white-space:nowrap;
    vertical-align:middle;
}
.rapport-export-actions{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center;}
.rapport-stock-revendeur{
    margin-top:1rem;
    border:1px solid rgba(148,163,184,.35);
    border-radius:.5rem;
    background:#fff;
    overflow:hidden;
}
.rapport-stock-revendeur .admin-card-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:.75rem;
    flex-wrap:wrap;
    padding:.85rem 1rem;
    border-bottom:1px solid rgba(148,163,184,.25);
    background:#f8fafc;
}
.rapport-stock-revendeur .admin-card-body{padding:1rem;}
.rapport-check-stock{
    display:flex;
    align-items:center;
    gap:.5rem;
    font-weight:600;
    cursor:pointer;
    margin:0;
}
.rapport-check-stock input{
    width:1rem;
    height:1rem;
    margin:0;
}
.treso-filtre-comptes{
    display:flex;
    flex-wrap:wrap;
    gap:.5rem;
}
.treso-radio-chip{
    display:inline-flex;
    align-items:center;
    gap:.4rem;
    margin:0;
    padding:.45rem .85rem;
    border:1px solid rgba(148,163,184,.45);
    border-radius:.45rem;
    background:#f8fafc;
    cursor:pointer;
    font-weight:600;
    font-size:.85rem;
    user-select:none;
}
.treso-radio-chip input{
    margin:0;
    accent-color:#0f766e;
}
.treso-radio-chip:has(input:checked){
    border-color:#0f766e;
    background:#ecfdf5;
    color:#0f766e;
}
.treso-ops-form .select2-container{width:100% !important;}
.treso-ops-layout{
    display:grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .9fr);
    gap:1rem;
    align-items:start;
}
.treso-ops-form,
.treso-dernieres-ops{
    padding:1.25rem;
    max-width:none;
}
.treso-dernieres-ops-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:.5rem;
    margin-bottom:.85rem;
}
.treso-dernieres-ops-head h4{
    margin:0;
    font-size:.92rem;
    display:flex;
    align-items:center;
    gap:.4rem;
}
.treso-dernieres-ops-list{
    display:flex;
    flex-direction:column;
    gap:.55rem;
    max-height:calc(100vh - 220px);
    overflow:auto;
}
.treso-ops-item{
    padding:.65rem .75rem;
    border:1px solid rgba(148,163,184,.3);
    border-radius:.5rem;
    background:#f8fafc;
}
.treso-ops-item-top{
    display:flex;
    justify-content:space-between;
    gap:.5rem;
    align-items:baseline;
}
.treso-ops-montant{font-weight:700;font-size:.88rem;white-space:nowrap;}
.treso-ops-montant.is-in{color:#059669;}
.treso-ops-montant.is-out{color:#d97706;}
.treso-ops-item-meta{
    font-size:.72rem;
    color:#64748b;
    margin-top:.2rem;
}
.treso-ops-item-lib{
    font-size:.8rem;
    margin-top:.2rem;
    color:#334155;
}
@media (max-width:991.98px){
    .treso-ops-layout{grid-template-columns:1fr;}
    .treso-dernieres-ops-list{max-height:none;}
}
.treso-filtre-historique .treso-filtre-btns{
    display:flex;
    gap:.5rem;
    flex-wrap:nowrap;
    align-items:center;
}
.treso-filtre-historique .treso-filtre-btns .btn{
    white-space:nowrap;
}
.treso-ops-actions{
    display:flex;
    flex-wrap:wrap;
    gap:.35rem;
    align-items:center;
}
.treso-ops-action-form{display:inline;}
.treso-ops-item-actions{margin-top:.45rem;}
tr.row-ops-annule td,
.treso-ops-item.is-annule{
    background:#fef2f2 !important;
    color:#b91c1c !important;
}
tr.row-ops-annule td strong,
tr.row-ops-annule .text-muted{
    color:#b91c1c !important;
}
tr.row-ops-annule td{
    text-decoration:line-through;
}
tr.row-ops-annule td:last-child,
tr.row-ops-annule .badge{
    text-decoration:none;
}
.treso-ops-item.is-annule .treso-ops-montant,
.treso-ops-item.is-annule .treso-ops-item-lib{
    color:#b91c1c;
    text-decoration:line-through;
}
.treso-table-wrap{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}
.treso-ops-table{
    min-width:760px;
}
.treso-ops-detail-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:.65rem .85rem;
}
.treso-ops-detail-grid .full{grid-column:1 / -1;}
.treso-ops-detail-grid .lbl{
    display:block;
    font-size:.72rem;
    color:#64748b;
    margin-bottom:.15rem;
}
@media (max-width:991.98px){
    .form-grid .col-2{grid-column:span 6;}
    .form-grid .col-4{grid-column:span 12;}
}
@media (max-width:575.98px){
    .form-grid .col-2{grid-column:span 12;}
    .treso-filtre-historique .treso-filtre-btns{
        flex-wrap:wrap;
        width:100%;
    }
    .treso-filtre-historique .treso-filtre-btns .btn{flex:1 1 auto;}
    .treso-ops-detail-grid{grid-template-columns:1fr;}
    .treso-ops-actions .btn{flex:1 1 auto;justify-content:center;}
}
.fiche-stock-produit{
    margin-bottom:1.15rem;
    padding-bottom:1rem;
    border-bottom:1px dashed rgba(148,163,184,.45);
}
.fiche-stock-produit:last-child{
    margin-bottom:0;
    padding-bottom:0;
    border-bottom:0;
}
.fiche-stock-produit-head{
    display:flex;
    align-items:baseline;
    gap:.5rem;
    margin-bottom:.5rem;
}
.fiche-stock-mv-title{
    font-size:.82rem;
    margin:.15rem 0 .4rem;
    color:#475569;
}
.fiche-stock-resume th,
.fiche-stock-resume td{vertical-align:middle;}
.fiche-stock-solde-final{
    background:#f8fafc;
}
.rapport-empty{
    padding:2.5rem 1.25rem;
    text-align:center;
    color:#64748b;
}
@media (max-width:991.98px){
    .rapport-criteres .form-field > label{
        flex:0 0 100%;
        max-width:100%;
    }
    .rapport-criteres .form-field > .form-control,
    .rapport-criteres .form-field > .rapport-dates-row,
    .rapport-criteres .form-field > .select2-container{
        flex:0 0 100%;
    }
    .rapport-totaux .total-box{
        margin-left:0;
        width:100%;
        min-width:0;
    }
    .rapport-resultat-body table.table{min-width:520px;}
}

.hub-card-body { min-width: 0; flex: 1; }
.hub-card-title {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .95rem;
    font-weight: 800;
    color: #0f172a;
}
.hub-card-desc {
    margin: .25rem 0 0;
    font-size: .78rem;
    color: #64748b;
    line-height: 1.4;
}
.hub-card-arrow {
    color: #94a3b8;
    font-size: 1rem;
    flex-shrink: 0;
}
.hub-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: .7rem;
    font-weight: 800;
}

@media (max-width: 980px) {
    .dash-hubs { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .hub-cards { grid-template-columns: 1fr; }
    .dash-hub { min-height: auto; }
}

/* === DOCUMENTATION (tabs) === */
.doc-page {
    display: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    gap: 1.35rem;
    align-items: stretch;
    min-height: calc(100vh - 11rem);
}

.doc-sidebar,
.doc-main {
    border: 1px solid #e8edf4;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .06);
}

/* Colonne gauche */
.doc-sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 5rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    border-radius: 18px;
}
.doc-sidebar-head {
    padding: 1.1rem 1.15rem .85rem;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(165deg, #f8faff 0%, #ffffff 55%, #fafbff 100%);
    flex-shrink: 0;
}
.doc-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .55rem;
}
.doc-sidebar-head strong {
    display: block;
    font-size: .92rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -.01em;
}
.doc-sidebar-head small {
    display: block;
    font-size: .68rem;
    color: #94a3b8;
    font-weight: 500;
    margin-top: .12rem;
}
.doc-sidebar-stats {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .68rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: .65rem;
}
.doc-dot { opacity: .45; }
.doc-progress {
    height: 4px;
    border-radius: 999px;
    background: #e8edf4;
    overflow: hidden;
}
.doc-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width .35s cubic-bezier(.4, 0, .2, 1);
}
.doc-sidebar-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(79, 70, 229, .28);
}
.doc-sidebar-icon .bi { color: #fff; font-size: 1.05rem; }

.doc-search-wrap {
    position: relative;
    padding: .65rem .75rem 0;
    flex-shrink: 0;
}
.doc-search-ico {
    position: absolute;
    left: 1.35rem;
    top: calc(50% + .32rem);
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: .8rem;
    pointer-events: none;
}
.doc-search {
    width: 100%;
    padding: .55rem .75rem .55rem 2.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    font-family: inherit;
    font-size: .78rem;
    color: #334155;
    background: #f8fafc;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.doc-search::placeholder { color: #94a3b8; }
.doc-search:focus {
    outline: none;
    border-color: #a5b4fc;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.doc-tabs {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .65rem .75rem .75rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.doc-tabs::-webkit-scrollbar { width: 5px; }
.doc-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.doc-tab {
    position: relative;
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: .5rem;
    width: 100%;
    text-align: left;
    padding: .62rem .75rem .62rem .85rem;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    font-family: inherit;
    font-size: .8rem;
    color: #64748b;
    cursor: pointer;
    transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .18s;
}
.doc-tab-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    border-radius: 0 4px 4px 0;
    background: #6366f1;
    transition: transform .2s ease;
}
.doc-tab:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #eef2f7;
}
.doc-tab:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, .28);
}
.doc-tab.is-active {
    background: #fff;
    font-weight: 600;
    color: #1e293b;
    border-color: #e8edf4;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
}
.doc-tab.is-active .doc-tab-indicator {
    transform: translateY(-50%) scaleY(1);
}
.doc-tab.is-filtered-out { display: none; }
.doc-tab-num {
    font-size: .62rem;
    font-weight: 800;
    color: #cbd5e1;
    min-width: 1.3rem;
    font-variant-numeric: tabular-nums;
}
.doc-tab.is-active .doc-tab-num { color: #94a3b8; }
.doc-tab-ico {
    font-size: .95rem;
    opacity: .75;
    transition: opacity .15s;
}
.doc-tab.is-active .doc-tab-ico { opacity: 1; }
.doc-tab-label { line-height: 1.35; }

.doc-tab--indigo.is-active { color: #4338ca; }
.doc-tab--indigo.is-active .doc-tab-indicator { background: #6366f1; }
.doc-tab--emerald.is-active { color: #047857; }
.doc-tab--emerald.is-active .doc-tab-indicator { background: #10b981; }
.doc-tab--violet.is-active { color: #6d28d9; }
.doc-tab--violet.is-active .doc-tab-indicator { background: #8b5cf6; }
.doc-tab--blue.is-active { color: #1d4ed8; }
.doc-tab--blue.is-active .doc-tab-indicator { background: #3b82f6; }
.doc-tab--amber.is-active { color: #b45309; }
.doc-tab--amber.is-active .doc-tab-indicator { background: #f59e0b; }
.doc-tab--slate.is-active { color: #334155; }
.doc-tab--slate.is-active .doc-tab-indicator { background: #64748b; }
.doc-tab--teal.is-active { color: #0f766e; }
.doc-tab--teal.is-active .doc-tab-indicator { background: #14b8a6; }

/* Colonne droite */
.doc-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 540px;
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
}
.doc-panes {
    flex: 1;
    min-height: 0;
    position: relative;
}
.doc-pane {
    display: none;
    flex-direction: column;
    height: 100%;
    animation: docPaneIn .28s cubic-bezier(.4, 0, .2, 1);
}
.doc-pane.is-active { display: flex; }
.doc-pane[hidden] { display: none !important; }

@keyframes docPaneIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.doc-pane-head {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
}
.doc-pane-head .panel-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 14px;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.doc-pane-head-text { min-width: 0; flex: 1; }
.doc-pane-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .5rem;
}
.doc-pane-index,
.doc-pane-count {
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .22rem .55rem;
    border-radius: 999px;
}
.doc-pane-index {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #4338ca;
}
.doc-pane-count {
    background: #f1f5f9;
    color: #64748b;
}
.doc-pane-head h2 {
    margin: 0 0 .4rem;
    font-size: 1.28rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    letter-spacing: -.02em;
}
.doc-pane-head p {
    margin: 0;
    color: #64748b;
    font-size: .88rem;
    line-height: 1.6;
    max-width: 52rem;
}
.doc-pane-body {
    padding: 1.35rem 1.5rem 1.65rem;
    overflow-y: auto;
    flex: 1;
    max-height: calc(100vh - 17rem);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.doc-pane--indigo .doc-pane-head { border-top: 3px solid #6366f1; }
.doc-pane--emerald .doc-pane-head { border-top: 3px solid #10b981; }
.doc-pane--violet .doc-pane-head { border-top: 3px solid #8b5cf6; }
.doc-pane--blue .doc-pane-head { border-top: 3px solid #3b82f6; }
.doc-pane--amber .doc-pane-head { border-top: 3px solid #f59e0b; }
.doc-pane--slate .doc-pane-head { border-top: 3px solid #64748b; }
.doc-pane--teal .doc-pane-head { border-top: 3px solid #14b8a6; }

.doc-main-footer {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1.35rem;
    border-top: 1px solid #eef2f7;
    background: linear-gradient(180deg, #fafbfe 0%, #f8fafc 100%);
    flex-shrink: 0;
}
.doc-footer-center {
    text-align: center;
    min-width: 0;
}
.doc-footer-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.doc-footer-counter {
    display: block;
    font-size: .68rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: .1rem;
    font-variant-numeric: tabular-nums;
}
.doc-nav-prev:disabled,
.doc-nav-next:disabled {
    opacity: .4;
    pointer-events: none;
}
.doc-main-footer .bi { font-size: .75rem; }

/* Étapes */
.doc-steps-section { margin-top: .15rem; }
.doc-steps-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px dashed #e2e8f0;
}
.doc-steps-heading h3 {
    margin: 0;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #475569;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.doc-steps-heading h3 .bi { color: #6366f1; font-size: .9rem; }
.doc-steps-badge {
    font-size: .65rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
}

.doc-steps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}
.doc-step-item {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: 1rem 1.05rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e8edf4;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.doc-step-item:hover {
    border-color: #dbeafe;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
    transform: translateY(-1px);
}
.doc-step-num {
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.doc-step-item--indigo { border-left: 3px solid #6366f1; }
.doc-step-item--emerald { border-left: 3px solid #10b981; }
.doc-step-item--violet { border-left: 3px solid #8b5cf6; }
.doc-step-item--blue { border-left: 3px solid #3b82f6; }
.doc-step-item--amber { border-left: 3px solid #f59e0b; }
.doc-step-item--slate { border-left: 3px solid #64748b; }
.doc-step-item--teal { border-left: 3px solid #14b8a6; }
.doc-step-item--indigo .doc-step-num { background: #eef2ff; color: #4338ca; }
.doc-step-item--emerald .doc-step-num { background: #ecfdf5; color: #047857; }
.doc-step-item--violet .doc-step-num { background: #f5f3ff; color: #6d28d9; }
.doc-step-item--blue .doc-step-num { background: #eff6ff; color: #1d4ed8; }
.doc-step-item--amber .doc-step-num { background: #fffbeb; color: #b45309; }
.doc-step-item--slate .doc-step-num { background: #f1f5f9; color: #475569; }
.doc-step-item--teal .doc-step-num { background: #ccfbf1; color: #0f766e; }
.doc-step-text {
    font-size: .85rem;
    line-height: 1.6;
    color: #334155;
    padding-top: .2rem;
}
.doc-step-text strong { color: #0f172a; font-weight: 600; }

.doc-callout {
    display: flex;
    gap: .9rem;
    margin-top: 1.15rem;
    padding: 1.05rem 1.15rem;
    border-radius: 14px;
    border: 1px solid transparent;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}
.doc-callout-icon {
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.doc-callout-title {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .4rem;
}
.doc-callout-body p { margin: 0; font-size: .85rem; line-height: 1.6; }
.doc-callout--example {
    background: linear-gradient(135deg, #fffbeb 0%, #fef9c3 100%);
    border-color: #fde68a;
}
.doc-callout--example .doc-callout-icon { background: #fef3c7; color: #b45309; }
.doc-callout--example .doc-callout-title { color: #b45309; }
.doc-callout--example p { color: #78350f; }
.doc-callout--info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
}
.doc-callout--info .doc-callout-icon { background: #dbeafe; color: #1d4ed8; }
.doc-callout--info .doc-callout-title { color: #1d4ed8; }
.doc-notes {
    margin: 0;
    padding-left: 1rem;
    color: #1e40af;
    font-size: .84rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    line-height: 1.5;
}

/* Support — équipe & contacts */
.doc-team-section,
.doc-contact-section {
    margin-top: 1.5rem;
}

.doc-team-section::before {
    content: '';
    display: block;
    height: 1px;
    margin-bottom: 1.35rem;
    background: linear-gradient(90deg, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
}

.doc-team-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 45%, #2dd4bf 100%);
    color: #fff;
    box-shadow: 0 10px 28px rgba(20, 184, 166, .22);
}
.doc-team-banner-brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}
.doc-team-banner-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.doc-team-banner-brand strong {
    display: block;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.doc-team-banner-brand span {
    display: block;
    font-size: .72rem;
    opacity: .9;
    margin-top: .15rem;
    line-height: 1.4;
}
.doc-team-banner-count {
    flex-shrink: 0;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .25);
}

.doc-team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}
.doc-team-card {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: 1.1rem 1.15rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e8edf4;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}
.doc-team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--doc-team-accent, #14b8a6);
}
.doc-team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    border-color: #dbeafe;
}
.doc-team-card--wide {
    grid-column: 1 / -1;
}
.doc-team-card--lead {
    grid-column: 1 / -1;
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 35%);
}
.doc-team-card--lead::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.doc-team-card--violet { --doc-team-accent: #8b5cf6; }
.doc-team-card--indigo { --doc-team-accent: #6366f1; }
.doc-team-card--amber { --doc-team-accent: #f59e0b; }
.doc-team-card--teal { --doc-team-accent: #14b8a6; }

.doc-team-card-top {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
}
.doc-team-avatar {
    position: relative;
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--doc-team-accent, #14b8a6), color-mix(in srgb, var(--doc-team-accent, #14b8a6) 70%, #000));
    color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--doc-team-accent, #14b8a6) 35%, transparent);
}
.doc-team-initials {
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .02em;
}
.doc-team-avatar-ico {
    display: none;
}
.doc-team-head {
    min-width: 0;
    flex: 1;
    padding-top: .1rem;
}
.doc-team-ribbon {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: .18rem .45rem;
    border-radius: 999px;
    margin-bottom: .4rem;
}
.doc-team-ribbon .bi { font-size: .55rem; }
.doc-team-name {
    margin: 0 0 .2rem;
    font-size: .95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    letter-spacing: -.01em;
}
.doc-team-title {
    margin: 0;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
}
.doc-team-subtitle {
    margin: .25rem 0 0;
    font-size: .74rem;
    color: #64748b;
    line-height: 1.45;
}

.doc-team-skill-groups {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding-top: .15rem;
    border-top: 1px dashed #e8edf4;
}
.doc-team-skill-group {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.doc-team-skill-label {
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
}
.doc-team-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.doc-team-tag {
    font-size: .68rem;
    font-weight: 600;
    padding: .22rem .5rem;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e8edf4;
    line-height: 1.3;
}
.doc-team-card--violet .doc-team-tag { background: #f5f3ff; color: #6d28d9; border-color: #ede9fe; }
.doc-team-card--indigo .doc-team-tag { background: #eef2ff; color: #4338ca; border-color: #e0e7ff; }
.doc-team-card--amber .doc-team-tag { background: #fffbeb; color: #b45309; border-color: #fef3c7; }
.doc-team-card--lead .doc-team-tag { background: #fffbeb; color: #b45309; border-color: #fde68a; }

.doc-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .85rem;
}
.doc-contact-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .85rem;
}
.doc-contact-block {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid #e8edf4;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}
.doc-contact-block--whatsapp { border-top: 3px solid #25d366; }
.doc-contact-block--web { border-top: 3px solid #6366f1; }
.doc-contact-block-head {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #475569;
    margin-bottom: .65rem;
}
.doc-contact-block--whatsapp .doc-contact-block-head { color: #15803d; }
.doc-contact-block--whatsapp .doc-contact-block-head .bi { color: #25d366; }
.doc-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.doc-contact-list a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .84rem;
    font-weight: 600;
    color: #0f766e;
    text-decoration: none;
    padding: .35rem .5rem;
    border-radius: 8px;
    transition: background .15s, color .15s;
}
.doc-contact-list a:hover {
    background: #ecfdf5;
    color: #047857;
}
.doc-contact-website {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .88rem;
    font-weight: 600;
    color: #4338ca;
    text-decoration: none;
    padding: .4rem .55rem;
    border-radius: 8px;
    transition: background .15s;
}
.doc-contact-website:hover {
    background: #eef2ff;
    color: #3730a3;
}

@media (max-width: 1100px) {
    .doc-steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .doc-page {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 1rem;
    }
    .doc-sidebar {
        position: static;
        max-height: none;
    }
    .doc-tabs {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: .5rem;
        -webkit-overflow-scrolling: touch;
    }
    .doc-tab {
        flex: 0 0 auto;
        min-width: 155px;
        grid-template-columns: auto 1fr;
        padding-left: .75rem;
    }
    .doc-tab-indicator { display: none; }
    .doc-tab-num { display: none; }
    .doc-pane-body { max-height: none; }
    .doc-main { min-height: auto; }
    .doc-main-footer {
        grid-template-columns: 1fr;
        gap: .65rem;
    }
    .doc-footer-center { order: -1; }
    .doc-nav-prev,
    .doc-nav-next { width: 100%; justify-content: center; }
    .doc-pane-head { padding: 1.1rem 1.15rem; }
    .doc-pane-head h2 { font-size: 1.1rem; }
    .doc-team-grid { grid-template-columns: 1fr; }
    .doc-team-card--wide { grid-column: auto; }
    .doc-team-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* —— Configuration entreprise —— */
.entreprise-page {
    --ent-accent: #6366f1;
    --ent-accent-2: #4f46e5;
    --ent-soft: #eef2ff;
    --ent-border: #e8edf5;
    --ent-text: #0f172a;
    --ent-muted: #64748b;
    margin-top: .15rem;
}
.entreprise-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.entreprise-aside {
    position: sticky;
    top: .75rem;
}
.entreprise-card {
    background: #fff;
    border: 1px solid var(--ent-border);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px rgba(15, 23, 42, .05);
    overflow: hidden;
}
.entreprise-card-hero {
    padding: 1.35rem 1.1rem 1.15rem;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(255,255,255,.18), transparent 45%),
        linear-gradient(145deg, #6366f1 0%, #4338ca 55%, #312e81 100%);
}
.entreprise-avatar {
    width: 92px;
    height: 92px;
    margin: 0 auto .85rem;
    border-radius: 50%;
    background: #fff;
    border: 3px solid rgba(255,255,255,.85);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .22);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.entreprise-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 8px;
}
.entreprise-avatar-fallback {
    font-size: 1.6rem;
    color: #6366f1;
}
.entreprise-card-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.25;
}
.entreprise-card-desc {
    margin: .35rem 0 0;
    font-size: .78rem;
    opacity: .9;
    line-height: 1.35;
}
.entreprise-card-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    margin: .55rem 0 0;
    font-size: .72rem;
    opacity: .88;
}
.entreprise-card-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem;
    margin-top: .85rem;
}
.entreprise-card-badges .badge {
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.14);
    color: #fff;
}
.entreprise-card-badges .badge-success { background: rgba(16, 185, 129, .25); }
.entreprise-card-badges .badge-info { background: rgba(99, 102, 241, .3); }
.entreprise-card-badges .badge-warning { background: rgba(245, 158, 11, .28); }
.entreprise-card-badges .badge-muted { background: rgba(148, 163, 184, .25); }

.entreprise-card-logo {
    padding: 1rem 1.05rem 1.1rem;
    display: grid;
    gap: .55rem;
}
.entreprise-block-title {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ent-muted);
}
.entreprise-block-hint {
    margin: -.2rem 0 0;
    font-size: .72rem;
    color: #94a3b8;
    line-height: 1.35;
}
.entreprise-upload {
    display: grid;
    gap: .55rem;
}
.entreprise-drop {
    position: relative;
    display: grid;
    justify-items: center;
    gap: .15rem;
    padding: .95rem .7rem;
    border: 1.5px dashed #c7d2fe;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc, #eef2ff);
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s, transform .15s;
}
.entreprise-drop:hover {
    border-color: var(--ent-accent);
    background: #eef2ff;
    transform: translateY(-1px);
}
.entreprise-drop input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}
.entreprise-drop-ico {
    font-size: 1.25rem;
    color: var(--ent-accent);
    line-height: 1;
    margin-bottom: .15rem;
}
.entreprise-drop-title {
    font-size: .8rem;
    font-weight: 650;
    color: var(--ent-text);
}
.entreprise-drop-sub {
    font-size: .68rem;
    color: #94a3b8;
}
.entreprise-drop-file {
    margin-top: .3rem;
    font-size: .7rem;
    font-weight: 600;
    color: var(--ent-accent-2);
    word-break: break-all;
}
.entreprise-card-logo .btn {
    width: 100%;
    justify-content: center;
}

.entreprise-form-head {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1.05rem 1.2rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}
.entreprise-form-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ent-text);
}
.entreprise-form-head p {
    margin: .2rem 0 0;
    font-size: .75rem;
    color: var(--ent-muted);
}
.entreprise-form {
    padding: .85rem 1.15rem 1.15rem;
}
.entreprise-fieldset {
    margin: 0 0 .85rem;
    padding: 0 0 .75rem;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
}
.entreprise-fieldset-last {
    border-bottom: 0;
    margin-bottom: .35rem;
    padding-bottom: 0;
}
.entreprise-fieldset legend {
    float: none;
    width: auto;
    padding: 0;
    margin: 0 0 .65rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ent-accent);
}
.entreprise-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem .85rem;
}
.entreprise-grid .span-2 { grid-column: 1 / -1; }
.entreprise-form .form-field label {
    font-size: .75rem;
    font-weight: 600;
    color: #475569;
}
.entreprise-form .form-control {
    min-height: 38px;
    border-radius: 10px;
    border-color: #e2e8f0;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.entreprise-form .form-control:hover { border-color: #c7d2fe; }
.entreprise-form .form-control:focus {
    border-color: var(--ent-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .14);
}
.entreprise-form .form-control::placeholder {
    color: #94a3b8;
    font-size: .8rem;
}
.entreprise-form .check-item {
    margin: 0;
    border-radius: 10px;
    background: #f8fafc;
}
.entreprise-form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: .85rem;
    margin-top: .25rem;
    border-top: 1px solid #f1f5f9;
}
.entreprise-form-actions .btn {
    min-width: 220px;
    justify-content: center;
}

@media (max-width: 1100px) {
    .entreprise-layout { grid-template-columns: 1fr; }
    .entreprise-aside { position: static; }
}
@media (max-width: 640px) {
    .entreprise-grid { grid-template-columns: 1fr; }
    .entreprise-form-actions { justify-content: stretch; }
    .entreprise-form-actions .btn { width: 100%; min-width: 0; }
    .entreprise-form { padding: .8rem .9rem 1rem; }
}

