/* =============================================
       UTILS, BASE STYLES & ANIMATIONS
   ============================================= */

/* Liens externes et icônes */
a[rel="external"]::after {
    content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVR42qXKwQkAIAxDUUdxtO6/RBQkQZvSi8I/pL4BoGw/XPkh4XigPmsUgh0626AjRsgxHTkUThsG2T/sIlzdTsp52kSS1wAAAABJRU5ErkJggg==);
    margin: 0 3px 0 5px;
}
html[data-theme="dark"] a[rel="external"]::after {
    filter: invert(1) opacity(0.8);
}
[onclick] { cursor: pointer; }
.bi { fill: currentColor; }
.tracking-tight { letter-spacing: -0.04em; }

/* Tailles et affichage fixes */
.card-table-wrapper { overflow: clip !important; } /* Arrondis sans bloquer scroll H */
.registration-steps { height: 40px !important; }
.gri-card { width: 16rem; }
.p-card { width: 22rem; max-width: 100%; }
.o-card { width: 19rem; }
.lines-6 { height: 150px !important; }

/* Overlays & Animations */
.maintenance-stripes {
    background: repeating-linear-gradient(-45deg, #000, #000 25px, #ff0 25px, #ff0 50px);
    opacity: 0.5; z-index: 10;
}
.hover-lift {
    --hover-shadow: 0 0.8rem 2rem rgba(0,0,0,.12);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease-in-out;
}
.hover-lift:hover, .hover-lift:focus-within {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--hover-shadow);
}

/* Transitions globales de thèmes */
:is(.theme-frost, .theme-material) :is(.card, .navbar, .btn, .nav-link, table, th, td) {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
}

/* =============================================
         THEMES CORE (LIGHT & DARK BASE)
   ============================================= */

html[data-theme="dark"] {
    color-scheme: dark;
    --bs-body-color: #cbd5e1;
    --bs-body-color-rgb: 203, 213, 225;
    --bs-emphasis-color: #f8fafc;
    --bs-emphasis-color-rgb: 248, 250, 252;
    --bs-secondary-color: #94a3b8;
    --bs-secondary-color-rgb: 148, 163, 184;
    --bs-tertiary-color: #64748b;
    --bs-tertiary-color-rgb: 100, 116, 139;
    --bs-secondary-bg: #334155;
    --bs-secondary-bg-rgb: 51, 65, 85;
    --bs-tertiary-bg: #1e293b;
    --bs-tertiary-bg-rgb: 30, 41, 59;
    --bs-border-color: rgba(255, 255, 255, 0.15);
    --bs-border-color-translucent: rgba(255, 255, 255, 0.1);
}

/* --- FROST THEME --- */
.theme-frost {
    background: #f8fafc fixed;
    background-image: radial-gradient(circle at 15% 50%, rgba(100, 185, 233, 0.25), transparent 50%),
                      radial-gradient(circle at 85% 30%, rgba(228, 0, 70, 0.15), transparent 50%);
}
.theme-frost::before {
    content: ''; position: fixed; inset: 0; backdrop-filter: blur(60px); z-index: -1; pointer-events: none;
}
.theme-frost .glass-navbar {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.theme-frost .glass-navbar::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background-color: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    backdrop-filter: blur(24px) saturate(200%);
}

