/* 
   ==========================================================================
   ProSpec - Premium UI Stylesheet (Inspired by SYGESCO)
   ========================================================================== 
*/

:root {
    /* Colors */
    --bg-main: #f8fafc;
    --bg-sidebar: #0f172a;
    --bg-sidebar-active: #4f46e5;

    --primary: #4f46e5;
    --primary-light: rgba(79, 70, 229, 0.1);
    --primary-hover: #4338ca;

    --text-dark: #0f172a;
    --text-medium: #334155;
    --text-light: #64748b;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;

    /* Semantic Colors */
    --success: #10b981;
    --success-light: #ecfdf5;
    --success-border: #a7f3d0;

    --info: #3b82f6;
    --info-light: #eff6ff;
    --info-border: #bfdbfe;

    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-border: #fde68a;

    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-border: #fca5a5;

    /* Sizes */
    --sidebar-width: 245px;
    --header-height: 60px;
    --border-radius: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
html {
    font-size: 15px; /* Base stable */
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-medium);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    zoom: 0.8; /* Simule nativement et globalement le rendu à 80% de zoom (aéré, fin et spacieux) sur Desktop */
}

@media (max-width: 1200px) {
    body {
        zoom: 0.9; /* Échelle 90% sur petites résolutions/tablettes */
    }
}

@media (max-width: 768px) {
    body {
        zoom: 1; /* Échelle 100% (taille d'origine) sur mobile pour l'ergonomie tactile */
    }
}

/* App Wrapper for Sidebar Layout */
.app-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
    scrollbar-width: thin;
}

/* Scrollbar personnalisée et discrète pour la sidebar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.sidebar-logo i {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.sidebar-logo-text span {
    color: var(--primary-hover);
}

.sidebar-logo-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    margin-top: -2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 24px 24px 10px 24px;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-menu-item a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-menu-item {
    position: relative;
}

.sidebar-menu-item a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
    padding-left: 20px; /* Décalage horizontal au survol */
}

.sidebar-menu-item.active a {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.sidebar-menu-item.active::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 10px;
    bottom: 10px;
    width: 4px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 0 8px #fff;
    z-index: 10;
}

/* Sidebar Footer Profile & Logout */
.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 16px;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0 8px;
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #818cf8, var(--primary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-sidebar-logout:hover {
    background-color: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

/* Main Content Area */
.main-layout {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
    transition: var(--transition);
    min-width: 0;
}

/* Main Header */
.main-header {
    height: var(--header-height);
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px; /* Aligné avec .page-container */
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-welcome {
    display: flex;
    flex-direction: column;
}

.header-welcome h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.header-welcome span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.header-search {
    position: relative;
    width: 320px;
}

.header-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-search input {
    width: 100%;
    background-color: #f1f5f9;
    border: 1px solid transparent;
    padding: 10px 16px 10px 42px;
    border-radius: 20px;
    color: var(--text-medium);
    font-family: inherit;
    font-size: 0.85rem;
    transition: var(--transition);
}

.header-search input:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.page-container {
    padding: 24px 32px; /* Plus compact et aéré */
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* Dashboard Header Actions */
.page-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header-actions h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
}

.page-header-actions p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 35px;
}

