﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.menu-separator {
    border: none;
    border-top: 2px solid #0d6efd; /* Couleur Bootstrap primaire */
    border-radius: 2px;
    margin: 0.5rem 0 0.5rem 0.5rem;
    width: 80%;
    opacity: 0.5;
}

/* WrapperLayout styles */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-row {
    background: linear-gradient(135deg, 
        #0f3460 0%, 
        #1a5490 25%,
        #1b6ec2 50%,
        #1861ac 75%,
        #16537e 100%
    );
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    justify-content: flex-end;
    height: 4rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15), 
                0 0 30px rgba(27, 110, 194, 0.2);
    position: sticky;
    top: 0;
    z-index: 1050; /* Au-dessus de la sidebar */
}

.content {
    padding: 2rem;
    background: #ffffff;
    margin: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-height: calc(100vh - 8rem);
    border: 1px solid #e9ecef;
    animation: contentFadeIn 0.3s ease-out;
}

/* Responsive design pour les écrans plus petits */
@media (max-width: 767.98px) {
    main {
        margin-left: 0;
    }
    
    .content {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 8px;
    }

    .top-row {
        padding: 0 1rem;
    }
}

/* ========================================
   BRAND LOGO dans le top-row
   ======================================== */

.brand-logo {
    display: flex;
    align-items: center;
}

.brand-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.brand-title .brand-highlight {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.85) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: italic;
    position: relative;
    display: inline-block;
    text-shadow: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Styles pour les boutons de navigation dans le top-row */
.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Icônes dans le top-row */
.top-row .bi-info-circle-nav-menu::before,
.top-row .bi-envelope-nav-menu::before {
    color: rgba(255, 255, 255, 0.9);
}

.top-row .nav-link:hover .bi-info-circle-nav-menu::before,
.top-row .nav-link:hover .bi-envelope-nav-menu::before {
    color: white;
}

/* Boutons Account Menu dans le top-row */
.top-row .account-menu-btn {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}

.top-row .account-menu-btn:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-1px);
}

.top-row .account-menu-btn .bi {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

.top-row .account-menu-btn:hover .bi {
    color: white;
}

.top-row .account-menu-btn::after {
    border-top-color: rgba(255, 255, 255, 0.9);
}

.top-row .account-menu-btn:hover::after {
    border-top-color: white;
}

/* Amélioration du bouton logout dans le top-row */
.top-row form button {
    background: none;
    border: none;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-row form button:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: translateY(-1px);
}

/* Amélioration des cartes dans le contenu */
.content .card {
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transition: all 0.2s ease-in-out;
}

.content .card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Styles pour les boutons primaires harmonisés */
.content .btn-primary {
    background: linear-gradient(135deg, #1b6ec2 0%, #1861ac 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(27, 110, 194, 0.3);
    transition: all 0.2s ease-in-out;
}

.content .btn-primary:hover {
    background: linear-gradient(135deg, #1861ac 0%, #155a94 100%);
    box-shadow: 0 4px 8px rgba(27, 110, 194, 0.4);
    transform: translateY(-1px);
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Amélioration des alertes */
.content .alert {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.content .alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

/* Styles pour les formulaires */
.content .form-control:focus {
    border-color: #1b6ec2;
    box-shadow: 0 0 0 0.2rem rgba(27, 110, 194, 0.25);
}

/* Hero sections */
.content .hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 3rem 2rem;
    margin: -1rem -1rem 2rem -1rem;
    border: 1px solid #e9ecef;
}

/* Améliorations des titres */
.content h1 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.content h2, .content h3 {
    color: #34495e;
    font-weight: 600;
}

/* Liens harmonisés */
.content a:not(.btn) {
    color: #1b6ec2;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.content a:not(.btn):hover {
    color: #1861ac;
    text-decoration: underline;
}

/* ========================================
   SIDEBAR & NAVIGATION STYLES
   ======================================== */

.wrapper-container {
    position: relative;
    min-height: 100vh;
}

/* ========================================
   SIDEBAR MODERNE - Design Premium
   ======================================== */

.sidebar {
    position: fixed;
    top: 3.5rem;
    left: -300px;
    width: 300px;
    height: calc(100vh - 3.5rem);
    background: linear-gradient(180deg, 
        #0f3460 0%, 
        #1a5490 25%,
        #1b6ec2 50%,
        #1861ac 75%,
        #16537e 100%
    );
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4),
                0 0 100px rgba(27, 110, 194, 0.3);
    z-index: 1040;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    border-right: 2px solid rgba(255, 255, 255, 0.1);
}

/* Effet de verre givré sur la sidebar */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%231b6ec2" width="100" height="100"/><circle fill="%231861ac" opacity="0.1" cx="50" cy="50" r="40"/></svg>');
    opacity: 0.05;
    pointer-events: none;
}

/* Gradient animé en arrière-plan */
.sidebar::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: rotateSidebarBg 20s linear infinite;
    pointer-events: none;
}

@keyframes rotateSidebarBg {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.sidebar.open {
    left: 0;
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.5),
                0 0 150px rgba(27, 110, 194, 0.4),
                inset -1px 0 20px rgba(255, 255, 255, 0.1);
}

/* ========================================
   OVERLAY - Effet de Profondeur
   ======================================== */

.sidebar-overlay {
    position: fixed;
    top: 3.5rem;
    left: 0;
    width: 100%;
    height: calc(100% - 3.5rem);
    background: radial-gradient(
        circle at 20% 50%,
        rgba(27, 110, 194, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.85) 100%
    );
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    z-index: 1039;
    animation: overlayFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px) saturate(1.2);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Ajustement du main quand le menu est ouvert */
main {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
}

@media (min-width: 992px) {
    main.menu-open {
        transform: translateX(0);
    }
}

/* Empêcher le scroll du body quand le menu est ouvert */
body:has(.sidebar.open) {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100vh;
}

/* Support pour iOS Safari */
@supports (-webkit-touch-callout: none) {
    body:has(.sidebar.open) {
        position: fixed;
        overflow: hidden;
        width: 100%;
        height: 100vh;
    }
}

/* Masquer le header du NavMenu dans la sidebar */
.sidebar .top-row {
    display: none !important;
}

.sidebar .navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.2s ease-in-out;
}

