:root {
    --fimiya-yellow: #ffb400;
    --fimiya-dark: #1e293b;
    --fimiya-earth: #3d1400;
    --sidebar-start: #161c24;
    --sidebar-end: #3d1400;
    --main-bg: #fdfaf5;
    --text-main: #212b36;
    --text-muted: #637381;
    --radius: 12px;
    --sidebar-width: 250px;
    --sidebar-compact-width: 75px;
    --glow-color: rgba(255, 180, 0, 0.12);
}

[data-bs-theme="dark"] {
    --main-bg: #0b0e11;
    --bg-login: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f4f6f8;
    --text-muted: #919eab;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(to top, var(--glow-color) 0%, var(--main-bg) 25%);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    font-size: 13px;
}

/* ========== LOGIN PAGE ========== */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, #ff9d00 -30%, #f1f5f9 25%, #f1f5f9 0%);
}

[data-bs-theme="dark"] .login-page {
    background: linear-gradient(to top, #451a03 0%, #0f172a 100%);
}

.login-container {
    width: 100%;
    max-width: 1000px;
    height: 600px;
    display: flex;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

[data-bs-theme="dark"] .login-container { background: var(--card-bg); }

.login-visual {
    flex: 1;
    background: linear-gradient(135deg, var(--fimiya-dark) 0%, var(--fimiya-earth) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-visual::after {
    content: "";
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--fimiya-yellow);
    filter: blur(80px);
    opacity: 0.3;
}

.visual-content { position: relative; z-index: 2; }
.brand-icon { font-size: 3rem; color: var(--fimiya-yellow); margin-bottom: 1.5rem; }
.visual-content h1 { font-weight: 800; font-size: 2.5rem; margin-bottom: 1rem; }
.visual-content p { opacity: 0.8; font-size: 1.1rem; line-height: 1.6; }

.greeting-container {
    display: inline-block;
    height: 1.6em;
    vertical-align: bottom;
    overflow: hidden;
}

.greeting-list {
    display: flex;
    flex-direction: column;
    animation: scrollGreetings 12s cubic-bezier(0.645, 0.045, 0.355, 1) infinite;
}

.greeting-item { height: 1.6em; font-weight: 800; color: var(--fimiya-yellow); }

@keyframes scrollGreetings {
    0%, 15% { transform: translateY(0); }
    20%, 35% { transform: translateY(-1.6em); }
    40%, 55% { transform: translateY(-3.2em); }
    60%, 75% { transform: translateY(-4.8em); }
    80%, 95% { transform: translateY(-6.4em); }
    100% { transform: translateY(0); }
}

.login-form-section {
    flex: 1;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

[data-bs-theme="dark"] .login-form-section { background: var(--card-bg); color: white; }

.form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    font-size: 0.9rem;
}

/* Toggle password button */
.btn-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s;
    z-index: 10;
}

.btn-toggle-password:hover {
    color: var(--fimiya-yellow);
    background: rgba(255, 180, 0, 0.1);
}

[data-bs-theme="dark"] .btn-toggle-password {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .btn-toggle-password:hover {
    color: var(--fimiya-yellow);
}

[data-bs-theme="dark"] .form-control {
    background-color: #0f172a;
    border-color: #334155;
    color: white;
}

.btn-login {
    background-color: var(--fimiya-yellow);
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 700;
    color: var(--fimiya-earth);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

/* ========== SIDEBAR ========== */
.sidebar {
    background: linear-gradient(180deg, var(--sidebar-start) 0%, var(--sidebar-end) 100%), 
                url('https://www.transparenttextures.com/patterns/az-subtle.png');
    background-blend-mode: overlay;
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.compact { width: var(--sidebar-compact-width); }
.sidebar.compact .brand span,
.sidebar.compact .nav-link span { display: none; }
.sidebar.compact .brand { justify-content: center; }
.sidebar.compact .nav-link { justify-content: center; padding: 0.8rem; }

.sidebar .brand {
    padding: 1.5rem 1.5rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar .brand i {
    color: var(--fimiya-yellow);
    font-size: 1.75rem;
}

.nav { padding: 1rem 0; }

.nav-link {
    color: #919eab;
    padding: 0.7rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 8px;
    margin: 0.15rem 1rem;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    font-size: 0.85rem;
}

.nav-link i { font-size: 1rem; }

.nav-link:hover {
    background: rgba(255, 180, 0, 0.05);
    color: var(--fimiya-yellow);
}

.nav-link.active {
    color: var(--fimiya-yellow);
    background: rgba(255, 180, 0, 0.1);
    border-left: 4px solid var(--fimiya-yellow);
    font-weight: 700;
}

/* ========== MAIN WRAPPER ========== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s;
    min-height: 100vh;
}

.main-wrapper.expanded { margin-left: var(--sidebar-compact-width); }

/* ========== TOP NAV ========== */
.top-nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

[data-bs-theme="dark"] .top-nav {
    background: rgba(22, 28, 36, 0.8);
    border-bottom-color: rgba(255,255,255,0.05);
}

.top-nav h6 { font-weight: 700; margin: 0; font-size: 1rem; }

.btn-toggle-sidebar {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-toggle-sidebar:hover {
    background: rgba(0,0,0,0.05);
    color: var(--fimiya-yellow);
}

/* ========== NOTIFICATIONS BELL ========== */
.notification-bell {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.notification-bell:hover {
    background: rgba(0,0,0,0.05);
    color: var(--fimiya-yellow);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* ========== USER DROPDOWN ========== */
.user-menu { position: relative; }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--fimiya-yellow);
    cursor: pointer;
    transition: all 0.3s;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 180, 0, 0.4);
}

.dropdown-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background: linear-gradient(to top, var(--fimiya-yellow) 0%, var(--fimiya-yellow) 5%, #f5f5f5 25%, #f5f5f5 100%);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 220px;
    padding: 0.5rem 0;
    display: none;
    z-index: 1000;
    border: 2px solid var(--fimiya-yellow);
}

[data-bs-theme="dark"] .dropdown-menu {
    background: linear-gradient(to top, var(--fimiya-yellow) 0%, var(--fimiya-yellow) 25%, #2d3748 25%, #2d3748 100%);
}

.dropdown-menu.show {
    display: block;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    padding: 0.65rem 1.25rem;
    color: var(--fimiya-earth);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    transition: all 0.2s;
    cursor: pointer;
    font-weight: 600;
}

.dropdown-item:hover {
    background: rgba(255, 180, 0, 0.2);
}

.dropdown-item i { font-size: 1rem; }

.dropdown-divider {
    height: 1px;
    background: rgba(61, 20, 0, 0.15);
    margin: 0.5rem 0;
}

.dropdown-item.user-info {
    pointer-events: none;
    opacity: 0.9;
    padding: 0.75rem 1.25rem;
}

.dropdown-item.user-info .user-details {
    display: flex;
    flex-direction: column;
}

.dropdown-item.user-info .user-name {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--fimiya-earth);
}

.dropdown-item.user-info .user-email {
    font-size: 0.75rem;
    color: rgba(61, 20, 0, 0.7);
    font-weight: 500;
}

.dropdown-item.logout {
    color: #dc2626;
    font-weight: 700;
    background: rgba(255, 180, 0, 0.3);
}

.dropdown-item.logout:hover {
    background: rgba(220, 38, 38, 0.15);
}

/* ========== DASHBOARD CONTENT ========== */
.dashboard-content { padding: 1.75rem 2rem; }

.welcome-text { margin-bottom: 1.75rem; }

.welcome-text h2 {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.welcome-text p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ========== STAT CARDS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    border-left: 4px solid var(--fimiya-yellow);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .stat-card { background: #161c24; }

.stat-card::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 120px;
    height: 120px;
    background: var(--fimiya-yellow);
    opacity: 0.03;
    border-radius: 50%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.stat-card h6 {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.65rem;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    line-height: 1;
}

.stat-card small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========== INFO CARD ========== */
.info-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
}

[data-bs-theme="dark"] .info-card {
    background: #161c24;
    border-color: rgba(255,255,255,0.05);
}

.info-card h5 {
    font-weight: 800;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.info-item { margin-bottom: 0; }

.info-item strong {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.info-item div { font-size: 0.875rem; }

.badge {
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.7rem;
}

.bg-warning {
    background-color: var(--fimiya-yellow) !important;
    color: var(--fimiya-earth) !important;
}

.bg-success {
    background-color: #10b981 !important;
    color: white !important;
}

/* ========== DARK MODE BUTTON ========== */
.btn-dark-mode {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-dark-mode:hover {
    background: rgba(0,0,0,0.05);
    color: var(--fimiya-yellow);
}

/* Dark mode button sur login page */
.login-page .btn-dark-mode {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.65rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fimiya-earth);
    font-size: 1.1rem;
    border: 2px solid rgba(255, 180, 0, 0.3);
    transition: all 0.3s;
}

.login-page .btn-dark-mode:hover {
    background: var(--fimiya-yellow);
    color: var(--fimiya-earth);
    border-color: var(--fimiya-yellow);
    transform: scale(1.1);
}

[data-bs-theme="dark"] .login-page .btn-dark-mode {
    background: rgba(255, 255, 255, 0.15);
    color: var(--fimiya-yellow);
    border-color: var(--fimiya-yellow);
}

[data-bs-theme="dark"] .login-page .btn-dark-mode:hover {
    background: var(--fimiya-yellow);
    color: var(--fimiya-earth);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    /* Login page */
    .login-visual { display: none !important; }
    .login-container { 
        height: auto;
        max-width: 100%;
        margin: 1rem;
        border-radius: 12px;
    }
    .login-form-section { padding: 2rem 1.5rem; }
    
    /* Sidebar mobile */
    .sidebar {
        position: fixed;
        left: -100%;
        width: var(--sidebar-width);
        transition: left 0.3s ease;
        z-index: 2000;
    }
    
    .sidebar.mobile-open {
        left: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    
    /* Main wrapper mobile */
    .main-wrapper {
        margin-left: 0 !important;
        width: 100%;
    }
    
    /* Top nav mobile */
    .top-nav {
        padding: 0 1rem;
    }
    
    .top-nav h6 {
        font-size: 0.9rem;
    }
    
    .btn-toggle-sidebar {
        display: block !important;
    }
    
    /* Dashboard content mobile */
    .dashboard-content {
        padding: 1.25rem 1rem;
    }
    
    .welcome-text h2 {
        font-size: 1.25rem;
    }
    
    .welcome-text p {
        font-size: 0.8rem;
    }
    
    /* Stats grid mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem 1rem;
    }
    
    .stat-card .value {
        font-size: 1.75rem;
    }
    
    /* Info card mobile */
    .info-card {
        padding: 1.5rem 1rem;
    }
    
    .info-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* User dropdown mobile */
    .dropdown-menu {
        right: 0;
        left: auto;
        min-width: 200px;
    }
    
    /* Mobile overlay */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
    }
    
    .mobile-overlay.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .top-nav {
        gap: 0.5rem;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .notification-bell {
        font-size: 1rem;
    }
}


/* ========== NOTIFICATIONS TOAST ========== */
.toast-container {
    position: fixed;
    top: 5rem;
    right: 1.5rem;
    z-index: 9999;
    max-width: 350px;
}

.toast {
    margin-bottom: 0.75rem;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast .toast-body {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
}

.toast.bg-success {
    background: #10b981 !important;
}

.toast.bg-danger {
    background: #ef4444 !important;
}

.toast.bg-warning {
    background: var(--fimiya-yellow) !important;
    color: var(--fimiya-earth) !important;
}

.toast.bg-info {
    background: #3b82f6 !important;
}

/* Mobile toast */
@media (max-width: 768px) {
    .toast-container {
        top: 4.5rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}


/* ========== STEPPER ========== */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.stepper-wrapper::before {
    content: '';
    position: absolute;
    top: 17px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.stepper-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-counter {
    width: 35px;
    height: 35px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 700;
    transition: 0.3s;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stepper-item.active .step-counter {
    background: var(--fimiya-yellow);
    border-color: var(--fimiya-yellow);
    color: var(--fimiya-earth);
    box-shadow: 0 0 15px rgba(255,180,0,0.4);
}

.stepper-item.completed .step-counter {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stepper-item.active .step-label {
    color: var(--fimiya-yellow);
}

.stepper-item.completed .step-label {
    color: #10b981;
}

/* ========== FORM STEPS ========== */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ========== FORM ELEMENTS ========== */
.form-label {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.form-label .required {
    color: #ef4444;
    margin-left: 3px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--fimiya-yellow);
    box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.1);
}

.form-helper {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Radio buttons custom */
.radio-card {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}

.radio-card:hover {
    border-color: var(--fimiya-yellow);
    background: rgba(255, 180, 0, 0.05);
    transform: translateY(-2px);
}

.radio-card.selected {
    border-color: var(--fimiya-yellow);
    background: rgba(255, 180, 0, 0.1);
    box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.1);
}

.radio-card.selected::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--fimiya-yellow);
    color: var(--fimiya-earth);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
}

.radio-card i {
    font-size: 2rem;
    color: var(--fimiya-yellow);
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.radio-card.selected i {
    transform: scale(1.1);
}

.radio-card input[type="radio"] {
    display: none;
}

/* ========== TABLE STYLES ========== */
.table-hover tbody tr {
    transition: all 0.2s;
}

.table-hover tbody tr:hover {
    background: rgba(255, 180, 0, 0.05);
}

.badge-client {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ========== SWEETALERT2 CUSTOM ========== */
.fimiya-swal-popup {
    border-radius: 15px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.fimiya-swal-confirm {
    background: var(--fimiya-yellow) !important;
    color: var(--fimiya-earth) !important;
    font-weight: 700 !important;
    border: none !important;
    padding: 0.65rem 2rem !important;
    border-radius: 8px !important;
    transition: all 0.3s !important;
}

.fimiya-swal-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(255, 180, 0, 0.3) !important;
}

.fimiya-swal-cancel {
    font-weight: 600 !important;
    padding: 0.65rem 2rem !important;
    border-radius: 8px !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #10b981 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(16, 185, 129, 0.3) !important;
}

/* Animations personnalisées SweetAlert */
@keyframes swal2-show {
    0% {
        transform: scale(0.7) translateY(-30px);
        opacity: 0;
    }
    45% {
        transform: scale(1.05) translateY(0);
        opacity: 1;
    }
    80% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes swal2-hide {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.8) translateY(-20px);
        opacity: 0;
    }
}

@keyframes swal2-backdrop-show {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 0.4;
    }
}

@keyframes swal2-backdrop-hide {
    0% {
        opacity: 0.4;
    }
    100% {
        opacity: 0;
    }
}

.swal2-show {
    animation: swal2-show 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.swal2-hide {
    animation: swal2-hide 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.swal2-backdrop-show {
    animation: swal2-backdrop-show 0.3s ease !important;
}

.swal2-backdrop-hide {
    animation: swal2-backdrop-hide 0.3s ease !important;
}

/* Override des animations par défaut de SweetAlert */
.swal2-container.swal2-backdrop-show,
.swal2-container.swal2-noanimation {
    background: rgba(0, 0, 0, 0.4) !important;
}

/* Transition du popup */
.swal2-popup {
    will-change: transform, opacity;
}

/* ========== MODAL ANIMATIONS ========== */
.modal {
    transition: opacity 0.3s ease;
}

.modal.fade .modal-dialog {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.9) translateY(-50px);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Backdrop fluide */
.modal-backdrop {
    transition: opacity 0.3s ease;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* Animation d'ouverture personnalisée */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(-30px);
    }
}

.modal.show .modal-dialog {
    animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Backdrop fluide */
.modal-backdrop.fade {
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* ========== BUTTON ANIMATIONS ========== */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* ========== TABLE ROW ANIMATIONS ========== */
.table tbody tr {
    transition: background-color 0.2s ease;
}

/* Pas de transform pour éviter le scroll */
.table tbody tr:hover {
    background-color: rgba(255, 180, 0, 0.08);
}


/* ========== PAGINATION ========== */
#paginationContainer {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.pagination {
    gap: 0.25rem;
}

.page-item {
    margin: 0;
}

.page-link {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.page-link:hover {
    background: rgba(255, 180, 0, 0.1);
    border-color: var(--fimiya-yellow);
    color: var(--fimiya-yellow);
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--fimiya-yellow);
    border-color: var(--fimiya-yellow);
    color: var(--fimiya-earth);
    font-weight: 700;
}

.page-item.disabled .page-link {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
    transform: none;
    background: transparent;
}

/* Sélecteur items par page */
#paginationContainer .form-select {
    border-radius: 8px;
    border-color: var(--border-color);
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-weight: 600;
    min-width: 80px;
    transition: all 0.2s ease;
}

#paginationContainer .form-select:focus {
    border-color: var(--fimiya-yellow);
    box-shadow: 0 0 0 0.2rem rgba(255, 180, 0, 0.1);
}

/* Responsive pagination */
@media (max-width: 768px) {
    #paginationContainer {
        padding: 1rem;
    }
    
    #paginationContainer > div {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem !important;
    }
    
    #paginationContainer nav {
        order: 2;
    }
    
    #paginationContainer > div > div:first-child {
        order: 1;
        text-align: center;
    }
    
    #paginationContainer > div > div:last-child {
        order: 3;
        justify-content: center;
    }
    
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.875rem;
        min-width: 36px;
    }
}


/* ========== UTILITIES ========== */
.text-warning { color: var(--fimiya-yellow) !important; }
.border-warning { border-color: var(--fimiya-yellow) !important; }
