/* =======================================================
   VOXIA AI — Premium Bootstrap theme
   Auteur : Voxia  |  Basé sur Bootstrap 5.3 + variables
   ======================================================= */

:root {
    --vx-primary:        #6366F1;   /* indigo */
    --vx-primary-600:    #4F46E5;
    --vx-primary-700:    #4338CA;
    --vx-accent:         #8B5CF6;
    --vx-success:        #10B981;
    --vx-warn:           #F59E0B;
    --vx-danger:         #EF4444;
    --vx-info:           #0EA5E9;

    --vx-bg:             #0B1020;
    --vx-bg-2:           #0F152B;
    --vx-surface:        #131A33;
    --vx-surface-2:      #1B2345;
    --vx-border:         rgba(255,255,255,0.08);
    --vx-text:           #E5E9F5;
    --vx-text-muted:     #8C95B4;
    --vx-text-soft:      #B5BCD6;

    --vx-radius:         14px;
    --vx-radius-lg:      20px;
    --vx-shadow:         0 10px 40px rgba(0,0,0,0.35);
    --vx-shadow-sm:      0 4px 16px rgba(0,0,0,0.25);
}

/* Clair (page marketing / login) */
.vx-theme-light {
    --vx-bg:             #F7F8FC;
    --vx-bg-2:           #FFFFFF;
    --vx-surface:        #FFFFFF;
    --vx-surface-2:      #F2F4FB;
    --vx-border:         #E6E9F2;
    --vx-text:           #0F172A;
    --vx-text-muted:     #64748B;
    --vx-text-soft:      #475569;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body {
    background: var(--vx-bg);
    color: var(--vx-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.01em;
}

/* ---------- Sidebar ---------- */
.vx-layout { display: flex; min-height: 100vh; }
/* =====================================================================
   SIDEBAR — Ultra premium
   ===================================================================== */
.vx-sidebar {
    width: 280px;
    background:
        radial-gradient(1200px 600px at -20% -10%, rgba(99,102,241,.10), transparent 60%),
        radial-gradient(800px 500px at 120% 100%, rgba(139,92,246,.08), transparent 60%),
        linear-gradient(180deg, #080C1E 0%, #0D1530 100%);
    color: #CAD1EC;
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 18px 12px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.10) transparent;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.vx-sidebar::-webkit-scrollbar { width: 6px; }
.vx-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}
.vx-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

/* ---------- Brand ---------- */
.vx-sidebar .vx-brand {
    display: flex; align-items: center; gap: .7rem;
    color: #fff; text-decoration: none;
    font-weight: 700; font-size: 1.05rem;
    padding: 4px 8px 14px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.vx-sidebar .vx-brand-logo {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6 70%, #EC4899);
    display: flex; align-items: center; justify-content: center;
    box-shadow:
        0 4px 14px rgba(99,102,241,.32),
        inset 0 1px 0 rgba(255,255,255,.18);
    flex-shrink: 0;
}
.vx-sidebar .vx-brand-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,.8);
}
.vx-sidebar .vx-brand-name {
    letter-spacing: -0.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Search ---------- */
.vx-sidebar .vx-sidebar-search {
    display: flex; align-items: center; gap: .5rem;
    padding: 8px 10px;
    margin: 12px 2px 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 9px;
    transition: border-color .15s, background .15s;
}
.vx-sidebar .vx-sidebar-search:focus-within {
    border-color: rgba(99,102,241,.5);
    background: rgba(99,102,241,.06);
}
.vx-sidebar .vx-sidebar-search i {
    color: #6A77A8; font-size: .85rem;
}
.vx-sidebar .vx-sidebar-search input {
    flex: 1; min-width: 0;
    background: transparent; border: 0; outline: 0;
    color: #E5EAF5;
    font-size: .85rem; font-family: inherit;
}
.vx-sidebar .vx-sidebar-search input::placeholder { color: #6A77A8; }
.vx-sidebar .vx-sidebar-search kbd {
    font-size: .68rem; font-weight: 600;
    padding: 2px 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    color: #8A96C3;
    font-family: inherit;
}

/* ---------- Sections ---------- */
.vx-sidebar .vx-section { margin-top: 14px; }
.vx-sidebar .vx-section:first-of-type { margin-top: 8px; }
.vx-sidebar .vx-section-label {
    padding: 0 14px 6px;
    font-size: .66rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 700;
    color: #5F6B9E;
}
.vx-sidebar .vx-nav {
    display: flex; flex-direction: column; gap: 1px;
}

/* ---------- Nav items (niveau 1) ---------- */
.vx-sidebar .vx-item {
    display: flex; align-items: center; gap: .75rem;
    width: 100%;
    padding: 9px 12px;
    border: 0; background: transparent;
    border-radius: 9px;
    color: #B7C0E4;
    text-decoration: none;
    font-size: .9rem; font-weight: 500;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: background .16s, color .16s;
    position: relative;
}
.vx-sidebar .vx-item > i:first-child {
    font-size: 1.05rem;
    width: 20px; text-align: center;
    color: #8692C1;
    transition: color .16s;
    flex-shrink: 0;
}
.vx-sidebar .vx-item .vx-label {
    flex: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vx-sidebar .vx-item:hover {
    background: rgba(255,255,255,0.045);
    color: #fff;
}
.vx-sidebar .vx-item:hover > i:first-child { color: #C3CCEA; }

.vx-sidebar .vx-item.active {
    background: linear-gradient(135deg, rgba(99,102,241,.20), rgba(139,92,246,.14));
    color: #fff;
    box-shadow:
        inset 0 0 0 1px rgba(99,102,241,.28),
        0 2px 8px rgba(99,102,241,.12);
}
.vx-sidebar .vx-item.active > i:first-child {
    color: #A5B4FC;
}
.vx-sidebar .vx-item.active::before {
    content: '';
    position: absolute; left: -12px; top: 6px; bottom: 6px;
    width: 3px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #6366F1, #8B5CF6);
    box-shadow: 0 0 10px rgba(99,102,241,.6);
}

/* ---------- Groupes (collapsibles) ---------- */
.vx-sidebar .vx-group { display: block; }
.vx-sidebar .vx-group-head .vx-chev {
    margin-left: auto; font-size: .75rem; opacity: .55;
    transition: transform .22s cubic-bezier(.4, 0, .2, 1), opacity .15s;
}
.vx-sidebar .vx-group-head:hover .vx-chev { opacity: .9; }
.vx-sidebar .vx-group.open > .vx-group-head .vx-chev {
    transform: rotate(180deg);
}
.vx-sidebar .vx-group.open > .vx-group-head {
    color: #fff;
}

.vx-sidebar .vx-sub {
    overflow: hidden;
    max-height: 0;
    transition: max-height .28s cubic-bezier(.4, 0, .2, 1);
    display: flex; flex-direction: column; gap: 1px;
    margin: 2px 0 4px 22px;
    padding-left: 12px;
    border-left: 1px dashed rgba(99,102,241,.22);
}
.vx-sidebar .vx-subitem {
    display: flex; align-items: center; gap: .6rem;
    padding: 7px 10px;
    border-radius: 7px;
    color: #8B96C4;
    text-decoration: none;
    font-size: .85rem; font-weight: 500;
    transition: background .14s, color .14s;
    position: relative;
}
.vx-sidebar .vx-subitem > i:first-child,
.vx-sidebar .vx-subitem > .vx-live-dot {
    font-size: .9rem; width: 16px; text-align: center;
    color: #6E7AAA; flex-shrink: 0;
}
.vx-sidebar .vx-subitem:hover {
    background: rgba(255,255,255,0.04);
    color: #E5EAF5;
}
.vx-sidebar .vx-subitem.active {
    background: linear-gradient(135deg, rgba(99,102,241,.22), rgba(139,92,246,.12));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(99,102,241,.28);
}
.vx-sidebar .vx-subitem.active > i:first-child { color: #A5B4FC; }
.vx-sidebar .vx-subitem.active::before {
    content: '';
    position: absolute; left: -13px; top: 50%;
    width: 7px; height: 7px; border-radius: 50%;
    transform: translateY(-50%);
    background: #6366F1;
    box-shadow: 0 0 8px rgba(99,102,241,.8);
}

/* ---------- Live dot (Monitoring) ---------- */
.vx-sidebar .vx-live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 3px rgba(34,197,94,.18), 0 0 8px rgba(34,197,94,.5);
    animation: vxLivePulse 1.6s ease-in-out infinite;
    display: inline-block;
    margin: 0 4px;
}
@keyframes vxLivePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .5; transform: scale(.85); }
}

/* ---------- Badge NEW ---------- */
.vx-sidebar .vx-badge-new {
    margin-left: auto;
    font-size: .6rem; font-weight: 800;
    letter-spacing: .08em;
    padding: 2px 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22C55E, #10B981);
    color: #052E16;
    box-shadow: 0 2px 6px rgba(34,197,94,.3);
}

/* ---------- Super admin section ---------- */
.vx-sidebar .vx-section-admin {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.vx-sidebar .vx-item-admin {
    color: #FCD34D !important;
    background: rgba(251,191,36,.06);
    border: 1px solid rgba(251,191,36,.12);
}
.vx-sidebar .vx-item-admin > i:first-child { color: #FCD34D !important; }
.vx-sidebar .vx-item-admin:hover {
    background: rgba(251,191,36,.12) !important;
}

/* ---------- Footer (profil) ---------- */
.vx-sidebar .vx-sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.vx-sidebar .vx-profile {
    display: flex; align-items: center; gap: .7rem;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    transition: background .15s, border-color .15s;
}
.vx-sidebar .vx-profile:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(99,102,241,.2);
}
.vx-sidebar .vx-avatar {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: #fff; font-weight: 700; font-size: .82rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(99,102,241,.3);
    flex-shrink: 0;
}
.vx-sidebar .vx-profile-info {
    flex: 1; min-width: 0;
}
.vx-sidebar .vx-profile-name {
    color: #E5EAF5; font-size: .85rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vx-sidebar .vx-profile-role {
    color: #6A77A8; font-size: .72rem;
    text-transform: capitalize;
}
.vx-sidebar .vx-profile-action {
    color: #8692C1;
    padding: 6px 8px;
    border-radius: 7px;
    transition: .15s;
}
.vx-sidebar .vx-profile-action:hover {
    color: #fff;
    background: rgba(99,102,241,.15);
}
.vx-sidebar .vx-version {
    text-align: center;
    color: #4A547E;
    font-size: .68rem;
    margin-top: 8px;
    letter-spacing: .04em;
}

/* ---------- Top bar ---------- */
.vx-main { flex: 1; min-width: 0; }
.vx-topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 28px;
    background: rgba(15, 21, 43, .85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--vx-border);
}
.vx-topbar .vx-search {
    flex: 1; max-width: 480px; margin: 0 24px;
    background: var(--vx-surface);
    border: 1px solid var(--vx-border);
    border-radius: 12px;
    padding: 8px 14px;
    display: flex; align-items: center; gap: .5rem;
    color: var(--vx-text-muted);
}
.vx-topbar .vx-search input {
    background: transparent; border: 0; outline: 0;
    color: var(--vx-text); width: 100%;
    font-size: .925rem;
}

/* ---------- Content ---------- */
.vx-content { padding: 28px 28px 60px; }
.vx-page-title {
    font-size: 1.6rem; font-weight: 700; color: var(--vx-text);
    margin-bottom: 4px; letter-spacing: -0.02em;
}
.vx-page-sub { color: var(--vx-text-muted); font-size: .95rem; margin-bottom: 24px; }

/* ---------- Cards ---------- */
.vx-card {
    background: var(--vx-surface);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius);
    box-shadow: var(--vx-shadow-sm);
    padding: 22px;
}
.vx-card-lg { padding: 28px; border-radius: var(--vx-radius-lg); }
.vx-card-hd {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.vx-card-hd h5 { margin: 0; font-weight: 600; font-size: 1rem; }

/* Stat cards */
.vx-stat {
    background: linear-gradient(135deg, var(--vx-surface), var(--vx-surface-2));
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius);
    padding: 22px;
    position: relative; overflow: hidden;
}
.vx-stat:before {
    content: ''; position: absolute; inset: -40% -20% auto auto;
    width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,.25), transparent 70%);
}
.vx-stat .lbl { color: var(--vx-text-muted); font-size: .85rem; font-weight: 500; }
.vx-stat .val { font-size: 2rem; font-weight: 700; margin: 6px 0; color: var(--vx-text); letter-spacing: -0.02em; }
.vx-stat .trend { color: var(--vx-success); font-size: .8rem; font-weight: 500; }
.vx-stat .trend.down { color: var(--vx-danger); }
.vx-stat .ico {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--vx-primary), var(--vx-accent));
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 8px 24px rgba(99,102,241,.35);
}