.sidebar .navbar-brand:hover {
    color: #e3f2fd !important;
    transform: scale(1.02);
}

/* Zone scrollable dans la sidebar - prend toute la hauteur */
.sidebar .nav-scrollable {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0;
    background: transparent;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling sur iOS */
    overscroll-behavior: contain; /* Empêche le scroll en cascade sur mobile */
}

/* Bouton de fermeture X positionné à l'extérieur du menu à droite */
.btn-close-sidebar {
    position: fixed;
    top: calc(3.5rem + 1.5rem);
    left: 320px; /* 300px (largeur sidebar) + 20px de marge */
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, 
        #ffffff 0%,
        #f8f9fa 100%
    );
    border: 2px solid rgba(27, 110, 194, 0.3);
    color: #1b6ec2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.5rem;
    z-index: 1041; /* Au-dessus de la sidebar */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15),
                0 2px 8px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideInFromLeft 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideInFromLeft {
    from {
        left: 300px;
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        left: 320px;
        opacity: 1;
        transform: scale(1);
    }
}

/* Effet de brillance */
.btn-close-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    transition: all 0.6s ease;
}

.btn-close-sidebar:hover::before {
    left: 100%;
}

.btn-close-sidebar:hover {
    background: linear-gradient(135deg, 
        #dc3545 0%,
        #c82333 100%
    );
    border-color: #dc3545;
    color: white;
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 6px 24px rgba(220, 53, 69, 0.5),
                0 3px 12px rgba(0, 0, 0, 0.2),
                inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.btn-close-sidebar:active {
    transform: scale(1.05) rotate(90deg);
    box-shadow: 0 3px 12px rgba(220, 53, 69, 0.4);
}

.btn-close-sidebar i {
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    line-height: 1;
}

.btn-close-sidebar:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* Animation de pulse pour attirer l'attention */
@keyframes closeBtnPulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15),
                    0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 6px 24px rgba(27, 110, 194, 0.4),
                    0 3px 12px rgba(0, 0, 0, 0.15),
                    0 0 30px rgba(27, 110, 194, 0.3);
    }
}