.kpi-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border-left: 4px solid var(--primary);
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.kpi-card.kpi-blue {
    border-left-color: var(--primary);
    background: linear-gradient(145deg, #ffffff 60%, #f5f3ff 100%);
}

.kpi-card.kpi-green {
    border-left-color: var(--success);
    background: linear-gradient(145deg, #ffffff 60%, #f0fdf4 100%);
}

.kpi-card.kpi-orange {
    border-left-color: var(--warning);
    background: linear-gradient(145deg, #ffffff 60%, #fffbeb 100%);
}

.kpi-content {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
}

.kpi-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.kpi-blue .kpi-icon-badge {
    background-color: var(--primary-light);
    color: var(--primary);
}

.kpi-green .kpi-icon-badge {
    background-color: var(--success-light);
    color: var(--success);
}

.kpi-orange .kpi-icon-badge {
    background-color: var(--warning-light);
    color: var(--warning);
}

/* Card Container for Data Grid */
.data-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    overflow: hidden;
}

.data-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.data-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-card-header h3 i {
    color: var(--primary);
}

/* Tabs inside Card */
.tabs-nav {
    display: flex;
    gap: 8px;
}

.tab-link {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.tab-link.active,
.tab-link:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: tabFadeIn 0.3s ease;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Alert styling */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--success-light);
    border-color: var(--success-border);
    color: var(--success);
}

.alert-error {
    background-color: var(--danger-light);
    border-color: var(--danger-border);
    color: var(--danger);
}

.alert-dismissible {
    position: relative;
}

/* Tables styling */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.custom-table th {
    background-color: #f8fafc;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-medium);
    vertical-align: top;
}

.custom-table tbody tr {
    transition: var(--transition);
}

.custom-table tbody tr:hover {
    background-color: #f8fafc;
}

.custom-table tbody tr:last-child td {
    border-bottom: none;
}

.empty-row-text {
    text-align: center;
    color: var(--text-muted);
    padding: 40px !important;
    font-style: italic;
}

/* Pagination */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 4px 4px;
    margin-top: 8px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 0.82rem;
    color: var(--text-light);
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-medium);
    background-color: #fff;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: var(--transition);
}

.page-link:hover {
    background-color: #f1f5f9;
    color: var(--text-dark);
}

.page-link.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.page-link-nav {
    font-weight: 500;
    padding: 0 12px;
}

.page-ellipsis {
    padding: 0 4px;
    color: var(--text-light);
    font-size: 0.82rem;
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-secondary {
    background-color: #fff;
    color: var(--text-medium);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    color: var(--text-dark);
}

.btn-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger-border);
}

.btn-danger:hover {
    background-color: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-icon {
    padding: 8px;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* ── Classes spécifiques à l'espace commercial ── */

/* Sous-titre de page */
.subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* Bouton large */
.btn-lg {
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* Bouton avec animation de pulsation */
.pulse-button {
    position: relative;
}

.pulse-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-color: var(--primary);
    opacity: 0;
    animation: pulse-ring 2.5s ease-out infinite;
}

@keyframes pulse-ring {
    0%   { transform: scale(1);    opacity: 0.4; }
    70%  { transform: scale(1.12); opacity: 0;   }
    100% { transform: scale(1.12); opacity: 0;   }
}

/* Texte de contact dans le tableau */
.contact-text {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

/* Cellule d'observation du tableau */
.observation-cell {
    max-width: 200px;
    color: var(--text-light);
    font-style: italic;
    font-size: 0.83rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cellule de date */
.date-cell {
    white-space: nowrap;
    font-size: 0.82rem;
    color: var(--text-light);
}

/* Colonnes de détail cachées (accordion mobile) */
.detail-field {
    display: none;
}

/* Double barre de défilement horizontal synchronisée */
.double-scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    height: 10px;
    display: block;
    margin-bottom: 8px;
}

.double-scroll-content {
    height: 1px;
}



/* Badges styling */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning);
}

/* Split-screen login styles */
.login-split-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
    background-color: #fff;
}

.login-form-side {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 14% 60px 4%;
    position: relative;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 50px;
}

.login-brand i {
    color: var(--primary);
    font-size: 1.6rem;
}

.login-brand span {
    color: var(--primary);
}

.login-form-header {
    margin-bottom: 35px;
}

.login-form-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.login-form-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Minimalist Underline Inputs */
.login-form .form-group {
    margin-bottom: 25px;
}

.login-form label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: none;
    letter-spacing: 0;
}

