        /* Modernized Soft Premium Dark Theme */
        :root {
            --bg-primary: #12101a;
            --bg-secondary: #1d182b;
            --bg-tertiary: #272238;
            --text-primary: #ffffff;
            --text-secondary: #a0a0b8;
            --text-muted: #726b87;
            --accent: #9a73c3;
            --accent-hover: #b55fe6;
            --border-color: #2e2642;
            --border-focus: #554488;
            --radius-lg: 8px;
            --radius-md: 6px;
            --radius-sm: 4px;
        }

        /* Prevent scrollbar page shifting */
        html {
            font-size: 17.5px;
            scrollbar-gutter: stable;
            overflow-y: scroll !important;
            overflow-x: hidden;
        }

        /* Custom scrollbar styling */
        ::-webkit-scrollbar {
            width: 10px;
            height: 10px;
        }

        ::-webkit-scrollbar-track {
            background-color: var(--bg-primary);
        }

        ::-webkit-scrollbar-thumb {
            background-color: var(--border-color);
            border-radius: 5px;
            border: 2px solid var(--bg-primary);
        }

        ::-webkit-scrollbar-thumb:hover {
            background-color: var(--accent);
        }

        #global-loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            height: 100dvh;
            background-color: var(--bg-primary);
            z-index: 99999;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: opacity 0.3s ease;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        body {
            background-color: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        header {
            background-color: rgba(11, 12, 16, 0.85);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 1000;
            transition: padding 0.3s ease;
            overflow-anchor: none;
            width: 100%;
        }

        .navbar-container {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
            gap: 2rem;
            padding: 1.2rem 1.5rem;
            width: 100%;
            max-width: 1920px;
            margin: 0 auto;
        }

        header.header-no-search .navbar-container {
            padding: 1.2rem 1.5rem;
        }

        header a.logo {
            font-size: 2rem;
            font-weight: 900;
            color: var(--text-primary);
            text-decoration: none;
            text-transform: uppercase;
            letter-spacing: -0.05em;
            justify-self: start;
            transition: font-size 0.3s ease;
        }

        header.header-no-search a.logo {
            font-size: 2rem;
        }

        header nav {
            display: flex;
            gap: 1.5rem;
            align-items: center;
            justify-self: end;
        }

        header nav a,
        header nav button {
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 1.05rem;
            font-weight: 600;
            background: none;
            border: none;
            cursor: pointer;
            transition: color 0.2s ease;
        }

        header nav a:hover,
        header nav button:hover {
            color: var(--text-primary);
        }

        header nav a.active {
            color: var(--text-primary);
            border-bottom: 2px solid var(--accent);
            padding-bottom: 0.2rem;
        }

        main {
            flex: 1;
            display: flex;
            flex-direction: column;
            width: 100%;
            max-width: 1920px;
            margin: 0 auto;
            padding: 0 1rem;
        }

        footer {
            background-color: var(--bg-secondary);
            border-top: 1px solid var(--border-color);
            padding: 2.5rem;
            text-align: center;
            font-size: 0.8rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.1em;
            position: relative;
            z-index: 100;
        }

        /* Mobile Hamburger & Offcanvas */
        .mobile-toggles {
            display: none;
        }

        #mobile-nav-toggle {
            display: none;
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 0.5rem;
            transition: color 0.3s ease;
        }

        #offcanvas-menu {
            position: fixed;
            top: 0;
            right: -100%;
            width: 300px;
            max-width: 80%;
            height: 100vh;
            height: 100dvh;
            background-color: var(--bg-secondary);
            border-left: 1px solid var(--border-color);
            z-index: 1000;
            transition: right 0.3s ease;
            display: flex;
            flex-direction: column;
            padding: 2rem;
            box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
        }

        #offcanvas-menu.open {
            right: 0;
        }

        .offcanvas-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
            z-index: 999;
            display: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .offcanvas-overlay.open {
            display: block;
            opacity: 1;
        }

        #offcanvas-menu nav {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        #offcanvas-menu nav a,
        #offcanvas-menu nav button {
            color: var(--text-primary);
            text-decoration: none;
            font-size: 1.2rem;
            font-weight: 800;
            text-transform: uppercase;
            background: none;
            border: none;
            text-align: left;
            cursor: pointer;
        }

        #offcanvas-menu nav a:hover,
        #offcanvas-menu nav button:hover {
            color: var(--accent);
        }

        /* Buttons and Form controls */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background-color: var(--accent);
            color: #ffffff;
            padding: 0.7rem 1.4rem;
            font-weight: 800;
            text-decoration: none;
            text-transform: uppercase;
            border: none;
            border-radius: var(--radius-md);
            cursor: pointer;
            font-size: 0.85rem;
            letter-spacing: 0.03em;
            transition: background-color 0.2s ease, transform 0.15s ease;
        }

        .btn:hover {
            background-color: var(--accent-hover);
        }

        .btn:active {
            transform: scale(0.97);
        }

        .btn-outline {
            background-color: transparent;
            color: var(--text-primary);
            border: 2px solid var(--border-color);
        }

        .btn-outline:hover {
            border-color: var(--text-primary);
            background-color: rgba(255, 255, 255, 0.05);
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            font-weight: 800;
            font-size: 0.75rem;
            text-transform: uppercase;
            margin-bottom: 0.5rem;
            color: var(--text-secondary);
            letter-spacing: 0.05em;
        }

        .form-control {
            width: 100%;
            background-color: var(--bg-secondary);
            border: 2px solid var(--border-color);
            border-radius: var(--radius-md);
            padding: 0.75rem 1rem;
            color: var(--text-primary);
            font-size: 0.95rem;
            transition: border-color 0.2s ease, background-color 0.2s ease;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--accent);
            background-color: var(--bg-tertiary);
        }

        /* Search Bar */
        .search-bar {
            display: flex;
            align-items: stretch;
            background-color: transparent;
            border: none;
            border-bottom: 2px solid var(--border-color);
            border-radius: 0;
            padding: 0;
            transition: border-color 0.2s ease;
            width: 100%;
        }

        .search-bar:focus-within {
            border-color: var(--accent);
        }

        .search-bar input {
            flex: 1;
            background: transparent;
            border: none;
            color: #ffffff;
            font-size: 0.95rem;
            outline: none;
            min-width: 0;
            padding: 0.7rem 0.5rem;
        }

        .search-bar button {
            background: transparent;
            color: var(--text-muted);
            border: none;
            border-radius: 0;
            padding: 0 0.8rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: color 0.2s ease;
        }

        .search-bar button:hover {
            color: var(--accent);
        }

        .grid {
            display: grid;
            gap: 2rem;
        }

        .section-title {
            font-size: 1.1rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-primary);
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }

        .dropdown {
            position: relative;
            display: inline-block;
        }

        .dropdown-menu {
            display: none;
            position: absolute;
            right: 0;
            top: 100%;
            margin-top: 0.5rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            padding: 0.5rem;
            min-width: 240px;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        }

        .dropdown-menu.show {
            display: block;
        }

        .dropdown-menu a,
        .dropdown-menu button {
            display: flex !important;
            align-items: center;
            gap: 1rem;
            padding: 0.8rem 1.2rem;
            color: var(--text-primary);
            text-decoration: none;
            text-align: left;
            background: none;
            border: none;
            width: 100%;
            cursor: pointer;
            font-family: inherit;
            font-size: 0.9rem;
            font-weight: 800;
            text-transform: uppercase;
            border-radius: var(--radius-sm);
            transition: background-color 0.2s ease, color 0.2s ease;
        }

        .dropdown-menu a:hover,
        .dropdown-menu button:hover {
            background-color: var(--bg-tertiary);
            color: var(--accent);
        }

        /* Like Button Animation */
        @keyframes heartBurst {
            0% {
                transform: scale(1);
            }

            15% {
                transform: scale(1.35);
            }

            30% {
                transform: scale(0.85);
            }

            50% {
                transform: scale(1.15);
            }

            100% {
                transform: scale(1);
            }
        }

        .btn-like {
            cursor: pointer;
            transition: color 0.2s, transform 0.2s;
        }

        .btn-like svg {
            transition: fill 0.2s, stroke 0.2s;
        }

        .btn-like.liked {
            color: #ec4899 !important;
        }

        .btn-like.liked svg {
            fill: #ec4899;
            stroke: #ec4899;
            animation: heartBurst 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .btn-like:hover {
            transform: scale(1.05);
        }

        /* Notifications */
        .alert {
            padding: 1rem 1.25rem;
            margin-bottom: 1.5rem;
            border: 1px solid;
            border-radius: var(--radius-md);
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.8rem;
            letter-spacing: 0.02em;
        }

        .alert-error {
            background-color: rgba(239, 68, 68, 0.1);
            border-color: rgba(239, 68, 68, 0.3);
            color: #f87171;
        }

        .alert-success {
            background-color: rgba(16, 185, 129, 0.1);
            border-color: rgba(16, 185, 129, 0.3);
            color: #34d399;
        }

        /* Custom sidebar layout for index */
        .index-container {
            flex: 1;
            display: flex;
            gap: 2rem;
            width: 100%;
            max-width: 1920px;
            margin: 0 auto;
            position: relative;
            padding-top: 1rem;
            padding-bottom: 0;
        }

        .sidebar {
            width: 250px;
            flex-shrink: 0;
            position: sticky;
            top: calc(var(--header-h, 126px) + 1rem);
            align-self: flex-start;
            height: calc(100vh - var(--header-h, 126px) - 2rem);
            overflow-y: auto;
            background-color: rgba(11, 12, 16, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 1rem;
        }

        .right-ad-sidebar,
        .right-ad-sidebar-index {
            width: 200px;
            flex-shrink: 0;
            position: sticky;
            top: calc(var(--header-h, 126px) + 1rem);
            align-self: flex-start;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            height: calc(100vh - var(--header-h, 126px) - 2rem);
        }

        .right-ad-sidebar>div,
        .right-ad-sidebar-index>div {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .content-area {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .content-area>footer,
        .video-main-column>footer {
            margin-top: auto !important;
        }

        .content-area> :nth-last-child(2),
        .video-main-column> :nth-last-child(2) {
            margin-bottom: 4rem;
        }

        .section-title {
            font-size: 1rem;
            font-weight: 900;
            text-transform: uppercase;
            border-bottom: 2px solid var(--border-color);
            padding-bottom: 0.8rem;
            margin-bottom: 1.5rem;
            color: var(--text-primary);
            letter-spacing: 0.05em;
        }

        /* Responsive Breakpoints */
        @media (max-width: 1400px) {

            .right-ad-sidebar,
            .right-ad-sidebar-index {
                display: none !important;
            }
        }

        @media (max-width: 1024px) {
            header form {
                min-width: 200px;
            }
        }

        @media (max-width: 768px) {
            .navbar-container {
                padding: 0.8rem 1rem;
                grid-template-columns: 1fr auto;
                gap: 1rem;
                row-gap: 0;
                align-items: center;
            }

            header.header-no-search .navbar-container {
                padding: 0.8rem 1rem;
                row-gap: 0;
                align-items: center;
            }

            header.header-no-search a.logo {
                font-size: 1.6rem;
            }

            header a.logo {
                grid-column: 1;
                grid-row: 1;
                justify-self: start;
            }

            header form.search-bar:not(.mobile-search-bar) {
                display: none !important;
            }

            .mobile-search-bar {
                display: flex !important;
                grid-column: 1 / -1;
                width: 100%;
                margin-top: 0.5rem;
                max-height: 60px;
                overflow: hidden;
                opacity: 1;
                transition: max-height 0.3s ease, margin-top 0.3s ease, opacity 0.2s ease, border-width 0.3s ease;
            }

            .mobile-search-bar.search-hidden {
                max-height: 0;
                margin-top: 0;
                opacity: 0;
                border-width: 0;
            }

            .desktop-nav {
                display: none !important;
            }

            .mobile-toggles {
                display: flex;
                align-items: center;
                gap: 1.2rem;
                grid-column: 2;
                grid-row: 1;
                justify-self: end;
            }

            #mobile-nav-toggle,
            #mobile-search-toggle {
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 0;
                color: var(--text-secondary);
                background: none;
                border: none;
                cursor: pointer;
                transition: color 0.2s;
            }

            @media (hover: hover) {

                #mobile-nav-toggle:hover,
                #mobile-search-toggle:hover {
                    color: var(--accent);
                }
            }

            #mobile-nav-toggle.active,
            #mobile-search-toggle.active {
                color: var(--accent);
            }

            main {
                padding: 0.5rem 1rem;
            }

            .index-container {
                flex-direction: column;
                padding: 0.5rem 0;
                gap: 1.5rem;
            }

            .sidebar {
                display: none !important;
            }

            .video-card .thumbnail-wrapper {
                border-radius: 0 !important;
                border-left: none !important;
                border-right: none !important;
            }

            .video-card-details {
                padding: 0 1rem;
            }

            .categories-grid {
                grid-template-columns: 1fr 1fr !important;
                gap: 1rem !important;
            }

            #video-player-container {
                margin: 0 -1rem;
                width: calc(100% + 2rem) !important;
                border-radius: 0 !important;
                border-left: none !important;
                border-right: none !important;
            }

            .content-area {
                padding-top: 0 !important;
            }
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 0.5;
            }

            50% {
                opacity: 1;
            }
        }

        @keyframes spin {
            100% {
                transform: rotate(360deg);
            }
        }

        /* Custom Modal & Toasts */
        #toast-container {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .toast {
            background-color: var(--bg-tertiary);
            color: var(--text-primary);
            padding: 1rem 1.5rem;
            border-radius: var(--radius-md);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            border-left: 4px solid var(--accent);
            font-weight: 700;
            font-size: 0.9rem;
            text-transform: uppercase;
            animation: slideInRight 0.3s ease forwards, fadeOut 0.3s ease 2.7s forwards;
            opacity: 0;
            transform: translateX(100%);
        }

        .toast.error {
            border-left-color: #ff4444;
        }

        .toast.success {
            border-left-color: #00cc66;
        }

        #custom-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(4px);
            z-index: 9998;
            display: none;
            align-items: center;
            justify-content: center;
        }

        #custom-modal {
            background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(20, 18, 30, 0.98) 100%);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: var(--radius-lg);
            padding: 2rem;
            width: 90%;
            max-width: 440px;
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(168, 85, 247, 0.08);
            text-align: left;
            animation: modalSlideIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes modalSlideIn {
            from {
                opacity: 0;
                transform: scale(0.92) translateY(12px);
            }

            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        #custom-modal h3 {
            font-size: 1.1rem !important;
            margin-bottom: 0.75rem !important;
        }

        #custom-modal>div:nth-child(2) {
            line-height: 1.6;
            margin-bottom: 1.5rem !important;
        }

        #custom-modal>div:last-child {
            display: flex;
            gap: 0.75rem;
            justify-content: flex-end;
            flex-wrap: wrap;
        }

        .btn-danger {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: #fff;
            border: none;
            box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
        }

        .btn-danger:hover {
            background: linear-gradient(135deg, #dc2626, #b91c1c);
            box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
        }

        @keyframes slideInRight {
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes fadeOut {
            to {
                opacity: 0;
                transform: translateY(10px);
            }
        }

        /* Global Video Card Layout fixes */
        .video-card {
            display: flex;
            flex-direction: column;
            height: 100%;
            text-decoration: none;
            color: inherit;
            overflow: hidden;
        }

        .video-card .thumbnail-wrapper {
            position: relative;
            width: 100%;
            padding-top: 56.25%;
            background-color: #0d0e12;
            overflow: hidden;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            transition: border-color 0.2s ease;
            flex-shrink: 0;
        }

        .video-card:hover .thumbnail-wrapper {
            border-color: var(--accent);
        }

        .video-card .thumbnail-wrapper img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .video-card:hover .thumbnail-wrapper img {
            transform: scale(1.03);
        }

        .video-card .duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 6px;
    letter-spacing: 0.02em;
    z-index: 10;
}

        .video-card .new-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            background-color: #22c55e;
            color: #ffffff;
            font-size: 0.65rem;
            font-weight: 800;
            padding: 3px 6px;
            border-radius: 4px;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            z-index: 10;
            box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
        }

        .video-card .video-title {
            font-size: 0.88rem;
            font-weight: 600;
            line-height: 1.35;
            color: var(--text-primary);
            margin: 0 0 4px 0;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-transform: none;
            transition: color 0.15s ease;
            word-break: break-word;
        }

        .video-card:hover .video-title {
            color: var(--accent);
        }

        .video-card .video-meta {
            font-size: 0.76rem;
            color: var(--text-secondary);
            line-height: 1.4;
        }

        .video-card .video-views-date {
            color: var(--text-muted);
            font-size: 0.73rem;
            margin-top: 1px;
        }

        /* User Badges Custom Element - global alignment */
        user-badges {
            display: inline-flex;
            align-items: center;
            vertical-align: middle;
            gap: 0.15em;
            line-height: 1;
            flex-shrink: 0;
        }

        user-badges .badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            vertical-align: middle;
        }

        user-badges .badge svg {
            display: block;
            flex-shrink: 0;
        }

        /* Video Grid - Restored to perfect original sizing */
        .video-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 1.2rem 0.4rem;
            width: 100%;
        }

        @media (max-width: 1600px) {
            .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        }

        @media (max-width: 1100px) {
            .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        }

        @media (max-width: 650px) {
            .video-grid {
                grid-template-columns: 1fr !important;
                gap: 2.5rem 0 !important;
                margin: 0 -1rem;
                width: calc(100% + 2rem) !important;
            }
        }

        /* Categories/Models Grid - 5-4-3-2 logic */
        .categories-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 1.0rem 0.6rem;
        }

        @media (max-width: 1600px) {
            .categories-grid { grid-template-columns: repeat(4, 1fr); }
        }

        @media (max-width: 1100px) {
            .categories-grid { grid-template-columns: repeat(3, 1fr); }
        }

        @media (max-width: 650px) {
            .categories-grid {
                grid-template-columns: 1fr 1fr !important;
                gap: 1rem !important;
            }
        }

        .video-card {
            text-decoration: none;
            display: flex;
            flex-direction: column;
            height: 100%;
        }


        /* User Badges Web Component Styles */
        user-badges {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            vertical-align: middle;
        }

        user-badges .badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            position: relative;
            cursor: default;
        }

        user-badges .badge::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%) translateY(-2px);
            background-color: var(--bg-tertiary, #2c2c2c);
            color: #fff;
            padding: 0.3rem 0.6rem;
            border-radius: var(--radius-sm);
            font-size: 0.75rem;
            font-weight: 700;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.15s ease, transform 0.15s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
            z-index: 100;
            pointer-events: none;
            letter-spacing: 0.02em;
        }

        user-badges .badge:hover::after {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(-6px);
        }

        user-badges .badge-admin,
        user-badges .badge-gestionnaire,
        user-badges .badge-staff {
            display: inline-flex;
            align-items: center;
            line-height: 1;
            vertical-align: middle;
            font-size: 0.9em;
        }

        user-badges .badge-admin svg,
        user-badges .badge-gestionnaire svg,
        user-badges .badge-staff svg {
            width: 0.9em;
            height: 0.9em;
            display: block;
            flex-shrink: 0;
        }

        user-badges .badge-uploader {
            font-size: 0.95em;
            transform: translateY(-1px);
        }

        user-badges .badge-brain {
            font-size: 0.82em;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
            transform: translateY(-1px);
        }



        /* Auth pages specific styles */
        .auth-container {
            width: 100%;
            max-width: 500px;
            margin: 4rem auto;
            padding: 0 1rem;
        }

        .auth-card {
            border: 1px solid var(--border-color);
            padding: 2.5rem;
            background-color: var(--bg-secondary);
            border-radius: var(--radius-lg);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        }

        @media (max-width: 768px) {
            .auth-container {
                margin: 1.5rem auto;
                padding: 0 0.5rem;
            }

            .auth-card {
                padding: 1.5rem 1rem;
            }
        }

        /* Responsive Ad Containers */
        .ad-desktop {
            display: flex;
            justify-content: center;
            width: 100%;
            margin: 1rem 0;
        }
        .ad-mobile {
            display: none;
            justify-content: center;
            width: 100%;
            margin: 1rem 0;
        }
        .ad-mobile-popup {
            display: none;
        }
        @media (max-width: 768px) {
            .ad-desktop {
                display: none !important;
            }
            .ad-mobile {
                display: flex !important;
            }
            .ad-mobile-popup {
                display: block !important;
            }
        }