.btn-close-sidebar:focus {
    outline: 3px solid rgba(27, 110, 194, 0.4);
    outline-offset: 3px;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .btn-close-sidebar {
        left: 300px; /* 280px (largeur sidebar mobile) + 20px */
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .btn-close-sidebar {
        left: 280px; /* 260px (largeur sidebar) + 20px */
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* ========================================
   MENU ITEMS - Design Moderne et Élégant
   ======================================== */

.sidebar .nav-item {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem !important;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    margin: 0.25rem 0;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    letter-spacing: 0.3px;
}

/* Ligne indicatrice à gauche */
.sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 0%;
    width: 4px;
    background: linear-gradient(180deg, 
        #ffffff 0%,
        #e3f2fd 50%,
        #ffffff 100%
    );
    border-radius: 0 2px 2px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* Effet de brillance qui traverse le lien */
.sidebar .nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.sidebar .nav-link:hover::after {
    left: 100%;
}

.sidebar .nav-link:hover {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.15) 100%
    );
    border-color: rgba(255, 255, 255, 0.3);
    color: white !important;
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(255, 255, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sidebar .nav-link:hover::before {
    height: 60%;
}

/* État actif avec un style premium */
.sidebar .nav-link.active {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.15) 100%
    ) !important;
    border-color: rgba(255, 255, 255, 0.4);
    color: white !important;
    transform: translateX(8px);
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 40px rgba(255, 255, 255, 0.15),
                inset 0 2px 0 rgba(255, 255, 255, 0.3),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.sidebar .nav-link.active::before {
    height: 80%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 1);
}

/* Animation d'entrée pour les items */
.sidebar.open .nav-item {
    animation: slideInFromLeft 0.5s ease-out forwards;
    opacity: 0;
}

.sidebar.open .nav-item:nth-child(1) { animation-delay: 0.1s; }
.sidebar.open .nav-item:nth-child(2) { animation-delay: 0.15s; }
.sidebar.open .nav-item:nth-child(3) { animation-delay: 0.2s; }
.sidebar.open .nav-item:nth-child(4) { animation-delay: 0.25s; }
.sidebar.open .nav-item:nth-child(5) { animation-delay: 0.3s; }
.sidebar.open .nav-item:nth-child(6) { animation-delay: 0.35s; }
.sidebar.open .nav-item:nth-child(7) { animation-delay: 0.4s; }
.sidebar.open .nav-item:nth-child(8) { animation-delay: 0.45s; }

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   ICÔNES DU MENU - Effets Avancés
   ======================================== */

.sidebar .bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-right: 1rem;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border-radius: 10px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

/* Effet de pulse sur l'icône */
.sidebar .bi::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar .nav-link:hover .bi {
    opacity: 1;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.15) 100%
    );
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3),
                inset 0 2px 0 rgba(255, 255, 255, 0.4),
                0 0 30px rgba(255, 255, 255, 0.2);
}

.sidebar .nav-link:hover .bi::before {
    opacity: 1;
    animation: iconPulse 1.5s ease-in-out infinite;
}

.sidebar .nav-link.active .bi {
    opacity: 1;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.2) 100%
    );
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
                inset 0 2px 0 rgba(255, 255, 255, 0.5),
                0 0 40px rgba(255, 255, 255, 0.3);
}

@keyframes iconPulse {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Titres des sections - Style Premium */
.sidebar .nav-link-text {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
    padding: 1.5rem 1.5rem 0.75rem 1.5rem;
    margin-top: 0.5rem;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 100%
    );
    border-left: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 0 4px 4px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link-text::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transition: left 0.8s ease;
}

.sidebar .nav-link-text:hover::before {
    left: 100%;
}

/* Bouton logout dans la sidebar */
.sidebar .btn-logout {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9) !important;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    position: relative;
}

.sidebar .btn-logout:hover {
    background: rgba(220, 53, 69, 0.3);
    color: white !important;
    transform: translateX(4px);
}

/* ========================================
   SÉPARATEURS ET SECTIONS
   ======================================== */

.sidebar .menu-separator {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.1) 10%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.1) 90%,
        transparent 100%
    );
    margin: 1.5rem 1.5rem;
    opacity: 0.8;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sidebar .menu-separator::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    filter: blur(2px);
}

/* ========================================
   SCROLLBAR PERSONNALISÉE - Design Élégant
   ======================================== */

.sidebar .nav-scrollable::-webkit-scrollbar {
    width: 8px;
}

.sidebar .nav-scrollable::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin: 10px 0;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

.sidebar .nav-scrollable::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.5) 100%
    );
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.sidebar .nav-scrollable::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.7) 100%
    );
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.sidebar .nav-scrollable::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(255, 255, 255, 0.9) 100%
    );
}

/* Masquer le bouton toggle du NavMenu car on utilise notre propre bouton */
.sidebar .navbar-toggler,
.sidebar .navbar-toggler-label,
.sidebar .navbar-overlay {
    display: none !important;
}

/* ========================================
   MENU CATÉGORIES - Design Premium dans Sidebar
   ======================================== */

/* Conteneur des catégories */
.sidebar .list-group {
    background: transparent;
}

/* Items de catégories principales */
.sidebar .list-group-item {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.04) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    padding: 0.55rem 0.75rem !important;
    margin: 0.25rem 0.5rem !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

/* Effet de brillance sur les catégories */
.sidebar .list-group-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.sidebar .list-group-item:hover::before {
    left: 100%;
}

.sidebar .list-group-item:hover {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0.12) 100%
    );
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateX(6px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3),
                0 0 25px rgba(255, 255, 255, 0.1);
}

/* Catégorie active avec un style élégant */
.sidebar .list-group-item.active {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.3) 0%,
        rgba(255, 193, 7, 0.25) 50%,
        rgba(255, 235, 59, 0.2) 100%
    ) !important;
    border-color: rgba(255, 215, 0, 0.6) !important;
    color: #fff !important;
    transform: translateX(6px);
    font-weight: 600;
    box-shadow: 0 8px 28px rgba(255, 215, 0, 0.3),
                0 0 40px rgba(255, 215, 0, 0.2),
                inset 0 2px 0 rgba(255, 255, 255, 0.4),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* Badge de couleur des catégories */