.login-form input {
    width: 100% !important;
    border: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 12px 0 !important;
    background: transparent !important;
    color: var(--text-dark) !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    transition: var(--transition) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.login-form input::placeholder {
    color: var(--text-muted);
}

.login-form input:focus {
    outline: none !important;
    border-bottom-color: var(--primary) !important;
    box-shadow: none !important;
    background: transparent !important;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background-color: #111524;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 15px;
}

.btn-login:hover {
    background-color: #1e2538;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-footer-text {
    position: absolute;
    bottom: 30px;
    left: 6%;
    right: 14%;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: left;
}

/* Right Graphical Panel */
.login-graphic-side {
    flex: 2.5;
    margin: 20px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px;
    background: #0b0f19;
    box-shadow: var(--shadow-xl);
}

/* Technical grid sheet pattern */
.login-graphic-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 1;
    pointer-events: none;
}

/* Atmospheric Mesh Glows */
.login-glow-1 {
    position: absolute;
    top: 10%;
    right: 5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(6, 182, 212, 0) 70%);
    filter: blur(110px);
    z-index: 1;
}

.login-glow-2 {
    position: absolute;
    bottom: 5%;
    left: 5%;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, rgba(168, 85, 247, 0) 70%);
    filter: blur(120px);
    z-index: 1;
}

.login-glow-3 {
    position: absolute;
    top: 35%;
    left: 20%;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(99, 102, 241, 0) 70%);
    filter: blur(100px);
    z-index: 1;
}

/* Decorative SVG Network */
.login-network-svg {
    position: absolute;
    top: 20%;
    left: 0;
    width: 110%;
    height: 60%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
}

/* Floating overlay glassmorphic card on graphic side */
.graphic-overlay-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 280px;
    align-self: flex-end;
    z-index: 2;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.graphic-overlay-icon {
    width: 42px;
    height: 42px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
}

.graphic-overlay-info {
    display: flex;
    flex-direction: column;
}

.graphic-overlay-title {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}

.graphic-overlay-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.graphic-quote-container {
    z-index: 2;
    max-width: 480px;
}

.graphic-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.graphic-status-tag span {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
}

.graphic-quote {
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.6;
    color: #f1f5f9;
    margin-bottom: 20px;
}

.graphic-author {
    display: flex;
    flex-direction: column;
}

.graphic-author-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
}

.graphic-author-title {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Modals Refined */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: modalScaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-content.modal-lg {
    max-width: 680px;
}

@keyframes modalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Modal Form Fields */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
    display: block;
}

.form-group label span {
    color: var(--danger);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background-color: #fff;
    border: 1px solid var(--border-color);
    padding: 11px 16px;
    border-radius: 8px;
    color: var(--text-medium);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* ══════════════════════════════════════════════════════
   Dashboard Admin — Barre de filtres temporels
   ══════════════════════════════════════════════════════ */

.filter-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 20px;
    box-shadow: var(--shadow-sm);
}

.filter-period-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    background: #f1f5f9;
    border: 1px solid transparent;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.filter-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: rgba(79, 70, 229, 0.2);
}

.filter-btn.active {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.filter-custom-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.filter-date-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-date-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.filter-date-group input[type="date"] {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.82rem;
    color: var(--text-medium);
    font-family: inherit;
    transition: var(--transition);
    cursor: pointer;
}

.filter-date-group input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: #fff;
}

