/* Viva Compta PRO — Page d'accueil unifiée */

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

.vc-body {
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    background: #0c1222;
    color: #e2e8f0;
    -webkit-font-smoothing: antialiased;
}

/* ── Shell ── */
.vc-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* ── Sidebar ── */
.vc-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #131c31 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.vc-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    margin-bottom: 8px;
    padding: 0 8px;
}

.vc-brand-mark {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 16px rgba(59,130,246,0.35);
}

.vc-brand-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.vc-brand-text em {
    font-style: normal;
    font-size: 0.65rem;
    font-weight: 800;
    background: rgba(59,130,246,0.25);
    color: #93c5fd;
    padding: 3px 8px;
    border-radius: 6px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.08em;
}

.vc-sidebar-tagline {
    font-size: 0.78rem;
    color: #64748b;
    padding: 0 8px;
    margin-bottom: 32px;
}

/* Nav tabs */
.vc-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.vc-nav-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-family: inherit;
}

.vc-nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: #cbd5e1;
}

.vc-nav-item.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(37,99,235,0.08));
    border-color: rgba(59,130,246,0.25);
    color: #fff;
    box-shadow: 0 4px 20px rgba(37,99,235,0.12);
}

.vc-nav-icon {
    font-size: 1.25rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.vc-nav-label {
    font-size: 0.95rem;
    font-weight: 600;
    flex: 1;
}

.vc-nav-desc {
    width: 100%;
    padding-left: 40px;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: -4px;
}

.vc-nav-item.active .vc-nav-desc { color: #93c5fd; }

/* Sidebar footer */
.vc-sidebar-foot {
    margin-top: auto;
    padding-top: 24px;
}

.vc-trial-pill {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(5,150,105,0.08));
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.vc-trial-pill strong {
    display: block;
    color: #6ee7b7;
    font-size: 0.88rem;
    margin-bottom: 4px;
}

.vc-trial-pill span {
    font-size: 0.72rem;
    color: #64748b;
}

.vc-sidebar-feats {
    list-style: none;
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.8;
    padding: 0 8px;
}

.vc-sidebar-feats li::before {
    content: '✓ ';
    color: #3b82f6;
}

.vc-interface-switch {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.78rem;
}

.vc-interface-switch a {
    color: #93c5fd;
    text-decoration: none;
}

.vc-interface-switch a:hover {
    text-decoration: underline;
}

/* ── Main content ── */
.vc-main {
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 50%, #e8eef5 100%);
    min-height: 100vh;
    overflow-y: auto;
    position: relative;
}

.vc-main::before {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.vc-panel {
    display: none;
    padding: 48px 56px;
    animation: vcFadeIn 0.35s ease;
    min-height: 100vh;
}

.vc-panel.active { display: block; }

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

.vc-panel-head {
    margin-bottom: 36px;
}

.vc-panel-head h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.vc-panel-head p {
    font-size: 1rem;
    color: #64748b;
}

/* ── Tarifs grid ── */
.vc-tarif-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}

.vc-tarif-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vc-slider-block {
    background: #fff;
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 2px 16px rgba(15,23,42,0.05);
    border: 1px solid rgba(15,23,42,0.04);
}

.vc-slider-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

.vc-slider-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vc-slider-ico {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.vc-slider-ico.blue  { background: #eff6ff; }
.vc-slider-ico.green { background: #ecfdf5; }
.vc-slider-ico.amber { background: #fffbeb; }

.vc-slider-info strong {
    display: block;
    font-size: 1rem;
    color: #0f172a;
}

.vc-slider-info small {
    font-size: 0.78rem;
    color: #94a3b8;
}

.vc-stepper {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.vc-step {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    transition: background 0.12s;
}

.vc-step:hover { background: #e2e8f0; }

.vc-stepper input {
    width: 48px;
    height: 40px;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
    font-family: inherit;
    -moz-appearance: textfield;
}

.vc-stepper input::-webkit-outer-spin-button,
.vc-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.vc-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    --range-fill: #2563eb;
    --range-pct: 0%;
    background: linear-gradient(
        to right,
        var(--range-fill) 0%,
        var(--range-fill) var(--range-pct),
        #e2e8f0 var(--range-pct),
        #e2e8f0 100%
    );
}

.vc-range.blue  { --range-fill: #2563eb; accent-color: #2563eb; }
.vc-range.green { --range-fill: #059669; accent-color: #059669; }
.vc-range.amber { --range-fill: #d97706; accent-color: #d97706; }

.vc-range::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: transparent;
}

.vc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--range-fill);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: grab;
    margin-top: -8px;
}

.vc-range::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
}

.vc-range::-moz-range-progress {
    height: 6px;
    border-radius: 3px;
    background: var(--range-fill);
}

.vc-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--range-fill);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: grab;
}

.vc-range.blue  { color: #2563eb; }
.vc-range.green { color: #059669; }
.vc-range.amber { color: #d97706; }

.vc-unit-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.vc-unit {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.vc-unit span {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #2563eb;
}

.vc-unit small {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Recap card */
.vc-recap-card {
    background: #fff;
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 8px 40px rgba(15,23,42,0.08);
    border: 1px solid rgba(15,23,42,0.04);
    position: sticky;
    top: 48px;
}

.vc-recap-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
}

.vc-recap-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.vc-recap-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
    color: #475569;
}

.vc-recap-row strong {
    color: #0f172a;
    font-weight: 600;
}

.vc-recap-row.vc-recap-sub {
    font-size: 0.85rem;
    color: #64748b;
    padding-top: 4px;
    border-top: 1px dashed #e2e8f0;
}

.vc-recap-row.vc-recap-sub strong {
    color: #475569;
    font-weight: 600;
}

.vc-recap-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 18px;
    border-top: 2px solid #f1f5f9;
    margin-bottom: 8px;
}

.vc-recap-total span {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.vc-recap-total strong {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.vc-recap-total strong small {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
}

.vc-recap-note {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-bottom: 24px;
}

.vc-trust {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    font-size: 0.78rem;
    color: #64748b;
}

/* ── Buttons ── */
.vc-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}

.vc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(37,99,235,0.4);
}

.vc-btn-full { width: 100%; }

/* ── Auth panels ── */
.vc-auth-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 96px);
    width: 100%;
    max-width: 100%;
    padding: 0 24px;
    box-sizing: border-box;
}

.vc-auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 28px;
    padding: 44px 40px;
    box-shadow: 0 12px 48px rgba(15,23,42,0.08);
    border: 1px solid rgba(15,23,42,0.04);
    box-sizing: border-box;
    overflow: hidden;
}

.vc-auth-card--wide { max-width: 480px; }

.vc-auth-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.vc-auth-card h1 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.vc-auth-sub {
    text-align: center;
    font-size: 0.92rem;
    color: #64748b;
    margin-bottom: 28px;
}

.vc-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.vc-badges span {
    font-size: 0.72rem;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 5px 12px;
    border-radius: 20px;
}

.vc-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.vc-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.vc-form-row > .vc-input-wrap {
    min-width: 0;
    max-width: 100%;
}

.vc-input-wrap {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    position: relative;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.vc-input-wrap:focus-within {
    border-color: #93c5fd;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}

.vc-input-ico {
    padding: 0 4px 0 14px;
    font-size: 1rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.vc-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px 12px 15px 4px;
    font-size: 0.95rem;
    color: #0f172a;
    outline: none;
    font-family: inherit;
    min-width: 0;
    width: 0;
    box-sizing: border-box;
}

.vc-input-wrap input::placeholder { color: #cbd5e1; }

.vc-input-wrap--code input {
    text-align: center;
    font-size: 1.8rem;
    letter-spacing: 12px;
    font-family: monospace;
    padding: 16px;
    width: 100%;
}

.vc-toggle-pwd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 4px;
    border: none;
    background: none;
    color: #64748b;
    padding: 0;
    cursor: pointer;
    border-radius: 10px;
    transition: color 0.15s, background 0.15s;
}

.vc-toggle-pwd:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

.vc-eye-icon {
    fill: currentColor;
}

.vc-toggle-pwd .vc-eye-hide { display: none; }

.vc-toggle-pwd.is-visible .vc-eye-show { display: none; }
.vc-toggle-pwd.is-visible .vc-eye-hide { display: block; }

.vc-pwd-meter { margin-top: -6px; }

.vc-pwd-bars {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.vc-pwd-bars i {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    display: block;
    transition: background 0.2s;
    font-style: normal;
}

.vc-pwd-meter[data-level="1"] i:nth-child(1) { background: #ef4444; }
.vc-pwd-meter[data-level="2"] i:nth-child(-n+2) { background: #f97316; }
.vc-pwd-meter[data-level="3"] i:nth-child(-n+3) { background: #eab308; }
.vc-pwd-meter[data-level="4"] i:nth-child(-n+4) { background: #84cc16; }
.vc-pwd-meter[data-level="5"] i { background: #22c55e; }

.vc-pwd-meter span {
    font-size: 0.75rem;
    color: #94a3b8;
}

.vc-pwd-hints {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: -2px;
}

.vc-pwd-hint {
    font-size: 0.78rem;
    line-height: 1.35;
}

.vc-pwd-hint--err { color: #ef4444; }
.vc-pwd-hint--ok  { color: #22c55e; }

#pwd-confirm-hint { margin-top: -8px; }

.vc-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
    cursor: pointer;
}

.vc-check input { margin-top: 3px; accent-color: #2563eb; }

.vc-auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.88rem;
    color: #64748b;
}

.vc-auth-switch a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.vc-auth-switch a:hover { text-decoration: underline; }

.vc-error {
    color: #dc2626;
    font-size: 0.85rem;
    padding: 12px 14px;
    background: #fef2f2;
    border-radius: 10px;
}

.vc-dev-code {
    padding: 12px;
    background: #fffbeb;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #92400e;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .vc-shell { grid-template-columns: 1fr; }
    .vc-sidebar {
        position: relative;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 20px;
        gap: 12px;
    }
    .vc-sidebar-tagline, .vc-sidebar-foot { display: none; }
    .vc-nav {
        flex-direction: row;
        flex: none;
        width: 100%;
        order: 3;
    }
    .vc-nav-item { flex: 1; }
    .vc-nav-desc { display: none; }
    .vc-tarif-grid { grid-template-columns: 1fr; }
    .vc-recap-card { position: static; }
    .vc-panel { padding: 32px 24px; }
}

@media (max-width: 600px) {
    .vc-form-row { grid-template-columns: 1fr; }
    .vc-unit-cards { grid-template-columns: 1fr; }
    .vc-auth-card { padding: 32px 24px; }
}

/* ── Pages compte (paramètres app) ── */
.ebp-abo-badge {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; margin: 0 12px 8px;
    background: linear-gradient(135deg, #e8f4fd, #f0f7ff);
    border-radius: 8px; font-size: 0.8rem;
}
.ebp-abo-badge .abo-days { font-weight: 700; color: #002D5A; font-size: 1.1rem; }
.ebp-abo-badge.warning { background: linear-gradient(135deg, #fff3cd, #ffeaa7); }
.ebp-abo-badge.warning .abo-days { color: #856404; }
.ebp-abo-badge.expired { background: linear-gradient(135deg, #fdecea, #f8d7da); }
.ebp-abo-badge.expired .abo-days { color: #c0392b; }
.ebp-abo-plan { color: #666; font-size: 0.75rem; }

.compte-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; margin-bottom: 24px;
}
.compte-card {
    background: #fff; border: 1px solid #e0e0e0;
    border-radius: 8px; padding: 20px;
}
.compte-card h3 { margin: 0 0 12px; color: #002D5A; font-size: 1rem; }
.compte-stat { font-size: 2rem; font-weight: 700; color: #0059b3; }

.ebp-content .ebp-tarif-configurator {
    margin-bottom: 24px;
}
.ebp-tarif-recap-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.ebp-tarif-recap-head h2 {
    margin: 0;
}
.ebp-tarif-recap-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #e8f4fd;
    color: #002D5A;
}
.ebp-tarif-recap-badge.is-projection {
    background: #fff3cd;
    color: #856404;
}
.compte-abo-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}
.compte-abo-status-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #444;
    font-size: 0.9rem;
}
.compte-abo-status-main strong {
    font-size: 1.1rem;
    color: #002D5A;
}
.compte-abo-status-main .is-expired { color: #c0392b; }
.compte-abo-status-free {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0059b3;
}
.compte-abo-status-price small {
    display: block;
    color: #666;
    font-size: 0.8rem;
}
.compte-abo-empty,
.compte-abo-intro {
    color: #666;
    font-size: 0.92rem;
    margin: 0 0 20px;
}
.compte-abo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}
.compte-fe-card { margin-bottom: 24px; }
.compte-fe-hint {
    color: #666;
    font-size: 0.85rem;
    margin: 0 0 12px;
}
.compte-fe-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.compte-abo-activate { margin-top: 8px; }

/* Pages compte client (abonnement, utilisateurs) */
.ebp-content:has(.compte-page) {
    background: #f4f7fb;
}
.compte-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 40px 48px;
}

/* Administration utilisateurs : pleine largeur (tableau large) */
.ebp-content:has(.admin-users-page) {
    background: #f4f7fb;
}
.admin-users-page {
    padding: 24px 28px 32px;
}

.compte-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.compte-page-title,
.compte-page .ebp-page-title {
    margin: 0 0 8px;
    font-size: 1.65rem;
    font-weight: 700;
    color: #002D5A;
    letter-spacing: -0.02em;
}
.compte-page-intro {
    margin: 0;
    max-width: 620px;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.55;
}
.compte-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.compte-stat-pill {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.compte-stat-pill-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0059b3;
    line-height: 1.1;
}
.compte-stat-pill-label {
    font-size: 0.78rem;
    color: #64748b;
}
.compte-stat-pill--trial .compte-stat-pill-value {
    color: #b45309;
}
.compte-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}
.compte-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.compte-card-head h2,
.compte-card h3 {
    margin: 0;
    color: #002D5A;
    font-size: 1.05rem;
    font-weight: 700;
}
.compte-card-count {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
}
.compte-card-hint {
    font-size: 0.8rem;
    color: #94a3b8;
}
.compte-user-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.compte-user-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    background: #fafbfd;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.compte-user-item:hover {
    border-color: #dbeafe;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}
.compte-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #1d4ed8;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    flex-shrink: 0;
}
.compte-user-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.compte-user-name {
    font-size: 0.95rem;
    color: #0f172a;
}
.compte-user-email {
    font-size: 0.82rem;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.compte-user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.compte-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}
.compte-status-badge.is-active {
    background: #ecfdf5;
    color: #047857;
}
.compte-status-badge.is-pending {
    background: #fff7ed;
    color: #c2410c;
}
.compte-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}
.compte-empty-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
}
.compte-invite-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.compte-invite-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.compte-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.compte-field span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}
.compte-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.compte-field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.compte-field--wide {
    grid-column: 1 / -1;
}
.compte-invite-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Paramètres → Intégration KlassIA — style sobre et carré (charte PRO) */
.compte-page [hidden] {
    display: none !important;
}
.klassia-page .compte-card {
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #d0d7de;
    padding: 16px 18px;
}
.klassia-page .compte-card-head h2 {
    font-size: 0.95rem;
}
.klassia-page .compte-field input {
    border-radius: 0;
    padding: 7px 10px;
    font-size: 0.85rem;
    border-color: #d0d7de;
}
.klassia-page .compte-field input:focus {
    border-color: #0059b3;
    box-shadow: none;
    outline: 1px solid #0059b3;
    outline-offset: -1px;
}
.klassia-page .compte-status-badge {
    border-radius: 0;
}
.klassia-page .compte-invite-grid {
    gap: 12px;
}
.klassia-current {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}
.klassia-key-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.klassia-key-row input {
    flex: 1 1 auto;
    font-family: 'Consolas', 'Menlo', monospace;
    letter-spacing: 0.02em;
    background: #f6f8fa;
}
.klassia-key-row .ebp-btn {
    flex-shrink: 0;
    white-space: nowrap;
}
.klassia-compte-hint {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: #64748b;
}
[data-theme="dark"] .klassia-page .compte-card {
    border-color: var(--ebp-border, #30363d);
}
[data-theme="dark"] .klassia-current {
    border-bottom-color: var(--ebp-border, #30363d);
}
[data-theme="dark"] .klassia-key-row input {
    background: var(--ebp-surface, #161b22);
}
.compte-invite-msg {
    font-size: 0.85rem;
    font-weight: 600;
}
.compte-invite-msg.is-success { color: #047857; }
.compte-invite-msg.is-error { color: #c0392b; }
.compte-alert {
    padding: 14px 18px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
}
.compte-alert--warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.compte-alert a {
    color: #0059b3;
    font-weight: 600;
    text-decoration: none;
}
.compte-alert a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .compte-page {
        padding: 24px 20px 36px;
    }
    .compte-page-head {
        flex-direction: column;
    }
    .compte-user-item {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }
    .compte-user-badges {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 60px;
    }
    .compte-invite-grid {
        grid-template-columns: 1fr;
    }
}

/* Pages Système (Paramètres) */
.systeme-page .systeme-card {
    margin-bottom: 16px;
}
.systeme-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.systeme-info-table th,
.systeme-info-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e8edf2;
    text-align: left;
    vertical-align: top;
}
.systeme-info-table th {
    width: 38%;
    color: #555;
    font-weight: 600;
}
.systeme-info-table tr:last-child th,
.systeme-info-table tr:last-child td {
    border-bottom: none;
}
.systeme-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.systeme-about-hero p {
    margin: 12px 0 0;
    color: #444;
    line-height: 1.5;
}
.systeme-about-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.systeme-about-logo {
    width: 52px;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
}
.systeme-about-brand h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #002D5A;
}
.systeme-about-version {
    margin: 4px 0 0;
    color: #666;
    font-size: 13px;
}
.systeme-about-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.7;
    color: #444;
}
.systeme-about-copy {
    margin: 8px 0 0;
    font-size: 12px;
    color: #888;
}

.users-table { width: 100%; border-collapse: collapse; }
.users-table th, .users-table td {
    padding: 10px 12px; text-align: left;
    border-bottom: 1px solid #eee; font-size: 0.9rem;
}
.users-table th { background: #f5f5f5; color: #333; font-weight: 600; }

.admin-users-table th,
.admin-users-table td {
    padding: 5px 10px;
    vertical-align: middle;
}

.admin-users-table th {
    padding: 6px 10px;
}

.admin-users-table .admin-users-group-cell {
    padding: 4px 10px;
}

.admin-users-table .admin-action-btn {
    width: auto;
    height: auto;
    min-width: 0;
}

.role-badge {
    display: inline-block; padding: 2px 8px; border-radius: 0;
    font-size: 0.75rem; background: #e8f4fd; color: #002D5A;
    border: 1px solid #bfdbfe;
}
.role-badge.owner { background: #002D5A; color: #fff; }
.role-badge.admin { background: #7c3aed; color: #fff; }

.invite-form {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; margin-top: 16px; padding-top: 16px;
    border-top: 1px solid #eee;
}
.invite-form label { display: block; font-size: 0.85rem; }
.invite-form input {
    width: 100%; padding: 8px; border: 1px solid #ccc;
    border-radius: 4px; margin-top: 4px; box-sizing: border-box;
}
.invite-form .full-width { grid-column: 1 / -1; }

.admin-users-wrap { overflow-x: auto; }

.admin-users-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

.admin-users-head-actions .ebp-btn {
    padding: 8px 16px;
    font-size: 13px;
    min-height: 36px;
}

.admin-users-search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 0;
}

.admin-users-search-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.admin-users-search-field {
    position: relative;
    flex: 1 1 220px;
    max-width: 420px;
}

.admin-users-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 32px 6px 8px;
    border: 1px solid #888;
    border-radius: 0;
    font-size: 12px;
    background: #fff;
}

.admin-users-search-input:focus {
    outline: none;
    border-color: #555;
    box-shadow: none;
}

.admin-users-search-clear {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #555;
    cursor: pointer;
    font-size: 0.85rem;
}

.admin-users-search-clear:hover {
    background: #e2e8f0;
    color: #1a1a1a;
}

.admin-users-search-count {
    font-size: 0.82rem;
    color: #64748b;
    white-space: nowrap;
}

.admin-users-fold-actions {
    display: inline-flex;
    gap: 6px;
    margin-left: auto;
}

.admin-fold-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 7px 12px;
    color: #475569;
    border-color: #cbd5e1;
    white-space: nowrap;
}

.admin-fold-btn .admin-action-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.admin-fold-btn:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #94a3b8;
}

.admin-fold-btn-icon[hidden] {
    display: none !important;
}

.admin-users-no-results {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.88rem;
}

.admin-users-no-results[hidden] {
    display: none !important;
}

.admin-users-dnd-hint {
    margin: -6px 0 12px;
    font-size: 0.82rem;
    color: #64748b;
}

.admin-users-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #94a3b8;
    cursor: grab;
    border-radius: 4px;
}

.admin-drag-handle:hover {
    color: #475569;
    background: #f1f5f9;
}

.admin-drag-handle:active {
    cursor: grabbing;
}

.admin-drag-handle .admin-action-icon {
    width: 14px;
    height: 14px;
}

.admin-users-draggable.admin-users-dragging {
    opacity: 0.45;
}

.admin-users-drop-target--over .admin-users-group-cell {
    background: #dbeafe !important;
    box-shadow: inset 0 0 0 2px #2563eb;
}

.admin-users-group-row--warn.admin-users-drop-target--over .admin-users-group-cell {
    background: #fef3c7 !important;
    box-shadow: inset 0 0 0 2px #d97706;
}

.admin-users-grouped-table .admin-users-group-row { cursor: default; }

.admin-users-group-cell {
    background: #f1f5f9;
    border-top: 2px solid #e2e8f0;
}

.admin-users-group-row--warn .admin-users-group-cell {
    background: #fffbeb;
}

.admin-users-group-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-users-group-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.admin-users-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.admin-users-group-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1.25rem;
    line-height: 1;
    color: #475569;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.admin-users-group-toggle:hover .admin-users-group-chevron {
    color: #1e293b;
}

.admin-users-group-row[data-expanded="0"] .admin-users-group-chevron {
    transform: rotate(-90deg);
}

.admin-users-group-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 0;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
}

.admin-users-group-badge--warn {
    background: #fde68a;
    color: #92400e;
}

.admin-users-group-meta,
.admin-users-group-price {
    margin-left: 6px;
    font-size: 0.82rem;
    color: #64748b;
}

.admin-users-group-aside {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.admin-users-group-item td:first-child {
    padding-left: 2rem;
}

.admin-users-group-item[hidden],
.admin-users-table tr[hidden] {
    display: none !important;
}

.admin-field-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
}

.admin-create-dialog {
    width: min(480px, calc(100vw - 32px));
}

.admin-create-form label {
    margin-bottom: 12px;
}

.admin-edit-client-abo-select {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.admin-edit-client-abo-select select {
    width: 100%;
}

.admin-abo-select {
    width: 100%;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid #888;
    border-radius: 0;
    padding: 6px 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    appearance: auto;
}

.admin-abo-select--essai {
    background: #fffbeb;
    color: #92400e;
    border-color: #d97706;
}

.admin-abo-select--gratuit {
    background: #f0fdf4;
    color: #166534;
    border-color: #16a34a;
}

.admin-abo-select--actif {
    background: #eff6ff;
    color: #1e40af;
    border-color: #2563eb;
}

.admin-abo-select--impaye {
    background: #fff7ed;
    color: #9a3412;
    border-color: #ea580c;
}

.admin-abo-select option {
    font-weight: 600;
    padding: 8px;
}

.admin-abo-select option[value="essai"] {
    background-color: #fef9c3;
    color: #a16207;
}

.admin-abo-select option[value="gratuit"] {
    background-color: #dcfce7;
    color: #15803d;
}

.admin-abo-select option[value="actif"] {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.admin-abo-select option[value="impaye"] {
    background-color: #ffedd5;
    color: #c2410c;
}

.admin-edit-client-abo {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 0;
    background: #fff;
}

.admin-edit-client-abo-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-edit-client-abo-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.admin-edit-client-abo-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.admin-edit-client-abo-montant {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.admin-edit-client-abo-detail {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.admin-edit-client-abo-lignes {
    margin: 8px 0 0;
    padding-left: 1.1rem;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.45;
}

.admin-edit-client-abo-lignes li + li {
    margin-top: 2px;
}

.admin-users-table { min-width: 1100px; }

.admin-dossiers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-dossiers--client {
    max-width: none;
}

.admin-dossier-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 0;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid #bfdbfe;
}

.admin-dossier-pill--colored {
    --dossier-couleur: #3b82f6;
    background: color-mix(in srgb, var(--dossier-couleur) 22%, white);
    color: var(--dossier-couleur);
    border: 1px solid color-mix(in srgb, var(--dossier-couleur) 35%, white);
}

.admin-dossiers-count {
    margin-top: 4px;
    font-size: 0.72rem;
    color: #94a3b8;
}

.admin-dossiers-empty {
    font-size: 0.82rem;
    color: #94a3b8;
    font-style: italic;
}

.admin-abo {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 0;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.admin-abo--trial { background: #fffbeb; color: #92400e; border-color: #fcd34d; }
.admin-abo--gratuit { background: #f0fdf4; color: #166534; border-color: #86efac; }
.admin-abo--active { background: #eff6ff; color: #1e40af; border-color: #93c5fd; }
.admin-abo--impaye { background: #fff7ed; color: #9a3412; border-color: #fdba74; }
.admin-abo--expired { background: #fffbeb; color: #92400e; border-color: #fcd34d; opacity: 0.75; }

.admin-abo-detail {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
    max-width: 220px;
}

.admin-btn-pwd { white-space: nowrap; }

.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.admin-user-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 0;
    white-space: nowrap;
    border: 1px solid transparent;
}
.admin-user-status--active {
    color: #1e7e34;
    background: rgba(39, 174, 96, 0.12);
}
.admin-user-status--pending {
    color: #856404;
    background: rgba(241, 196, 15, 0.2);
}
.admin-user-status--inactive {
    color: #6c757d;
    background: rgba(108, 117, 125, 0.15);
}
.admin-users-row--inactive td {
    color: #94a3b8;
    background: #f8fafc;
}
.admin-users-row--inactive .role-badge {
    opacity: 0.65;
}
.admin-users-inactive-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    margin-right: 6px;
    vertical-align: middle;
}

.admin-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 34px;
    padding: 6px 10px;
    line-height: 1.2;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.admin-action-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}

.admin-action-label {
    display: inline-block;
}

.admin-btn-client {
    color: #2563eb;
    border-color: #bfdbfe;
}

.admin-btn-client:hover {
    background: #eff6ff;
}

.admin-btn-edit-client {
    color: #475569;
    border-color: #cbd5e1;
}

.admin-btn-edit-client:hover {
    background: #f8fafc;
    color: #1e293b;
}

.admin-btn-edit-user {
    color: #334155;
    border-color: #cbd5e1;
}

.admin-btn-edit-user:hover {
    background: #f8fafc;
    color: #0f172a;
}

.admin-btn-pwd {
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.admin-btn-pwd:hover {
    background: #eff6ff;
}

.admin-btn-login {
    color: #0f766e;
    border-color: #99f6e4;
}

.admin-btn-login:hover {
    background: #f0fdfa;
}

.admin-btn-delete {
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

.admin-btn-delete:hover {
    background: #fef2f2 !important;
}

.admin-pro-modal[hidden] { display: none !important; }

.admin-pro-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.admin-pro-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.admin-pro-modal-window {
    position: relative;
    width: min(480px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    border: 1px solid #888;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    background: #f0f0f0;
    overflow: hidden;
}

.admin-pro-modal-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(180deg, #fff 0%, #ececec 100%);
    border-bottom: 1px solid #aaa;
    flex-shrink: 0;
}

.admin-pro-modal-title {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
}

.admin-pro-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 0 2px;
}

.admin-pro-modal-close:hover {
    color: #1a1a1a;
}

.admin-pro-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    background: #f5f5f5;
    min-height: 0;
}

.admin-pro-modal-subtitle {
    margin: 0 0 12px;
    font-size: 12px;
    color: #555;
    line-height: 1.45;
}

.admin-pro-form label {
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.admin-pro-form input,
.admin-pro-form select {
    width: 100%;
    margin-top: 4px;
    padding: 6px 8px;
    border: 1px solid #888;
    border-radius: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 12px;
    background: #fff;
}

.admin-pro-form input:focus,
.admin-pro-form select:focus {
    outline: none;
    border-color: #555;
}

.admin-pro-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 14px -18px -16px;
    padding: 10px 12px;
    background: #ececec;
    border-top: 1px solid #aaa;
}

.admin-pro-modal-msg {
    margin: 10px 0 0;
    font-size: 12px;
}

/* Legacy aliases (autres pages auth) */
.admin-pwd-modal[hidden] { display: none !important; }

.admin-pwd-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-pwd-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.admin-pwd-dialog {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    background: #f0f0f0;
    border: 1px solid #888;
    border-radius: 0;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.admin-pwd-dialog h3 {
    margin: 0;
    padding: 8px 12px;
    background: linear-gradient(180deg, #fff 0%, #ececec 100%);
    border-bottom: 1px solid #aaa;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 600;
}

.admin-pwd-user {
    margin: 0 0 12px;
    color: #555;
    font-size: 12px;
}

.admin-pwd-form label {
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    color: #333;
    font-weight: 600;
}

.admin-pwd-form input,
.admin-pwd-form select {
    width: 100%;
    margin-top: 4px;
    padding: 6px 8px;
    border: 1px solid #888;
    border-radius: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 12px;
    background: #fff;
}

.admin-pwd-form {
    padding: 16px 18px;
    background: #f5f5f5;
}

.admin-pwd-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 14px -18px -16px;
    padding: 10px 12px;
    background: #ececec;
    border-top: 1px solid #aaa;
}

.admin-pwd-msg {
    margin: 10px 0 0;
    font-size: 12px;
}

/* ── Thème sombre : pages compte & administration utilisateurs ── */
[data-theme="dark"] .ebp-content:has(.compte-page),
[data-theme="dark"] .ebp-content:has(.admin-users-page) {
    background: var(--ebp-white, #161b22);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .compte-page-title,
[data-theme="dark"] .compte-page .ebp-page-title,
[data-theme="dark"] .compte-card-head h2,
[data-theme="dark"] .compte-card h3 {
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .compte-page-intro,
[data-theme="dark"] .compte-card-count,
[data-theme="dark"] .compte-card-hint,
[data-theme="dark"] .compte-user-email,
[data-theme="dark"] .compte-empty,
[data-theme="dark"] .admin-users-search-count,
[data-theme="dark"] .admin-users-dnd-hint,
[data-theme="dark"] .admin-users-group-meta,
[data-theme="dark"] .admin-users-group-price,
[data-theme="dark"] .admin-field-hint,
[data-theme="dark"] .admin-edit-client-abo-label,
[data-theme="dark"] .admin-edit-client-abo-detail,
[data-theme="dark"] .admin-edit-client-abo-lignes,
[data-theme="dark"] .admin-abo-detail,
[data-theme="dark"] .admin-dossiers-count,
[data-theme="dark"] .admin-dossiers-empty {
    color: var(--ebp-text-light, #8b949e);
}

[data-theme="dark"] .compte-stat-pill,
[data-theme="dark"] .compte-card {
    background: var(--ebp-surface-2, #1c2330);
    border-color: var(--ebp-border, #30363d);
    box-shadow: none;
}

[data-theme="dark"] .compte-stat-pill-value {
    color: #79c0ff;
}

[data-theme="dark"] .compte-stat-pill-label {
    color: var(--ebp-text-light, #8b949e);
}

[data-theme="dark"] .compte-user-item {
    background: var(--ebp-surface-2, #1c2330);
    border-color: var(--ebp-border, #30363d);
}

[data-theme="dark"] .compte-user-item:hover {
    border-color: #484f58;
    box-shadow: none;
}

[data-theme="dark"] .compte-user-name {
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .compte-user-avatar {
    background: rgba(31, 111, 235, 0.18);
    color: #79c0ff;
}

[data-theme="dark"] .compte-field span {
    color: var(--ebp-text-light, #8b949e);
}

[data-theme="dark"] .compte-field input,
[data-theme="dark"] .compte-alert {
    background: var(--ebp-surface-2, #1c2330);
    border-color: var(--ebp-border, #30363d);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .compte-alert--warning {
    background: rgba(210, 153, 34, 0.12);
    border-color: rgba(210, 153, 34, 0.35);
    color: #f0c040;
}

[data-theme="dark"] .compte-alert a {
    color: #79c0ff;
}

[data-theme="dark"] .users-table th,
[data-theme="dark"] .users-table td {
    border-bottom-color: var(--ebp-border, #30363d);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .users-table th {
    background: var(--ebp-surface-3, #252d3a);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .users-table tbody tr:nth-child(even) td {
    background: var(--ebp-row-alt, #1a2030);
}

[data-theme="dark"] .users-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .role-badge {
    background: rgba(31, 111, 235, 0.18);
    color: #79c0ff;
}

[data-theme="dark"] .admin-users-search-bar {
    background: var(--ebp-toolbar, #161b22);
    border-color: var(--ebp-border, #30363d);
}

[data-theme="dark"] .admin-users-search-label {
    color: var(--ebp-text-light, #8b949e);
}

[data-theme="dark"] .admin-users-search-input {
    background: var(--ebp-surface-2, #1c2330);
    border-color: var(--ebp-border, #30363d);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-users-search-clear {
    color: var(--ebp-text-light, #8b949e);
}

[data-theme="dark"] .admin-users-search-clear:hover {
    background: var(--ebp-surface-3, #252d3a);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-fold-btn {
    color: var(--ebp-text-light, #8b949e);
    border-color: var(--ebp-border, #30363d);
}

[data-theme="dark"] .admin-fold-btn:hover {
    background: var(--ebp-surface-3, #252d3a);
    color: var(--ebp-text, #e6edf3);
    border-color: #484f58;
}

[data-theme="dark"] .admin-users-no-results {
    background: rgba(210, 153, 34, 0.12);
    color: #f0c040;
}

[data-theme="dark"] .admin-drag-handle {
    color: var(--ebp-text-light, #8b949e);
}

[data-theme="dark"] .admin-drag-handle:hover {
    color: var(--ebp-text, #e6edf3);
    background: var(--ebp-surface-3, #252d3a);
}

[data-theme="dark"] .admin-users-group-cell {
    background: var(--ebp-surface-2, #1c2330);
    border-top-color: var(--ebp-border, #30363d);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-users-group-row--warn .admin-users-group-cell {
    background: rgba(210, 153, 34, 0.1);
}

[data-theme="dark"] .admin-users-drop-target--over .admin-users-group-cell {
    background: rgba(31, 111, 235, 0.18) !important;
    box-shadow: inset 0 0 0 2px #2563eb;
}

[data-theme="dark"] .admin-users-group-row--warn.admin-users-drop-target--over .admin-users-group-cell {
    background: rgba(210, 153, 34, 0.18) !important;
    box-shadow: inset 0 0 0 2px #d97706;
}

[data-theme="dark"] .admin-users-group-chevron {
    color: var(--ebp-text-light, #8b949e);
}

[data-theme="dark"] .admin-users-group-toggle:hover .admin-users-group-chevron {
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-users-group-badge {
    background: var(--ebp-surface-3, #252d3a);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-users-group-badge--warn {
    background: rgba(210, 153, 34, 0.2);
    color: #f0c040;
}

[data-theme="dark"] .admin-edit-client-abo {
    background: var(--ebp-surface-2, #1c2330);
    border-color: var(--ebp-border, #30363d);
}

[data-theme="dark"] .admin-edit-client-abo-montant {
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-abo-select {
    border-color: var(--ebp-border, #30363d);
}

[data-theme="dark"] .admin-abo-select--essai {
    background: rgba(210, 153, 34, 0.12);
    color: #f0c040;
    border-color: rgba(210, 153, 34, 0.35);
}

[data-theme="dark"] .admin-abo-select--gratuit {
    background: rgba(46, 160, 67, 0.12);
    color: #7ee787;
    border-color: rgba(46, 160, 67, 0.35);
}

[data-theme="dark"] .admin-abo-select--actif {
    background: rgba(31, 111, 235, 0.12);
    color: #79c0ff;
    border-color: rgba(31, 111, 235, 0.35);
}

[data-theme="dark"] .admin-abo-select--impaye {
    background: rgba(248, 81, 73, 0.12);
    color: #ff8a84;
    border-color: rgba(248, 81, 73, 0.35);
}

[data-theme="dark"] .admin-dossier-pill {
    background: rgba(31, 111, 235, 0.15);
    color: #79c0ff;
    border-color: rgba(31, 111, 235, 0.35);
}

[data-theme="dark"] .admin-dossier-pill--colored {
    background: color-mix(in srgb, var(--dossier-couleur) 22%, #161b22);
    border-color: color-mix(in srgb, var(--dossier-couleur) 35%, #161b22);
}

[data-theme="dark"] .admin-abo {
    background: var(--ebp-surface-3, #252d3a);
    color: var(--ebp-text-light, #8b949e);
    border-color: var(--ebp-border, #30363d);
}

[data-theme="dark"] .admin-abo--trial {
    background: rgba(210, 153, 34, 0.12);
    color: #f0c040;
    border-color: rgba(210, 153, 34, 0.35);
}

[data-theme="dark"] .admin-abo--gratuit {
    background: rgba(46, 160, 67, 0.12);
    color: #7ee787;
    border-color: rgba(46, 160, 67, 0.35);
}

[data-theme="dark"] .admin-abo--active {
    background: rgba(31, 111, 235, 0.12);
    color: #79c0ff;
    border-color: rgba(31, 111, 235, 0.35);
}

[data-theme="dark"] .admin-abo--impaye {
    background: rgba(248, 81, 73, 0.12);
    color: #ff8a84;
    border-color: rgba(248, 81, 73, 0.35);
}

[data-theme="dark"] .admin-abo--expired {
    background: rgba(210, 153, 34, 0.1);
    color: #f0c040;
    border-color: rgba(210, 153, 34, 0.3);
}

[data-theme="dark"] .admin-user-status--active {
    color: #7ee787;
    background: rgba(46, 160, 67, 0.15);
}

[data-theme="dark"] .admin-user-status--pending {
    color: #f0c040;
    background: rgba(210, 153, 34, 0.15);
}

[data-theme="dark"] .admin-user-status--inactive {
    color: var(--ebp-text-light, #8b949e);
    background: rgba(139, 148, 158, 0.15);
}

[data-theme="dark"] .admin-users-row--inactive td {
    color: var(--ebp-text-light, #8b949e);
    background: rgba(139, 148, 158, 0.08);
}

[data-theme="dark"] .admin-users-inactive-dot {
    background: #484f58;
}

[data-theme="dark"] .admin-btn-client {
    color: #79c0ff;
    border-color: rgba(31, 111, 235, 0.35);
}

[data-theme="dark"] .admin-btn-client:hover {
    background: rgba(31, 111, 235, 0.12);
}

[data-theme="dark"] .admin-btn-edit-client {
    color: var(--ebp-text-light, #8b949e);
    border-color: var(--ebp-border, #30363d);
}

[data-theme="dark"] .admin-btn-edit-client:hover {
    background: var(--ebp-surface-3, #252d3a);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-btn-login {
    color: #56d4cf;
    border-color: rgba(45, 212, 191, 0.35);
}

[data-theme="dark"] .admin-btn-login:hover {
    background: rgba(45, 212, 191, 0.1);
}

[data-theme="dark"] .admin-btn-delete {
    color: #ff8a84 !important;
    border-color: rgba(248, 81, 73, 0.35) !important;
}

[data-theme="dark"] .admin-btn-delete:hover {
    background: rgba(248, 81, 73, 0.12) !important;
}

[data-theme="dark"] .admin-pro-modal-window,
[data-theme="dark"] .admin-pwd-dialog {
    background: #161b22;
    border-color: #484f58;
}

[data-theme="dark"] .admin-pro-modal-titlebar,
[data-theme="dark"] .admin-pwd-dialog h3 {
    background: linear-gradient(180deg, #1c2330 0%, #161b22 100%);
    border-bottom-color: var(--ebp-border, #30363d);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-pro-modal-title,
[data-theme="dark"] .admin-pro-modal-close,
[data-theme="dark"] .admin-pwd-user {
    color: var(--ebp-text-light, #8b949e);
}

[data-theme="dark"] .admin-pro-modal-close:hover {
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-pro-modal-body,
[data-theme="dark"] .admin-pwd-form {
    background: #131920;
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-pro-modal-subtitle,
[data-theme="dark"] .admin-pro-form label,
[data-theme="dark"] .admin-pwd-form label {
    color: var(--ebp-text-light, #8b949e);
}

[data-theme="dark"] .admin-pro-form input,
[data-theme="dark"] .admin-pro-form select,
[data-theme="dark"] .admin-pwd-form input,
[data-theme="dark"] .admin-pwd-form select {
    background: var(--ebp-surface-2, #1c2330);
    border-color: var(--ebp-border, #30363d);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-pro-modal-footer,
[data-theme="dark"] .admin-pwd-actions {
    background: #161b22;
    border-top-color: var(--ebp-border, #30363d);
}