html[data-theme="dark"] .theme-frost {
    background-color: #08090f; color: #f8fafc;
    background-image: radial-gradient(circle at 15% 50%, rgba(20, 80, 150, 0.3), transparent 50%),
                      radial-gradient(circle at 85% 30%, rgba(180, 0, 100, 0.25), transparent 50%);
}
html[data-theme="dark"] .theme-frost .glass-navbar {
    background-color: transparent !important; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .theme-frost .glass-navbar::before {
    background-color: rgba(15, 20, 30, 0.45);
}
html[data-theme="dark"] .theme-frost .bg-body-tertiary {
    background-color: rgba(15, 23, 42, 0.8) !important; backdrop-filter: blur(8px);
}

/* --- MATERIAL THEME --- */
.theme-material { background-color: #f2f7fc; }
.theme-material .navbar:not(.bg-danger) {
    background-color: #ffffff !important; box-shadow: 0 4px 20px rgba(0, 46, 90, 0.05) !important;
}
.theme-material .navbar-light .navbar-nav .nav-link { color: #002e5a !important; font-weight: 500; }
.theme-material h3.card-title { color: #002e5a !important; font-weight: 600; }

html[data-theme="dark"] .theme-material { background-color: #16181e; color: #e2e8f0; }
html[data-theme="dark"] .theme-material .navbar:not(.bg-danger) {
    background-color: #1e2028 !important; border-bottom: 1px solid #2c2f3a;
}
html[data-theme="dark"] .theme-material .bg-body-tertiary { background-color: #1e2028 !important; }

/* --- GLOBAL DARK TEXT & BRAND OVERRIDES --- */
html[data-theme="dark"] :is(.theme-frost, .theme-material) :is(h1, h2, h3, h4, h5, h6, .card-title, .navbar-brand, .nav-link, .text-body, .modal-body, .text-reset) {
    color: #f8fafc !important;
}
html[data-theme="dark"] :is(.theme-frost, .theme-material) :is(.text-muted, .text-secondary, .text-body-secondary, .link-secondary, .link-dark) {
    color: #94a3b8 !important;
}
html[data-theme="dark"] :is(.theme-frost, .theme-material) .border-dark-transparent { border-color: transparent !important; }

/* Correctifs de priorités */
html[data-theme="dark"] :is(.theme-frost, .theme-material) .navbar-nav .nav-link { color: #f8fafc !important; }
.theme-material .text-primary { color: #0d6efd !important; }
html[data-theme="dark"] :is(.theme-frost, .theme-material) .text-primary { color: #60a5fa !important; } /* Bleu clair vif */

/* Menu Hamburger Mobile (Dark) */
html[data-theme="dark"] :is(.theme-material, .theme-frost) .navbar-toggler-icon { filter: invert(1) grayscale(100%) brightness(200%); }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .navbar-toggler { border-color: rgba(255, 255, 255, 0.15) !important; }

/* Active Indicator for Navbar */
.nav-active-indicator {
    border-left: 3px solid #0d6efd;
}
html[data-theme="dark"] .nav-active-indicator {
    border-left-color: #60a5fa !important;
}
@media (min-width: 768px) {
    .nav-active-indicator {
        border-left: none;
        border-bottom: 2px solid #0d6efd;
    }
    html[data-theme="dark"] .nav-active-indicator {
        border-bottom-color: #60a5fa !important;
    }
}

/* Menu Styling */
@media (max-width: 767.98px) {
    #navbar_content.offcanvas-md { width: 200px !important; }
}
@media (min-width: 768px) {
    #navbar_content.offcanvas-md {
        background-color: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        border: none !important;
    }
}
.theme-frost :is(.offcanvas, .offcanvas-md) { background-color: rgba(255, 255, 255, 0.55) !important; -webkit-backdrop-filter: blur(24px) saturate(200%); backdrop-filter: blur(24px) saturate(200%); border-left-color: rgba(255, 255, 255, 0.5) !important; }
html[data-theme="dark"] .theme-material :is(.offcanvas, .offcanvas-md) { background-color: #1e2028 !important; color: #f8fafc !important; border-left-color: #2c2f3a !important; }
html[data-theme="dark"] .theme-frost :is(.offcanvas, .offcanvas-md) { background-color: rgba(15, 20, 30, 0.45) !important; color: #f8fafc !important; -webkit-backdrop-filter: blur(24px) saturate(200%); backdrop-filter: blur(24px) saturate(200%); border-left-color: rgba(255, 255, 255, 0.1) !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .offcanvas-header { border-bottom-color: rgba(255, 255, 255, 0.15) !important; }
.theme-frost .offcanvas-backdrop.show { opacity: 0.2 !important; }
html[data-theme="dark"] .theme-frost .offcanvas-backdrop.show { opacity: 0.3 !important; }

/* =============================================
    COMPONENTS (CARDS, MODALS, TOASTS, BADGES)
   ============================================= */

/* --- CARDS --- */
:is(.theme-frost, .theme-material) .card {
    border-radius: 1.5rem !important; background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 46, 0.08) !important; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}
.theme-frost .card {
    border-radius: 1.25rem !important; background-color: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(24px) saturate(150%); border: 1px solid rgba(255, 255, 255, 0.6) !important;
}
.theme-frost h3.card-title { font-weight: 700; letter-spacing: -0.02em; }

html[data-theme="dark"] :is(.theme-frost, .theme-material) .card {
    background-color: #22252f !important; border: 1px solid #2c2f3a !important; color: #f1f5f9 !important;
}
html[data-theme="dark"] .theme-frost .card { background-color: rgba(30, 41, 59, 0.7) !important; border-color: rgba(255, 255, 255, 0.1) !important; }
html[data-theme="dark"] .theme-material .card.hover-lift { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important; }

/* --- AVATARS --- */
.avatar-placeholder {
    width: 160px !important; height: 200px !important; margin: 0 auto;
    background: linear-gradient(135deg, #6366f1, #a855f7) !important;
    display: flex; align-items: center; justify-content: center;
    border-radius: 1rem; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease;
}
.avatar-placeholder svg { width: 80px !important; height: 80px !important; color: #fff !important; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); overflow: visible !important; }
.avatar-placeholder:hover { transform: scale(1.03); }

/* Thumbnails */
html[data-theme="dark"] :is(.theme-material, .theme-frost) :is(.img-thumbnail, .bg-light) {
    background-color: rgba(255, 255, 255, 0.05) !important; border-color: rgba(255, 255, 255, 0.1) !important; color: #cbd5e1 !important;
}

/* --- Toast notifications --- */
.toast-container {
    position: fixed !important;  /* Le conteneur suit l'écran pendant le scroll */
    top: 125px !important;       
    right: 1.5rem !important;  
    z-index: 1000 !important; 
    pointer-events: none;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important; /* Espace entre chaque toast */
}

.toast {
    pointer-events: auto;          /* Permet de cliquer sur la croix du toast */
    position: relative !important; /* Permet au toast de s'empiler dans le conteneur */
    margin: 0 !important;
}

/* Material Light */
.glass-toast { 
    background-color: #ffffff !important; /* Opaque total */
    backdrop-filter: none !important; 
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* Frost Light */
.theme-frost .glass-toast { 
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important; 
}

/* Dark Mode Material */
html[data-theme="dark"] .theme-material .glass-toast { 
    background-color: #1e2028 !important; /* Gris anthracite solide */
    backdrop-filter: none !important; 
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Dark Mode Frost */
html[data-theme="dark"] .theme-frost .glass-toast { 
    background-color: rgba(15, 20, 30, 0.85) !important; 
    backdrop-filter: blur(12px) !important; 
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Ajustements globaux Dark */
html[data-theme="dark"] :is(.theme-material, .theme-frost) .glass-toast { color: #f8fafc; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

html[data-theme="dark"] .tooltip {
    --bs-tooltip-bg: #090d16;
    --bs-tooltip-color: #f8fafc;
    --bs-tooltip-opacity: 0.95;
}
html[data-theme="dark"] .popover {
    --bs-popover-color: #cbd5e1;
    --bs-popover-border-color: rgba(255, 255, 255, 0.15);
}
html[data-theme="dark"] .theme-material .popover {
    --bs-popover-bg: #1e2028;
    --bs-popover-header-bg: #22252f;
}
html[data-theme="dark"] .theme-frost .popover {
    --bs-popover-bg: rgba(30, 41, 59, 0.85);
    --bs-popover-header-bg: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(20px);
}

/* --- Modals --- */
.modal-content { border: none !important; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important; }
.modal-header, .modal-footer { border-color: rgba(0, 0, 0, 0.08) !important; }
.modal-footer .btn { border-radius: 50rem !important; padding: 0.5rem 1.5rem !important; font-weight: 600 !important; }
html[data-theme="dark"] .theme-material .modal-content { background-color: #22252f !important; }
html[data-theme="dark"] .theme-frost .modal-content { background-color: rgba(30, 41, 59, 0.85) !important; backdrop-filter: blur(20px); }
html[data-theme="dark"] :is(.theme-material, .theme-frost) :is(.modal-header, .modal-footer) { border-color: rgba(255, 255, 255, 0.1) !important; }

/* --- Badges and accordion menus --- */
.badge.bg-success, .badge.bg-danger { color: #ffffff !important; }
.bg-opacity-10 { backdrop-filter: saturate(1.5); }

.badge-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.25rem 0.75rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0.02em !important;
    border-radius: 50rem !important;
    background-color: rgba(100, 185, 233, 0.12) !important; /* PC2 primary blue with transparency */
    color: #152f4e !important; /* PC1 deep dark blue for light theme contrast */
    border: 1px solid rgba(100, 185, 233, 0.25) !important;
    backdrop-filter: blur(8px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(8px) saturate(1.2) !important;
    transition: all 0.2s ease !important;
}

html[data-theme="dark"] .badge-count {
    background-color: rgba(96, 165, 250, 0.16) !important;
    color: #93c5fd !important; /* bright pastel blue for dark theme readability */
    border: 1px solid rgba(96, 165, 250, 0.3) !important;
}


html[data-theme="dark"] :is(.theme-material, .theme-frost) .badge { color: #f8fafc !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .badge.bg-opacity-25 { background-color: rgba(255, 255, 255, 0.15) !important; border: 1px solid rgba(255, 255, 255, 0.1); }
html[data-theme="dark"] .badge.bg-dark-subtle.text-dark-emphasis { background-color: #cbd5e1 !important; color: #000000 !important; border: 1px solid rgba(255, 255, 255, 0.2) !important; font-weight: 700 !important; } /* Annulée */

html[data-theme="dark"] :is(.theme-material, .theme-frost) :is(.accordion-item, .accordion-button) { background-color: transparent !important; color: #e2e8f0 !important; box-shadow: none !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .accordion-button::after { filter: invert(1) brightness(1.5); }


/* =============================================
                BUTTONS & ACTIONS
   ============================================= */
:is(.theme-frost, .theme-material) .btn { border-radius: 50rem !important; }
.btn svg.bi { overflow: visible !important; }

/* Primary (Material) */
.theme-material .btn-primary { background-color: #0d6efd !important; color: #fff !important; border: none !important; font-weight: 600; box-shadow: none !important; }
.theme-material .btn-primary:hover { background-color: #0b5ed7 !important; }

/* Outlines & Secondaries (Dark Mode Fixes) */
html[data-theme="dark"] .btn-outline-danger { --bs-btn-color: #ff0000 !important; --bs-btn-border-color: #ff0000 !important; }
html[data-theme="dark"] .btn-outline-danger:disabled { opacity: 0.8 !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) :is(.btn-secondary, .btn-outline-secondary) { background-color: rgba(255, 255, 255, 0.1) !important; border-color: rgba(255, 255, 255, 0.2) !important; color: #f1f5f9 !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .btn-outline-secondary:hover { background-color: rgba(255, 255, 255, 0.2) !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .btn-outline-primary { --bs-btn-color: #60a5fa !important; --bs-btn-border-color: #60a5fa !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .btn-outline-primary:hover { --bs-btn-hover-bg: #60a5fa !important; --bs-btn-hover-color: #ffffff !important; }

/* Icon Buttons (Zoom & Edit) */
:is(.btn-icon-zoom, .btn-pc5) { transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; border-radius: 50% !important; display: inline-flex !important; align-items: center; justify-content: center; }
.btn-icon-zoom { background-color: transparent !important; border: none !important; }
.btn-icon-zoom:hover:not(:disabled) { transform: scale(1.15) !important; background-color: currentColor !important; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); }
.btn-icon-zoom:hover:not(:disabled) svg { color: #ffffff !important; }
html[data-theme="dark"] .btn-icon-zoom.text-success { color: #4ade80 !important; }
html[data-theme="dark"] .btn-icon-zoom.text-warning { color: #fbbf24 !important; }
html[data-theme="dark"] .btn-icon-zoom.text-danger { color: #f87171 !important; }
html[data-theme="dark"] .btn-icon-zoom:hover:not(:disabled) svg { color: #1e293b !important; }

.btn-pc5 { background-color: rgba(0, 0, 0, 0.05); border: 1px solid rgba(0, 0, 0, 0.1); padding: 0.5rem !important; }
.btn-pc5:hover { background-color: rgba(0, 0, 0, 0.1); transform: scale(1.1); }
html[data-theme="dark"] .btn-pc5 { background-color: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }
html[data-theme="dark"] .btn-pc5:hover { background-color: rgba(255, 255, 255, 0.2); }
html[data-theme="dark"] .btn-pc5 svg { color: #cbd5e1 !important; }


/* =============================================
        TABLES (HARMONIZATION & FIXES)
   ============================================= */

/* Conteneurs et globalités */
.table-responsive, .card .table-responsive, .card-body.bg-body-tertiary.border {
    border-radius: 1rem !important; border: 1px solid var(--bs-table-border-color) !important; background-color: var(--bs-tertiary-bg) !important;  overscroll-behavior-x: none !important;
}
.theme-frost :is(.table-responsive, .card .table-responsive, .card-body.bg-body-tertiary.border) { background-color: rgba(255, 255, 255, 0.5) !important; backdrop-filter: blur(24px) saturate(150%); }
.table-responsive-clean,
:is(.theme-material, .theme-frost) .table-responsive-clean,
.theme-frost :is(.table-responsive-clean, .card .table-responsive-clean),
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table-responsive-clean {
    border: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
}

:is(.theme-material, .theme-frost) .table {
    --bs-table-bg: transparent; --bs-table-color: inherit; --bs-table-border-color: rgba(0, 0, 0, 0.08); --bs-table-hover-bg: rgba(0, 0, 0, 0.03); margin-bottom: 0 !important;
}
.table tbody td { vertical-align: middle !important; }
:is(.theme-material, .theme-frost) .table .btn.p-0 { border: none !important; background-color: transparent !important; box-shadow: none !important; }

/* Thead */
:is(.theme-material, .theme-frost) .table thead th {
    background-color: rgba(0, 0, 0, 0.03) !important; color: #1e293b !important; font-weight: 700 !important; font-size: 0.85rem !important;
    text-transform: none !important; vertical-align: middle !important; padding: 1rem 0.5rem !important; border-bottom: 2px solid var(--bs-table-border-color) !important;
}
:is(.theme-material, .theme-frost) .table-transparent-thead thead th,
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table-transparent-thead thead th {
    background-color: transparent !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid var(--bs-table-border-color) !important;
}

/* Suppression des rayures Bootstrap (.table-striped) */
:is(.theme-material, .theme-frost) .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: transparent !important;
    --bs-table-bg-type: transparent !important; /* Sécurité pour Bootstrap 5.3+ */
    background-color: transparent !important;
}

/* --- TABLES DARK MODE --- */
html[data-theme="dark"] .theme-frost :is(.table-responsive, .card .table-responsive, .card-body.bg-body-tertiary.border) { background-color: rgba(30, 41, 59, 0.7) !important; }
html[data-theme="dark"] .theme-material :is(.table-responsive, .card .table-responsive, .card-body.bg-body-tertiary.border) { background-color: #1e2028 !important; }

html[data-theme="dark"] :is(.theme-material, .theme-frost) .table {
    --bs-table-border-color: rgba(255, 255, 255, 0.1); --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
    --bs-table-color: #f8fafc !important; color: #f8fafc !important;
}
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table > :not(caption) > * > * { color: inherit !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table thead th { background-color: rgba(255, 255, 255, 0.05) !important; color: #f8fafc !important; }

/* Textes, liens et icônes dans les tableaux (Hover & Colors) */
html:not([data-theme="dark"]) :is(.theme-material, .theme-frost) .table-hover > tbody > tr:hover > :is(td, th) { color: inherit !important; --bs-table-hover-color: inherit !important; --bs-table-color-state: inherit !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table-hover > tbody > tr:hover > :is(td, th, *) { color: #f8fafc !important; --bs-table-hover-color: #f8fafc !important; --bs-table-color-state: #f8fafc !important; }

html[data-theme="dark"] :is(.theme-material, .theme-frost) .table a.text-secondary { color: #93c5fd !important; text-decoration: none !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table a.text-secondary:hover { color: #bfdbfe !important; text-decoration: underline !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table svg.bi { color: #cbd5e1; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table-hover > tbody > tr:hover svg.bi { color: #f8fafc; }

/* Lignes colorées (Articles, Succès, Danger) */
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table tr.table-success > :is(td, th) {
    background-color: rgba(16, 185, 129, 0.15) !important; --bs-table-bg: rgba(16, 185, 129, 0.15) !important;
    color: #f8fafc !important; --bs-table-color-state: #f8fafc !important;
}
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table tr.table-danger > :is(td, th) {
    background-color: rgba(239, 68, 68, 0.15) !important; --bs-table-bg: rgba(239, 68, 68, 0.15) !important;
    color: #f8fafc !important; --bs-table-color-state: #f8fafc !important;
}
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table-hover > tbody > tr.table-success:hover > :is(td, th) {
    background-color: rgba(16, 185, 129, 0.25) !important; --bs-table-hover-bg: rgba(16, 185, 129, 0.25) !important; color: #ffffff !important;
}
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table-hover > tbody > tr.table-danger:hover > :is(td, th) {
    background-color: rgba(239, 68, 68, 0.25) !important; --bs-table-hover-bg: rgba(239, 68, 68, 0.25) !important; color: #ffffff !important;
}
html[data-theme="dark"] :is(.theme-material, .theme-frost) tr.table-success svg.bi, html[data-theme="dark"] :is(.theme-material, .theme-frost) tr.table-danger svg.bi { color: #f8fafc !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) tr.table-danger a { color: #fca5a5 !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) tr.table-success a { color: #86efac !important; }

/* Overrides for banner management tables */
:is(.theme-material, .theme-frost) .table-responsive.table-responsive-clean,
:is(.theme-material, .theme-frost) .card .table-responsive.table-responsive-clean,
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table-responsive.table-responsive-clean,
html[data-theme="dark"] :is(.theme-material, .theme-frost) .card .table-responsive.table-responsive-clean {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
}
:is(.theme-material, .theme-frost) .table.table-transparent-thead thead th,
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table.table-transparent-thead thead th {
    background-color: transparent !important;
}


/* =============================================
           FORMS, SWITCHES & DROPDOWNS
   ============================================= */

/* M3 Switches */
.form-switch { padding-left: 3em; display: flex; align-items: center; }
.form-switch .form-check-input {
    width: 2.5em !important; height: 1.25em !important; margin-left: -3em; margin-right: 0.75rem !important; margin-top: 0;
    background-color: rgba(0, 0, 0, 0.2); border: none !important; border-radius: 2em; cursor: pointer; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e") !important; background-size: contain;
    transition: background-position 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease;
}
.form-switch .form-check-input:checked { background-color: #3b82f6 !important; background-position: right center; }
.form-switch .form-check-input:focus { box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25); }

html[data-theme="dark"] .form-switch .form-check-input {
    background-color: rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2394a3b8'/%3e%3c/svg%3e") !important;
}
html[data-theme="dark"] .form-switch .form-check-input:checked {
    background-color: #3b82f6 !important; box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e") !important;
}

/* Number inputs & Dropdowns */
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.dropdown-menu-scrollable { max-height: 400px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.2) transparent; }
.dropdown-menu-scrollable::-webkit-scrollbar { width: 6px; }
.dropdown-menu-scrollable::-webkit-scrollbar-track { background: transparent; }
.dropdown-menu-scrollable::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.2); border-radius: 10px; }

html[data-theme="dark"] .dropdown-menu-scrollable { scrollbar-color: rgba(255,255,255,0.2) transparent; }
html[data-theme="dark"] .dropdown-menu-scrollable::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.2); }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .dropdown-menu { background-color: #0f172a; border: 1px solid #1e293b; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .dropdown-item { color: #e2e8f0; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .dropdown-item:hover { background-color: #1e293b; color: #f8fafc; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .dropdown-menu :is(.dropdown-item.disabled, .dropdown-item:disabled, .text-muted) { color: #64748b !important; opacity: 0.6; background-color: transparent !important; cursor: not-allowed; }

/* Icon Picker */
html[data-theme="dark"] :is(.theme-material, .theme-frost) .icon-picker-container .dropdown-menu { background-color: #22252f; border-color: #2c2f3a; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .icon-picker-container .dropdown-item:hover { background-color: #3b82f6; color: #ffffff; }
html:not([data-theme="dark"]) :is(.theme-material, .theme-frost) .icon-picker-container .dropdown-item:hover { background-color: #0d6efd; color: #ffffff; }

/* Inputs Text (Light Mode) */
.theme-material :is(.form-control, .form-select) { background-color: rgba(255, 255, 255, 0.9); border-color: rgba(0, 0, 0, 0.12); color: #1a1a2e; }
.theme-material :is(.form-control:focus, .form-select:focus) { background-color: #ffffff; border-color: #0d6efd; box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15); color: #1a1a2e; }
.theme-material .form-floating label { color: rgba(0, 0, 0, 0.55); }

.theme-frost :is(.form-control, .form-select) { background-color: rgba(255, 255, 255, 0.45); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.5); color: #1a1a2e; }
.theme-frost :is(.form-control:focus, .form-select:focus) { background-color: rgba(255, 255, 255, 0.65); border-color: rgba(100, 185, 233, 0.6); box-shadow: 0 0 0 0.2rem rgba(100, 185, 233, 0.15); color: #1a1a2e; }
.theme-frost .form-floating label { color: rgba(0, 0, 0, 0.5); }

/* Inputs Text (Dark Mode) */
html[data-theme="dark"] .theme-material :is(.form-control, .form-select) { background-color: #22252f; border-color: #2c2f3a; color: #e2e8f0; }
html[data-theme="dark"] .theme-material :is(.form-control:focus, .form-select:focus) { background-color: #2a2e3a; border-color: #3b82f6; box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.2); color: #f8fafc; }

html[data-theme="dark"] .theme-frost :is(.form-control, .form-select) { background-color: #161b26; border-color: rgba(255, 255, 255, 0.15); color: #e2e8f0; backdrop-filter: none; }
html[data-theme="dark"] .theme-frost :is(.form-control:focus, .form-select:focus) { background-color: rgba(255, 255, 255, 0.12); border-color: #60a5fa; box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.2); color: #f8fafc; }

/* Global Inputs fixes Dark Mode */
html[data-theme="dark"] :is(.theme-material, .theme-frost) .form-control { border-color: rgba(255, 255, 255, 0.25) !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .form-control:focus { border-color: #60a5fa !important; box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.25) !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .form-control::placeholder { color: rgba(255, 255, 255, 0.35); }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .form-select option { background-color: #22252f; color: #e2e8f0; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .form-control::file-selector-button { background-color: #2a2e3a; color: #f8fafc; border-right: 1px solid rgba(255, 255, 255, 0.1); transition: all 0.2s ease; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .form-control:hover::file-selector-button { background-color: #3b82f6; color: #ffffff; }

/* Form Floating Dark Mode Fixes */
html[data-theme="dark"] :is(.theme-material, .theme-frost) .form-floating > .form-control::placeholder { color: transparent !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .form-floating label { color: rgba(255, 255, 255, 0.45); text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
html[data-theme="dark"] .form-floating > label { background-color: transparent !important; color: rgba(255, 255, 255, 0.6) !important; padding-left: 1rem; }
html[data-theme="dark"] .form-floating > label::after { background-color: transparent !important; }
html[data-theme="dark"] .form-floating > .form-control:focus ~ label,
html[data-theme="dark"] .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #60a5fa !important; background-color: #22252f !important; border-radius: 4px; height: fit-content; padding: 0 5px; margin-left: 10px;
}

/* Autofill Webkit Fixes */
.theme-material input:-webkit-autofill { -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.95) inset !important; -webkit-text-fill-color: #1a1a2e !important; transition: background-color 5000s ease-in-out 0s; }
.theme-frost input:-webkit-autofill { -webkit-box-shadow: 0 0 0px 1000px rgba(248, 250, 252, 0.85) inset !important; -webkit-text-fill-color: #1a1a2e !important; transition: background-color 5000s ease-in-out 0s; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) input:-webkit-autofill { -webkit-text-fill-color: #e2e8f0 !important; transition: background-color 5000s ease-in-out 0s; }
html[data-theme="dark"] .theme-material input:-webkit-autofill { -webkit-box-shadow: 0 0 0px 1000px #22252f inset !important; }
html[data-theme="dark"] .theme-frost input:-webkit-autofill { -webkit-box-shadow: 0 0 0px 1000px #161b26 inset !important; }


/* =============================================
       SPECIFIC PIPELINES & CUSTOM SECTIONS
   ============================================= */

/* --- PANIER BIO --- */
.card-accent-success { position: relative; }
.card-accent-success::before { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 15px; background-color: #198754; z-index: 1; }
.card-accent-success .card-body { padding-left: 2.5rem !important; }
html[data-theme="dark"] .card-accent-success::before { background-color: #4ade80; }

.multiple_checkbox ul { list-style: none !important; padding-left: 0 !important; margin-bottom: 0 !important; }
.multiple_checkbox li { margin-bottom: 0.75rem; display: flex !important; align-items: center !important; }
.multiple_checkbox input[type="checkbox"] { margin-right: 1rem !important; width: 1.25rem !important; height: 1.25rem !important; cursor: pointer; }

/* Alerte Premium Gold */
html[data-theme="dark"] .alert.alert-warning.shadow-sm.p-4.mb-5 {
    background-color: rgba(255, 193, 7, 0.1) !important; border: 1px solid rgba(255, 193, 7, 0.3) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important; color: #ffe082 !important;
}
html[data-theme="dark"] .alert.alert-warning.shadow-sm.p-4.mb-5 h5 { color: #ffca28 !important; font-weight: 800 !important; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }

/* --- HISTORIQUE & TRANSACTIONS ANNULÉES --- */
html:not([data-theme="dark"]) tr.table-danger.text-decoration-line-through, html:not([data-theme="dark"]) tr.table-danger.text-decoration-line-through * { color: #64748b !important; }
html:not([data-theme="dark"]) tr.table-danger.text-decoration-line-through a.text-secondary { color: #475569 !important; }
html:not([data-theme="dark"]) tr.transaction-reverted td { text-decoration: none !important; }
html:not([data-theme="dark"]) tr.transaction-reverted td:nth-child(2) { text-decoration: line-through rgba(0, 0, 0, 0.3) !important; color: #64748b !important; }

html[data-theme="dark"] :is(.theme-material, .theme-frost) tr.table-danger.text-decoration-line-through,
html[data-theme="dark"] :is(.theme-material, .theme-frost) tr.table-danger.text-decoration-line-through * { color: rgba(255, 255, 255, 0.6) !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) tr.table-danger.text-decoration-line-through a.text-secondary { color: #fca5a5 !important; text-decoration: line-through rgba(255, 255, 255, 0.4) !important; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table-hover > tbody > tr.table-danger.text-decoration-line-through:hover,
html[data-theme="dark"] :is(.theme-material, .theme-frost) .table-hover > tbody > tr.table-danger.text-decoration-line-through:hover * { color: #ffffff !important; }

html[data-theme="dark"] tr.transaction-reverted td { text-decoration: none !important; opacity: 0.7; }
html[data-theme="dark"] tr.transaction-reverted td:nth-child(2) { text-decoration: line-through rgba(255, 255, 255, 0.4) !important; }
html[data-theme="dark"] tr.transaction-reverted .badge { display: inline-flex !important; text-decoration: none !important; vertical-align: middle; }

/* --- REGISTRATION STEPS --- */
:is(.theme-material, .theme-frost) .registration-steps {
    background-color: transparent !important; border-radius: 50rem !important; overflow: hidden;
    display: flex; gap: 0 !important; padding: 0 !important; height: auto !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.08);
}
html[data-theme="dark"] :is(.theme-material, .theme-frost) .registration-steps { box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); border-color: rgba(255,255,255,0.08); }

:is(.theme-material, .theme-frost) .registration-steps .progress-bar { border-radius: 0 !important; border: none !important; font-weight: 600; font-size: 0.85rem; padding: 0.6rem 0; transition: all 0.3s ease; }
html[data-theme="dark"] :is(.theme-material, .theme-frost) .registration-steps .progress-bar { border-right: 1px solid rgba(255,255,255,0.1) !important; }
:is(.theme-material, .theme-frost) .registration-steps .progress-bar:last-child { border-right: none !important; }

:is(.theme-material, .theme-frost) .registration-steps .progress-bar.bg-success { background: linear-gradient(135deg, #10b981, #059669) !important; color: white; }
:is(.theme-material, .theme-frost) .registration-steps .progress-bar.bg-secondary { background: linear-gradient(135deg, #3b82f6, #2563eb) !important; color: white; box-shadow: inset 0 0 10px rgba(255,255,255,0.2); }

.theme-material .registration-steps .progress-bar.bg-light { background-color: #f1f5f9 !important; color: #94a3b8 !important; }
.theme-frost .registration-steps .progress-bar.bg-light { background-color: rgba(255, 255, 255, 0.4) !important; backdrop-filter: blur(8px); color: rgba(0, 0, 0, 0.5) !important; }
html[data-theme="dark"] .theme-material .registration-steps .progress-bar.bg-light { background-color: #22252f !important; color: #64748b !important; }
html[data-theme="dark"] .theme-frost .registration-steps .progress-bar.bg-light { background-color: rgba(255, 255, 255, 0.05) !important; color: rgba(255, 255, 255, 0.4) !important; }

/* --- LIST GROUP (PAGE PAIEMENT) --- */
html[data-theme="dark"] .list-group-item { color: #f8fafc !important; }
html[data-theme="dark"] .list-group-item .text-primary { color: #60a5fa !important; }
html[data-theme="dark"] .list-group-flush > .list-group-item { border-color: rgba(255, 255, 255, 0.1) !important; }


/* =============================================
            PLUGINS (TERMINAL LOGS)
   ============================================= */

/* --- Club Q Terminal log box --- */
.log-box-themed {
    background-color: #1a1d24 !important; color: #00ff00 !important;
    font-family: 'Fira Code', 'Courier New', monospace; min-height: 480px; max-height: 600px; overflow-y: auto; border: none;
}
html[data-theme="light"] .log-box-themed { background-color: #f8fafc !important; color: #0f172a !important; border-top: 1px solid rgba(0,0,0,0.05) !important; }

/* =============================================
            INFO BANNERS CAROUSEL
   ============================================= */

.carousel-peeking-wrapper,
#live-preview-container,
#preset-preview-pane {
    width: 100%;
    position: relative;
    container-type: inline-size;
    container-name: info-carousel;
    touch-action: auto;
    border-radius: 1.5rem;
    overflow: hidden;
}

#live-preview-container,
#preset-preview-pane {
    aspect-ratio: 21 / 11;
}

.theme-frost :is(.carousel-peeking-wrapper, #live-preview-container, #preset-preview-pane) {
    border-radius: 1.25rem !important;
}
.banner-text-slide {
    transition: filter 0.3s ease;
    padding: 0 !important;
    touch-action: auto;
    user-select: none;
    -webkit-user-select: none;
}
.banner-text-slide a,
.banner-text-slide .btn {
    user-select: auto;
    -webkit-user-select: auto;
}
a:hover .banner-text-slide {
    filter: brightness(0.95);
}
.banner-text-slide .banner-body p {
    margin-bottom: 0.35rem;
}
.banner-text-slide .banner-body p:last-child {
    margin-bottom: 0;
}
.banner-text-slide .banner-body ul,
.banner-text-slide .banner-body ol {
    margin-bottom: 0.35rem;
    padding-left: 1.25rem;
}
.banner-text-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    flex-grow: 1;
    overflow: hidden;
    min-height: 0;
    min-width: 0;
    align-self: stretch; /* Prevents overflow in row flex layout */
}
.text-start .banner-text-wrap {
    align-items: flex-start;
}
.text-center .banner-text-wrap {
    align-items: center;
}
.text-end .banner-text-wrap {
    align-items: flex-end;
}
.banner-text-slide h2 {
    flex-shrink: 0;
    width: 100%;
    font-size: clamp(1.1rem, 4.5cqi, 2rem) !important;
    margin-bottom: clamp(0.4rem, 2cqi, 0.85rem) !important;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}
.banner-text-slide .banner-body {
    flex-shrink: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    touch-action: auto;
    width: 100%;
    font-size: clamp(0.85rem, 2.2cqi, 1.15rem) !important;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    padding-right: 4px;
}
.banner-text-slide .banner-body::-webkit-scrollbar {
    width: 6px;
}
.banner-text-slide .banner-body::-webkit-scrollbar-track {
    background: transparent;
}
.banner-text-slide .banner-body::-webkit-scrollbar-thumb {
    background-color: rgba(128, 128, 128, 0.35);
    border-radius: 3px;
}
.banner-text-slide .banner-body::-webkit-scrollbar-thumb:hover {
    background-color: rgba(128, 128, 128, 0.55);
}
.banner-text-slide .btn {
    margin-top: clamp(0.5rem, 2cqi, 1rem) !important;
    font-size: clamp(0.65rem, 1.8cqi, 0.85rem) !important;
    padding: clamp(0.15rem, 0.8cqi, 0.375rem) clamp(0.35rem, 1.8cqi, 0.75rem) !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.banner-icon {
    display: inline-block;
    vertical-align: middle;
    width: 2.25rem;
    height: 2.25rem;
    width: clamp(1.5rem, 6cqi, 3.25rem);
    height: clamp(1.5rem, 6cqi, 3.25rem);
    opacity: 0.9;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.25));
}
.banner-content-horizontal .banner-icon-wrap {
    width: 3.5rem;
    height: 3.5rem;
    width: clamp(2.5rem, 10cqi, 4.5rem);
    height: clamp(2.5rem, 10cqi, 4.5rem);
}
.banner-content-vertical .banner-icon-wrap,
.banner-content-horizontal .banner-icon-wrap {
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Layout definitions */
.banner-content-vertical {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.banner-content-vertical.text-start {
    align-items: flex-start;
}
.banner-content-vertical.text-center {
    align-items: center;
}
.banner-content-vertical.text-end {
    align-items: flex-end;
}

.banner-content-horizontal {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.banner-content-horizontal.text-start {
    align-items: flex-start;
}
.banner-content-horizontal.text-center {
    align-items: center;
}
.banner-content-horizontal.text-end {
    align-items: flex-end;
}

@container info-carousel (min-width: 300px) {
    .banner-content-horizontal {
        flex-direction: row;
        align-items: center !important; /* Ensure vertical centering in row layout */
    }
}

.banner-content-vertical,
.banner-content-horizontal {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding-inline: clamp(1rem, 5cqi, 4rem) !important;
    padding-top: clamp(0.75rem, 3cqi, 2rem) !important;
    padding-bottom: clamp(1rem, 4cqi, 2rem) !important;
    gap: clamp(0.5rem, 2.5cqi, 1.25rem);
}
.carousel-peeking-wrapper .banner-content-vertical,
.carousel-peeking-wrapper .banner-content-horizontal {
    padding-bottom: clamp(1.75rem, 5cqi, 3rem) !important;
}
.fade-element {
    transition: opacity 0.3s ease, max-height 0.3s ease, margin-bottom 0.3s ease, padding-bottom 0.3s ease, visibility 0.3s;
    opacity: 1;
    max-height: 300px;
    overflow: visible;
    visibility: visible;
}
.fade-element.fade-hidden {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden;
    visibility: hidden;
}

.carousel-peeking-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden; /* Hide scrollbars of the track */
    padding-bottom: 0.5rem;
}

.carousel-peeking-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding: 0.5rem 0;
}

.carousel-peeking-track::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.carousel-peeking-item {
    flex: 0 0 100%; 
    scroll-snap-align: center;
    scroll-snap-stop: always;
    margin: 0;
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1), opacity 0.4s cubic-bezier(0.2, 0, 0, 1);
    opacity: 1;
    transform: scale(1);
    aspect-ratio: 21 / 11;
    display: flex;
    flex-direction: column;
}

.carousel-peeking-item.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Desktop sizing */
@media (min-width: 768px) {
    .carousel-peeking-wrapper {
        width: 100vw !important;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        border-radius: 0 !important;
    }

    .carousel-peeking-track::before,
    .carousel-peeking-track::after {
        content: '';
        flex: 0 0 calc(50vw - min(30vw, 400px));
    }

    .carousel-peeking-item {
        flex: 0 0 60%;
        max-width: 800px;
        margin: 0 15px;
        opacity: 0.4;
        transform: scale(0.85);
    }
    
    .carousel-peeking-item.is-active {
        opacity: 1;
        transform: scale(1);
    }
}

.peeking-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background-color: #adb5bd;
    padding: 0;
    transition: background-color 0.3s, transform 0.3s;
    margin: 0;
}
.peeking-indicator-dot.active {
    background-color: #0d6efd;
    transform: scale(1.3);
}

.carousel-peeking-prev-inline:hover,
.carousel-peeking-next-inline:hover {
    color: #000 !important;
}

/* Fix SVG Bootstrap icons clipping */
svg.bi { overflow: visible !important; }