/* ══════════════════════════════════════════════════════
   Dashboard Admin — Classement des Commerciaux
   ══════════════════════════════════════════════════════ */

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ranking-badge-col {
    flex-shrink: 0;
    width: 28px;
    display: flex;
    justify-content: center;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.rank-1 {
    background-color: #fef3c7;
    color: #d97706;
}

.rank-2 {
    background-color: #f1f5f9;
    color: #64748b;
}

.rank-3 {
    background-color: #fef3c7;
    color: #b45309;
}

.rank-default {
    background-color: #f1f5f9;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.ranking-info-col {
    flex: 1;
    min-width: 0;
}

.ranking-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.ranking-progress-bar {
    width: 100%;
    height: 5px;
    background-color: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
}

.ranking-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rank-fill-1 {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.rank-fill-2 {
    background: linear-gradient(90deg, #6366f1, #818cf8);
}

.rank-fill-3 {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.rank-fill-4 {
    background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

/* ── Sections de formulaire (modal Renseigner ma fiche) ── */


.form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--primary);
    margin-bottom: 16px;
}

/* form-group standalone (hors login) */
.form-group {
    display: flex;
    flex-direction: column;
}

/* Groupes de boutons radio */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-medium);
    cursor: pointer;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    background: #fff;
}

.radio-label:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary);
}

.radio-label input[type="radio"] {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
}

/* Groupes de cases à cocher */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-medium);
    cursor: pointer;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    background: #fff;
}

.checkbox-label:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary);
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
}



/* ══════════════════════════════════════════════════════
   Modal Détails de Fiche — Grille et items
   ══════════════════════════════════════════════════════ */

/* Grille 2 colonnes pour les champs de la fiche */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

/* Chaque champ label + valeur */
.detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-item strong {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-light);
}

.detail-item span,
.detail-item div {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
}

/* Toast Container & Notification styles */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: #fff;
    border-radius: 10px;
    padding: 14px 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    border: 1px solid var(--border-color);
    animation: toastSlideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.toast-success {
    border-left: 4px solid var(--success);
}