.sidebar .badge.rounded-pill {
    padding: 0.35rem 0.55rem;
    font-size: 0.85rem;
    min-width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
}

/* Effet de pulse sur les badges */
.sidebar .badge.rounded-pill::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.3);
    }
}

.sidebar .list-group-item:hover .badge.rounded-pill {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4),
                inset 0 2px 0 rgba(255, 255, 255, 0.4),
                0 0 30px currentColor;
}

/* Icônes dans les badges */
.sidebar .badge.rounded-pill i {
    font-size: 0.9rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Chevron pour sous-catégories */
.sidebar .list-group-item .bi-chevron-down,
.sidebar .list-group-item .bi-chevron-right {
    transition: all 0.3s ease;
    opacity: 0.8;
    font-size: 0.75rem;
}

.sidebar .list-group-item:hover .bi-chevron-down,
.sidebar .list-group-item:hover .bi-chevron-right {
    opacity: 1;
    transform: scale(1.2);
}

/* Sous-catégories avec un style distinct */
.sidebar .list-group-item.small {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-left: 1.75rem !important;
    margin-right: 0.5rem !important;
    padding: 0.4rem 0.65rem !important;
    font-size: 0.8rem;
    position: relative;
}

/* Ligne de connexion pour les sous-catégories */
.sidebar .list-group-item.small::before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 50%;
    width: 1rem;
    height: 2px;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
}

.sidebar .list-group-item.small:hover {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    transform: translateX(4px) scale(1.01);
}

.sidebar .list-group-item.small.active {
    background: linear-gradient(135deg,
        rgba(100, 200, 255, 0.25) 0%,
        rgba(80, 180, 235, 0.2) 100%
    ) !important;
    border-color: rgba(100, 200, 255, 0.5) !important;
    box-shadow: 0 4px 16px rgba(100, 200, 255, 0.3),
                0 0 25px rgba(100, 200, 255, 0.15);
}

/* Animation d'ouverture des sous-catégories */
.sidebar .ms-4 {
    animation: slideDownCategories 0.4s ease-out;
}

@keyframes slideDownCategories {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

/* Conteneur de sous-catégories */
.sidebar .categories-submenu,
.sidebar .ms-4 {
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.05) 100%
    );
    border-left: 3px solid rgba(255, 215, 0, 0.4);
    border-radius: 0 8px 8px 0;
    margin-left: 1rem;
    padding: 0.5rem 0;
    box-shadow: inset 2px 0 10px rgba(0, 0, 0, 0.2);
}

/* ========================================
   PALETTES DE COULEURS POUR BADGES
   ======================================== */

