/*
 * VISA VOYAGES - Main Stylesheet
 * Back-office platform (Admin, Agent, Ambassadeur, Guide, Staff)
 * Brand Identity: Gold & Black luxury travel theme
 * ------------------------------------------------------------ */

/* ============================================================
   1. GOOGLE FONT IMPORT
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;500;600;700&display=swap");

/* ============================================================
   2. CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================================ */
:root {
    /* Brand Colors - Gold */
    --or-principal: #a68c42;
    --or-fonce: #8b7537;
    --or-clair: #d2b464;
    --or-accent: #b4a05a;

    /* Neutrals */
    --noir: #000000;
    --blanc: #ffffff;
    --gris-fonce: #464646;
    --gris-clair: #f5f5f5;

    /* Functional Colors */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --secondary: #6c757d;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);

    /* Sidebar */
    --sidebar-width: 260px;

    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;

    /* Font stacks */
    --font-heading: "El Messiri", Arial, sans-serif;
    --font-body:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
}

/* ============================================================
   3. BASE / RESET
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--gris-clair);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--gris-fonce);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--noir);
    margin-top: 0;
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
}
h2 {
    font-size: 1.65rem;
    font-weight: 600;
}
h3 {
    font-size: 1.35rem;
    font-weight: 600;
}
h4 {
    font-size: 1.15rem;
    font-weight: 600;
}
h5 {
    font-size: 1rem;
    font-weight: 500;
}
h6 {
    font-size: 0.875rem;
    font-weight: 500;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: var(--or-principal);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--or-fonce);
    text-decoration: none;
}

::selection {
    background-color: var(--or-principal);
    color: var(--blanc);
}

/* ============================================================
   5. LAYOUT - SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--noir);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1040;
    transition: transform 0.3s ease;
}

/* -- Sidebar brand / logo area -- */
.sidebar .brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--or-principal);
}

.sidebar .brand img {
    max-width: 160px;
    height: auto;
}

.sidebar .brand h4,
.sidebar .brand .brand-name {
    color: var(--or-principal);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    margin: 8px 0 0;
}

.sidebar .brand .brand-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

/* -- User info inside sidebar -- */
.sidebar .user-info {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .user-info .user-name {
    color: var(--blanc);
    font-weight: 500;
    font-size: 14px;
}

.sidebar .user-info .user-role {
    color: var(--or-principal);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* -- Navigation menu -- */
.sidebar .nav-menu {
    padding: 10px 0;
    list-style: none;
    margin: 0;
}

.sidebar .nav-menu .nav-section {
    padding: 15px 20px 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--or-principal);
    font-weight: 600;
    margin-top: 5px;
}

.sidebar .nav-menu .nav-item {
    padding: 0;
    position: relative;
    transition: var(--transition-fast);
}

.sidebar .nav-menu .nav-item:hover {
    background-color: rgba(166, 140, 66, 0.1);
}

.sidebar .nav-menu .nav-item a {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    color: var(--blanc);
    text-decoration: none;
    font-size: 14px;
    gap: 12px;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.sidebar .nav-menu .nav-item a i,
.sidebar .nav-menu .nav-item a .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.sidebar .nav-menu .nav-item a .nav-text {
    flex: 1;
}

.sidebar .nav-menu .nav-item a .nav-badge {
    background-color: var(--danger);
    color: var(--blanc);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.sidebar .nav-menu .nav-item a:hover {
    color: var(--or-principal);
}

.sidebar .nav-menu .nav-item a:hover i,
.sidebar .nav-menu .nav-item a:hover .nav-icon {
    opacity: 1;
    color: var(--or-principal);
}

.sidebar .nav-menu .nav-item.active a {
    color: var(--or-principal);
    border-left: 3px solid var(--or-principal);
    background-color: rgba(166, 140, 66, 0.08);
}

.sidebar .nav-menu .nav-item.active a i,
.sidebar .nav-menu .nav-item.active a .nav-icon {
    opacity: 1;
    color: var(--or-principal);
}

/* -- Submenu -- */
.sidebar .nav-menu .nav-item .submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.03);
    display: none;
}

.sidebar .nav-menu .nav-item .submenu.show {
    display: block;
}

.sidebar .nav-menu .nav-item .submenu li a {
    padding: 9px 20px 9px 52px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar .nav-menu .nav-item .submenu li a:hover {
    color: var(--or-principal);
}

.sidebar .nav-menu .nav-item .submenu li.active a {
    color: var(--or-principal);
}

/* -- Sidebar footer -- */
.sidebar .sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--noir);
}