.toast.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-message {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== PWA Install Modal ===== */
.pwa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pwa-modal-overlay.visible {
    opacity: 1;
}

.pwa-modal-box {
    background-color: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pwa-modal-overlay.visible .pwa-modal-box {
    transform: scale(1);
}

.pwa-modal-icon {
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

.pwa-modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.pwa-modal-desc {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.5;
    margin-bottom: 20px;
}

.pwa-modal-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    text-align: left;
    width: 100%;
}

.pwa-modal-features li {
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pwa-modal-features li i {
    color: var(--primary);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.pwa-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.pwa-btn-install {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pwa-btn-install:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.pwa-btn-dismiss {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: var(--text-light);
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.pwa-btn-dismiss:hover {
    color: var(--text-dark);
}

/* Dashboard Grid Layout */
.dashboard-grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 30px;
}

.grid-main-area {
    min-width: 0; /* Empêche le débordement des tableaux flex */
}

/* Simple Footer */
.app-footer {
    text-align: center;
    padding: 24px 40px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    background-color: #fff;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablette (≤ 1024px)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    /* Sidebar rétrécie */
    :root { --sidebar-width: 220px; }

    /* Page padding réduit */
    .page-container { padding: 30px; }

    /* Dashboard grid : 1 colonne */
    .dashboard-grid-layout { grid-template-columns: 1fr; }

    /* KPI grid : 2 colonnes */
    .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

    /* Login : masquer illustration */
    .login-graphic-side { display: none; }
    .login-form-side { flex: 1; padding: 40px 12%; }

    /* Header padding réduit */
    .main-header { padding: 0 24px; }

    /* Recherche header plus petite */
    .header-search { width: 240px; }
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 768px)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── Sidebar : drawer latéral ───────────────────────────── */
    .sidebar {
        transform: translateX(-100%);
        z-index: 200;
        width: 280px;
        box-shadow: none;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0,0,0,0.3);
    }

    /* Bouton burger visible */
    .mobile-menu-toggle { display: flex !important; }
    .mobile-menu-close  { display: flex !important; }

    /* Overlay sombre quand sidebar ouverte */
    .sidebar.active::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: -1;
        left: 280px;
        pointer-events: auto;
    }

    /* ── Layout principal ───────────────────────────────────── */
    .main-layout   { margin-left: 0; }
    .main-header   { padding: 0 16px; height: 60px; }
    .page-container { padding: 16px; }

    /* ── Dashboard Tabs & Funnel responsifs ──────────────────── */
    .dashboard-tabs-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        flex-wrap: nowrap !important;
        padding: 5px 10px 0 10px;
        margin-bottom: 20px;
        gap: 6px;
    }
    .dashboard-tab-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    .funnel-stage {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin-bottom: 12px;
    }
    .funnel-label-col {
        width: 100% !important;
        font-size: 0.78rem;
        margin-bottom: 2px;
    }
    .funnel-bar {
        font-size: 0.8rem;
        height: 30px;
        padding: 0 10px;
    }

    /* Welcome message compact */
    .header-welcome h2   { font-size: 1rem; }
    .header-welcome span { display: none; }

    /* Recherche header masquée sur mobile (accès via page) */
    .header-search { display: none; }

    /* ── Titres de page ─────────────────────────────────────── */
    .page-header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .page-header-actions h1 { font-size: 1.25rem; }

    /* ── KPI Cards : 1 par ligne ────────────────────────────── */
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }

    .kpi-card   { padding: 16px 18px; }
    .kpi-value  { font-size: 1.4rem; }

    /* ── Formulaires : 1 colonne ────────────────────────────── */
    .form-grid         { grid-template-columns: 1fr; gap: 14px; }
    .form-group.full-width { grid-column: span 1; }
    .detail-grid       { grid-template-columns: 1fr; }

    /* ── Filtres toolbar ────────────────────────────────────── */
    .filter-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 14px;
    }

    .filter-period-buttons {
        flex-wrap: wrap;
        gap: 6px;
    }

    .filter-btn { padding: 6px 12px; font-size: 0.78rem; }

    .filter-custom-form {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        gap: 8px;
    }

    .filter-date-group {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .filter-date-group input[type="date"] {
        flex: 1;
        width: auto;
    }

    /* ── Tableaux → vue cartes sur mobile ───────────────────── */
    .custom-table thead { display: none; }

    .custom-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: var(--shadow-sm);
        background: #fff;
    }

    .custom-table tbody tr:hover { background: #fff; }

    .custom-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.85rem;
        gap: 10px;
    }

    .custom-table td:last-child { border-bottom: none; }

    /* Label généré via data-label */
    .custom-table td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.72rem;
        text-transform: uppercase;
        color: var(--text-light);
        letter-spacing: 0.4px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Ligne vide centrée */
    .empty-row td {
        display: block;
        text-align: center;
        border: none;
    }

    .empty-row td::before { display: none; }

    /* ── Modales ────────────────────────────────────────────── */
    .modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 10px auto;
        border-radius: 12px;
    }

    .modal-body  { padding: 16px 18px !important; }
    .modal-header { padding: 14px 18px !important; }
    .modal-footer { padding: 12px 18px !important; }

    .modal-lg {
        width: 95vw !important;
        max-width: 95vw !important;
    }

    /* ── Data-card header : wrap ────────────────────────────── */
    .data-card-header { padding: 14px 16px; }
    .data-card-header h3 { font-size: 0.95rem; }

    /* Tabs : scroll horizontal */
    .tabs-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .tab-link { white-space: nowrap; padding: 7px 12px; font-size: 0.8rem; }

    /* ── Classement (ranking) ───────────────────────────────── */
    .ranking-list { gap: 10px; }
    .ranking-name { font-size: 0.82rem; }

    /* ── Boutons action-group ───────────────────────────────── */
    .action-btn-group { gap: 4px; }

    /* ── Pipeline / Suivi des Affaires : 1 colonne ─────────── */
    .pipeline-grid { grid-template-columns: 1fr !important; }
    .pipeline-col-body { max-height: 280px; }

    /* ── Footer ─────────────────────────────────────────────── */
    .app-footer { padding: 16px 20px; font-size: 0.75rem; }

    /* ── Pagination : empilée sur mobile ────────────────────── */
    .pagination-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .pagination-nav { justify-content: center; }

    /* ── Barre de scroll supérieure inutile sur mobile (vue cartes) ── */
    .double-scroll-wrapper { display: none !important; }
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — Très petits écrans (≤ 480px)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    :root {
        --border-radius: 12px;
        --header-height: 56px;
    }

    .page-container { padding: 12px; }

    /* KPI encore plus compact */
    .kpi-card  { padding: 14px 14px; }
    .kpi-value { font-size: 1.25rem; }
    .kpi-icon-badge { width: 40px; height: 40px; font-size: 1rem; }

    /* Boutons pleine largeur sur très petit écran */
    .page-header-actions .btn { width: 100%; justify-content: center; }

    /* Login */
    .login-form-side { padding: 30px 20px !important; }
    .login-card      { padding: 28px 20px !important; }

    /* Formulaires */
    .form-section  { padding-bottom: 16px; margin-bottom: 16px; }
    .form-group    { margin-bottom: 14px; }

    /* Modal scroll */
    .modal { align-items: flex-end; }
    .modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 16px 16px 0 0 !important;
        margin: 0 !important;
        max-height: 95vh;
    }

    /* Header search compact */
    .header-search { display: none; }

    /* Table cards encore plus compactes */
    .custom-table td { padding: 9px 12px; font-size: 0.8rem; }

    /* filter-btn encore plus compact */
    .filter-btn { padding: 5px 10px; font-size: 0.75rem; }
}