/* Amélioration des couleurs Bootstrap dans la sidebar */
.sidebar .badge[style*="background-color: #0d6efd"],
.sidebar .badge[style*="background-color: rgb(13, 110, 253)"] {
    background: linear-gradient(135deg, #4e9af1 0%, #2a7de1 100%) !important;
    box-shadow: 0 4px 15px rgba(78, 154, 241, 0.4);
}

.sidebar .badge[style*="background-color: #198754"],
.sidebar .badge[style*="background-color: rgb(25, 135, 84)"] {
    background: linear-gradient(135deg, #20c997 0%, #17a085 100%) !important;
    box-shadow: 0 4px 15px rgba(32, 201, 151, 0.4);
}

.sidebar .badge[style*="background-color: #dc3545"],
.sidebar .badge[style*="background-color: rgb(220, 53, 69)"] {
    background: linear-gradient(135deg, #f06595 0%, #e03e5c 100%) !important;
    box-shadow: 0 4px 15px rgba(240, 101, 149, 0.4);
}

.sidebar .badge[style*="background-color: #ffc107"],
.sidebar .badge[style*="background-color: rgb(255, 193, 7)"] {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 212, 59, 0.4);
}

.sidebar .badge[style*="background-color: #fd7e14"],
.sidebar .badge[style*="background-color: rgb(253, 126, 20)"] {
    background: linear-gradient(135deg, #ff922b 0%, #fd7e14 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 146, 43, 0.4);
}

.sidebar .badge[style*="background-color: #20c997"],
.sidebar .badge[style*="background-color: rgb(32, 201, 151)"] {
    background: linear-gradient(135deg, #38d9a9 0%, #20c997 100%) !important;
    box-shadow: 0 4px 15px rgba(56, 217, 169, 0.4);
}

.sidebar .badge[style*="background-color: #6610f2"],
.sidebar .badge[style*="background-color: rgb(102, 16, 242)"] {
    background: linear-gradient(135deg, #845ef7 0%, #7048e8 100%) !important;
    box-shadow: 0 4px 15px rgba(132, 94, 247, 0.4);
}

.sidebar .badge[style*="background-color: #6f42c1"],
.sidebar .badge[style*="background-color: rgb(111, 66, 193)"] {
    background: linear-gradient(135deg, #9775fa 0%, #7950f2 100%) !important;
    box-shadow: 0 4px 15px rgba(151, 117, 250, 0.4);
}

.sidebar .badge[style*="background-color: #e83e8c"],
.sidebar .badge[style*="background-color: rgb(232, 62, 140)"] {
    background: linear-gradient(135deg, #f783ac 0%, #e64980 100%) !important;
    box-shadow: 0 4px 15px rgba(247, 131, 172, 0.4);
}

.sidebar .badge[style*="background-color: #17a2b8"],
.sidebar .badge[style*="background-color: rgb(23, 162, 184)"] {
    background: linear-gradient(135deg, #3bc9db 0%, #22b8cf 100%) !important;
    box-shadow: 0 4px 15px rgba(59, 201, 219, 0.4);
}

/* Couleurs sombres */
.sidebar .badge[style*="background-color: #343a40"],
.sidebar .badge[style*="background-color: rgb(52, 58, 64)"] {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%) !important;
    box-shadow: 0 4px 15px rgba(73, 80, 87, 0.4);
}

/* Couleurs personnalisées modernes */
.sidebar .badge[style*="background-color: #ff6b6b"] {
    background: linear-gradient(135deg, #ff8787 0%, #ff6b6b 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 135, 135, 0.5);
}

.sidebar .badge[style*="background-color: #4ecdc4"] {
    background: linear-gradient(135deg, #63e6e0 0%, #4ecdc4 100%) !important;
    box-shadow: 0 4px 15px rgba(99, 230, 224, 0.5);
}

.sidebar .badge[style*="background-color: #45b7d1"] {
    background: linear-gradient(135deg, #5fc3dd 0%, #45b7d1 100%) !important;
    box-shadow: 0 4px 15px rgba(95, 195, 221, 0.5);
}

.sidebar .badge[style*="background-color: #f7b731"] {
    background: linear-gradient(135deg, #feca57 0%, #f7b731 100%) !important;
    box-shadow: 0 4px 15px rgba(254, 202, 87, 0.5);
}

.sidebar .badge[style*="background-color: #5f27cd"] {
    background: linear-gradient(135deg, #7e5bef 0%, #5f27cd 100%) !important;
    box-shadow: 0 4px 15px rgba(126, 91, 239, 0.5);
}

.sidebar .badge[style*="background-color: #00d2d3"] {
    background: linear-gradient(135deg, #1dd1a1 0%, #00d2d3 100%) !important;
    box-shadow: 0 4px 15px rgba(29, 209, 161, 0.5);
}

/* Effet arc-en-ciel pour badges sans couleur définie */
.sidebar .badge:not([style*="background-color"]) {
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 50%,
        #f093fb 100%
    ) !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    animation: rainbowShift 3s ease-in-out infinite;
}

@keyframes rainbowShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(30deg);
    }
}

/* ========================================
   RESPONSIVE - Optimisations Mobile
   ======================================== */

@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }

    .sidebar .nav-link {
        padding: 0.875rem 1rem !important;
        font-size: 0.9rem;
    }

    .sidebar .bi {
        width: 2.25rem;
        height: 2.25rem;
        margin-right: 0.875rem;
    }

    .sidebar .nav-item {
        margin-bottom: 0.375rem;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 260px;
        left: -260px;
    }

    .sidebar .nav-link {
        padding: 0.75rem 0.875rem !important;
        font-size: 0.875rem;
        border-radius: 10px;
    }

    .sidebar .bi {
        width: 2rem;
        height: 2rem;
        margin-right: 0.75rem;
        border-radius: 8px;
    }

    .sidebar .nav-link-text {
        font-size: 0.65rem;
        padding: 1.25rem 1.25rem 0.625rem 1.25rem;
    }
}

/* Animation au touch sur mobile */
@media (hover: none) and (pointer: coarse) {
    .sidebar .nav-link:active {
        transform: translateX(8px) scale(0.98);
    }
}

/* ========================================
   MENU BUTTON STYLES - Bouton Moderne Premium 
   ======================================== */

.btn-menu {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, 
        #1a5490 0%, 
        #1b6ec2 35%,
        #1861ac 65%,
        #16537e 100%
    );
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(27, 110, 194, 0.3),
                0 1px 4px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
    min-height: 36px;
}

/* Effet de brillance anim� en arri�re-plan */
.btn-menu::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 70%
    );
    animation: rotateBtnBg 6s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-menu:hover::before {
    opacity: 1;
}

@keyframes rotateBtnBg {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Ligne de brillance qui traverse le bouton */
.btn-menu::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    transition: left 0.8s ease;
}

.btn-menu:hover::after {
    left: 200%;
}

.btn-menu:hover {
    background: linear-gradient(135deg, 
        #1b6ec2 0%, 
        #1861ac 50%,
        #16537e 100%
    );
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 18px rgba(27, 110, 194, 0.45),
                0 3px 8px rgba(0, 0, 0, 0.18),
                inset 0 1px 0 rgba(255, 255, 255, 0.25),
                0 0 30px rgba(27, 110, 194, 0.25);
}

.btn-menu:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(27, 110, 194, 0.4),
                0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-menu:focus {
    outline: 3px solid rgba(27, 110, 194, 0.4);
    outline-offset: 3px;
}

/* État actif avec une couleur diff�rente */
.btn-menu.active {
    background: linear-gradient(135deg, 
        #16537e 0%, 
        #0f3460 50%,
        #0a2540 100%
    );
    box-shadow: 0 4px 20px rgba(15, 52, 96, 0.5),
                0 2px 8px rgba(0, 0, 0, 0.25),
                inset 0 2px 0 rgba(255, 255, 255, 0.15),
                inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

/* Conteneur des ic�nes hamburger */
.menu-icon-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 20px;
    position: relative;
    z-index: 1;
}

.menu-icon {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Effet de brillance sur les barres */
.menu-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-menu:hover .menu-icon::after {
    opacity: 1;
    animation: barShine 1.2s ease-in-out infinite;
}

@keyframes barShine {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

.menu-icon:nth-child(1) {
    transform-origin: center left;
}

.menu-icon:nth-child(2) {
    transform-origin: center;
}

.menu-icon:nth-child(3) {
    transform-origin: center left;
}

/* Hover effect sur les barres */
.btn-menu:hover .menu-icon:nth-child(1) {
    transform: scaleX(1.1);
}

.btn-menu:hover .menu-icon:nth-child(2) {
    transform: scaleX(0.9);
}

.btn-menu:hover .menu-icon:nth-child(3) {
    transform: scaleX(1.1);
}

/* Animation du bouton menu au clic - transformation en X */
.btn-menu.active .menu-icon:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-menu.active .menu-icon:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.btn-menu.active .menu-icon:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Texte du bouton */
.menu-text {
    font-size: 0.8rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-menu:hover .menu-text {
    letter-spacing: 0.6px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3),
                 0 0 15px rgba(255, 255, 255, 0.25);
}

.btn-menu.active .menu-text {
    letter-spacing: 0.7px;
}

/* Effet de pulsation pour attirer l'attention */
@keyframes menuPulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(27, 110, 194, 0.3),
                    0 2px 8px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 6px 24px rgba(27, 110, 194, 0.5),
                    0 4px 12px rgba(0, 0, 0, 0.2),
                    0 0 40px rgba(27, 110, 194, 0.4);
    }
}

.btn-menu.pulse {
    animation: menuPulse 2s ease-in-out infinite;
}

/* Badge notification (optionnel pour plus tard) */
.btn-menu .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.5);
    animation: badgeBounce 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes badgeBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .brand-title {
        font-size: 1.25rem;
    }

    .btn-menu {
        padding: 0.4rem 0.7rem;
        min-height: 34px;
        gap: 0.35rem;
    }

    .menu-icon-wrapper {
        width: 22px;
        height: 16px;
    }

    .menu-icon {
        height: 2.5px;
    }

    .menu-text {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .brand-title {
        font-size: 1.1rem;
    }

    .btn-menu {
        padding: 0.35rem 0.6rem;
        min-height: 32px;
        border-radius: 0.5rem;
        gap: 0.3rem;
    }

    .menu-icon-wrapper {
        width: 20px;
        height: 14px;
    }

    .menu-icon {
        height: 2px;
    }

    .menu-text {
        font-size: 0.7rem;
        letter-spacing: 0.3px;
    }

    .btn-menu:hover .menu-text {
        letter-spacing: 0.4px;
    }
}

/* Version compacte sans texte (optionnel) */
.btn-menu.compact {
    padding: 0.5rem;
    min-width: 38px;
}

.btn-menu.compact .menu-text {
    display: none;
}

@media (max-width: 400px) {
    .btn-menu .menu-text {
        display: none;
    }
    
    .btn-menu {
        padding: 0.5rem;
        min-width: 36px;
        justify-content: center;
    }
}

/* ========================================
   CAROUSEL STYLES - Design Premium Harmonisé
   ======================================== */

/* Conteneur principal du carousel */
.carousel.slide {
    position: relative;
    overflow: hidden;
}

.carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-item {
    position: relative;
    display: none;
    float: left;
    width: 100%;
    margin-right: -100%;
    backface-visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item.active {
    display: block;
}

/* ========================================
   CARTES DE CATÉGORIES - Style Premium
   ======================================== */

.category-card .card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1.25rem;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #f8f9fa 50%,
        #f0f2f5 100%
    );
    border: 2px solid rgba(27, 110, 194, 0.15);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08),
                0 4px 8px rgba(0, 0, 0, 0.04);
}

/* Effet de verre avec motif subtil */
.category-card .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(27, 110, 194, 0.08) 0%, 
        rgba(27, 110, 194, 0.02) 50%,
        rgba(27, 110, 194, 0.08) 100%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

/* Gradient animé en arrière-plan */
.category-card .card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(27, 110, 194, 0.1) 0%,
        transparent 70%
    );
    animation: rotateCardBg 15s linear infinite;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 0;
}

@keyframes rotateCardBg {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.category-card:hover .card::before,
.category-card:hover .card::after {
    opacity: 1;
}

.category-card:hover .card {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 40px rgba(27, 110, 194, 0.25), 
                0 12px 20px rgba(0, 0, 0, 0.15),
                inset 0 2px 0 rgba(255, 255, 255, 0.5),
                0 0 60px rgba(27, 110, 194, 0.15);
    border-color: rgba(27, 110, 194, 0.4);
}

/* Carte sélectionnée avec effet doré */
.category-card.selected .card {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.15) 0%,
        rgba(255, 255, 255, 0.95) 50%,
        rgba(255, 235, 59, 0.1) 100%
    );
    border: 3px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 12px 32px rgba(255, 215, 0, 0.3),
                0 0 60px rgba(255, 215, 0, 0.2),
                inset 0 3px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(-8px) scale(1.02);
}