/* ---------- Tables ---------- */
.vx-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.vx-table thead th {
    background: var(--vx-surface-2);
    color: var(--vx-text-muted);
    font-weight: 600; font-size: .78rem;
    text-transform: uppercase; letter-spacing: .05em;
    padding: 12px 14px; text-align: left;
    border-bottom: 1px solid var(--vx-border);
}
.vx-table tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--vx-border);
    color: var(--vx-text);
    font-size: .925rem;
}
.vx-table tbody tr:hover td { background: rgba(99,102,241,.05); }
.vx-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Badges ---------- */
.vx-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px;
    font-size: .72rem; font-weight: 600;
    letter-spacing: .02em;
    background: var(--vx-surface-2);
    color: var(--vx-text-soft);
    border: 1px solid var(--vx-border);
}
.vx-badge.primary { background: rgba(99,102,241,.15); color: #A5A9FF; border-color: rgba(99,102,241,.3); }
.vx-badge.success { background: rgba(16,185,129,.15);  color: #4ADE80; border-color: rgba(16,185,129,.3); }
.vx-badge.warn    { background: rgba(245,158,11,.15);  color: #FBBF24; border-color: rgba(245,158,11,.3); }
.vx-badge.danger  { background: rgba(239,68,68,.15);   color: #F87171; border-color: rgba(239,68,68,.3); }
.vx-badge.info    { background: rgba(14,165,233,.15);  color: #38BDF8; border-color: rgba(14,165,233,.3); }

/* ---------- Buttons ---------- */
.btn-vx-primary {
    background: linear-gradient(135deg, var(--vx-primary), var(--vx-accent));
    color: #fff; border: 0;
    padding: 10px 20px; border-radius: 10px;
    font-weight: 600; font-size: .9rem;
    box-shadow: 0 6px 18px rgba(99,102,241,.35);
    transition: .2s ease;
}
.btn-vx-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(99,102,241,.5); color: #fff; }
.btn-vx-ghost {
    background: transparent; color: var(--vx-text);
    border: 1px solid var(--vx-border);
    padding: 10px 20px; border-radius: 10px; font-weight: 500;
}
.btn-vx-ghost:hover { background: var(--vx-surface-2); }
.btn-vx-danger {
    background: rgba(239,68,68,.15);
    color: #F87171;
    border: 1px solid rgba(239,68,68,.35);
    padding: 9px 18px; border-radius: 10px; font-weight: 500;
}
.btn-vx-danger:hover { background: rgba(239,68,68,.25); color: #fff; }

/* ---------- Forms ---------- */
.form-label { color: var(--vx-text-soft); font-weight: 500; font-size: .85rem; margin-bottom: 6px; }
.form-control, .form-select, textarea.form-control {
    background: var(--vx-surface);
    border: 1px solid var(--vx-border);
    color: var(--vx-text);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: .9rem;
    transition: .15s;
}
.form-control:focus, .form-select:focus {
    background: var(--vx-surface);
    border-color: var(--vx-primary);
    color: var(--vx-text);
    box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}
.form-control::placeholder { color: var(--vx-text-muted); }

/* ---------- Alerts (flash) ---------- */
.vx-alert {
    border-radius: 12px; padding: 14px 16px;
    display: flex; align-items: start; gap: .75rem;
    margin-bottom: 18px;
    border: 1px solid var(--vx-border);
}
.vx-alert.success { background: rgba(16,185,129,.1);  border-color: rgba(16,185,129,.3);  color: #4ADE80; }
.vx-alert.error   { background: rgba(239,68,68,.1);   border-color: rgba(239,68,68,.3);   color: #F87171; }
.vx-alert.warning { background: rgba(245,158,11,.1);  border-color: rgba(245,158,11,.3);  color: #FBBF24; }
.vx-alert.info    { background: rgba(14,165,233,.1);  border-color: rgba(14,165,233,.3);  color: #38BDF8; }

/* ---------- Auth screens ---------- */
.vx-auth {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
    background:
      radial-gradient(circle at 10% 20%, rgba(99,102,241,.25), transparent 40%),
      radial-gradient(circle at 85% 85%, rgba(139,92,246,.25), transparent 40%),
      var(--vx-bg);
}
.vx-auth-card {
    width: 100%; max-width: 460px;
    background: var(--vx-surface);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-lg);
    padding: 40px 36px;
    box-shadow: var(--vx-shadow);
}
.vx-auth-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.vx-auth-card p.sub { color: var(--vx-text-muted); margin-bottom: 26px; }

/* ---------- Landing (public) ---------- */
.vx-hero {
    min-height: 82vh;
    padding: 120px 20px 80px;
    background:
      radial-gradient(ellipse at top, rgba(99,102,241,.2), transparent 50%),
      radial-gradient(ellipse at bottom right, rgba(139,92,246,.15), transparent 50%),
      var(--vx-bg);
    text-align: center;
}
.vx-hero h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.1; letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #A5B4FC 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
}
.vx-hero p.lead { color: var(--vx-text-soft); font-size: 1.15rem; max-width: 680px; margin: 0 auto 30px; }

.vx-section { padding: 80px 20px; }
.vx-section .section-title {
    text-align: center; font-size: 2rem; font-weight: 700;
    margin-bottom: 40px; letter-spacing: -0.02em;
}
.vx-feature {
    background: var(--vx-surface);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius);
    padding: 28px;
    height: 100%;
}
.vx-feature .ico {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, var(--vx-primary), var(--vx-accent));
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 18px; color: #fff;
}
.vx-feature h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; }
.vx-feature p { color: var(--vx-text-muted); font-size: .92rem; }

/* Price card */
.vx-price {
    background: var(--vx-surface);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-lg);
    padding: 36px 28px;
    height: 100%;
    transition: .25s;
}
.vx-price:hover { transform: translateY(-4px); box-shadow: var(--vx-shadow); }
.vx-price.featured {
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.12));
    border-color: rgba(99,102,241,.4);
    box-shadow: 0 20px 60px rgba(99,102,241,.25);
    transform: scale(1.02);
}
.vx-price .name { font-size: 1.05rem; color: var(--vx-text-muted); text-transform: uppercase; letter-spacing: .08em; }
.vx-price .price { font-size: 2.5rem; font-weight: 700; margin: 10px 0; }
.vx-price .price sub { font-size: .8rem; color: var(--vx-text-muted); }
.vx-price ul { list-style: none; padding: 0; margin: 20px 0 24px; }
.vx-price li { padding: 7px 0; border-bottom: 1px dashed var(--vx-border); color: var(--vx-text-soft); font-size: .9rem; }

/* Avatar */
.vx-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--vx-primary), var(--vx-accent));
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 600; font-size: .85rem;
}
.vx-avatar-sm { width: 28px; height: 28px; font-size: .72rem; }