/* Choices.js Dark Theme Override */
.choices__inner {
    background: var(--bg-tertiary) !important;
    border: 2px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    padding: .35rem .7rem !important;
    min-height: 40px;
    font-size: .9rem;
    color: var(--text-primary);
}
.choices.is-focused .choices__inner {
    border-color: var(--accent) !important;
}
.choices__input {
    color: var(--text-primary) !important;
    background: transparent !important;
    font-size: .9rem !important;
}
.choices__list--dropdown {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
}
.choices__list--dropdown .choices__item--selectable {
    padding: .6rem .8rem;
    font-weight: 700;
    font-size: .85rem;
    color: var(--text-primary);
}
.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background: var(--bg-tertiary) !important;
    color: var(--accent) !important;
}
.choices[data-type*="select-multiple"] .choices__item {
    background: var(--accent) !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 800 !important;
    font-size: .75rem !important;
    color: #fff !important;
}
.choices__list--single .choices__item {
    color: var(--text-primary);
}

/* ===== Image Cards Grid ===== */
.image-card-link {
    display: block;
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
    background-color: var(--bg-tertiary);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.image-card-link:hover {
    transform: scale(1.03);
    border-color: var(--accent);
}

.image-card-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.image-card-link:hover img {
    opacity: 0.85;
}

#image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    #image-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .image-card-link {
        border-radius: var(--radius-sm);
    }
}

@media (max-width: 480px) {
    #image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
}