.category-card .card-body {
    position: relative;
    z-index: 1;
    padding: 1.75rem 1.5rem;
}

/* ========================================
   ICÔNES DE CATÉGORIES - Premium 3D
   ======================================== */

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2),
                inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

/* Effet de brillance qui pulse */
.category-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 70%
    );
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.category-card:hover .category-icon::before {
    width: 150%;
    height: 150%;
    opacity: 1;
}

/* Effet de pulse continu */
.category-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid currentColor;
    opacity: 0;
    animation: iconPulseCarousel 2.5s ease-in-out infinite;
}

@keyframes iconPulseCarousel {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.4);
    }
}

.category-card:hover .category-icon {
    transform: scale(1.2) rotate(12deg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3),
                inset 0 3px 0 rgba(255, 255, 255, 0.5),
                0 0 40px currentColor;
}

.category-icon i {
    position: relative;
    z-index: 1;
    font-size: 2.25rem !important;
    transition: all 0.4s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.category-card:hover .category-icon i {
    transform: scale(1.15);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

/* Titre de la catégorie */
.category-card .card-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 0.75rem;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-card:hover .card-title {
    color: #1b6ec2;
    transform: scale(1.05);
    text-shadow: 0 3px 6px rgba(27, 110, 194, 0.2);
}

.category-card.selected .card-title {
    color: #d4af37;
    text-shadow: 0 3px 6px rgba(212, 175, 55, 0.3);
}

/* Compteur de sous-catégories */
.category-card small {
    color: #6c757d;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.category-card:hover small {
    color: #1b6ec2;
    font-weight: 600;
}

/* ========================================
   BOUTONS DE NAVIGATION - Style Premium
   ======================================== */

#carouselCategories + .d-flex button.btn-sm,
.carousel ~ .d-flex button.btn-sm,
button[data-bs-target="#carouselCategories"] {
    min-width: 48px;
    height: 48px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(27, 110, 194, 0.3);
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #f8f9fa 50%,
        #f0f2f5 100%
    );
    color: #1b6ec2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(27, 110, 194, 0.15),
                0 2px 4px rgba(0, 0, 0, 0.08);
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Effet de brillance sur les boutons */
button[data-bs-target="#carouselCategories"]::before,
#carouselCategories + .d-flex button.btn-sm::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.6) 0%,
        transparent 70%
    );
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    opacity: 0;
}