/* ──────────────────────────────────────────────────────────
   STYLES DU DASHBOARD ANALYTIQUE (BI - v2.7)
   ────────────────────────────────────────────────────────── */

.dashboard-tabs-container {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
    background: #fff;
    padding: 5px 15px 0 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    scrollbar-width: none; /* Masque la scrollbar sur Firefox */
}

/* Masque la scrollbar sur Chrome/Safari/Webkit */
.dashboard-tabs-container::-webkit-scrollbar {
    display: none;
}

.dashboard-tab-btn {
    background: none;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 14px 20px;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap; /* Empêche le retour à la ligne */
    flex-shrink: 0; /* Empêche le bouton de s'écraser */
}

.dashboard-tab-btn:hover {
    color: var(--primary);
}

.dashboard-tab-btn.active {
    color: var(--primary);
    font-weight: 800;
}

.dashboard-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px 3px 0 0;
}

.dashboard-tab-content {
    display: none;
}

.dashboard-tab-content.active {
    display: block;
    animation: fadeInTab 0.35s ease;
}

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

/* Design de l'Entonnoir (Funnel) de Conversion */
.funnel-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: #fff;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.funnel-stage {
    display: flex;
    align-items: center;
    position: relative;
}

.funnel-label-col {
    width: 200px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.funnel-bar-col {
    flex: 1;
    position: relative;
}

.funnel-bar {
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    transition: width 1s ease-in-out;
    justify-content: space-between;
}

.funnel-conversion-rate {
    font-size: 0.78rem;
    background: rgba(0,0,0,0.25);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Couleurs dégradées de l'entonnoir (du bleu roi à l'émeraude) */
.funnel-bar-1 { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.funnel-bar-2 { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.funnel-bar-3 { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.funnel-bar-4 { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.funnel-bar-5 { background: linear-gradient(135deg, #059669, #34d399); }
.funnel-bar-6 { background: linear-gradient(135deg, #16a34a, #4ade80); }

/* Tableaux d'analyse */
.analytics-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.analytics-table th {
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.analytics-table td {
    padding: 14px 16px;
    font-size: 0.85rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.analytics-table tr:hover td {
    background-color: #f8fafc;
}

.analytics-table tr:last-child td {
    border-bottom: none;
}

.analytics-badge-role {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}
.analytics-badge-role.manager { background: #fee2e2; color: #ef4444; }

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}
.analytics-badge-role.commercial { background: #e0f2fe; color: #0284c7; }