.sidebar .sidebar-footer a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar .sidebar-footer a:hover {
    color: var(--danger);
}

/* -- Sidebar scrollbar -- */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--or-principal);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: var(--or-clair);
}

/* Firefox scrollbar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--or-principal) transparent;
}

/* ============================================================
   6. LAYOUT - MAIN CONTENT
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 25px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ============================================================
   7. TOPBAR
   ============================================================ */
.topbar {
    background-color: var(--blanc);
    padding: 15px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.topbar .topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar .topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar .topbar-search {
    position: relative;
}

.topbar .topbar-search input {
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 7px 15px 7px 35px;
    font-size: 13px;
    width: 220px;
    transition: var(--transition-base);
    background-color: var(--gris-clair);
}

.topbar .topbar-search input:focus {
    border-color: var(--or-principal);
    box-shadow: 0 0 0 0.2rem rgba(166, 140, 66, 0.15);
    outline: none;
    width: 280px;
    background-color: var(--blanc);
}

.topbar .topbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 14px;
}

.topbar .topbar-icon {
    position: relative;
    color: var(--gris-fonce);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition-fast);
}

.topbar .topbar-icon:hover {
    color: var(--or-principal);
}

.topbar .topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.topbar .topbar-user .user-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--noir);
}

.topbar .topbar-user .user-role {
    font-size: 12px;
    color: #888;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--gris-fonce);
    cursor: pointer;
    padding: 5px;
}

/* ============================================================
   8. PAGE TITLE & BREADCRUMB
   ============================================================ */
.page-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    color: var(--noir);
    margin-bottom: 0;
    line-height: 1.3;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
    font-size: 13px;
}

.breadcrumb-item a {
    color: var(--or-principal);
}

.breadcrumb-item.active {
    color: #888;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #ccc;
}

/* ============================================================
   9. CARDS (Bootstrap Override)
   ============================================================ */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
    transition: var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background-color: var(--blanc);
    border-bottom: 2px solid var(--gris-clair);
    font-weight: 600;
    font-family: var(--font-heading);
    padding: 15px 20px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background-color: var(--blanc);
    border-top: 1px solid var(--gris-clair);
    padding: 15px 20px;
}

.card-footer:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ============================================================
   10. BUTTONS
   ============================================================ */