/* Tabs */
.vx-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--vx-border); margin-bottom: 24px; }
.vx-tabs a {
    padding: 10px 16px; color: var(--vx-text-muted);
    text-decoration: none; font-weight: 500; font-size: .9rem;
    border-bottom: 2px solid transparent;
}
.vx-tabs a.active { color: var(--vx-text); border-color: var(--vx-primary); }

/* Misc */
.text-muted-soft { color: var(--vx-text-muted); }
.divider { height: 1px; background: var(--vx-border); margin: 24px 0; }

@media (max-width: 900px) {
    .vx-sidebar { position: fixed; left: -280px; transition: .25s; z-index: 50; }
    .vx-sidebar.open { left: 0; }
}

/* =====================================================================
   TOPNAV HORIZONTAL — Ultra premium
   ===================================================================== */
.vx-body-horizontal { min-height: 100vh; }

.vx-topnav {
    position: sticky; top: 0; z-index: 100;
    background:
        radial-gradient(800px 300px at 0% 0%, rgba(99,102,241,.12), transparent 60%),
        radial-gradient(600px 280px at 100% 0%, rgba(236,72,153,.08), transparent 60%),
        linear-gradient(180deg, rgba(11,16,32,.95), rgba(15,21,43,.90));
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.vx-topnav-inner {
    max-width: 1600px; margin: 0 auto;
    display: flex; align-items: center; gap: 18px;
    padding: 10px 22px;
    min-height: 62px;
}

/* Brand */
.vx-topnav-brand {
    display: flex; align-items: center; gap: .7rem;
    color: #fff; text-decoration: none;
    flex-shrink: 0;
    padding: 4px 8px 4px 0;
    border-right: 1px solid rgba(255,255,255,0.07);
    margin-right: 6px;
    padding-right: 18px;
}
.vx-topnav-logo {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6 60%, #EC4899);
    display: flex; align-items: center; justify-content: center;
    box-shadow:
        0 4px 16px rgba(99,102,241,.38),
        inset 0 1px 0 rgba(255,255,255,.22);
}
.vx-topnav-logo > span {
    width: 9px; height: 9px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 12px rgba(255,255,255,.85);
}
.vx-topnav-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.vx-topnav-brand-name {
    font-weight: 700; font-size: .95rem; color: #fff;
    max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vx-topnav-brand-sub {
    font-size: .68rem; color: #7C88BD; letter-spacing: .08em; text-transform: uppercase;
    font-weight: 600;
}

/* Burger mobile */
.vx-topnav-burger {
    display: none; background: transparent; border: 0;
    color: #CAD1EC; font-size: 1.4rem; padding: 6px 10px;
    border-radius: 8px; cursor: pointer;
}
.vx-topnav-burger:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* ---------- Nav items ---------- */
.vx-topnav-menu {
    display: flex; align-items: center; gap: 2px;
    flex: 1 1 auto;
    min-width: 0;          /* autorise flex shrink */
    flex-wrap: nowrap;
    /* overflow visible impératif : sinon les panels dropdown (position: absolute)
       seraient coupés et ne s'afficheraient pas au clic. */
    overflow: visible;
}
.vx-navlink {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: 8px 12px;
    border: 0; background: transparent;
    border-radius: 9px;
    color: #B7C0E4;
    font-family: inherit;
    font-size: .88rem; font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
    position: relative;
}
.vx-navlink > i:first-child {
    font-size: 1rem; opacity: .82;
}
.vx-navlink .chev {
    font-size: .7rem; opacity: .55; margin-left: 1px;
    transition: transform .2s cubic-bezier(.4, 0, .2, 1);
}
.vx-navlink:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}
.vx-navlink.active {
    background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(139,92,246,.14));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(99,102,241,.3);
}
.vx-navlink.active > i:first-child { color: #A5B4FC; }

/* Dropdown */
.vx-nav-dd { position: relative; }
.vx-nav-dd.show > .vx-navlink {
    background: rgba(255,255,255,0.06); color: #fff;
}
.vx-nav-dd.show > .vx-navlink .chev { transform: rotate(180deg); }

.vx-nav-panel {
    position: absolute; top: calc(100% + 8px); left: 0;
    min-width: 320px;
    background: #121A36;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow:
        0 24px 60px rgba(0,0,0,.55),
        0 0 0 1px rgba(99,102,241,0.06);
    padding: 8px;
    opacity: 0; transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 500;
}
.vx-nav-dd.show > .vx-nav-panel {
    opacity: 1; transform: translateY(0);
    pointer-events: auto;
}
.vx-nav-panel::before {
    content: ''; position: absolute; top: -5px; left: 22px;
    width: 10px; height: 10px; transform: rotate(45deg);
    background: #121A36;
    border-left: 1px solid rgba(255,255,255,0.08);
    border-top: 1px solid rgba(255,255,255,0.08);
}
.vx-nav-panel-2col {
    min-width: 560px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
}
.vx-nav-dd-right > .vx-nav-panel {
    left: auto; right: 0;
}
.vx-nav-dd-right > .vx-nav-panel::before { left: auto; right: 22px; }

/* Panel items */
.vx-panel-item {
    display: flex; align-items: center; gap: .75rem;
    padding: 10px 12px;
    border-radius: 10px;
    color: #C3CBEB;
    text-decoration: none;
    transition: background .14s, color .14s;
    font-family: inherit; border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: inherit;
    cursor: pointer;
}
.vx-panel-item:hover {
    background: rgba(99,102,241,.1);
    color: #fff;
}
.vx-panel-item.active {
    background: linear-gradient(135deg, rgba(99,102,241,.22), rgba(139,92,246,.14));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(99,102,241,.28);
}
.vx-panel-item.simple { font-size: .88rem; padding: 9px 12px; }
.vx-panel-item.simple.danger { color: #FCA5A5; }
.vx-panel-item.simple.danger:hover { background: rgba(239,68,68,.1); color: #FEE2E2; }
.vx-panel-item.simple > i { width: 16px; text-align: center; opacity: .85; }

.vx-panel-item .ico {
    width: 36px; height: 36px; border-radius: 9px;
    background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(139,92,246,.12));
    border: 1px solid rgba(99,102,241,.2);
    color: #A5B4FC;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.vx-panel-item .ico.live {
    background: radial-gradient(circle, #22C55E 0%, #166534 100%);
    border-color: rgba(34,197,94,.4);
    color: #fff;
    animation: vxLivePulse 1.6s ease-in-out infinite;
    position: relative;
}
.vx-panel-item .ico.live::after {
    content: ''; width: 10px; height: 10px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 10px #fff;
}
.vx-panel-item .t {
    font-weight: 600; font-size: .88rem; color: #EEF0FA;
    display: flex; align-items: center; gap: .4rem;
}
.vx-panel-item .d {
    font-size: .76rem; color: #7C88BD; margin-top: 1px;
    line-height: 1.35;
}
.vx-panel-item:hover .d { color: #9DA8D1; }
.chip-new {
    font-size: .58rem; font-weight: 800; letter-spacing: .08em;
    padding: 1px 6px; border-radius: 999px;
    background: linear-gradient(135deg, #22C55E, #10B981);
    color: #052E16;
}

/* ---------- Right side ---------- */
.vx-topnav-right {
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0;
}
.vx-topnav-search {
    display: flex; align-items: center; gap: .45rem;
    padding: 7px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    transition: background .15s, border-color .15s;
    min-width: 240px;
}
.vx-topnav-search:focus-within {
    background: rgba(99,102,241,.07);
    border-color: rgba(99,102,241,.45);
}
.vx-topnav-search i { color: #6A77A8; font-size: .9rem; }
.vx-topnav-search input {
    flex: 1; min-width: 0;
    background: transparent; border: 0; outline: 0;
    color: #E5EAF5; font-size: .86rem; font-family: inherit;
}
.vx-topnav-search input::placeholder { color: #6A77A8; }
.vx-topnav-search kbd {
    font-size: .66rem; font-weight: 600;
    padding: 2px 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    color: #8A96C3; font-family: inherit;
}

.vx-icon-btn {
    position: relative;
    width: 38px; height: 38px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    color: #B7C0E4;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: .15s;
    text-decoration: none;
}
.vx-icon-btn:hover {
    background: rgba(99,102,241,.12);
    border-color: rgba(99,102,241,.3);
    color: #fff;
}
.vx-icon-btn-warn {
    color: #FCD34D;
    border-color: rgba(251,191,36,.25);
    background: rgba(251,191,36,.06);
}
.vx-icon-btn-warn:hover {
    background: rgba(251,191,36,.15);
    color: #FDE68A;
}
.vx-icon-dot {
    position: absolute; top: 7px; right: 8px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #EF4444;
    box-shadow: 0 0 0 2px #0D1530, 0 0 8px rgba(239,68,68,.7);
}

/* Profile */
.vx-profile-btn {
    display: flex; align-items: center; gap: .55rem;
    padding: 4px 10px 4px 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: .15s;
}
.vx-profile-btn:hover {
    background: rgba(99,102,241,.1);
    border-color: rgba(99,102,241,.3);
}
.vx-topnav-avatar {
    width: 30px; height: 30px; border-radius: 8px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: #fff; font-weight: 700; font-size: .76rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(99,102,241,.35);
    flex-shrink: 0;
}
.vx-profile-meta {
    display: flex; flex-direction: column; line-height: 1.15;
    max-width: 140px;
}
.vx-profile-meta .name {
    color: #E5EAF5; font-size: .82rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vx-profile-meta .role {
    color: #6A77A8; font-size: .68rem; text-transform: capitalize;
}
.vx-profile-btn .chev {
    font-size: .7rem; opacity: .55; color: #B7C0E4;
    transition: transform .2s;
}
.vx-nav-dd.show .vx-profile-btn .chev { transform: rotate(180deg); }

.vx-nav-panel-profile { min-width: 280px; padding: 6px; }
.vx-nav-panel-profile hr {
    border: 0; border-top: 1px solid rgba(255,255,255,0.06);
    margin: 6px 2px;
}
.vx-panel-profile-head {
    display: flex; align-items: center; gap: .7rem;
    padding: 12px 10px 14px;
    margin: -2px -2px 4px;
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.06));
    border-radius: 10px;
}
.vx-panel-profile-head .name {
    font-weight: 700; font-size: .92rem; color: #fff;
}
.vx-panel-profile-head .mail {
    font-size: .75rem; color: #7C88BD;
    max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Main (horizontal layout) ---------- */
.vx-main-h {
    max-width: 1600px;
    margin: 0 auto;
    padding: 26px 22px;
}
.vx-main-h .vx-content { padding: 0; }

/* ---------- Responsive ---------- */

/* Écrans "normaux" mais étroits (ex. 1440×900, écran ordinateur standard) :
   on resserre un peu le nav pour qu'il tienne toujours sur une ligne. */
@media (max-width: 1500px) {
    .vx-topnav-inner { gap: 12px; padding: 10px 18px; }
    .vx-topnav-brand { padding-right: 12px; margin-right: 4px; }
    .vx-topnav-brand-name { max-width: 140px; }
    .vx-topnav-menu { gap: 0; }
    .vx-navlink { padding: 7px 10px; font-size: .84rem; }
    .vx-topnav-search { min-width: 200px; }
    .vx-profile-meta { max-width: 110px; }
}

/* Écrans moyens (ex. 1366px, 1280px) : on masque les libellés des dropdowns
   (qui restent identifiables par icône + tooltip), on garde les simples liens. */
@media (max-width: 1380px) {
    .vx-nav-dd > .vx-navlink > .lbl { display: none; }
    .vx-nav-dd > .vx-navlink .chip-new { display: none; }
    .vx-nav-dd > .vx-navlink { padding: 7px 9px; }
    .vx-nav-dd > .vx-navlink .chev { margin-left: 0; opacity: .35; }
    .vx-topnav-search { min-width: 160px; }
    .vx-topnav-brand-sub { display: none; }
}

@media (max-width: 1200px) {
    .vx-topnav-search { min-width: 140px; }
    .vx-profile-meta { display: none !important; }
    /* Les liens simples perdent leur label aussi à ce stade */
    .vx-topnav-menu > a.vx-navlink > .lbl { display: none; }
    .vx-navlink { padding: 7px 9px; }
}
@media (max-width: 1024px) {
    .vx-topnav-brand-sub { display: none; }
    .vx-topnav-search { display: none; }
}
@media (max-width: 900px) {
    .vx-topnav-burger { display: flex; }
    .vx-topnav-menu {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch;
        gap: 4px;
        background: #0D1530;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        padding: 14px 18px 18px;
        max-height: 0; overflow: hidden;
        transition: max-height .25s, padding .25s;
    }
    .vx-topnav.open .vx-topnav-menu {
        max-height: 80vh; overflow-y: auto;
    }
    .vx-navlink { padding: 10px 14px; width: 100%; justify-content: flex-start; font-size: .92rem; }
    .vx-navlink .chev { margin-left: auto; opacity: .7; }
    /* En mode burger les libellés doivent réapparaître */
    .vx-topnav-menu > a.vx-navlink > .lbl,
    .vx-nav-dd > .vx-navlink > .lbl { display: inline; }
    .vx-nav-dd > .vx-navlink .chip-new { display: inline-block; }
    .vx-nav-dd { width: 100%; }
    .vx-nav-panel {
        position: static; opacity: 1; transform: none; pointer-events: auto;
        display: none; box-shadow: none; background: transparent;
        border: 0; border-left: 1px dashed rgba(99,102,241,.25);
        border-radius: 0; margin-left: 14px; padding: 4px 8px;
        min-width: 0;
    }
    .vx-nav-panel::before { display: none; }
    .vx-nav-panel-2col { grid-template-columns: 1fr; }
    .vx-nav-dd.show > .vx-nav-panel { display: block; }
    .vx-main-h { padding: 18px 14px; }
}

/* ============================================================= */
/*  Bandeau impersonation super-admin                              */
/* ============================================================= */
.vx-impersonation-bar {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: linear-gradient(90deg, #F6B935 0%, #F28F3B 100%);
    color: #1A1A1A;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.vx-impersonation-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.vx-impersonation-msg {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .92rem;
}
.vx-impersonation-msg i { font-size: 1.05rem; }
.vx-impersonation-msg strong { font-weight: 800; }
.vx-impersonation-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.vx-impersonation-actions .btn-dark {
    background: #1A1A1A;
    border-color: #1A1A1A;
}
.vx-impersonation-actions .btn-dark:hover {
    background: #000;
    border-color: #000;
}
@media (max-width: 640px) {
    .vx-impersonation-inner { padding: 8px 12px; }
    .vx-impersonation-msg { font-size: .85rem; }
}

/* ============================================================= */
/*  Bandeau essai freemium 14 jours                                */
/* ============================================================= */
.vx-trial-bar {
    position: sticky;
    top: 0;
    z-index: 1190;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 8px rgba(0,0,0,0.10);
}
.vx-trial-bar--normal  { background: linear-gradient(90deg, #6366F1 0%, #8B5CF6 100%); }
.vx-trial-bar--urgent  { background: linear-gradient(90deg, #F59E0B 0%, #F97316 100%); }
.vx-trial-bar--expired { background: linear-gradient(90deg, #EF4444 0%, #DC2626 100%); }
.vx-trial-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    font-size: .92rem;
}
.vx-trial-bar-cta {
    color: #fff;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    padding: 4px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: background .15s ease;
    white-space: nowrap;
}
.vx-trial-bar-cta:hover { background: rgba(0,0,0,0.35); color: #fff; }
@media (max-width: 640px) {
    .vx-trial-bar-inner { padding: 6px 12px; font-size: .82rem; }
}