button[data-bs-target="#carouselCategories"]:hover::before,
#carouselCategories + .d-flex button.btn-sm:hover::before {
    width: 200%;
    height: 200%;
    opacity: 1;
}

button[data-bs-target="#carouselCategories"]:hover,
.carousel ~ .d-flex button.btn-sm:hover {
    background: linear-gradient(135deg, 
        #1b6ec2 0%, 
        #1861ac 50%,
        #16537e 100%
    );
    color: white;
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 24px rgba(27, 110, 194, 0.4),
                0 4px 12px rgba(0, 0, 0, 0.15),
                inset 0 2px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

button[data-bs-target="#carouselCategories"]:active {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(27, 110, 194, 0.3);
}

button[data-bs-target="#carouselCategories"]:disabled,
button[data-bs-target="#carouselCategories"].disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ========================================
   INDICATEURS - Style Premium Élégant
   ======================================== */

.carousel-indicators {
    margin-bottom: 0;
    padding: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(27, 110, 194, 0.05) 50%,
        transparent 100%
    );
    border-radius: 2rem;
}

.carousel-indicators button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        #d1d5db 0%,
        #9ca3af 100%
    );
    border: 2px solid rgba(255, 255, 255, 0.8);
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    margin: 0;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Effet de pulse sur les indicateurs */
.carousel-indicators button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    transition: all 0.3s ease;
}