/* Gold button - Primary brand button */
.btn-gold {
    background-color: var(--or-principal);
    color: var(--noir);
    border: none;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-gold:hover,
.btn-gold:focus {
    background-color: var(--or-fonce);
    color: var(--blanc);
    box-shadow: 0 4px 12px rgba(166, 140, 66, 0.35);
}

.btn-gold:active {
    background-color: var(--or-fonce);
    transform: translateY(1px);
}

.btn-gold:disabled,
.btn-gold.disabled {
    background-color: var(--or-accent);
    color: rgba(0, 0, 0, 0.4);
    cursor: not-allowed;
    box-shadow: none;
}

/* Dark button */
.btn-dark {
    background-color: var(--noir);
    color: var(--blanc);
    border: none;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.btn-dark:hover,
.btn-dark:focus {
    background-color: var(--gris-fonce);
    color: var(--blanc);
}

/* Outline Gold button */
.btn-outline-gold {
    background-color: transparent;
    color: var(--or-principal);
    border: 1px solid var(--or-principal);
    font-weight: 500;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.btn-outline-gold:hover,
.btn-outline-gold:focus {
    background-color: var(--or-principal);
    color: var(--noir);
    box-shadow: 0 4px 12px rgba(166, 140, 66, 0.25);
}

/* Small button variant */
.btn-sm.btn-gold,
.btn-sm.btn-dark,
.btn-sm.btn-outline-gold {
    padding: 5px 12px;
    font-size: 13px;
}

/* ============================================================
   11. BADGES
   ============================================================ */
.badge-gold {
    background-color: var(--or-principal);
    color: var(--noir);
    font-weight: 600;
}

.badge-success,
.badge.bg-success {
    background-color: var(--success) !important;
    color: var(--blanc);
}

.badge-warning,
.badge.bg-warning {
    background-color: var(--warning) !important;
    color: var(--noir);
}

.badge-danger,
.badge.bg-danger {
    background-color: var(--danger) !important;
    color: var(--blanc);
}

.badge-secondary,
.badge.bg-secondary {
    background-color: var(--secondary) !important;
    color: var(--blanc);
}

.badge-info,
.badge.bg-info {
    background-color: var(--info) !important;
    color: var(--blanc);
}

/* Larger status badges */
.badge-statut {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ============================================================
   12. STAT WIDGETS
   ============================================================ */
.stat-widget {
    background-color: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition-base);
    margin-bottom: 25px;
}

.stat-widget:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-widget .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--or-principal), var(--or-clair));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--blanc);
    flex-shrink: 0;
}

.stat-widget .stat-icon.bg-success {
    background: linear-gradient(135deg, #28a745, #5cb85c) !important;
}

.stat-widget .stat-icon.bg-danger {
    background: linear-gradient(135deg, #dc3545, #e86571) !important;
}

.stat-widget .stat-icon.bg-info {
    background: linear-gradient(135deg, #17a2b8, #45c4d6) !important;
}

.stat-widget .stat-icon.bg-warning {
    background: linear-gradient(135deg, #ffc107, #ffd54f) !important;
}

.stat-widget .stat-info {
    flex: 1;
}

.stat-widget .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--noir);
    font-family: var(--font-heading);
    line-height: 1.2;
}

.stat-widget .stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.stat-widget .stat-change {
    font-size: 12px;
    margin-top: 4px;
}

.stat-widget .stat-change.up {
    color: var(--success);
}

.stat-widget .stat-change.down {
    color: var(--danger);
}

/* ============================================================
   13. TABLES (Bootstrap Override)
   ============================================================ */
.table {
    font-size: 14px;
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--noir);
    color: var(--blanc);
    font-family: var(--font-heading);
    font-weight: 500;
    border: 0;
    padding: 12px 15px;
    white-space: nowrap;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.table thead th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

.table thead th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    border-color: #f0f0f0;
}

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

.table tbody tr:hover {
    background-color: rgba(166, 140, 66, 0.05);
}

.table .actions {
    white-space: nowrap;
}

.table .actions .btn {
    margin-right: 4px;
}

.table .actions .btn:last-child {
    margin-right: 0;
}

/* Striped rows */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.015);
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: rgba(166, 140, 66, 0.05);
}

/* Table responsive wrapper */
.table-responsive {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ============================================================
   14. FORMS
   ============================================================ */
.form-control {
    border-radius: var(--radius-sm);
    border: 1px solid #ddd;
    padding: 9px 14px;
    font-size: 14px;
    transition: var(--transition-base);
}

.form-control:focus {
    border-color: var(--or-principal);
    box-shadow: 0 0 0 0.2rem rgba(166, 140, 66, 0.25);
    outline: none;
}

.form-select {
    border-radius: var(--radius-sm);
    border: 1px solid #ddd;
    padding: 9px 14px;
    font-size: 14px;
    transition: var(--transition-base);
}

.form-select:focus {
    border-color: var(--or-principal);
    box-shadow: 0 0 0 0.2rem rgba(166, 140, 66, 0.25);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--gris-fonce);
    margin-bottom: 5px;
    font-size: 14px;
}

.form-text {
    font-size: 12px;
    color: #888;
}

