/* 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-mark--logo {
    background: #fff;
    color: inherit;
    padding: 6px;
    box-sizing: border-box;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}
.vc-brand-mark--logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.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-ico.slate { background: #f1f5f9; }

.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(2, 1fr);
    gap: 12px;
}

@media (min-width: 720px) {
    .vc-unit-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

.vc-option-block .vc-slider-top {
    margin-bottom: 0;
}

.vc-option-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.vc-option-toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.vc-option-switch {
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #e2e8f0;
    position: relative;
    transition: background 0.15s;
    flex-shrink: 0;
}

.vc-option-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
    transition: transform 0.15s;
}

.vc-option-toggle input:checked + .vc-option-switch {
    background: #475569;
}

.vc-option-toggle input:checked + .vc-option-switch::after {
    transform: translateX(18px);
}

.vc-option-toggle input:focus-visible + .vc-option-switch {
    outline: 2px solid #64748b;
    outline-offset: 2px;
}

.vc-option-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    min-width: 3.5rem;
}

.vc-option-toggle input:checked ~ .vc-option-label {
    color: #0f172a;
}

.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-remise-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 12px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}
.vc-remise-banner[hidden] { display: none; }
.vc-remise-banner strong {
    font-size: 0.92rem;
    font-weight: 700;
}
.vc-remise-banner span {
    font-size: 0.8rem;
    color: #047857;
}
.vc-recap-row.vc-recap-remise span,
.vc-recap-row.vc-recap-remise strong {
    color: #047857;
}
.vc-recap-total.has-remise strong {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    line-height: 1.1;
}
.vc-price-was {
    font-size: 1rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: line-through;
}

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

.vc-recap-help {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.45;
}

.vc-recap-help a {
    color: #475569;
    font-weight: 500;
    text-decoration: none;
}

.vc-recap-help a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* ── 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-forgot-link {
    text-align: center;
    margin: 4px 0 0;
    font-size: 0.85rem;
}

.vc-forgot-link a {
    color: #64748b;
    font-weight: 500;
    text-decoration: none;
}

.vc-forgot-link a:hover {
    color: #2563eb;
    text-decoration: underline;
}

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

.vc-success {
    color: #166534;
    font-size: 0.85rem;
    padding: 12px 14px;
    background: #f0fdf4;
    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; }
.ebp-abo-plan.is-disabled,
.ebp-abo-plan[aria-disabled="true"] {
    opacity: 0.7;
    cursor: default;
    color: #888;
}
.ebp-abo-plan-link {
    color: #c0392b;
    font-weight: 650;
    text-decoration: underline;
    cursor: pointer;
}
.ebp-abo-plan-link:hover {
    color: #922b21;
}

.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: color-mix(in srgb, var(--ebp-accent, #0ea5e9) 14%, #fff);
    color: var(--ebp-nav, #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 rgba(15, 23, 42, 0.04);
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}
.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-status-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.compte-abo-price-was {
    font-size: 1.05rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: line-through;
}
.compte-abo-price-now {
    font-size: 1.4rem;
    font-weight: 700;
    color: #047857;
}
.compte-abo-price-now small {
    display: inline;
    margin-left: 2px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}
.compte-abo-remise {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding: 14px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid #a7f3d0;
}
.compte-abo-remise-badge {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: #059669;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.compte-abo-remise-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.compte-abo-remise-body strong {
    color: #065f46;
    font-size: 1rem;
}
.compte-abo-remise-body span {
    color: #047857;
    font-size: 0.85rem;
}
.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 {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.compte-fe-toggle .toggle-fe {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    appearance: none;
}
.compte-fe-switch {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ebp-border, #c5d3e0) 70%, #94a3b8);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}
.compte-fe-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
    transition: transform 0.18s ease;
}
.compte-fe-toggle .toggle-fe:checked + .compte-fe-switch {
    background: var(--ebp-nav-active, #1a6bb5);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ebp-nav-active, #1a6bb5) 35%, transparent);
}
.compte-fe-toggle .toggle-fe:checked + .compte-fe-switch::after {
    transform: translateX(18px);
}
.compte-fe-toggle .toggle-fe:focus-visible + .compte-fe-switch {
    outline: 2px solid var(--ebp-focus-ring, rgba(26, 107, 181, 0.45));
    outline-offset: 2px;
}
.compte-fe-toggle:hover .compte-fe-switch {
    background: color-mix(in srgb, var(--ebp-border, #c5d3e0) 45%, #64748b);
}
.compte-fe-toggle:hover .toggle-fe:checked + .compte-fe-switch {
    background: var(--ebp-accent-hover, var(--ebp-nav-active, #1a6bb5));
}
.compte-fe-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ebp-text-light, #555);
    min-width: 5.5em;
}
.compte-fe-toggle .toggle-fe:checked ~ .compte-fe-label {
    color: var(--ebp-nav, #003B73);
    font-weight: 600;
}
.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 / dashboard : pleine largeur workspace */
.ebp-content:has(.admin-users-page),
.ebp-content:has(.admin-dashboard-page) {
    background: var(--ebp-toolbar, #eef2f6);
}
.admin-users-page,
.admin-dashboard-page {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px 16px 32px;
}
.admin-users-page-head {
    margin-bottom: 18px;
}
.admin-users-page-head-text {
    min-width: 0;
}
.admin-users-page .compte-page-intro,
.admin-dashboard-page .compte-page-intro {
    max-width: none;
}

.admin-users-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.admin-users-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    min-width: 120px;
    padding: 10px 14px;
    background: var(--ebp-white, #fff);
    border: 1px solid var(--ebp-border, #c5d3e0);
}
.admin-users-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ebp-nav, #002D5A);
    line-height: 1;
    letter-spacing: -0.02em;
}
.admin-users-stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ebp-text-light, #555);
}
.admin-users-stat--warn .admin-users-stat-value {
    color: #92400e;
}
.admin-users-stat--warn {
    background: #fffbeb;
    border-color: #fcd34d;
}