.carousel-indicators button:hover {
    background: linear-gradient(135deg,
        #9ca3af 0%,
        #6b7280 100%
    );
    transform: scale(1.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.carousel-indicators button:hover::after {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.5);
}

/* Indicateur actif avec style premium */
.carousel-indicators button.active {
    width: 40px;
    border-radius: 8px;
    background: linear-gradient(90deg, 
        #1b6ec2 0%, 
        #1861ac 50%,
        #1b6ec2 100%
    );
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 16px rgba(27, 110, 194, 0.5),
                0 2px 8px rgba(0, 0, 0, 0.2),
                inset 0 2px 0 rgba(255, 255, 255, 0.4),
                0 0 30px rgba(27, 110, 194, 0.3);
    position: relative;
    overflow: hidden;
}

/* Effet de brillance animé sur l'indicateur actif */
.carousel-indicators button.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 100%
    );
    animation: indicatorShine 2s ease-in-out infinite;
}

@keyframes indicatorShine {
    0%, 100% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
}

/* ========================================
   CONTENEUR DU CAROUSEL - Style Premium
   ======================================== */

/* Carte conteneur du carousel */
.carousel .card {
    background: linear-gradient(135deg,
        #ffffff 0%,
        #f8f9fa 100%
    );
    border: 2px solid rgba(27, 110, 194, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: relative;
}

.carousel .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        transparent 0%,
        #1b6ec2 50%,
        transparent 100%
    );
}

.carousel .card-body {
    padding: 2rem;
}

/* Titre du carousel */
.carousel .card-body h5 {
    color: #2c3e50;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.carousel .card-body h5 i {
    color: #1b6ec2;
    font-size: 1.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel .card-body:hover h5 i {
    transform: rotate(360deg) scale(1.2);
    color: #1861ac;
    filter: drop-shadow(0 4px 12px rgba(27, 110, 194, 0.4));
}

/* Animation d'entrée des slides */
@keyframes carouselFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.carousel-item.active {
    animation: carouselFadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation des cartes individuelles */
.carousel-item.active .category-card {
    animation: slideInCard 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.carousel-item.active .category-card:nth-child(1) { animation-delay: 0.1s; }
.carousel-item.active .category-card:nth-child(2) { animation-delay: 0.2s; }
.carousel-item.active .category-card:nth-child(3) { animation-delay: 0.3s; }
.carousel-item.active .category-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInCard {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Effet hover pour les produits */
.hover-shadow {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-shadow:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15), 
                0 8px 12px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-6px);
}

.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}

/* Titre du carousel */
.carousel .card-body h5 i {
    transition: transform 0.3s ease;
}

.carousel .card-body:hover h5 i {
    transform: rotate(360deg);
}

/* Responsive design pour le carousel */
@media (max-width: 992px) {
    .category-icon {
        width: 60px;
        height: 60px;
    }

    .category-icon i {
        font-size: 1.75rem !important;
    }

    .category-card .card {
        border-radius: 0.75rem;
    }
}

@media (max-width: 768px) {
    .category-icon {
        width: 50px;
        height: 50px;
    }

    .category-icon i {
        font-size: 1.5rem !important;
    }

    .category-card:hover .card {
        transform: translateY(-4px) scale(1.01);
    }

    button[data-bs-target="#carouselCategories"],
    .carousel ~ .d-flex button.btn-sm {
        min-width: 36px;
        height: 36px;
        border-radius: 0.5rem;
    }

    .carousel-indicators button {
        width: 10px;
        height: 10px;
    }

    .carousel-indicators button.active {
        width: 24px;
    }
}

@media (max-width: 576px) {
    .category-icon {
        width: 45px;
        height: 45px;
    }

    .category-icon i {
        font-size: 1.25rem !important;
    }

    .category-card .card-body {
        padding: 1rem !important;
    }

    .category-card h6 {
        font-size: 0.875rem;
    }

    .category-card small {
        font-size: 0.75rem;
    }
}

/* Animation de chargement pour le carousel */
@keyframes pulseCarousel {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.carousel.loading {
    animation: pulseCarousel 1.5s ease-in-out infinite;
}

/* Effet de brillance au survol */
.category-card .card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.category-card:hover .card::after {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Amélioration de l'accessibilité */
.carousel-indicators button:focus,
button[data-bs-target="#carouselCategories"]:focus {
    outline: 3px solid rgba(27, 110, 194, 0.5);
    outline-offset: 2px;
}

.category-card:focus-within .card {
    border-color: #1b6ec2;
    box-shadow: 0 0 0 3px rgba(27, 110, 194, 0.2);
}