.form-check-input:checked {
    background-color: var(--or-principal);
    border-color: var(--or-principal);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(166, 140, 66, 0.25);
    border-color: var(--or-principal);
}

/* Input group gold addon */
.input-group-text {
    background-color: var(--gris-clair);
    border-color: #ddd;
    color: var(--gris-fonce);
}

/* Custom file input */
.custom-file-label::after {
    background-color: var(--or-principal);
    color: var(--noir);
    font-weight: 500;
}

/* ============================================================
   15. NOTIFICATION BADGE
   ============================================================ */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    color: var(--blanc);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--blanc);
}

/* ============================================================
   16. ALERTS
   ============================================================ */
.alert-gold {
    background-color: rgba(166, 140, 66, 0.1);
    border-color: var(--or-principal);
    color: var(--or-fonce);
}

.alert-gold .alert-link {
    color: var(--or-fonce);
    font-weight: 600;
}

.alert {
    border-radius: var(--radius-md);
    font-size: 14px;
}

/* ============================================================
   17. USER AVATAR
   ============================================================ */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--or-principal);
}

.user-avatar.avatar-sm {
    width: 32px;
    height: 32px;
}

.user-avatar.avatar-lg {
    width: 56px;
    height: 56px;
}

.user-avatar.avatar-xl {
    width: 80px;
    height: 80px;
}

/* Avatar placeholder when no image */
.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--or-principal), var(--or-clair));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanc);
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 16px;
}

/* ============================================================
   18. EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state i,
.empty-state .empty-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
    display: block;
}

.empty-state h5 {
    color: var(--gris-fonce);
    margin-bottom: 8px;
}

.empty-state p {
    color: #aaa;
    max-width: 360px;
    margin: 0 auto 20px;
    font-size: 14px;
}

/* ============================================================
   19. COUNTDOWN / URGENCY BADGE
   ============================================================ */
.countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    animation: pulse-urgency 2s infinite;
}

.countdown-badge.urgency-high {
    background-color: rgba(220, 53, 69, 0.15);
    color: var(--danger);
}

.countdown-badge.urgency-medium {
    background-color: rgba(255, 193, 7, 0.2);
    color: #d39e00;
}

.countdown-badge.urgency-low {
    background-color: rgba(40, 167, 69, 0.15);
    color: var(--success);
}

@keyframes pulse-urgency {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* ============================================================
   20. MODAL OVERRIDES
   ============================================================ */
.modal-header {
    background-color: var(--noir);
    color: var(--blanc);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 15px 20px;
}

.modal-header .modal-title {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--blanc);
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid var(--gris-clair);
    padding: 15px 20px;
}

/* ============================================================
   21. PAGINATION
   ============================================================ */
.page-link {
    color: var(--or-principal);
    border-color: #e0e0e0;
    font-size: 14px;
    transition: var(--transition-fast);
}

.page-link:hover {
    background-color: var(--or-principal);
    border-color: var(--or-principal);
    color: var(--blanc);
}

.page-item.active .page-link {
    background-color: var(--or-principal);
    border-color: var(--or-principal);
    color: var(--noir);
    font-weight: 600;
}

.page-item.disabled .page-link {
    color: #ccc;
}

/* ============================================================
   22. DROPDOWN OVERRIDES
   ============================================================ */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 8px 0;
    font-size: 14px;
}

.dropdown-item {
    padding: 8px 18px;
    color: var(--gris-fonce);
    transition: var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(166, 140, 66, 0.08);
    color: var(--or-fonce);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--or-principal);
    color: var(--noir);
}

.dropdown-item i {
    width: 20px;
    margin-right: 8px;
    text-align: center;
}

.dropdown-divider {
    border-color: var(--gris-clair);
}

/* ============================================================
   23. TABS / NAV-TABS OVERRIDE
   ============================================================ */
.nav-tabs {
    border-bottom: 2px solid var(--gris-clair);
}

.nav-tabs .nav-link {
    color: var(--gris-fonce);
    font-weight: 500;
    border: none;
    padding: 10px 20px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition-fast);
    font-size: 14px;
}