.admin-users-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 10px;
}

.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: var(--ebp-nav, #002D5A);
    letter-spacing: -0.02em;
}
.compte-page-intro {
    margin: 0;
    max-width: 620px;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.55;
}

/* Stats Utilisateurs — même langage que les blocs abonnement */
.compte-users-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.compte-users-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.04);
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}
.compte-users-stat-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.compte-users-stat-body strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.compte-users-stat-body small {
    font-size: 0.78rem;
    color: #94a3b8;
}
.compte-users-stat-unit {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}
.compte-users-stat .ebp-tarif-recap-badge {
    flex-shrink: 0;
    margin-left: auto;
}
.compte-users-stat--trial .compte-users-stat-body strong {
    color: #b45309;
}

/* Legacy pills (autres pages éventuelles) */
.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 rgba(15, 23, 42, 0.04);
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}
.compte-stat-pill-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ebp-accent, #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 rgba(15, 23, 42, 0.04);
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}
.compte-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.compte-card-head h2,
.compte-card h3 {
    margin: 0;
    color: var(--ebp-nav, #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;
}

/* Paramètres → Raccourcis clavier */
.nav-shortcuts-head-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-shortcuts-visibility-card {
    margin-bottom: 16px;
    padding: 14px 16px;
}
.nav-shortcuts-display-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.nav-shortcuts-display-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.nav-shortcuts-display-switch {
    display: inline-flex;
    align-self: flex-start;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--ebp-border, #e2e8f0);
    background: var(--ebp-surface-2, #f1f5f9);
}
.nav-shortcuts-display-btn {
    border: none;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    color: var(--ebp-text-light, #64748b);
    background: transparent;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.nav-shortcuts-display-btn:hover {
    color: var(--ebp-text, #0f172a);
    background: color-mix(in srgb, #fff 80%, transparent);
}
.nav-shortcuts-display-btn.is-active {
    color: var(--ebp-text, #0f172a);
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}
.nav-shortcuts-display-hint {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--ebp-text-light, #64748b);
}
.nav-shortcuts-display-hint kbd,
.nav-shortcuts-display-hint u {
    font-weight: 700;
}
.nav-shortcuts-visibility-card kbd {
    display: inline-block;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--ebp-text, #334155);
    background: var(--ebp-surface-2, #f1f5f9);
    border: 1px solid var(--ebp-border, #e2e8f0);
    box-shadow: 0 1px 0 var(--ebp-surface-3, #e2e8f0);
}
[data-theme="dark"] .nav-shortcuts-display-switch {
    border-color: #334155;
    background: #1e293b;
}
[data-theme="dark"] .nav-shortcuts-display-btn {
    color: #94a3b8;
}
[data-theme="dark"] .nav-shortcuts-display-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .nav-shortcuts-display-btn.is-active {
    color: #f8fafc;
    background: #334155;
    box-shadow: none;
}
[data-theme="dark"] .nav-shortcuts-visibility-card kbd {
    color: #e2e8f0;
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 1px 0 #0f172a;
}
.nav-shortcuts-page .compte-page-intro kbd {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 0 #cbd5e1;
}
.nav-shortcuts-card .compte-card-head {
    margin-bottom: 14px;
}
.nav-shortcuts-table th,
.nav-shortcuts-table td {
    vertical-align: middle;
}
.nav-shortcuts-table .nav-shortcuts-label {
    font-weight: 600;
    color: var(--ebp-text, #1e293b);
}
.nav-shortcuts-combo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    min-width: 5.5rem;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--ebp-nav, #002D5A);
    background: color-mix(in srgb, var(--ebp-nav-active, #0ea5e9) 12%, #f8fafc);
    border: 1px solid color-mix(in srgb, var(--ebp-nav-active, #0ea5e9) 28%, #e2e8f0);
    white-space: nowrap;
}
.nav-shortcuts-combo.is-empty {
    font-weight: 500;
    letter-spacing: 0;
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e2e8f0;
}
.nav-shortcuts-col-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}
.nav-shortcuts-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}
.nav-shortcuts-foot {
    margin: 8px 0 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #64748b;
}
.nav-shortcuts-foot kbd {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 0 #cbd5e1;
}
[data-theme="dark"] .nav-shortcuts-combo {
    color: #e2e8f0;
    background: color-mix(in srgb, var(--ebp-nav-active, #38bdf8) 16%, #0f172a);
    border-color: color-mix(in srgb, var(--ebp-nav-active, #38bdf8) 30%, #334155);
}
[data-theme="dark"] .nav-shortcuts-combo.is-empty {
    color: #64748b;
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .nav-shortcuts-foot kbd,
[data-theme="dark"] .nav-shortcuts-page .compte-page-intro kbd {
    color: #e2e8f0;
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 1px 0 #0f172a;
}

.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: 16px 18px;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.compte-user-item:hover {
    border-color: color-mix(in srgb, var(--ebp-accent, #3b82f6) 28%, #e2e8f0);
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.compte-user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--ebp-accent-hover, #1d4ed8);
    background: color-mix(in srgb, var(--ebp-accent, #3b82f6) 12%, #fff);
    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-role-badge,
.compte-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.compte-role-badge {
    background: #e8f4fd;
    color: var(--ebp-nav, #002D5A);
}
.compte-role-badge.is-owner {
    background: color-mix(in srgb, var(--ebp-accent, #0ea5e9) 16%, #fff);
    color: var(--ebp-accent-hover, #0284c7);
}
.compte-role-badge.is-admin {
    background: color-mix(in srgb, var(--ebp-nav, #002D5A) 10%, #fff);
    color: var(--ebp-nav, #002D5A);
}
.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: 12px;
    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: var(--ebp-accent, #3b82f6);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ebp-accent, #3b82f6) 22%, transparent);
}
.compte-field--wide {
    grid-column: 1 / -1;
}
.compte-invite-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.compte-users-page .compte-invite-actions .ebp-btn-primary {
    min-height: 42px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
}
.compte-users-page .compte-abo-actions {
    margin-top: 4px;
}

/* 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-users-stats {
        grid-template-columns: 1fr;
    }
    .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;
    }
    .admin-users-page,
    .admin-dashboard-page {
        padding: 16px 10px 28px;
    }
    .admin-users-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-users-fold-actions {
        margin-left: 0;
    }
    .admin-users-group-actions {
        border-left: 0;
        padding-left: 0;
    }
}

/* Pages Système (Paramètres) */
.systeme-page .systeme-card {
    margin-bottom: 16px;
}

/* Admin — Modules (feature flags) */
.admin-modules-section-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    color: #002D5A;
}
.admin-modules-hint {
    margin: 0 0 18px;
    color: #666;
    font-size: 13px;
    line-height: 1.45;
}
.admin-modules-flash {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #e8f7ef;
    color: #155724;
    font-size: 13px;
}
.admin-modules-flash.is-error {
    background: #fdecea;
    color: #721c24;
}
.admin-modules-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-modules-empty {
    margin: 0;
    color: #666;
    font-size: 13px;
}
.admin-modules-table-wrap {
    overflow-x: auto;
    margin-bottom: 8px;
}
.admin-modules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-modules-table th,
.admin-modules-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e8edf2;
    text-align: left;
    vertical-align: middle;
}
.admin-modules-table th {
    color: #5a6d7e;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.admin-modules-col-toggle {
    width: 140px;
    text-align: center !important;
}
.admin-modules-client-name {
    font-weight: 600;
    color: #1a2b3c;
}
.admin-module-switch--table {
    display: inline-block;
    vertical-align: middle;
}
.admin-modules-table .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.admin-module-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 12px;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    cursor: pointer;
}
.admin-module-toggle:hover {
    background: #f8fafc;
}
.admin-module-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.admin-module-toggle-label {
    font-weight: 600;
    color: #1a2b3c;
    font-size: 14px;
}
.admin-module-toggle-desc {
    color: #666;
    font-size: 12.5px;
    line-height: 1.4;
}
.admin-module-switch {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
}
.admin-module-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}
.admin-module-switch-ui {
    display: block;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: #c5ced6;
    transition: background .15s ease;
    position: relative;
}
.admin-module-switch-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    transition: transform .15s ease;
}
.admin-module-switch input:checked + .admin-module-switch-ui {
    background: #0d9488;
}
.admin-module-switch input:checked + .admin-module-switch-ui::after {
    transform: translateX(20px);
}
.admin-module-switch input:focus-visible + .admin-module-switch-ui {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}
.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 {
    width: 100%;
    table-layout: fixed;
}

.admin-users-table th,
.admin-users-table td {
    padding: 9px 14px;
    vertical-align: middle;
    border-bottom-color: color-mix(in srgb, var(--ebp-border, #c5d3e0) 70%, #fff);
}

.admin-users-table th {
    padding: 8px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ebp-text-light, #555);
    background: color-mix(in srgb, var(--ebp-toolbar, #eef2f6) 55%, #fff);
    border-bottom: 1px solid var(--ebp-border, #c5d3e0);
    white-space: nowrap;
}

/* Répartition colonnes : nom/email prennent l’espace, actions compactes.
   Largeurs sur les <th> uniquement (table-layout:fixed) — pas sur les td
   pour éviter les collisions avec colspan / display custom. */
.admin-users-table th:nth-child(1) { width: 26%; min-width: 12rem; }
.admin-users-table th:nth-child(2) { width: 26%; }
.admin-users-table th:nth-child(3) { width: 12%; }
.admin-users-table th:nth-child(4) { width: 11%; }
.admin-users-table th:nth-child(5) { width: 10%; }
.admin-users-table th:nth-child(6) { width: 15%; }

.admin-users-table .admin-users-group-cell {
    padding: 0;
}

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

.admin-users-actions-col {
    width: 15%;
    text-align: right;
}

.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;
    background: var(--ebp-white, #fff);
    border: 1px solid var(--ebp-border, #c5d3e0);
}

.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 12px;
    flex: 1 1 280px;
    min-width: 0;
    margin-bottom: 0;
    padding: 10px 12px;
    background: var(--ebp-white, #fff);
    border: 1px solid var(--ebp-border, #c5d3e0);
}

.admin-users-search-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ebp-text-light, #555);
    white-space: nowrap;
}

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

.admin-users-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 32px 7px 10px;
    border: 1px solid var(--ebp-border, #c5d3e0);
    border-radius: 0;
    font-size: 13px;
    background: var(--ebp-white, #fff);
    color: var(--ebp-text, #1a1a1a);
}

.admin-users-search-input:focus {
    outline: none;
    border-color: var(--ebp-nav-active, #1a6bb5);
    box-shadow: 0 0 0 2px var(--ebp-focus-ring, rgba(26, 107, 181, 0.45));
}

.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: var(--ebp-text-light, #555);
    cursor: pointer;
    font-size: 0.85rem;
}

.admin-users-search-clear:hover {
    background: var(--ebp-btn-hover-bg, #f0f4f8);
    color: var(--ebp-text, #1a1a1a);
}

.admin-users-search-count {
    font-size: 0.8rem;
    color: var(--ebp-text-light, #555);
    white-space: nowrap;
}

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

.admin-fold-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 7px 12px;
    color: var(--ebp-text-light, #555);
    border-color: var(--ebp-border, #c5d3e0);
    white-space: nowrap;
}

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

.admin-fold-btn:hover {
    background: var(--ebp-btn-hover-bg, #f0f4f8);
    color: var(--ebp-nav, #002D5A);
    border-color: var(--ebp-nav-active, #1a6bb5);
}

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

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

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

.admin-users-dnd-hint {
    margin: 0 0 12px;
    font-size: 0.78rem;
    color: var(--ebp-text-light, #555);
}

/* Le <td> reste table-cell : display:grid/flex dessus fait collapse
   la colonne (surtout avec table-layout:fixed + padding-left). */
.admin-users-name-cell {
    min-width: 12rem;
    vertical-align: middle;
}

.admin-users-name-inner {
    display: grid;
    grid-template-columns: auto minmax(8rem, 1fr);
    column-gap: 8px;
    row-gap: 2px;
    align-items: start;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.admin-users-name-inner .admin-drag-handle,
.admin-users-name-inner .admin-users-inactive-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.admin-users-name-inner .admin-users-name-main,
.admin-users-name-inner .admin-user-meta {
    grid-column: 2;
    min-width: 0;
}

.admin-users-name-inner:not(:has(.admin-drag-handle)):not(:has(.admin-users-inactive-dot)) .admin-users-name-main,
.admin-users-name-inner:not(:has(.admin-drag-handle)):not(:has(.admin-users-inactive-dot)) .admin-user-meta {
    grid-column: 1 / -1;
}

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

.admin-drag-handle:hover {
    color: var(--ebp-nav, #002D5A);
    background: var(--ebp-btn-hover-bg, #f0f4f8);
}

.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: color-mix(in srgb, var(--ebp-nav-active, #1a6bb5) 14%, #fff) !important;
    box-shadow: inset 0 0 0 2px var(--ebp-nav-active, #1a6bb5);
}

.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: color-mix(in srgb, var(--ebp-nav, #002D5A) 6%, #fff);
    border-top: 1px solid var(--ebp-border, #c5d3e0);
    border-bottom: 1px solid var(--ebp-border, #c5d3e0);
}

.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: 12px 16px;
    padding: 12px 14px;
}

.admin-users-group-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex: 1 1 280px;
    min-width: 0;
}

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

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

.admin-users-group-title strong {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ebp-nav, #002D5A);
    letter-spacing: -0.01em;
}

.admin-users-group-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--ebp-text-light, #555);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.admin-users-group-toggle:hover .admin-users-group-chevron {
    color: var(--ebp-nav, #002D5A);
}

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

.admin-users-group-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 0;
    background: color-mix(in srgb, var(--ebp-nav, #002D5A) 8%, #fff);
    color: var(--ebp-nav, #002D5A);
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid color-mix(in srgb, var(--ebp-nav, #002D5A) 18%, #fff);
}

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

.admin-users-group-meta,
.admin-users-group-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ebp-text-light, #555);
    white-space: nowrap;
}

.admin-users-group-aside {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 12px;
    flex: 0 1 auto;
}

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

.admin-users-group-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding-left: 8px;
    border-left: 1px solid color-mix(in srgb, var(--ebp-border, #c5d3e0) 80%, transparent);
}

.admin-users-group-item td {
    background: var(--ebp-white, #fff);
}

.admin-users-group-item:hover td {
    background: var(--ebp-row-alt, #f5f8fb);
}

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

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

.admin-users-actions-cell {
    text-align: right;
    white-space: nowrap;
}

.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;
}

.ebp-admin-form-modal {
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
}

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

.ebp-admin-form-modal .ebp-dialog-footer {
    flex-shrink: 0;
}

.ebp-admin-form-modal .admin-pro-form label:last-of-type {
    margin-bottom: 0;
}

.admin-field-optional {
    font-weight: 400;
    color: #64748b;
}

.admin-users-name-main,
.admin-users-email-main {
    display: block;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-users-name-main {
    font-weight: 600;
    color: var(--ebp-text, #1a1a1a);
    width: 100%;
    max-width: 100%;
}

.admin-users-email-main {
    color: var(--ebp-text, #1a1a1a);
    font-size: 0.88rem;
}

.admin-user-meta {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.3;
}

.admin-users-name-cell .admin-user-meta {
    margin-left: 0;
}

[data-theme="dark"] .ebp-admin-form-modal {
    background: #161b22;
}

[data-theme="dark"] .ebp-admin-form-modal .ebp-modal-body {
    background: #131920;
}

[data-theme="dark"] .admin-field-optional,
[data-theme="dark"] .admin-user-meta {
    color: #8b949e;
}

.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-modules {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.admin-edit-client-modules legend {
    padding: 0 4px;
}
.admin-edit-client-module-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0 0;
    cursor: pointer;
    font-size: 0.88rem;
    color: #1e293b;
}
.admin-edit-client-module-row input {
    margin-top: 3px;
    flex-shrink: 0;
}
.admin-edit-client-module-row strong {
    display: block;
    font-weight: 600;
}
.admin-edit-client-module-row .admin-field-hint {
    display: block;
    margin-top: 2px;
}

.admin-edit-client-remise {
    margin: 12px 0;
    padding-top: 10px;
    border-top: 1px dashed #cbd5e1;
}
.admin-edit-client-remise-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 8px 0 6px;
}
.admin-edit-client-remise-row label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    color: #334155;
}
.admin-edit-client-remise-input {
    display: flex;
    align-items: center;
    gap: 6px;
}
.admin-edit-client-remise-input input {
    width: 100%;
    min-width: 0;
}
.admin-edit-client-remise-input span {
    flex-shrink: 0;
    color: #64748b;
    font-size: 0.8rem;
}
.admin-edit-client-remise-status {
    margin: 8px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 0.8rem;
    line-height: 1.35;
}
.admin-edit-client-remise-status[hidden] { display: none; }

.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: 980px; }

.admin-dossiers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-left: 2.15rem;
}

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

.admin-dossier-pill {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 0;
    background: color-mix(in srgb, var(--ebp-toolbar, #eef2f6) 70%, #fff);
    color: var(--ebp-text-light, #555);
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.35;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid color-mix(in srgb, var(--ebp-border, #c5d3e0) 85%, #fff);
}

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

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

.admin-dossiers-empty {
    padding-left: 2.15rem;
    font-size: 0.75rem;
    color: #94a3b8;
    font-style: italic;
}

.admin-abo {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 0;
    font-size: 0.72rem;
    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: inline-flex;
    flex-wrap: nowrap;
    gap: 5px;
    align-items: center;
    justify-content: flex-end;
}

.admin-user-status {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    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:hover td {
    background: #f1f5f9;
}
.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: 6px 0 0;
    flex-shrink: 0;
}

.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;
    border-radius: 4px;
    box-shadow: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.admin-action-btn--icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    gap: 0;
}

.admin-action-btn--icon .admin-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

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

/* Soft-color icon buttons — palette PRO (nav / teal / amber / danger) */
.ebp-btn.admin-btn-client {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.ebp-btn.admin-btn-client:hover,
.ebp-btn.admin-btn-client:focus-visible {
    color: #1e40af;
    background: #dbeafe;
    border-color: #93c5fd;
}

.ebp-btn.admin-btn-edit-client,
.ebp-btn.admin-btn-edit-user {
    color: #1a6bb5;
    background: color-mix(in srgb, var(--ebp-nav-active, #1a6bb5) 10%, #fff);
    border-color: color-mix(in srgb, var(--ebp-nav-active, #1a6bb5) 32%, #fff);
}

.ebp-btn.admin-btn-edit-client:hover,
.ebp-btn.admin-btn-edit-client:focus-visible,
.ebp-btn.admin-btn-edit-user:hover,
.ebp-btn.admin-btn-edit-user:focus-visible {
    color: var(--ebp-nav, #002D5A);
    background: color-mix(in srgb, var(--ebp-nav-active, #1a6bb5) 18%, #fff);
    border-color: var(--ebp-nav-active, #1a6bb5);
}

.ebp-btn.admin-btn-create-for-client,
.ebp-btn.admin-btn-login {
    color: #0f766e;
    background: #f0fdfa;
    border-color: #99f6e4;
}

.ebp-btn.admin-btn-create-for-client:hover,
.ebp-btn.admin-btn-create-for-client:focus-visible,
.ebp-btn.admin-btn-login:hover,
.ebp-btn.admin-btn-login:focus-visible {
    color: #115e59;
    background: #ccfbf1;
    border-color: #5eead4;
}

.ebp-btn.admin-btn-pwd {
    color: #b45309;
    background: #fffbeb;
    border-color: #fcd34d;
}

.ebp-btn.admin-btn-pwd:hover,
.ebp-btn.admin-btn-pwd:focus-visible {
    color: #92400e;
    background: #fef3c7;
    border-color: #fbbf24;
}

.ebp-btn.admin-btn-delete {
    color: var(--ebp-danger-text, #b91c1c) !important;
    background: var(--ebp-danger-bg, #fef2f2) !important;
    border-color: var(--ebp-danger-border, #f0a8a8) !important;
}

.ebp-btn.admin-btn-delete:hover,
.ebp-btn.admin-btn-delete:focus-visible {
    color: var(--ebp-danger-hover, #b91c1c) !important;
    background: var(--ebp-danger-bg-hover, #fee2e2) !important;
    border-color: var(--ebp-danger, #dc2626) !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,
        var(--ebp-nav, var(--ebp-titlebar, #003b73)) 0%,
        var(--ebp-titlebar, var(--ebp-nav, #002d5a)) 100%
    );
    border-bottom: 1px solid rgba(0, 0, 0, 0.28);
    color: #fff;
    flex-shrink: 0;
}

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

.admin-pro-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.88);
    padding: 0 2px;
}

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

.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),
[data-theme="dark"] .ebp-content:has(.admin-dashboard-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-users-stat,
[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,
[data-theme="dark"] .compte-users-stat-body small,
[data-theme="dark"] .compte-users-stat-unit {
    color: var(--ebp-text-light, #8b949e);
}

[data-theme="dark"] .compte-users-stat-body strong {
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .compte-users-stat--trial .compte-users-stat-body strong {
    color: #f0c040;
}

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

[data-theme="dark"] .compte-user-item:hover {
    border-color: #484f58;
    background: var(--ebp-surface-2, #1c2330);
    box-shadow: none;
}

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

[data-theme="dark"] .compte-user-avatar {
    background: color-mix(in srgb, var(--ebp-accent, #3b82f6) 22%, transparent);
    color: #79c0ff;
}

[data-theme="dark"] .compte-users-stat .vc-slider-ico.blue {
    background: rgba(59, 130, 246, 0.18);
}
[data-theme="dark"] .compte-users-stat .vc-slider-ico.green {
    background: rgba(5, 150, 105, 0.18);
}
[data-theme="dark"] .compte-users-stat .vc-slider-ico.amber {
    background: rgba(217, 119, 6, 0.18);
}
[data-theme="dark"] .compte-users-stat .vc-slider-ico.slate,
[data-theme="dark"] .ebp-tarif-configurator .vc-slider-ico.slate {
    background: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .compte-users-page .ebp-tarif-recap-badge {
    background: rgba(31, 111, 235, 0.18);
    color: #79c0ff;
}

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

[data-theme="dark"] .compte-role-badge.is-owner {
    background: color-mix(in srgb, var(--ebp-accent, #0ea5e9) 28%, transparent);
    color: #79c0ff;
}

[data-theme="dark"] .compte-role-badge.is-admin {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ebp-text, #e6edf3);
}

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

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

[data-theme="dark"] .compte-abo-status-main strong {
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .compte-abo-remise {
    background: rgba(46, 160, 67, 0.12);
    border-color: rgba(46, 160, 67, 0.35);
}
[data-theme="dark"] .compte-abo-remise-body strong {
    color: #3fb950;
}
[data-theme="dark"] .compte-abo-remise-body span,
[data-theme="dark"] .compte-abo-price-now {
    color: #56d364;
}
[data-theme="dark"] .compte-abo-price-was,
[data-theme="dark"] .vc-price-was {
    color: var(--ebp-text-light, #8b949e);
}
[data-theme="dark"] .vc-remise-banner {
    background: rgba(46, 160, 67, 0.12);
    border-color: rgba(46, 160, 67, 0.35);
    color: #3fb950;
}
[data-theme="dark"] .vc-remise-banner span,
[data-theme="dark"] .vc-recap-row.vc-recap-remise span,
[data-theme="dark"] .vc-recap-row.vc-recap-remise strong {
    color: #56d364;
}

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

[data-theme="dark"] .compte-fe-switch {
    background: var(--ebp-surface-3, #252d3a);
    box-shadow: inset 0 0 0 1px var(--ebp-border, #30363d);
}

[data-theme="dark"] .compte-fe-switch::after {
    background: var(--ebp-text, #e6edf3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .compte-fe-toggle .toggle-fe:checked + .compte-fe-switch {
    background: var(--ebp-nav-active, #2563a8);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ebp-nav-active, #2563a8) 40%, transparent);
}

[data-theme="dark"] .compte-fe-toggle:hover .compte-fe-switch {
    background: color-mix(in srgb, var(--ebp-surface-3, #252d3a) 70%, #64748b);
}

[data-theme="dark"] .compte-fe-toggle:hover .toggle-fe:checked + .compte-fe-switch {
    background: var(--ebp-nav-active, #2563a8);
    filter: brightness(1.08);
}

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

[data-theme="dark"] .compte-fe-toggle .toggle-fe:checked ~ .compte-fe-label {
    color: var(--ebp-text, #e6edf3);
}

[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-stat {
    background: var(--ebp-surface-2, #1c2330);
    border-color: var(--ebp-border, #30363d);
}

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

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

[data-theme="dark"] .admin-users-stat--warn {
    background: rgba(210, 153, 34, 0.12);
    border-color: rgba(210, 153, 34, 0.45);
}

[data-theme="dark"] .admin-users-stat--warn .admin-users-stat-value {
    color: #f0c040;
}

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

[data-theme="dark"] .admin-users-table th {
    background: var(--ebp-toolbar, #161b22);
    color: var(--ebp-text-light, #8b949e);
    border-bottom-color: var(--ebp-border, #30363d);
}

[data-theme="dark"] .admin-users-group-title strong,
[data-theme="dark"] .admin-users-name-main,
[data-theme="dark"] .admin-users-email-main {
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-users-group-item td {
    background: var(--ebp-white, #161b22);
}

[data-theme="dark"] .admin-users-group-item:hover td {
    background: rgba(255, 255, 255, 0.03);
}

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

[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);
    border-bottom-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-edit-client-remise {
    border-top-color: var(--ebp-border, #30363d);
}
[data-theme="dark"] .admin-edit-client-remise-row label {
    color: var(--ebp-text, #e6edf3);
}
[data-theme="dark"] .admin-edit-client-remise-status {
    background: rgba(46, 160, 67, 0.12);
    border-color: rgba(46, 160, 67, 0.35);
    color: #3fb950;
}

[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"] .ebp-btn.admin-btn-client {
    color: #79c0ff;
    background: rgba(31, 111, 235, 0.16);
    border-color: rgba(31, 111, 235, 0.4);
}

[data-theme="dark"] .ebp-btn.admin-btn-client:hover,
[data-theme="dark"] .ebp-btn.admin-btn-client:focus-visible {
    color: #a5d6ff;
    background: rgba(31, 111, 235, 0.28);
    border-color: rgba(121, 192, 255, 0.55);
}

[data-theme="dark"] .ebp-btn.admin-btn-edit-client,
[data-theme="dark"] .ebp-btn.admin-btn-edit-user {
    color: #79c0ff;
    background: rgba(26, 107, 181, 0.18);
    border-color: rgba(26, 107, 181, 0.4);
}

[data-theme="dark"] .ebp-btn.admin-btn-edit-client:hover,
[data-theme="dark"] .ebp-btn.admin-btn-edit-client:focus-visible,
[data-theme="dark"] .ebp-btn.admin-btn-edit-user:hover,
[data-theme="dark"] .ebp-btn.admin-btn-edit-user:focus-visible {
    color: #a5d6ff;
    background: rgba(26, 107, 181, 0.3);
    border-color: rgba(121, 192, 255, 0.55);
}

[data-theme="dark"] .ebp-btn.admin-btn-create-for-client,
[data-theme="dark"] .ebp-btn.admin-btn-login {
    color: #56d4cf;
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.38);
}

[data-theme="dark"] .ebp-btn.admin-btn-create-for-client:hover,
[data-theme="dark"] .ebp-btn.admin-btn-create-for-client:focus-visible,
[data-theme="dark"] .ebp-btn.admin-btn-login:hover,
[data-theme="dark"] .ebp-btn.admin-btn-login:focus-visible {
    color: #7ee7e1;
    background: rgba(45, 212, 191, 0.22);
    border-color: rgba(45, 212, 191, 0.55);
}

[data-theme="dark"] .ebp-btn.admin-btn-pwd {
    color: #f0c040;
    background: rgba(217, 119, 6, 0.16);
    border-color: rgba(240, 192, 64, 0.4);
}

[data-theme="dark"] .ebp-btn.admin-btn-pwd:hover,
[data-theme="dark"] .ebp-btn.admin-btn-pwd:focus-visible {
    color: #f5d56a;
    background: rgba(217, 119, 6, 0.28);
    border-color: rgba(240, 192, 64, 0.55);
}

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

[data-theme="dark"] .ebp-btn.admin-btn-delete:hover,
[data-theme="dark"] .ebp-btn.admin-btn-delete:focus-visible {
    color: #ffb1ad !important;
    background: rgba(248, 81, 73, 0.24) !important;
    border-color: rgba(248, 81, 73, 0.55) !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 {
    background: linear-gradient(
        180deg,
        var(--ebp-nav, var(--ebp-titlebar, #003b73)) 0%,
        var(--ebp-titlebar, var(--ebp-nav, #002d5a)) 100%
    );
    border-bottom-color: rgba(0, 0, 0, 0.4);
    color: #fff;
}

[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 {
    color: inherit;
}

[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);
}

/* ——— Tableau de bord / Accès admin système ——— */
.admin-dashboard-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--shell-link, var(--ebp-accent, #0f766e));
}

.admin-dashboard-head {
    margin-bottom: 8px;
}

.admin-dashboard-toolbar {
    margin: 4px 0 6px;
}

.admin-dashboard-search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    background: var(--ebp-white, #fff);
    border: 1px solid var(--ebp-border, #c5d3e0);
}

.admin-dashboard-search-label,
.admin-connexions-search-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ebp-text-light, #555);
    white-space: nowrap;
}

.admin-dashboard-search-field {
    position: relative;
    flex: 1 1 320px;
    min-width: 0;
    max-width: none;
}

.admin-dashboard-search-input,
.admin-connexions-search-input {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    padding: 6px 10px 6px 30px;
    border: 1px solid var(--ebp-border, #c5d3e0);
    border-radius: 3px;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.35;
    color: var(--ebp-text, #1a1a1a);
    background-color: var(--ebp-white, #fff);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-dashboard-search-input::-webkit-search-decoration,
.admin-dashboard-search-input::-webkit-search-cancel-button,
.admin-connexions-search-input::-webkit-search-decoration,
.admin-connexions-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.admin-dashboard-search-input:hover,
.admin-connexions-search-input:hover {
    border-color: var(--ebp-nav-active, var(--ebp-accent, #1a6bb5));
}

.admin-dashboard-search-input:focus,
.admin-dashboard-search-input:focus-visible,
.admin-connexions-search-input:focus,
.admin-connexions-search-input:focus-visible {
    outline: 2px solid var(--ebp-focus-ring, rgba(26, 107, 181, 0.45));
    outline-offset: 1px;
    border-color: var(--ebp-nav-active, var(--ebp-accent, #1a6bb5));
}

.admin-dashboard-exclude-ip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid var(--ebp-border, #c5d3e0);
    border-radius: 3px;
    background: color-mix(in srgb, var(--ebp-white, #fff) 88%, var(--shell-side-active-bg, #ccfbf1));
    font-size: 12px;
    font-weight: 600;
    color: var(--ebp-text, #1a1a1a);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.admin-dashboard-exclude-ip input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--shell-link, var(--ebp-accent, #0f766e));
    cursor: pointer;
}

.admin-dashboard-exclude-ip:hover {
    border-color: var(--ebp-nav-active, var(--ebp-accent, #1a6bb5));
}

.admin-dashboard-scope {
    flex: 1 1 180px;
    min-width: 0;
    margin: 0;
    font-size: 12.5px;
    color: var(--shell-link, #0f766e);
}

.admin-dashboard-page.is-loading {
    opacity: 0.72;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.admin-dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 20px;
    width: 100%;
}

.admin-kpi {
    min-width: 0;
    padding: 14px 16px;
    border-radius: 3px;
    background: var(--ebp-white, #fff);
    border: 1px solid var(--ebp-border, #c5d3e0);
}

.admin-kpi--accent {
    border-color: color-mix(in srgb, var(--shell-link, #0f766e) 35%, var(--ebp-border, #c5d3e0));
    background: color-mix(in srgb, var(--shell-side-active-bg, #ccfbf1) 45%, #fff);
}

.admin-kpi-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ebp-text-light, #64748b);
}

.admin-kpi-value {
    display: block;
    margin-top: 6px;
    font-size: 1.85rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--ebp-nav, #0f172a);
}

.admin-kpi-meta {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--ebp-text-light, #64748b);
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}

.admin-dash-card {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 16px 16px 12px;
    border-radius: 3px;
    background: var(--ebp-white, #fff);
    border: 1px solid var(--ebp-border, #c5d3e0);
}

.admin-dash-card-head {
    margin-bottom: 10px;
}

.admin-dash-card-head h2 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ebp-nav, #0f172a);
}

.admin-dash-card-head p {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--ebp-text-light, #64748b);
}

.admin-dash-chart-wrap {
    position: relative;
    height: 260px;
}

.admin-dash-chart-wrap--sm {
    height: 220px;
}

.admin-dash-card--table {
    margin-top: 14px;
    width: 100%;
}

.admin-dash-card-head--row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.admin-connexions-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-connexions-search-input {
    width: min(320px, 100%);
    flex: 1 1 220px;
}

.admin-connexions-count {
    font-size: 12px;
    color: var(--ebp-text-light, #64748b);
    white-space: nowrap;
}

.admin-connexions-wrap {
    overflow-x: auto;
    margin-top: 4px;
    width: 100%;
}

.admin-connexions-table {
    width: 100%;
    min-width: 720px;
}

.admin-connexions-table th:nth-child(1) { width: 14%; }
.admin-connexions-table th:nth-child(2) { width: 18%; }
.admin-connexions-table th:nth-child(3) { width: 18%; }
.admin-connexions-table th:nth-child(4) { width: 12%; }
.admin-connexions-table th:nth-child(5) { width: 26%; }
.admin-connexions-table th:nth-child(6) { width: 12%; }

.admin-activite-email {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--ebp-text-light, #64748b);
}

.admin-activite-type {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.3;
    background: color-mix(in srgb, var(--ebp-border, #c5d3e0) 55%, #fff);
    color: var(--ebp-nav, #0f172a);
    white-space: nowrap;
}

.admin-activite-type--page {
    background: color-mix(in srgb, #0284c7 16%, #fff);
    color: #075985;
}

.admin-activite-type--save,
.admin-activite-type--create,
.admin-activite-type--update {
    background: color-mix(in srgb, #0f766e 16%, #fff);
    color: #115e59;
}

.admin-activite-type--delete,
.admin-activite-type--login_failed {
    background: color-mix(in srgb, #e11d48 14%, #fff);
    color: #9f1239;
}

.admin-activite-type--login,
.admin-activite-type--logout {
    background: color-mix(in srgb, #d97706 16%, #fff);
    color: #92400e;
}

.admin-activite-type--restore,
.admin-activite-type--dossier {
    background: color-mix(in srgb, #475569 14%, #fff);
    color: #334155;
}

[data-theme="dark"] .admin-activite-type--page {
    background: rgba(2, 132, 199, 0.22);
    color: #7dd3fc;
}

[data-theme="dark"] .admin-activite-type--save,
[data-theme="dark"] .admin-activite-type--create,
[data-theme="dark"] .admin-activite-type--update {
    background: rgba(15, 118, 110, 0.28);
    color: #5eead4;
}

[data-theme="dark"] .admin-activite-type--delete,
[data-theme="dark"] .admin-activite-type--login_failed {
    background: rgba(225, 29, 72, 0.22);
    color: #fda4af;
}

[data-theme="dark"] .admin-activite-type--login,
[data-theme="dark"] .admin-activite-type--logout {
    background: rgba(217, 119, 6, 0.22);
    color: #fcd34d;
}

[data-theme="dark"] .admin-activite-type--restore,
[data-theme="dark"] .admin-activite-type--dossier {
    background: rgba(100, 116, 139, 0.28);
    color: #cbd5e1;
}

.admin-connexions-ip {
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--ebp-text, #334155);
}

.admin-connexions-empty {
    margin: 16px 0 4px;
    font-size: 13px;
    color: var(--ebp-text-light, #64748b);
}

.admin-acces-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 18px;
}

.admin-acces-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--ebp-border, #d8e0e8);
    background: var(--ebp-white, #fff);
}

.admin-acces-summary-count {
    font-size: 1.6rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--ebp-nav, #0f172a);
}

.admin-acces-summary-label {
    font-size: 13px;
    color: var(--ebp-text-light, #64748b);
}

.admin-acces-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.admin-acces-card {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--ebp-border, #d8e0e8);
    background: var(--ebp-white, #fff);
}

.admin-acces-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.admin-acces-card-head h2 {
    margin: 6px 0 4px;
    font-size: 1.05rem;
    color: var(--ebp-nav, #0f172a);
}

.admin-acces-card-head p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ebp-text-light, #64748b);
}

.admin-acces-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    background: color-mix(in srgb, var(--shell-side-active-bg, #e2e8f0) 85%, #fff);
    color: var(--shell-side-active-text, #334155);
}

.admin-acces-card--admin .admin-acces-badge {
    background: color-mix(in srgb, #0f766e 16%, #fff);
    color: #115e59;
}

.admin-acces-card--owner .admin-acces-badge {
    background: color-mix(in srgb, #0284c7 14%, #fff);
    color: #075985;
}

.admin-acces-card-count {
    font-size: 1.5rem;
    font-weight: 750;
    color: var(--ebp-nav, #0f172a);
}

.admin-acces-perms {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-acces-perms li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--ebp-text, #334155);
}

.admin-acces-perm-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
}

.admin-acces-perms li.is-ok .admin-acces-perm-icon {
    background: color-mix(in srgb, #0f766e 16%, #fff);
    color: #0f766e;
}

.admin-acces-perms li.is-no {
    color: var(--ebp-text-light, #94a3b8);
}

.admin-acces-perms li.is-no .admin-acces-perm-icon {
    background: var(--ebp-surface-2, #f1f5f9);
    color: #94a3b8;
}

@media (max-width: 1280px) {
    .admin-dashboard-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .admin-dashboard-kpis,
    .admin-dashboard-grid,
    .admin-acces-grid,
    .admin-acces-summary {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .admin-dashboard-kpis,
    .admin-dashboard-grid,
    .admin-acces-grid,
    .admin-acces-summary {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-search-field,
    .admin-connexions-search-input {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
    }
}

[data-theme="dark"] .admin-kpi,
[data-theme="dark"] .admin-dash-card,
[data-theme="dark"] .admin-dashboard-search-bar,
[data-theme="dark"] .admin-acces-summary-item,
[data-theme="dark"] .admin-acces-card {
    background: var(--ebp-surface, #161b22);
    border-color: var(--ebp-border, #30363d);
    box-shadow: none;
}

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

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

[data-theme="dark"] .admin-dashboard-exclude-ip {
    background: color-mix(in srgb, #0f766e 14%, #161b22);
    border-color: var(--ebp-border, #30363d);
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-dashboard-exclude-ip:hover {
    border-color: #14b8a6;
}

[data-theme="dark"] .admin-dashboard-scope {
    color: #5eead4;
}

[data-theme="dark"] .admin-connexions-ip {
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-kpi--accent {
    background: color-mix(in srgb, #0f766e 18%, #161b22);
    border-color: color-mix(in srgb, #14b8a6 35%, #30363d);
}

[data-theme="dark"] .admin-kpi-value,
[data-theme="dark"] .admin-dash-card-head h2,
[data-theme="dark"] .admin-acces-card-head h2,
[data-theme="dark"] .admin-acces-summary-count,
[data-theme="dark"] .admin-acces-card-count {
    color: var(--ebp-text, #e6edf3);
}

[data-theme="dark"] .admin-acces-card--admin .admin-acces-badge {
    background: color-mix(in srgb, #14b8a6 22%, #161b22);
    color: #5eead4;
}

[data-theme="dark"] .admin-acces-card--owner .admin-acces-badge {
    background: color-mix(in srgb, #38bdf8 18%, #161b22);
    color: #7dd3fc;
}

[data-theme="dark"] .admin-acces-perms li.is-ok .admin-acces-perm-icon {
    background: color-mix(in srgb, #14b8a6 22%, #161b22);
    color: #5eead4;
}

[data-theme="dark"] .admin-acces-perms li.is-no .admin-acces-perm-icon {
    background: #21262d;
    color: #6e7681;
}