.nav-tabs .nav-link:hover {
    color: var(--or-principal);
    border-color: transparent;
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--or-principal);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--or-principal);
    font-weight: 600;
}

/* ============================================================
   24. PROGRESS BAR
   ============================================================ */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: var(--gris-clair);
}

.progress-bar {
    background-color: var(--or-principal);
    border-radius: 10px;
}

.progress-bar.bg-success {
    background-color: var(--success) !important;
}

.progress-bar.bg-danger {
    background-color: var(--danger) !important;
}

.progress-bar.bg-warning {
    background-color: var(--warning) !important;
}

/* ============================================================
   25. TOOLTIP
   ============================================================ */
.tooltip-inner {
    background-color: var(--noir);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

/* ============================================================
   26. SIDEBAR OVERLAY (Mobile)
   ============================================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ============================================================
   27. UTILITY CLASSES
   ============================================================ */
.text-gold {
    color: var(--or-principal) !important;
}

.text-gold-dark {
    color: var(--or-fonce) !important;
}

.bg-gold {
    background-color: var(--or-principal) !important;
}

.bg-gold-light {
    background-color: rgba(166, 140, 66, 0.1) !important;
}

.border-gold {
    border-color: var(--or-principal) !important;
}

.font-heading {
    font-family: var(--font-heading) !important;
}

/* Spacing helpers */
.gap-10 {
    gap: 10px;
}
.gap-15 {
    gap: 15px;
}
.gap-20 {
    gap: 20px;
}

/* ============================================================
   28. LOADING SPINNER
   ============================================================ */
.spinner-gold {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(166, 140, 66, 0.2);
    border-top-color: var(--or-principal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius-lg);
}

/* ============================================================
   29. DATA / FILTER BAR
   ============================================================ */
.filter-bar {
    background-color: var(--blanc);
    padding: 15px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-bar .form-control,
.filter-bar .form-select {
    max-width: 200px;
    font-size: 13px;
    padding: 7px 12px;
}

.filter-bar .btn {
    font-size: 13px;
    padding: 7px 16px;
}

/* ============================================================
   30. TIMELINE
   ============================================================ */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e0e0e0;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--or-principal);
    border: 2px solid var(--blanc);
    box-shadow: 0 0 0 2px var(--or-principal);
}

.timeline-item .timeline-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.timeline-item .timeline-content {
    font-size: 14px;
    color: var(--gris-fonce);
}

/* ============================================================
   31. CHAT / NOTES STYLES
   ============================================================ */
.note-item {
    padding: 12px 15px;
    border-left: 3px solid var(--or-principal);
    background-color: rgba(166, 140, 66, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 12px;
}

.note-item .note-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.note-item .note-text {
    font-size: 14px;
    color: var(--gris-fonce);
}

/* ============================================================
   32. RESPONSIVE DESIGN
   ============================================================ */

/* Tablet and below */
@media (max-width: 991.98px) {
    .topbar .topbar-search input {
        width: 180px;
    }

    .topbar .topbar-search input:focus {
        width: 200px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .form-control,
    .filter-bar .form-select {
        max-width: 100%;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-260px);
    }

    .sidebar.show {
        transform: translateX(0);
        z-index: 1050;
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
    }

    .sidebar-toggle {
        display: block;
    }

    .topbar {
        padding: 12px 15px;
        margin-bottom: 15px;
    }

    .topbar .topbar-search {
        display: none;
    }

    .page-title {
        font-size: 20px;
    }

    .page-header {
        margin-bottom: 15px;
    }

    .stat-widget {
        padding: 15px;
    }

    .stat-widget .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .stat-widget .stat-value {
        font-size: 22px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-body {
        padding: 15px;
    }

    .table {
        font-size: 13px;
    }

    .table thead th,
    .table tbody td {
        padding: 10px 8px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }

    .topbar {
        padding: 10px 12px;
        margin-bottom: 12px;
    }

    h1,
    .page-title {
        font-size: 18px;
    }

    .stat-widget {
        flex-direction: column;
        text-align: center;
    }

    .btn-gold,
    .btn-dark,
    .btn-outline-gold {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   33. PRINT STYLES
   ============================================================ */
@media print {
    .sidebar,
    .topbar,
    .sidebar-toggle,
    .sidebar-overlay,
    .btn,
    .filter-bar,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    body {
        background: var(--blanc);
        color: var(--noir);
        font-size: 12pt;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .card-header {
        background-color: var(--gris-clair) !important;
    }

    .table thead th {
        background-color: var(--gris-clair) !important;
        color: var(--noir) !important;
    }

    a {
        color: var(--noir);
        text-decoration: underline;
    }

    .page-title {
        font-size: 18pt;
    }

    .stat-widget {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================================
   34. ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

/* Smooth transitions on interactive elements */
a,
.btn,
.form-control,
.form-select,
.nav-link,
.card,
.stat-widget,
.dropdown-item {
    transition: var(--transition-fast);
}

/* ============================================================
   35. SIDEBAR COLLAPSIBLE GROUPS
   ============================================================ */
.sidebar-nav .nav-section-title {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--or-principal);
    font-weight: 600;
    margin-top: 5px;
    user-select: none;
    transition: var(--transition-fast);
}

.sidebar-nav .nav-section-title:hover {
    color: var(--or-clair);
}

.sidebar-nav .nav-section-title .section-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.sidebar-nav .nav-section-title.collapsed .section-arrow {
    transform: rotate(-90deg);
}

.sidebar-nav .nav-group {
    overflow: hidden;
    max-height: 500px;
    transition:
        max-height 0.4s ease,
        opacity 0.3s ease;
    opacity: 1;
}

.sidebar-nav .nav-group.collapsed {
    max-height: 0;
    opacity: 0;
}

/* ============================================================
   36. ENHANCED SIDEBAR STYLES
   ============================================================ */
.sidebar-brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(166, 140, 66, 0.3);
    background: linear-gradient(
        180deg,
        rgba(166, 140, 66, 0.08) 0%,
        transparent 100%
    );
}

.sidebar-brand a {
    text-decoration: none;
}

.sidebar-brand .sidebar-logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 8px;
}

.sidebar-brand .brand-text {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--blanc);
    letter-spacing: 2px;
}

.sidebar-brand .brand-text .text-gold {
    color: var(--or-principal);
}

.sidebar-nav {
    padding: 8px 0 80px;
}

.sidebar-nav .nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13.5px;
    gap: 12px;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-nav .nav-item .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.sidebar-nav .nav-item .nav-link:hover {
    color: var(--blanc);
    background: rgba(166, 140, 66, 0.1);
    border-left-color: rgba(166, 140, 66, 0.4);
}

.sidebar-nav .nav-item .nav-link:hover i {
    color: var(--or-principal);
}

.sidebar-nav .nav-item .nav-link.active {
    color: var(--or-principal);
    background: rgba(166, 140, 66, 0.12);
    border-left-color: var(--or-principal);
    font-weight: 500;
}

.sidebar-nav .nav-item .nav-link.active i {
    color: var(--or-principal);
}

.sidebar-nav .nav-item .nav-link .badge-count {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    margin-left: auto;
}

/* Sidebar close button (mobile) */
.sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.sidebar-close:hover {
    color: var(--blanc);
    background: rgba(255, 255, 255, 0.1);
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(166, 140, 66, 0.3);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(166, 140, 66, 0.5);
}

/* ============================================================
   37. ENHANCED TOPBAR
   ============================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.topbar-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--noir);
    margin: 0;
}

.topbar-icon {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--gris-fonce);
    transition: var(--transition-fast);
    text-decoration: none;
}

.topbar-icon:hover {
    background: rgba(166, 140, 66, 0.1);
    color: var(--or-principal);
}

/* Notification dropdown */
.notification-dropdown {
    width: 360px;
    max-height: 400px;
    padding: 0;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.notification-dropdown .dropdown-header {
    background: var(--noir);
    color: var(--blanc);
    padding: 12px 16px;
    font-weight: 600;
    font-family: var(--font-heading);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown .notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-dropdown .notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gris-clair);
    display: flex;
    gap: 12px;
    transition: var(--transition-fast);
    text-decoration: none;
    color: var(--gris-fonce);
}

.notification-dropdown .notification-item:hover {
    background: rgba(166, 140, 66, 0.05);
}

.notification-dropdown .notification-item .notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.notification-dropdown .notification-item .notif-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
}

.notification-dropdown .notification-item .notif-time {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.notification-dropdown .dropdown-footer {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid var(--gris-clair);
}

.notification-dropdown .dropdown-footer a {
    font-size: 13px;
    color: var(--or-principal);
    font-weight: 500;
}

/* ============================================================
   38. DASHBOARD SPECIFIC
   ============================================================ */
.welcome-banner {
    background: linear-gradient(135deg, var(--noir) 0%, #1a1a1a 100%);
    border-radius: var(--radius-lg);
    padding: 24px 30px;
    color: var(--blanc);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
}

.welcome-banner h2 {
    color: var(--blanc);
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.welcome-banner .welcome-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.welcome-banner .welcome-actions .btn {
    margin-left: 8px;
}

@media (max-width: 768px) {
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    .welcome-banner .welcome-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    .welcome-banner .welcome-actions .btn {
        margin-left: 0;
    }
}

/* Stat widgets with color variants */
.stat-widget.stat-gold .stat-icon {
    background: linear-gradient(135deg, #a68c42, #d2b464);
}

.stat-widget.stat-blue .stat-icon {
    background: linear-gradient(135deg, #1565c0, #42a5f5);
}

.stat-widget.stat-green .stat-icon {
    background: linear-gradient(135deg, #2e7d32, #66bb6a);
}

.stat-widget.stat-orange .stat-icon {
    background: linear-gradient(135deg, #e65100, #ff9800);
}

.stat-widget.stat-purple .stat-icon {
    background: linear-gradient(135deg, #6a1b9a, #ab47bc);
}

.stat-widget.stat-teal .stat-icon {
    background: linear-gradient(135deg, #00695c, #26a69a);
}

/* Chart card */
.chart-card {
    min-height: 380px;
}

.chart-card .card-body {
    position: relative;
}

/* Seats progress */
.seat-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--gris-clair);
}

.seat-item:last-child {
    border-bottom: none;
}

.seat-item .seat-title {
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 2px;
}

.seat-item .seat-meta {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
}

.seat-item .progress {
    height: 6px;
}

/* Activity timeline in dashboard */
.activity-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item .activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.activity-item .activity-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
}

.activity-item .activity-time {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

/* ============================================================
   39. PAGE LOAD ANIMATION
   ============================================================ */
.main-content {
    animation: fadeInContent 0.3s ease-out;
}

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

/* ============================================================
   40. DATATABLE OVERRIDES ENHANCED
   ============================================================ */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--or-principal) !important;
    border-color: var(--or-principal) !important;
    color: var(--noir) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(166, 140, 66, 0.1) !important;
    border-color: var(--or-principal) !important;
    color: var(--or-principal) !important;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: var(--radius-sm);
    border: 1px solid #ddd;
    padding: 6px 12px;
    transition: var(--transition-fast);
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--or-principal);
    box-shadow: 0 0 0 0.2rem rgba(166, 140, 66, 0.15);
    outline: none;
}

/* Table action buttons: subtle on desktop, visible on hover */
@media (min-width: 992px) {
    .table tbody tr .actions .btn {
        opacity: 0.5;
        transition: opacity 0.2s ease;
    }
    .table tbody tr:hover .actions .btn {
        opacity: 1;
    }
}

/* ============================================================
   41. FULLSCREEN MODE
   ============================================================ */
body.fullscreen-mode .sidebar,
body.fullscreen-mode .sidebar-overlay {
    display: none !important;
}

body.fullscreen-mode .main-content {
    margin-left: 0 !important;
}

/* ============================================================
   42. MAIN CONTENT SCROLLBAR
   ============================================================ */
.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}
