/* app.css — feuille de style unique des pages publiques. */
/* ===== styles.css ===== */
/* ===== VARIABLES CSS ===== */
:root {
    /* Couleurs principales */
    --primary-blue: #87CEEB;
    --primary-steel: #4682B4;
    --primary-navy: #1e3a8a;
    --dark-bg: #0a0a0a;
    --dark-surface: #1a1a1a;
    --dark-card: #2a2a2a;
    --gray-dark: #3a3a3a;
    --gray-medium: #5a5a5a;
    --gray-light: #8a8a8a;
    
    /* Couleurs d'accent */
    --accent-cyan: #00d4ff;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    
    /* Texte */
    --text-primary: #ffffff;
    --text-secondary: #b8bcc8;
    --text-muted: #6b7280;
    
    /* Effets */
    --glow-blue: 0 0 20px rgba(135, 206, 235, 0.3);
    --glow-steel: 0 0 30px rgba(70, 130, 180, 0.4);
    --glow-navy: 0 0 40px rgba(30, 58, 138, 0.5);
    --shadow-dark: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 8px 40px rgba(0, 0, 0, 0.5);
    
    /* Bordures */
    --border-light: 1px solid rgba(255, 255, 255, 0.1);
    --border-medium: 1px solid rgba(255, 255, 255, 0.2);
    --border-glow: 1px solid rgba(135, 206, 235, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --news-banner-height: 38px;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== RESET ET BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(135, 206, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(70, 130, 180, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(30, 58, 138, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px
        );
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Conteneur pour la grille de mèmes - utilise toute la largeur */
.memes-container {
    width: 100%;
    padding: 0 60px;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: var(--border-light);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    flex: 0 0 auto;
    min-width: 0;
    margin-right: auto;
    margin-left: 0;
    padding-left: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    margin-left: auto;
}

.nav-menu {
    display: flex;
    gap: 18px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition-smooth);
    position: relative;
    display: inline-block;
    white-space: nowrap;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-steel));
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    text-shadow: var(--glow-blue);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

/* Bandeau d'annonce collé sous la navbar */
.news-ticker {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    height: var(--news-banner-height);
    align-items: center;
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.95), rgba(15, 23, 42, 0.96) 40%, rgba(30, 58, 138, 0.95));
    border-bottom: 1px solid rgba(135, 206, 235, 0.22);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

body.has-news-banner {
    padding-top: var(--news-banner-height);
}

body.has-news-banner .news-ticker {
    display: flex;
}

.news-ticker[hidden] {
    display: none !important;
}

.news-ticker__label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 100%;
    color: var(--primary-blue);
    background: rgba(0, 0, 0, 0.18);
    font-size: 0.9rem;
}

.news-ticker__viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.news-ticker__track {
    display: flex;
    width: max-content;
}

.news-ticker.is-static .news-ticker__viewport {
    display: flex;
    justify-content: center;
}

.news-ticker.is-static .news-ticker__track {
    width: 100%;
    justify-content: center;
    animation: none;
}

.news-ticker.is-static .news-ticker__item {
    padding: 0 1rem;
}

.news-ticker.is-marquee .news-ticker__viewport {
    mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}

.news-ticker.is-marquee .news-ticker__track {
    animation: news-ticker-scroll var(--news-ticker-duration, 22s) linear infinite;
}

.news-ticker.is-marquee:hover .news-ticker__track {
    animation-play-state: paused;
}

.news-ticker__item {
    padding: 0 1rem;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: var(--news-banner-height);
}

.news-ticker.is-marquee .news-ticker__item {
    padding: 0 3.5rem 0 1rem;
}

.news-ticker__close {
    flex-shrink: 0;
    width: 38px;
    height: 100%;
    border: none;
    background: transparent;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 1.15rem;
}

.news-ticker__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

@keyframes news-ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .news-ticker.is-marquee .news-ticker__track {
        animation: none;
    }
    .news-ticker.is-marquee .news-ticker__clone {
        display: none;
    }
    .news-ticker.is-marquee .news-ticker__viewport {
        overflow-x: auto;
        mask-image: none;
        display: flex;
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    body.glass-theme .news-ticker {
        top: 56px;
    }
}

@media (max-width: 768px) {
    .news-ticker {
        top: 64px;
    }
    body.glass-theme .news-ticker {
        top: 56px;
    }
    .news-ticker__item {
        font-size: 0.82rem;
    }
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-btn,
.theme-toggle,
.menu-toggle {
    background: var(--dark-surface);
    border: var(--border-light);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.discord-connect {
    background: linear-gradient(135deg, #5865F2, #7289DA);
    border: none;
    color: white;
    height: 40px;
    padding: 0 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 600;
    font-size: 0.9rem;
}

.discord-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.3);
}



.search-btn:hover,
.theme-toggle:hover,
.menu-toggle:hover {
    background: var(--dark-card);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: var(--border-light);
    padding: 20px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.mobile-nav-links .nav-link {
    padding: 15px 20px;
    border-radius: 12px;
    background: var(--dark-surface);
    border: var(--border-light);
    text-align: center;
    font-size: 1.1rem;
}

.mobile-nav-links .nav-link:hover {
    background: var(--dark-card);
    border-color: var(--primary-blue);
}

.mobile-discord-connect {
    padding: 15px 20px;
    background: linear-gradient(135deg, #5865F2, #7289DA);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mobile-discord-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.3);
}

/* Filtres de catégories */
.category-filters {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.filter-search {
    position: relative;
    max-width: 400px;
}

.filter-search input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-search i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.filter-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.sort-options select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    min-width: 200px;
}

.sort-options select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    .mobile-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-container { height: 64px; }
    .nav-actions { gap: 8px; }
    .discord-connect { padding: 0 8px; font-size: 0.85rem; }
    .discord-text { display: none !important; }
    .menu-toggle { width: 40px; height: 40px; }
    .navbar { padding: 0 6px; }
    .mobile-menu { top: 64px; }
    .category-filters {
        gap: 1rem;
        padding: 1rem;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .sort-options select {
        width: 100%;
    }
}

/* ===== SEARCH FUNCTIONALITY ===== */
.search-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: var(--border-light);
    padding: 20px 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
    z-index: 999;
}

.search-container.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box input {
    flex: 1;
    background: var(--dark-surface);
    border: var(--border-medium);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-submit {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border: none;
    border-radius: 10px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.search-submit:hover {
    transform: scale(1.05);
    box-shadow: var(--glow-steel);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 12px;
    margin-top: 8px;
    max-height: 700px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-results.active {
    display: block;
}

.search-results-footer {
    position: sticky;
    bottom: 0;
    background: var(--dark-surface);
    border-top: 1px solid rgba(135, 206, 235, 0.15);
    margin-top: 4px;
    z-index: 2;
}

.search-results-footer .search-result-item:last-child {
    border-bottom: none;
}

.search-results-dropdown .search-results-footer {
    background: var(--dark-surface);
    margin: 0 8px 8px;
    border-radius: 0 0 8px 8px;
}

.search-result-item {
    padding: 12px 20px;
    border-bottom: var(--border-light);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item:hover {
    background: var(--dark-card);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item.search-view-all {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(70, 130, 180, 0.1));
    border-top: 1px solid rgba(135, 206, 235, 0.2);
    font-weight: 600;
}

.search-result-item.search-view-all:hover {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.2), rgba(70, 130, 180, 0.2));
}

.search-result-item.search-view-all .search-result-icon {
    color: var(--primary-color);
}

.search-result-item.search-ask-assistant {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(102, 126, 234, 0.1));
    border-top: 1px solid rgba(167, 139, 250, 0.25);
    cursor: pointer;
}

.search-result-item.search-ask-assistant:hover {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.22), rgba(102, 126, 234, 0.18));
}

.search-result-item.search-ask-assistant .search-result-icon {
    color: #a78bfa;
}

.search-result-item.search-ask-assistant .search-result-title {
    color: #c4b5fd;
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--dark-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.search-result-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-toggle i {
    transition: var(--transition-smooth);
}

.theme-toggle.light-mode {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-color: #fbbf24;
}

.theme-toggle.light-mode:hover {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

/* Light theme variables */
body.light-theme {
    --dark-bg: #f8fafc;
    --dark-surface: #ffffff;
    --dark-card: #f1f5f9;
    --gray-dark: #e2e8f0;
    --gray-medium: #cbd5e1;
    --gray-light: #94a3b8;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-light: 1px solid rgba(0, 0, 0, 0.1);
    --border-medium: 1px solid rgba(0, 0, 0, 0.2);
    --border-glow: 1px solid rgba(70, 130, 180, 0.3);
    --shadow-dark: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 8px 40px rgba(0, 0, 0, 0.15);
    --glow-blue: 0 0 20px rgba(70, 130, 180, 0.2);
    --glow-steel: 0 0 30px rgba(70, 130, 180, 0.3);
    --glow-navy: 0 0 40px rgba(30, 58, 138, 0.3);
}

body.light-theme::before {
    background: 
        radial-gradient(circle at 20% 20%, rgba(135, 206, 235, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(70, 130, 180, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(30, 58, 138, 0.03) 0%, transparent 50%);
}

body.light-theme::after {
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px
        );
}

body.light-theme .navbar {
    background: rgba(248, 250, 252, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .search-container {
    background: rgba(248, 250, 252, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Amélioration du thème clair */
body.light-theme .nav-brand {
    color: #1f2937;
}

body.light-theme .brand-text {
    background: linear-gradient(135deg, var(--primary-steel), var(--primary-navy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .nav-link {
    color: #4b5563;
}

body.light-theme .nav-link:hover,
body.light-theme .nav-link.active {
    color: #1f2937;
    text-shadow: none;
}

body.light-theme .search-btn,
body.light-theme .theme-toggle,
body.light-theme .menu-toggle {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #4b5563;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.light-theme .search-btn:hover,
body.light-theme .theme-toggle:hover,
body.light-theme .menu-toggle:hover {
    background: #f8fafc;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

body.light-theme .search-box input {
    background: var(--dark-surface);
    border: var(--border-medium);
    color: var(--text-primary);
    box-shadow: var(--shadow-dark);
}

body.light-theme .search-box input:focus {
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

body.light-theme .search-results {
    background: var(--dark-surface);
    border: var(--border-medium);
    box-shadow: var(--shadow-heavy);
}

body.light-theme .search-result-item {
    border-bottom: var(--border-light);
}

body.light-theme .search-result-item:hover {
    background: var(--dark-card);
}

body.light-theme .search-result-icon {
    background: var(--dark-card);
    color: var(--primary-blue);
}

body.light-theme .search-result-title {
    color: var(--text-primary);
}

body.light-theme .search-result-description {
    color: var(--text-secondary);
}

/* Amélioration des cartes et sections en thème clair */
body.light-theme .category-card,
body.light-theme .meme-card,
body.light-theme .stat-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.light-theme .category-card:hover,
body.light-theme .meme-card:hover,
body.light-theme .stat-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-blue);
}

body.light-theme .hero {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

body.light-theme .section {
    background: rgba(255, 255, 255, 0.3);
}

body.light-theme .btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
}

body.light-theme .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(135, 206, 235, 0.4);
}

body.light-theme .btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
}

body.light-theme .footer {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .category-card-large {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

body.light-theme .category-card-large:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-blue);
}

body.light-theme .tag {
    background: rgba(135, 206, 235, 0.15);
    color: var(--primary-blue);
    border: 1px solid rgba(135, 206, 235, 0.25);
}

body.light-theme .tag:hover {
    background: var(--primary-blue);
    color: white;
}

body.light-theme .page-header {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(226, 232, 240, 0.9));
}

body.light-theme .error-page {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

body.light-theme .modal-content {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .comment-input textarea {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .sort-options select {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Categories page specific styles */
.categories-page .page-header {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(70, 130, 180, 0.05));
    border-bottom: var(--border-light);
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.page-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.categories-grid-section {
    padding: 80px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card-large {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: var(--border-light);
    border-radius: 20px;
    padding: 30px;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(70, 130, 180, 0.05));
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: -1;
}

.category-card-large:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
    box-shadow: var(--glow-steel);
}

.category-card-large:hover::before {
    opacity: 1;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--glow-blue);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.category-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.category-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.category-stats .stat i {
    color: var(--primary-blue);
}

.category-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    background: var(--dark-card);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: var(--border-light);
    transition: var(--transition-fast);
}

.tag:hover {
    background: var(--primary-blue);
    color: white;
}

.category-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-meme {
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.quick-actions {
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: var(--border-light);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.action-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: var(--border-light);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: var(--transition-smooth);
}

.action-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

.action-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--glow-blue);
}

.action-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.action-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.action-btn {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: inline-block;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-steel);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 70px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(135, 206, 235, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(70, 130, 180, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(30, 58, 138, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(135, 206, 235, 0.2), transparent);
    background-repeat: repeat;
    background-size: 150px 100px;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100px); }
}

.hero-glow {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(135, 206, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.8; }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-text {
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.title-line {
    display: block;
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.title-highlight {
    display: block;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel), var(--primary-navy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: var(--glow-blue);
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: var(--transition-smooth);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    color: var(--dark-bg);
    box-shadow: var(--glow-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-steel);
}

.btn-secondary {
    background: var(--dark-surface);
    color: var(--text-primary);
    border: var(--border-glow);
}

.btn-secondary:hover {
    background: var(--dark-card);
    box-shadow: var(--glow-blue);
    transform: translateY(-2px);
}

.btn-discord {
    background: linear-gradient(135deg, #5865f2, #4752c4);
    color: white;
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.3);
}

.btn-discord:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(88, 101, 242, 0.5);
}

/* ===== FLOATING CARDS ===== */
.hero-visual {
    position: relative;
    height: 500px;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-dark);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.floating-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--glow-blue);
    border-color: var(--primary-blue);
}

.card-1 {
    top: 20%;
    left: 10%;
    animation: float1 6s ease-in-out infinite;
}

.card-2 {
    top: 10%;
    right: 20%;
    animation: float2 8s ease-in-out infinite;
}

.card-3 {
    bottom: 30%;
    left: 20%;
    animation: float3 7s ease-in-out infinite;
}

.card-4 {
    bottom: 20%;
    right: 10%;
    animation: float4 9s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(1deg); }
}

@keyframes float4 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(-1deg); }
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.card-content i {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.card-content span {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== SECTIONS ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CATEGORIES ===== */
.categories {
    padding: 100px 0;
    position: relative;
}

.home-cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 1.1rem;
}
.home-cat-nav a {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
}
.home-cat-nav a:hover {
    color: var(--primary-blue);
    border-color: rgba(135, 206, 235, 0.45);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 20px;
    padding: 30px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.05), rgba(70, 130, 180, 0.05));
    opacity: 0;
    transition: var(--transition-smooth);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--glow-blue);
    border-color: var(--primary-blue);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: var(--glow-blue);
}

.category-icon i {
    font-size: 1.5rem;
    color: var(--dark-bg);
}

.category-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.category-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.category-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--dark-card);
    padding: 6px 12px;
    border-radius: 20px;
    border: var(--border-light);
}

.stat i {
    color: var(--primary-blue);
}

/* ===== SELECTED CATEGORY ===== */
.selected-category {
    padding: 100px 0;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--dark-surface);
    border: var(--border-light);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.back-btn:hover {
    background: var(--dark-card);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

.selected-category-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.selected-category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-blue);
}

.selected-category-icon i {
    font-size: 1.5rem;
    color: var(--dark-bg);
}

.selected-category-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.selected-category-description {
    color: var(--text-secondary);
}

/* ===== MEMES GRID ===== */
.memes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
    max-width: none;
}

/* Responsive pour les grilles de mèmes */
@media (max-width: 1600px) {
    .memes-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

@media (max-width: 1200px) {
    .memes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .memes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .meme-card {
        max-height: none;
        aspect-ratio: unset;
    }
    
    .meme-image-container {
        max-height: none;
        aspect-ratio: 3 / 4;
        min-height: 220px;
    }
}

@media (max-width: 480px) {
    .memes-grid {
        gap: 12px;
        padding: 0 10px;
    }
    
    .meme-card {
        padding: 12px;
    }
    
    .meme-image-container {
        min-height: 200px;
        aspect-ratio: 3 / 4;
    }
}

.meme-card {
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.meme-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 40px rgba(135, 206, 235, 0.2), var(--glow-blue);
    border-color: var(--primary-blue);
}

.meme-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

a.user-info,
a.author-profile-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a.user-info:hover .username,
.meme-header a.author-profile-link:hover .username {
    color: var(--primary-blue);
}

a.modal-user.author-profile-link.is-static {
    cursor: default;
    pointer-events: none;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border-radius: 50%;
    box-shadow: var(--glow-blue);
}

.user-avatar-img {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(135, 206, 235, 0.3);
}

.meme-card .meme-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.meme-card .meme-title {
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
    line-height: 1.3;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: left;
}
.meme-card .meme-title[data-len="short"] { font-size: 1.12rem; }
.meme-card .meme-title[data-len="medium"] { font-size: 0.98rem; }
.meme-card .meme-title[data-len="long"] { font-size: 0.9rem; }
.meme-card .meme-title[data-len="xl"] { font-size: 0.84rem; }

.meme-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 1.2rem auto;
    background: #181a20;
    border-radius: 16px;
    overflow: hidden;
}
.meme-image-container img,
.meme-image-container video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    aspect-ratio: auto;
}
@media (max-width: 700px) {
    .meme-image-container {
        max-height: none;
    }
    .meme-image-container img,
    .meme-image-container video {
        max-height: 100%;
    }
}

.user-details {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 600;
    color: var(--text-primary);
}

.timestamp {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.more-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.more-btn:hover {
    background: var(--dark-card);
    color: var(--text-primary);
}

.meme-content {
    padding: 0 20px 20px;
}

.meme-image-placeholder {
    background: var(--dark-card);
    border: var(--border-light);
    border-radius: 12px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
}

.meme-image-placeholder i {
    font-size: 2rem;
    color: var(--text-muted);
}

.meme-image-placeholder span {
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
}

.meme-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-top: var(--border-light);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 10px;
    transition: var(--transition-fast);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.action-btn:hover {
    background: var(--dark-card);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(0);
}

.like-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.comment-btn:hover {
    color: var(--primary-blue);
    background: rgba(135, 206, 235, 0.1);
}

.share-btn:hover {
    color: var(--accent-green);
    background: rgba(46, 204, 113, 0.1);
}

.bookmark-btn:hover {
    color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
}

.action-btn.liked {
    color: #e74c3c;
}

.action-btn.liked i {
    animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ===== TRENDING ===== */
.trending {
    padding: 100px 0;
    background: var(--dark-surface);
}

/* Structure en colonnes pour les tendances */
.trending-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch; /* Assure que toutes les colonnes ont la même hauteur */
}

/* PC : les 4 colonnes utilisent toute la largeur de l’écran */
@media (min-width: 1201px) {
    .trending > .container {
        max-width: none;
        width: 100%;
        padding: 0 60px;
    }

    .trending-columns {
        max-width: none;
        width: 100%;
    }

    .trending-item {
        min-height: 124px;
        gap: 16px;
        padding: 14px;
    }

    .trending-thumbnail.has-image {
        width: 96px;
        height: 96px;
        border-radius: 12px;
    }
}

.trending-column {
    background: var(--dark-card);
    border: var(--border-light);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.trending-column:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

.trending-column-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trending-column-header i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.trending-column-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Styles responsive pour les colonnes */
@media (max-width: 1200px) {
    .trending-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
        max-width: 760px;
    }
}

@media (max-width: 700px) {
    .trending-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 600px;
    }
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    transition: var(--transition-smooth);
    cursor: pointer;
    min-height: 100px; /* Hauteur fixe pour alignement */
    box-sizing: border-box;
}

.trending-item:hover {
    border-color: var(--primary-blue);
    background: rgba(135, 206, 235, 0.1);
    transform: translateY(-2px);
}

.trending-rank {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-blue);
    min-width: 32px;
}

.trending-thumbnail {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.trending-thumbnail.has-image {
    width: 72px;
    height: 72px;
    border-radius: 10px;
}

.trend-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
    display: none; /* Hidden by default, shown when src is set */
}

.trend-thumb-img.loaded {
    display: block;
}

.trending-thumbnail:before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background: rgba(135, 206, 235, 0.3);
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.trending-thumbnail.has-image:before {
    display: none;
}

.trending-content {
    flex: 1;
}

.trending-content h4 {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.3;
    max-height: 2.6rem; /* Limite à 2 lignes */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Lien propre pour les titres de tendances */
.trending-content .trend-link {
    color: var(--text-primary);
    text-decoration: none;
}

.trending-content .trend-link:hover,
.trending-content .trend-link:focus {
    color: var(--primary-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.trending-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.trending-stats {
    text-align: right;
}

.trend-up {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== COMMUNITY ===== */
.community {
    padding: 100px 0;
}

.community-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-card {
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--glow-blue);
    border-color: var(--primary-blue);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--glow-blue);
}

.stat-icon i {
    font-size: 1.5rem;
    color: var(--dark-bg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== SUBMISSION ===== */
.submission {
    padding: 100px 0;
    background: var(--dark-surface);
}

.submission-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.submission-info h3,
.submission-guidelines h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.submission-steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--glow-blue);
}

.step-icon i {
    color: var(--dark-bg);
    font-size: 1.2rem;
}

.step-content h4 {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.guidelines-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.guidelines-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    padding: 12px;
    background: var(--dark-card);
    border-radius: 10px;
    border: var(--border-light);
}

.guidelines-list li i {
    color: var(--accent-green);
    width: 16px;
}

.guidelines-list li i.fa-times {
    color: #e74c3c;
}

/* ===== PRESENTATION DU GENERATEUR (accueil) ===== */
.generator-promo {
    padding: 100px 0;
}

.generator-promo-content {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 60px;
    align-items: center;
}

.generator-promo-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.generator-promo-lead {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.generator-features {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 36px;
}

.generator-features li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.generator-feature-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    color: var(--dark-bg);
    font-size: 1.05rem;
    box-shadow: var(--glow-blue);
}

.generator-features h4 {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.generator-features p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
}

.generator-promo-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.generator-promo-cta .btn-primary {
    min-width: 230px;
}

.generator-promo-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Aperçu factice de l'éditeur : pas d'image à charger. */
.generator-mock {
    background: var(--dark-card);
    border: var(--border-light);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.generator-mock-head {
    display: flex;
    gap: 7px;
    padding: 2px 4px 12px;
}

.generator-mock-head span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.generator-mock-canvas {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    aspect-ratio: 4 / 3;
    padding: 18px 14px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(150deg, #16202f, #0b111b);
}

.generator-mock-canvas img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.generator-mock-text {
    position: relative;
    font-family: 'Anton', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: clamp(1.15rem, 2.8vw, 1.85rem);
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
    color: #fff;
    -webkit-text-stroke: 2px #000;
    paint-order: stroke fill;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.generator-mock-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
}

.generator-mock-tools span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    border: var(--border-light);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.generator-mock-tools i {
    color: var(--primary-blue);
}

@media (max-width: 900px) {
    .generator-promo {
        padding: 70px 0;
    }

    .generator-promo-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .generator-promo-preview {
        order: -1;
    }
}

@media (max-width: 560px) {
    .generator-features {
        grid-template-columns: 1fr;
    }

    .generator-promo-cta .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-bg);
    border-top: var(--border-light);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.footer-logo svg {
    transition: var(--transition-smooth);
    margin-left: 0;
    padding-left: 0;
}

.footer-brand h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-column a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: var(--border-light);
}

.footer-bottom p {
    color: var(--text-muted);
}

.footer-legal {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-left: 1rem;
    font-size: 0.82rem;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--text-secondary);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.footer-social a:hover {
    background: var(--dark-card);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .title-line {
        font-size: 1.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .memes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .submission-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .community-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .title-line {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .community-stats {
        grid-template-columns: 1fr;
    }
    
    .floating-cards {
        display: none;
    }
}

/* ===== ANIMATIONS AVANCÉES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.animate-on-scroll.from-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-on-scroll.from-right {
    animation: fadeInRight 0.8s ease forwards;
}

/* ===== SCROLLBAR PERSONNALISÉE ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-steel), var(--primary-navy));
}

/* ===== MODAL DE COMMENTAIRES ===== */
.comment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.comment-modal.show {
    opacity: 1;
    visibility: visible;
}

.comment-modal-content {
    background: var(--dark-card);
    border-radius: 16px;
    border: var(--border-medium);
    box-shadow: var(--shadow-heavy);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.comment-modal.show .comment-modal-content {
    transform: scale(1) translateY(0);
}

.comment-modal-header {
    padding: 20px;
    border-bottom: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comment-modal-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.close-modal-btn:hover {
    background: var(--gray-dark);
    color: var(--text-primary);
}

.comments-list {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 400px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 12px;
    background: var(--dark-surface);
    border: var(--border-light);
    transition: var(--transition-smooth);
}

.comment-item:hover {
    background: var(--gray-dark);
    border-color: var(--primary-blue);
}

.comment-item.new-comment {
    border-color: var(--accent-green);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.comment-report-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
}

.comment-report-btn:hover {
    color: #f87171;
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 4px;
}

.comment-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-input-section {
    padding: 20px;
    border-top: var(--border-light);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-input-wrapper {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.comment-input {
    flex: 1;
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    transition: var(--transition-smooth);
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(135, 206, 235, 0.2);
}

.comment-input::placeholder {
    color: var(--text-muted);
}

.send-comment-btn {
    background: var(--primary-blue);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--dark-bg);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.send-comment-btn:hover {
    background: var(--primary-steel);
    transform: translateY(-1px);
    box-shadow: var(--glow-blue);
}

.send-comment-btn:active {
    transform: translateY(0);
}

/* ===== NOTIFICATIONS AMÉLIORÉES ===== */
.notification {
    position: fixed;
    top: 90px;
    right: 20px;
    background: var(--dark-card);
    border: var(--border-medium);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-heavy);
    z-index: 3000;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 400px;
    min-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.info {
    border-left: 4px solid var(--accent-cyan);
}

.notification.success {
    border-left: 4px solid var(--accent-green);
}

.notification.warning {
    border-left: 4px solid var(--accent-orange);
}

.notification.error {
    border-left: 4px solid var(--accent-pink);
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.notification.info .notification-icon {
    color: var(--accent-cyan);
}

.notification.success .notification-icon {
    color: var(--accent-green);
}

.notification.warning .notification-icon {
    color: var(--accent-orange);
}

.notification.error .notification-icon {
    color: var(--accent-pink);
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.notification-btn {
    background: var(--primary-blue);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--dark-bg);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.notification-action.notification-btn {
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-btn:hover {
    background: var(--primary-steel);
}

.notification-btn.secondary {
    background: var(--gray-dark);
    color: var(--text-primary);
}

.notification-btn.secondary:hover {
    background: var(--gray-medium);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-smooth);
    margin-left: 8px;
}

.notification-close:hover {
    background: var(--gray-dark);
    color: var(--text-primary);
}

/* ===== DROPDOWN DISCORD AMÉLIORÉ ===== */
.discord-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #12161f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    min-width: 220px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.discord-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.discord-user-info {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discord-dropdown-menu hr {
    margin: 8px 0;
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 0;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(135, 206, 235, 0.12);
    color: var(--text-primary);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

.dropdown-item.logout {
    color: #ff6b6b;
}

.dropdown-item.logout:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

/* ===== AVATAR DISCORD CORRIGÉ ===== */
.discord-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.discord-connect.connected .discord-avatar {
    border-color: rgba(255, 255, 255, 0.3);
}

/* ===== MODAL DE SOUMISSION DE MÈMES ===== */
.submission-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submission-modal.show {
    opacity: 1;
    visibility: visible;
}

.submission-modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.submission-modal.show .submission-modal-content {
    transform: scale(1);
}

.submission-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}

.submission-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.submission-modal-header h3 i {
    color: var(--primary-blue);
    font-size: 1.4rem;
}

.submission-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group label i {
    color: var(--primary-blue);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
}

/* Forcer couleurs lisibles pour les listes déroulantes (thème sombre) */
.form-select option {
    background: var(--dark-card, #23272f);
    color: var(--text-primary, #fff);
}

/* Compatibilité WebKit (Chrome/Safari) pour le menu déroulant */
select.form-select::-webkit-scrollbar-thumb {
    background: var(--border-color, #374151);
}
select.form-select::-webkit-scrollbar-track {
    background: var(--bg-primary, #1f2937);
}

/* Menu déroulant de notifications */
.notif-dropdown-menu {
    background: #12161f !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.notif-dropdown-menu .notif-item {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.notif-dropdown-menu .notif-item:hover {
    background: rgba(135, 206, 235, 0.08);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-secondary);
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: var(--bg-primary);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.file-upload-area:hover {
    border-color: var(--primary-blue);
    background: rgba(135, 206, 235, 0.05);
}

.file-upload-area.drag-over {
    border-color: var(--primary-blue);
    background: rgba(135, 206, 235, 0.1);
    transform: scale(1.02);
}

.upload-placeholder {
    pointer-events: none;
}

.upload-placeholder i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    display: block;
}

.upload-placeholder p {
    margin: 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.upload-link {
    color: var(--primary-blue);
    text-decoration: underline;
    cursor: pointer;
}

.upload-placeholder small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 1rem;
    display: block;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-preview {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-primary);
}

.upload-preview img,
.upload-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.upload-preview:hover .upload-overlay {
    opacity: 1;
}

.change-file-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.change-file-btn:hover {
    background: var(--primary-steel);
    transform: translateY(-2px);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.btn-cancel {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-cancel:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    color: white;
}

.btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-steel), var(--primary-blue));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(135, 206, 235, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.close-modal-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* ===== RESPONSIVE POUR MODALS ===== */
@media (max-width: 768px) {
    .submission-modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 95vh;
    }
    
    .submission-modal-header {
        padding: 1rem;
    }
    
    .submission-modal-header h3 {
        font-size: 1.3rem;
    }
    
    .submission-form {
        padding: 1rem;
    }
    
    .file-upload-area {
        padding: 1.5rem;
    }
    
    .upload-placeholder i {
        font-size: 2rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-cancel,
    .btn-submit {
        width: 100%;
        justify-content: center;
    }
    
    .upload-preview {
        height: 150px;
    }
}

/* ===== STYLES SPÉCIFIQUES POUR CATEGORY.HTML ===== */
.category-page {
    padding-top: 70px;
    background: var(--dark-bg);
    min-height: 100vh;
}

body.has-news-banner.category-page {
    padding-top: calc(70px + var(--news-banner-height));
}

/* Category Header */
.category-page .category-header {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(70, 130, 180, 0.1));
    padding: 60px 0 40px;
    border-bottom: var(--border-light);
    position: relative;
    overflow: hidden;
}

.category-page .category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(135, 206, 235, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(70, 130, 180, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.category-page .category-header .container {
    position: relative;
    z-index: 2;
}

.category-page .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--dark-surface);
    border: var(--border-light);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    margin-bottom: 30px;
    font-weight: 500;
}

.category-page .back-btn:hover {
    background: var(--dark-card);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
    transform: translateY(-2px);
}

.category-page .selected-category-info {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
}

.category-page .selected-category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-blue);
    flex-shrink: 0;
}

.category-page .selected-category-icon i {
    font-size: 2rem;
    color: var(--dark-bg);
}

.category-page .selected-category-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-page .selected-category-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
}

/* Discord Banner */
.category-page .discord-banner {
    background: linear-gradient(135deg, #5865f2, #4752c4);
    padding: 16px 0;
    border-bottom: var(--border-light);
}

.category-page .banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: white;
    font-weight: 500;
}

.category-page .banner-content i {
    font-size: 1.2rem;
}

/* Memes Section */
.category-page .memes-section {
    padding: 60px 0;
}

.category-page .home-cat-nav {
    margin: 0 0 1.2rem;
    justify-content: flex-start;
}

.category-page .memes-section > .container {
    position: relative;
    z-index: 100;
    overflow: visible;
}
.category-page .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 110;
    overflow: visible;
}
.category-page .sort-options {
    position: relative;
    z-index: 120;
    overflow: visible;
}

.category-page .section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.category-page .sort-options select {
    background: var(--dark-surface);
    border: var(--border-light);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    min-width: 180px;
}

.category-page .sort-options select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.1);
}

.category-page .sort-options select:hover {
    border-color: var(--primary-blue);
}

/* Memes Grid */
.category-page .memes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
    max-width: none;
}

/* Responsive pour les grilles de mèmes des catégories */
@media (max-width: 1600px) {
    .category-page .memes-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

@media (max-width: 1200px) {
    .category-page .memes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .category-page .memes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-page .meme-card {
        max-height: none;
        aspect-ratio: unset;
    }
    
    .category-page .meme-image-container {
        max-height: 300px;
        aspect-ratio: 16/9;
    }
}

@media (max-width: 480px) {
    .category-page .memes-grid {
        gap: 12px;
        padding: 0 10px;
    }
    
    .category-page .meme-card {
        padding: 12px;
    }
    
    .category-page .meme-image-container {
        max-height: 250px;
        aspect-ratio: 4/3;
    }
}

.category-page .meme-card {
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-page .meme-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 40px rgba(135, 206, 235, 0.2), var(--glow-blue);
    border-color: var(--primary-blue);
}

.category-page .meme-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: var(--border-light);
}

.category-page .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-page .user-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-blue);
    box-shadow: 0 2px 10px rgba(135, 206, 235, 0.3);
}

.category-page .user-details {
    display: flex;
    flex-direction: column;
}

.category-page .username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.category-page .timestamp {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.category-page .meme-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.category-page .meme-card .meme-title {
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
    line-height: 1.3;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: left;
}
.category-page .meme-card .meme-title[data-len="short"] { font-size: 1.12rem; }
.category-page .meme-card .meme-title[data-len="medium"] { font-size: 0.98rem; }
.category-page .meme-card .meme-title[data-len="long"] { font-size: 0.9rem; }
.category-page .meme-card .meme-title[data-len="xl"] { font-size: 0.84rem; }

.category-page .meme-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--dark-card);
    margin-bottom: 15px;
}

.category-page .meme-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    display: block;
    transition: var(--transition-smooth);
}

.category-page .meme-card:hover .meme-image {
    transform: scale(1.02);
}

.category-page .meme-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-top: var(--border-light);
}

.category-page .action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 10px;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    font-weight: 500;
}

.category-page .action-btn:hover {
    background: var(--dark-card);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.category-page .like-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.category-page .comment-btn:hover {
    color: var(--primary-blue);
    background: rgba(135, 206, 235, 0.1);
}

.category-page .share-btn:hover {
    color: var(--accent-green);
    background: rgba(46, 204, 113, 0.1);
}

.category-page .action-btn.liked {
    color: #e74c3c;
}

.category-page .action-btn.liked i {
    animation: heartBeat 0.6s ease-in-out;
}

/* Meme Modal (catégorie + profil) */
.meme-modal,
.category-page .meme-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.meme-modal.show,
.category-page .meme-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.meme-modal .modal-overlay,
.category-page .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.category-page .modal-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--dark-card);
    border-radius: 22px;
    width: 100%;
    max-width: 600px;
    max-height: 96vh;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
    margin: 0 auto;
    border: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
}
.category-page .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 2.8rem 0.2rem 0.85rem;
    background: transparent;
    position: relative;
    z-index: 1;
    margin-top: 0;
}
.category-page .modal-user {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}
.category-page .modal-user .user-avatar-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    border: 1.5px solid var(--primary-blue);
    background: var(--dark-surface);
}
.category-page .modal-user .user-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}
.category-page .modal-user .username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.category-page .modal-user .post-time {
    color: var(--text-muted);
    font-size: 0.65rem;
    line-height: 1.2;
}
.meme-modal .modal-close {
    background: var(--dark-card);
    border: none;
    color: var(--text-secondary);
    font-size: 1.05rem;
    cursor: pointer;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    position: absolute;
    top: 0.45rem;
    right: 0.55rem;
    z-index: 20;
    flex-shrink: 0;
    margin: 0;
}
.meme-modal .modal-close:hover {
    background: rgba(255,255,255,0.08);
    color: var(--primary-blue);
}
.category-page .modal-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem 1.5rem 1.5rem;
    overflow: visible;
}
.category-page .meme-title-desc .meme-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin: 0.5rem 0 0.2rem 0;
    line-height: 1.2;
    word-break: break-word;
    height: auto;
    min-height: 0;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    overflow: visible;
}
.category-page .meme-title-desc .meme-title[data-len="short"] { font-size: 1.5rem; }
.category-page .meme-title-desc .meme-title[data-len="medium"] { font-size: 1.28rem; }
.category-page .meme-title-desc .meme-title[data-len="long"] { font-size: 1.1rem; }
.category-page .meme-title-desc .meme-title[data-len="xl"] { font-size: 0.95rem; }
.category-page .meme-description {
    color: var(--text-secondary);
    font-size: 1.08rem;
    text-align: left;
    margin-bottom: 1.1rem;
    margin-top: 0.2rem;
    max-height: none;
    overflow: visible;
    line-clamp: unset;
    display: block;
    -webkit-line-clamp: unset;
    word-break: break-word;
    white-space: pre-line;
}
.category-page .meme-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 90vw;
    background: var(--dark-card);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.2rem;
    position: relative;
}
.category-page .meme-image-full, .category-page .meme-image-container video {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #111;
    border-radius: 12px;
}
.category-page .meme-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    margin-bottom: 1.2rem;
}
.category-page .action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
    transition: background 0.2s, color 0.2s;
}
.category-page .action-btn:hover {
    background: rgba(135, 206, 235, 0.08);
    color: var(--primary-blue);
}
.category-page .action-btn.liked {
    color: #ff4757;
}
.category-page .action-btn.liked:hover {
    background: rgba(255, 71, 87, 0.1);
}
.category-page .comments-section {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    margin-top: 1.5rem;
    border-top: var(--border-light);
    padding-top: 1.5rem;
    overflow-y: auto;
    flex: 1 1 auto;
}
.category-page .comments-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}
.category-page .comment-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 30px;
    align-items: flex-start;
}
.category-page .comment-form .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-bg);
}
.category-page .comment-form .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-page .comment-input {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* neutralise le style de champ hérité de .comment-input (autre composant) */
    background: none;
    border: none;
    padding: 0;
    min-height: 0;
    max-height: none;
}
.category-page .comment-input textarea {
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    transition: var(--transition-smooth);
}
.category-page .comment-input textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.1);
}
.category-page .comment-input textarea::placeholder {
    color: var(--text-muted);
}
.category-page .comment-input .btn {
    align-self: flex-end;
    padding: 10px 20px;
    font-size: 0.9rem;
}
.category-page .comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.category-page .comment-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--dark-surface);
    border-radius: 12px;
    border: var(--border-light);
}
.category-page .comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-bg);
    font-size: 0.8rem;
}
.category-page .comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-page .comment-content {
    flex: 1;
}
.category-page .comment-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.category-page .comment-text {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}
.category-page .comment-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}
/* Loading States */
.category-page .loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.category-page .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-dark);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}
.category-page .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.category-page .empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}
.category-page .empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.category-page .empty-state p {
    font-size: 1rem;
    line-height: 1.6;
}
/* Responsive Design */
@media (max-width: 768px) {
    .category-page .selected-category-info {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .category-page .selected-category-title {
        font-size: 2rem;
    }
    
    .category-page .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .category-page .section-header h2 {
        font-size: 1.5rem;
    }
    
    .category-page .sort-options select {
        width: 100%;
    }
    
    .category-page .memes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-page .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .category-page .modal-body {
        padding: 20px;
    }
    
    /* align-items: flex-start empêcherait les enfants de prendre toute la largeur */
    .category-page .comment-form {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .category-page .comment-form .user-avatar {
        align-self: flex-start;
    }

    .category-page .comment-input {
        width: 100%;
    }

    .category-page .comment-input textarea {
        width: 100%;
    }

    .category-page .comment-input .btn {
        align-self: stretch;
    }
}
@media (max-width: 480px) {
    .category-page .selected-category-icon {
        width: 60px;
        height: 60px;
    }
    
    .category-page .selected-category-icon i {
        font-size: 1.5rem;
    }
    
    .category-page .selected-category-title {
        font-size: 1.5rem;
    }
    
    .category-page .meme-actions {
        gap: 15px;
        padding: 15px;
    }
    
    .category-page .action-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}


/* Hero Section */
.categories-page .hero-section {
    position: relative;
    padding: 80px 0 60px;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(70, 130, 180, 0.1));
    overflow: hidden;
}

.categories-page .hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(135, 206, 235, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.categories-page .hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.categories-page .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.categories-page .hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 18px;
    color: var(--text-primary);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    text-shadow: none;
    animation: none;
    display: block;
    text-align: center;
}

.categories-page .hero-title i {
    font-size: 2.2rem;
    margin-right: 0.7rem;
    color: var(--primary-blue);
    -webkit-text-fill-color: var(--primary-blue);
    animation: none;
}

.categories-page .hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
    text-align: center;
}

.categories-page .hero-stats {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
}

.categories-page .stat-card {
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 16px;
    padding: 1.5rem 2.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 140px;
    box-shadow: var(--glow-blue);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    text-align: left;
}

.categories-page .stat-card i {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-right: 0.5rem;
}

.categories-page .stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.categories-page .stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
}

.categories-page .stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-top: 0.1rem;
}

/* CARDS DE CATÉGORIES EN GRILLE, BLEU UNI, PAS DE VIOLET */
.categories-page .categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.categories-page .category-card {
    background: var(--dark-surface);
    border: var(--border-light);
    border-radius: 20px;
    padding: 2rem 2.2rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
}
.categories-page .category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: -1;
}
.categories-page .category-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}
.categories-page .category-card:hover::before {
    opacity: 0.08;
}
.categories-page .category-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}
.categories-page .category-icon {
    width: 60px;
    height: 60px;
    background: rgba(52, 104, 255, 0.08); /* bleu très léger, pas de dégradé */
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-blue);
    box-shadow: none;
}
.categories-page .category-icon i {
    color: var(--primary-blue);
    font-size: 2rem;
}
.categories-page .category-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.categories-page .category-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.categories-page .category-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.categories-page .category-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .categories-page .hero-title { font-size: 2.2rem; }
    .categories-page .categories-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .categories-page .hero-content { padding: 0 10px; }
    .categories-page .hero-stats { flex-direction: column; gap: 18px; align-items: center; }
    .categories-page .stat-card { min-width: 120px; padding: 1rem 1.2rem; text-align: center; align-items: center; }
    .categories-page .stat-content { align-items: center; }
}

/* ===== NOUVELLES ANIMATIONS ===== */
@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 20px rgba(135, 206, 235, 0.3)); }
    100% { filter: drop-shadow(0 0 30px rgba(135, 206, 235, 0.6)); }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== COULEURS SPÉCIFIQUES PAR CATÉGORIE ===== */
.categories-page .category-card[data-category="programmation"] .category-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.categories-page .category-card[data-category="gaming"] .category-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.categories-page .category-card[data-category="travail"] .category-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.categories-page .category-card[data-category="internet"] .category-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.categories-page .category-card[data-category="animaux"] .category-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.categories-page .category-card[data-category="science"] .category-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

/* ===== RESPONSIVE DESIGN AMÉLIORÉ ===== */
@media (max-width: 768px) {
    .categories-page .category-card {
        padding: 2rem;
    }
    
    .categories-page .category-header {
        gap: 1rem;
    }
    
    .categories-page .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .categories-page .category-title {
        font-size: 1.3rem;
    }
    
    .categories-page .category-stats {
        gap: 1rem;
    }
    
    .categories-page .category-stats .stat {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .categories-page .hero-title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .categories-page .hero-title i {
        font-size: 2rem;
    }
    
    .categories-page .stat-card {
        min-width: 140px;
        padding: 1.5rem;
    }
    
    .categories-page .stat-card i {
        font-size: 2rem;
    }
    
    .categories-page .stat-number {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .categories-page .category-card {
        padding: 1.5rem;
    }
    
    .categories-page .category-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .categories-page .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .categories-page .category-stats {
        justify-content: center;
    }
    
    .categories-page .category-actions {
        justify-content: center;
    }
    
    .categories-page .hero-title {
        font-size: 2rem;
    }
    
    .categories-page .hero-description {
        font-size: 1rem;
    }
    
    .categories-page .stat-card {
        min-width: 120px;
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .categories-page .stat-card i {
        font-size: 1.8rem;
    }
    
    .categories-page .stat-number {
        font-size: 1.5rem;
    }
}

/* ===== ANIMATIONS MANQUANTES ===== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== REDESIGN DES CARTES DE CATÉGORIES ===== */
.categories-page .category-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.categories-page .category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-steel), #8b5cf6, #ec4899);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px 20px 0 0;
}

.categories-page .category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.categories-page .category-card:hover::before {
    transform: scaleX(1);
}

.categories-page .category-card:hover::after {
    opacity: 1;
}

.categories-page .category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.categories-page .category-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.categories-page .category-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.categories-page .category-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.categories-page .category-card:hover .category-icon::before {
    opacity: 1;
}

.categories-page .category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.categories-page .category-info {
    flex: 1;
}

.categories-page .category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-primary), rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.categories-page .category-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    opacity: 0.8;
}

.categories-page .category-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.categories-page .category-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.categories-page .category-stats .stat:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.categories-page .category-stats .stat i {
    color: var(--primary-blue);
    font-size: 1rem;
    opacity: 0.8;
}

.categories-page .category-actions {
    display: flex;
    justify-content: flex-end;
}

.categories-page .category-actions .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border: none;
    border-radius: 12px;
    color: var(--dark-bg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.categories-page .category-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.categories-page .category-actions .btn:hover::before {
    left: 100%;
}

.categories-page .category-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 25px rgba(135, 206, 235, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* ===== CORRECTION DE LA HERO SECTION ===== */
.categories-page .hero-section {
    position: relative;
    padding: 80px 0 60px;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(70, 130, 180, 0.1));
    overflow: hidden;
}

.categories-page .hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(135, 206, 235, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.categories-page .hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.categories-page .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.categories-page .hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.categories-page .hero-title i {
    font-size: 3rem;
    color: var(--primary-blue);
    -webkit-text-fill-color: var(--primary-blue);
    animation: iconFloat 2s ease-in-out infinite;
}

.categories-page .hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
    opacity: 0.9;
}

.categories-page .hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.categories-page .stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 180px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.categories-page .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.categories-page .stat-card:hover::before {
    opacity: 1;
}

.categories-page .stat-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    border-color: var(--primary-blue);
}

.categories-page .stat-card i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    position: relative;
    z-index: 1;
    animation: iconPulse 2s ease-in-out infinite;
}

.categories-page .stat-content {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.categories-page .stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.categories-page .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* ===== NOUVELLES ANIMATIONS ===== */
@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 20px rgba(135, 206, 235, 0.3)); }
    100% { filter: drop-shadow(0 0 30px rgba(135, 206, 235, 0.6)); }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== COULEURS SPÉCIFIQUES PAR CATÉGORIE ===== */
.categories-page .category-card[data-category="programmation"] .category-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.categories-page .category-card[data-category="gaming"] .category-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.categories-page .category-card[data-category="travail"] .category-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.categories-page .category-card[data-category="internet"] .category-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.categories-page .category-card[data-category="animaux"] .category-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.categories-page .category-card[data-category="science"] .category-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

/* ===== RESPONSIVE DESIGN AMÉLIORÉ ===== */
@media (max-width: 768px) {
    .categories-page .category-card {
        padding: 2rem;
    }
    
    .categories-page .category-header {
        gap: 1rem;
    }
    
    .categories-page .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .categories-page .category-title {
        font-size: 1.3rem;
    }
    
    .categories-page .category-stats {
        gap: 1rem;
    }
    
    .categories-page .category-stats .stat {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .categories-page .hero-title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .categories-page .hero-title i {
        font-size: 2rem;
    }
    
    .categories-page .stat-card {
        min-width: 140px;
        padding: 1.5rem;
    }
    
    .categories-page .stat-card i {
        font-size: 2rem;
    }
    
    .categories-page .stat-number {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .categories-page .category-card {
        padding: 1.5rem;
    }
    
    .categories-page .category-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .categories-page .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .categories-page .category-stats {
        justify-content: center;
    }
    
    .categories-page .category-actions {
        justify-content: center;
    }
    
    .categories-page .hero-title {
        font-size: 2rem;
    }
    
    .categories-page .hero-description {
        font-size: 1rem;
    }
    
    .categories-page .stat-card {
        min-width: 120px;
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .categories-page .stat-card i {
        font-size: 1.8rem;
    }
    
    .categories-page .stat-number {
        font-size: 1.5rem;
    }
}

/* ===== FILTRES ET SECTIONS MANQUANTS ===== */
.categories-page .filters-section {
    padding: 2rem 0;
    background: var(--dark-surface);
    border-bottom: var(--border-light);
}

.categories-page .filters-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.categories-page .search-filter {
    flex: 1;
    min-width: 300px;
}

.categories-page .search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.categories-page .search-input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    z-index: 2;
}

.categories-page .search-input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: var(--dark-card);
    border: var(--border-light);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.categories-page .search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.1);
}

.categories-page .filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.categories-page .filter-tab {
    background: var(--dark-card);
    border: var(--border-light);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    text-decoration: none;
}

.categories-page .filter-tab:hover {
    background: var(--gray-dark);
    color: var(--text-primary);
}

.categories-page .filter-tab.active {
    background: var(--primary-blue);
    color: var(--dark-bg);
    border-color: var(--primary-blue);
}

.categories-page .filter-tab i {
    font-size: 0.9rem;
}

.categories-page .sort-filter {
    min-width: 200px;
}

.categories-page .sort-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--dark-card);
    border: var(--border-light);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.categories-page .sort-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.1);
}

/* Categories Section */
.categories-page .categories-section {
    padding: 4rem 0;
}

.categories-page .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.categories-page .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.categories-page .section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.categories-page .categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Loading and Empty States */
.categories-page .loading-state {
    text-align: center;
    padding: 3rem;
}

.categories-page .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-dark);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.categories-page .empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.categories-page .empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.categories-page .empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Quick Actions Section */
.categories-page .quick-actions {
    padding: 4rem 0;
    background: var(--dark-surface);
}

.categories-page .actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.categories-page .action-card {
    background: var(--dark-card);
    border: var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.categories-page .action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-blue);
}

.categories-page .action-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--dark-bg);
}

.categories-page .action-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.categories-page .action-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.categories-page .action-btn {
    background: var(--primary-blue);
    color: var(--dark-bg);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.categories-page .action-btn:hover {
    background: var(--primary-steel);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(135, 206, 235, 0.3);
}

.category-page .meme-image-container video {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
    margin: 20px 0;
    background: #000;
    display: block;
}

.meme-image-full, .meme-modal video.meme-image-full {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #111;
    border-radius: 12px;
}

.meme-modal .modal-content, .category-page .modal-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: var(--dark-card);
    border-radius: 20px;
    width: auto;
    max-width: 600px;
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    margin: 4vh auto;
    border: var(--border-medium);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    position: relative;
    padding: 0;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 2.8rem 0.2rem 0.85rem;
    background: transparent;
    position: relative;
    z-index: 1;
}
.meme-modal .modal-user {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}
.meme-modal a.modal-user {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.meme-modal a.modal-user:hover .username {
    color: var(--primary-blue);
}
.meme-modal .modal-user .user-avatar-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    border: 1.5px solid var(--primary-blue);
    background: var(--dark-surface);
}
.meme-modal .modal-user .user-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}
.meme-modal .modal-user .username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.78rem;
    line-height: 1.2;
}
.meme-modal .modal-user .post-time {
    color: var(--text-muted);
    font-size: 0.65rem;
    line-height: 1.2;
}
.meme-title-desc {
    text-align: center;
    margin: 0 1.5rem 0.7rem 1.5rem;
}
.meme-title-desc .meme-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    word-break: break-word;
    line-height: 1.25;
}
.meme-title-desc .meme-title[data-len="short"] { font-size: 1.5rem; }
.meme-title-desc .meme-title[data-len="medium"] { font-size: 1.28rem; }
.meme-title-desc .meme-title[data-len="long"] { font-size: 1.1rem; }
.meme-title-desc .meme-title[data-len="xl"] { font-size: 0.95rem; }
.meme-description {
    color: var(--text-secondary);
    font-size: 1rem;
    max-height: none;
    overflow: visible;
    white-space: pre-line;
    margin-bottom: 0.7rem;
}

.meme-engagement-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin: 0 1.5rem 0.45rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.meme-engagement-stats .meme-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.meme-engagement-stats .meme-stat i {
    color: var(--primary-blue);
    opacity: 0.85;
}

.meme-details-below {
    width: 100%;
    padding: 0 1.25rem 0.35rem;
    box-sizing: border-box;
}

.meme-details-below .meme-description {
    margin-bottom: 0.45rem;
    text-align: left;
}

.meme-details-below .meme-meta {
    margin-top: 0.35rem;
}

.meme-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 1.2rem auto;
    background: #181a20;
    border-radius: 16px;
    overflow: hidden;
}
.meme-image-container img,
.meme-image-container video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    aspect-ratio: auto;
}
@media (max-width: 700px) {
    .meme-image-container {
        max-height: none;
    }
    .meme-image-container img,
    .meme-image-container video {
        max-height: 100%;
    }
}
.meme-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin: 0 0 1rem 0;
}
.comments-section {
    background: #181a20;
    border-radius: 0 0 20px 20px;
    padding: 1rem 1.5rem 1.2rem 1.5rem;
    max-height: 180px;
    overflow-y: auto;
}
.comments-list {
    margin-top: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    scrollbar-width: thin;
    scrollbar-color: #4682B4 #222;
}
@media (max-width: 700px) {
    .meme-modal .modal-content, .category-page .modal-content {
        max-width: 98vw;
        max-height: 98vh;
        border-radius: 0;
        padding: 0;
        margin: 2vw auto;
    }
    .modal-header, .comments-section, .meme-title-desc {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }
    .meme-title-desc .meme-title,
    .category-page .meme-title-desc .meme-title {
        font-size: 1.05rem;
        margin-bottom: 0.15rem;
        height: auto;
        max-height: none;
        overflow: visible;
        display: block;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }
    .meme-title-desc .meme-title[data-len="short"],
    .category-page .meme-title-desc .meme-title[data-len="short"] { font-size: 1.1rem; }
    .meme-title-desc .meme-title[data-len="medium"],
    .category-page .meme-title-desc .meme-title[data-len="medium"] { font-size: 0.98rem; }
    .meme-title-desc .meme-title[data-len="long"],
    .category-page .meme-title-desc .meme-title[data-len="long"] { font-size: 0.88rem; }
    .meme-title-desc .meme-title[data-len="xl"],
    .category-page .meme-title-desc .meme-title[data-len="xl"] {
        font-size: 0.82rem;
        line-height: 1.25;
        display: block;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        overflow: visible;
        max-height: none;
    }
    .meme-description,
    .category-page .meme-description,
    .meme-details-below .meme-description {
        font-size: 0.88rem;
        max-height: none;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        display: block;
        overflow: visible;
        white-space: pre-line;
        margin-bottom: 0.35rem;
    }
    .meme-details-below {
        padding: 0 0.7rem 0.25rem;
    }
    .meme-meta {
        margin-top: 0.4rem;
    }
    .meme-meta-sections {
        gap: 0.3rem;
    }
    .meme-meta-row {
        gap: 0.25rem 0.4rem;
    }
    .meme-meta-label {
        min-width: 4.2rem;
        font-size: 0.62rem;
        letter-spacing: 0.02em;
        padding-top: 0.15rem;
    }
    .meme-meta-chips {
        gap: 0.25rem;
    }
    .meme-meta .meta-chip {
        padding: 0.12rem 0.4rem;
        font-size: 0.68rem;
        border-radius: 999px;
        line-height: 1.25;
    }
    .meme-image-container {
        max-width: 100vw;
        max-height: min(52vh, 360px);
    }
}

.comment {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: background 0.2s, box-shadow 0.2s;
    border-bottom: 1px solid rgba(135,206,235,0.07);
}
.comment:not(:last-child) {
    margin-bottom: 0.5rem;
}
.comment:hover {
    background: rgba(135,206,235,0.07);
    box-shadow: 0 4px 16px rgba(70,130,180,0.07);
}
.comment .user-avatar {
    flex-shrink: 0;
}
.comment .comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-blue);
}
.comment-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.comment-author {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.08rem;
}
.comment-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}
.comment-text {
    color: var(--text-primary);
    font-size: 1.08rem;
    margin-bottom: 0.2rem;
    word-break: break-word;
}
.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.2rem;
    justify-content: flex-end;
}
.comment-like-btn, .comment-delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.15rem;
    border-radius: 50%;
    padding: 0.3rem 0.5rem;
    transition: background 0.2s, color 0.2s;
}
.comment-like-btn.liked {
    color: #ff4757;
}
.comment-like-btn:hover {
    color: var(--primary-blue);
    background: rgba(135,206,235,0.08);
}
.comment-delete-btn:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}
.comments-list {
    scrollbar-width: thin;
    scrollbar-color: #4682B4 #222;
}
.comments-list::-webkit-scrollbar {
    width: 5px;
}
.comments-list::-webkit-scrollbar-thumb {
    background: #4682B4;
    border-radius: 6px;
}
@media (max-width: 700px) {
    .comment .comment-avatar {
        width: 36px;
        height: 36px;
    }
    .comment-content {
        font-size: 0.98rem;
    }
}

.categories-page .hero-title.gradient-title,
.categories-page .gradient-title {
    background: linear-gradient(135deg, #87CEEB, #4682B4, #1e3a8a) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: 0 0 20px rgba(135, 206, 235, 0.3) !important;
    animation: titleGlow 3s ease-in-out infinite alternate !important;
}

.admin-action-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.1em;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.admin-action-btn:hover, .admin-action-btn:focus {
  background: rgba(59,130,246,0.10);
  color: #3b82f6;
  outline: none;
}

.admin-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 2rem;
}
.admin-tab {
  background: var(--dark-card);
  color: var(--text-primary);
  border: none;
  padding: 10px 28px;
  border-radius: 8px 8px 0 0;
  font-size: 1.08em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.admin-tab.active, .admin-tab:hover {
  background: #3b82f6;
  color: #fff;
}
.admin-tab-content {
  display: none;
}
.admin-tab-content#tab-dashboard {
  display: block;
}

.certif-badge svg {
  vertical-align: middle;
  color: #3b82f6;
  display: inline-block;
  margin-left: 2px;
}
.certif-badge {
  display: inline-block;
  line-height: 1;
}

/* ===== MODALE ADMIN UTILISATEUR ===== */
.userManageModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.userManageModal.show {
    opacity: 1;
    visibility: visible;
}
.userManageModal .userManageContent {
    background: #181c24;
    border-radius: 18px;
    box-shadow: 0 8px 32px #000a;
    width: 95vw;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 0;
    position: relative;
    animation: fadeInUp 0.3s;
}
.userManageModal .closeUserManageBtn {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 1.5em;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.userManageModal .closeUserManageBtn:hover {
    color: #f43f5e;
}
@media (max-width: 600px) {
    .userManageModal .userManageContent {
        max-width: 98vw;
        border-radius: 10px;
    }
}

/* ===== TABLE ADMIN ===== */
.admin-table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    color: #222;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px #0001;
}
.admin-table th, .admin-table td {
    border: 1px solid #e5e7eb;
    padding: 12px 10px;
    text-align: left;
    font-size: 1em;
}
.admin-table th {
    background: #f3f4f6;
    color: #1e293b;
    font-weight: 700;
}
.admin-table tr {
    transition: background 0.18s;
}
.admin-table tr:hover {
    background: #e0e7ef;
}
.admin-table tr.user-row[style*='banni'] {
    background: #f43f5e11 !important;
    color: #b91c1c;
}

/* ===== MODALE ADMIN UTILISATEUR (DARK) ===== */
.userManageModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10,16,32,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.userManageModal.show {
    opacity: 1;
    visibility: visible;
}
.userManageModal .userManageContent {
    background: var(--dark-card, #181c24);
    border-radius: 18px;
    box-shadow: 0 8px 32px #000a;
    width: 95vw;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 0;
    position: relative;
    animation: fadeInUp 0.3s;
    color: var(--text-primary, #f3f4f6);
}
.userManageModal .closeUserManageBtn {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 1.5em;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.userManageModal .closeUserManageBtn:hover {
    color: #f43f5e;
}
@media (max-width: 600px) {
    .userManageModal .userManageContent {
        max-width: 98vw;
        border-radius: 10px;
    }
}

/* ===== TABLE ADMIN (DARK) ===== */
.admin-table {
    border-collapse: collapse;
    width: 100%;
    background: var(--dark-card, #181c24);
    color: var(--text-primary, #f3f4f6);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px #0002;
}
.admin-table th, .admin-table td {
    border: 1px solid #23272f;
    padding: 12px 10px;
    text-align: left;
    font-size: 1em;
}
.admin-table th {
    background: #23272f;
    color: #60a5fa;
    font-weight: 700;
}
.admin-table tr {
    transition: background 0.18s;
}
.admin-table tr:hover {
    background: #22304a;
}
.admin-table tr.user-row[style*='banni'] {
    background: #f43f5e11 !important;
    color: #b91c1c;
}

/* MODALE ADMIN UTILISATEUR : fond et bleu uniformes */
.userManageModal .userManageContent {
    background: var(--dark-card, #181c24);
    color: var(--text-primary, #f3f4f6);
    border-radius: 22px;
    box-shadow: 0 8px 40px rgba(59,130,246,0.25), 0 8px 32px #000a;
    border: 2px solid var(--primary-blue, #3b82f6);
    width: 95vw;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 0;
    position: relative;
    animation: fadeInUp 0.3s;
}
.userManageModal .closeUserManageBtn {
    color: var(--primary-blue, #3b82f6);
    background: none;
    border: none;
    font-size: 1.5em;
    position: absolute;
    top: 18px;
    right: 18px;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.userManageModal .closeUserManageBtn:hover {
    color: #f43f5e;
}

.userManageModal .userManageContent {
    background: var(--dark-card, #181c24) !important;
    color: var(--text-primary, #f3f4f6) !important;
    border-radius: 22px !important;
    box-shadow: 0 8px 40px rgba(59,130,246,0.25), 0 8px 32px #000a !important;
    border: 2px solid var(--primary-blue, #3b82f6) !important;
    width: 95vw;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 0;
    position: relative;
    animation: fadeInUp 0.3s;
}
.userManageModal .closeUserManageBtn {
    color: var(--primary-blue, #3b82f6) !important;
    background: none !important;
    border: none !important;
    font-size: 1.5em;
    position: absolute;
    top: 18px;
    right: 18px;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.userManageModal .closeUserManageBtn:hover {
    color: #f43f5e !important;
}

/* ===== UPLOAD ADMIN (ONGLET ADMIN) ===== */
#tab-upload .container {
    background: var(--dark-card, #181c24);
    border-radius: 18px;
    box-shadow: 0 2px 12px #0002;
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
}
#bulkUploadForm {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
#bulkUploadForm label {
    color: var(--text-primary, #f3f4f6);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
#bulkUploadForm input[type="file"] {
    background: #23272f;
    color: #60a5fa;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #23272f;
    margin-top: 0.5rem;
}
#uploadFileInputs > div {
    background: #23272f;
    border-radius: 10px;
    padding: 12px 10px;
    margin-bottom: 12px;
    color: var(--text-primary, #f3f4f6);
    box-shadow: 0 1px 6px #0001;
}
#bulkUploadForm input[type="text"] {
    background: #181c24;
    color: #f3f4f6;
    border: 1px solid #23272f;
    border-radius: 7px;
    padding: 7px 10px;
    margin-right: 8px;
    margin-bottom: 4px;
    font-size: 1em;
}
#bulkUploadForm input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.13);
}
#bulkUploadForm button[type="submit"] {
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    padding: 10px 28px;
    cursor: pointer;
    transition: background 0.18s;
    margin-top: 10px;
}
#bulkUploadForm button[type="submit"]:hover {
    background: #2563eb;
}
#uploadResult {
    margin-top: 1.5rem;
    font-size: 1.08em;
}
#uploadResult .success {
    color: #10b981;
    font-weight: 600;
}
#uploadResult .fail {
    color: #f43f5e;
    font-weight: 600;
}
@media (max-width: 700px) {
    #tab-upload .container {
        padding: 1rem 0.5rem;
    }
    #bulkUploadForm input[type="text"] {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Onglets admin */
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }
#tab-users .container, #tab-upload .container {
    background: var(--dark-card, #181c24);
    border-radius: 18px;
    box-shadow: 0 2px 12px #0002;
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
}
.admin-table {
    width: 100%;
    background: var(--dark-card, #181c24);
    color: var(--text-primary, #f3f4f6);
    border-radius: 10px;
    box-shadow: 0 1px 6px #0001;
}
.admin-table th, .admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #232323;
}
.admin-table th {
    background: #23272f;
    color: #60a5fa;
    font-weight: 700;
}
.admin-table tr:last-child td {
    border-bottom: none;
}
#bulkUploadForm {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
#bulkUploadForm label {
    color: var(--text-primary, #f3f4f6);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
#bulkUploadForm input[type="file"] {
    background: #23272f;
    color: #60a5fa;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #23272f;
    margin-top: 0.5rem;
}
#uploadFileInputs > div {
    background: #23272f;
    border-radius: 10px;
    padding: 12px 10px;
    margin-bottom: 12px;
    color: var(--text-primary, #f3f4f6);
    box-shadow: 0 1px 6px #0001;
}

/* ===== BOUTONS PREMIUM MODALE ADMIN ===== */
.premium-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.08em;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 10px 26px;
  box-shadow: 0 2px 12px #0002, 0 1.5px 0 #fff1 inset;
  background: linear-gradient(90deg, #3b82f6 0%, #1e3a8a 100%);
  color: #fff;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.13s;
  outline: none;
  position: relative;
}
.premium-btn i {
  font-size: 1.1em;
  margin-right: 6px;
}
.premium-btn.ban-btn {
  background: linear-gradient(90deg, #f43f5e 0%, #b91c1c 100%);
  box-shadow: 0 2px 12px #f43f5e33, 0 1.5px 0 #fff1 inset;
}
.premium-btn.certif-btn {
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  box-shadow: 0 2px 12px #3b82f633, 0 1.5px 0 #fff1 inset;
}
.premium-btn:hover, .premium-btn:focus {
  background: linear-gradient(90deg, #2563eb 0%, #1e40af 100%);
  box-shadow: 0 4px 18px #0004, 0 2px 0 #fff2 inset;
  transform: translateY(-2px) scale(1.04);
}
.premium-btn.ban-btn:hover, .premium-btn.ban-btn:focus {
  background: linear-gradient(90deg, #dc2626 0%, #7f1d1d 100%);
}
.premium-btn.certif-btn:hover, .premium-btn.certif-btn:focus {
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

/* Fond du modal admin utilisateur = fond principal du site */
#userManageModal {
  background: var(--dark-card, #181c24) !important;
  backdrop-filter: blur(4px);
  border-radius: 22px;
  box-shadow: 0 8px 40px rgba(59,130,246,0.18), 0 8px 32px #000a;
  border: none;
  padding: 0;
}

/* ===== ANNONCE ADMIN PREMIUM ===== */
.annonce-section-premium {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0 auto 2.5rem auto;
  max-width: 700px;
}
.annonce-card-premium {
  background: var(--dark-card, #23272f);
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 2.2rem 2.2rem 1.5rem 2.2rem;
  width: 100%;
  max-width: 600px;
  text-align: center;
  border: 1.5px solid rgba(255,255,255,0.07);
}
.annonce-icon {
  font-size: 2.1em;
  color: #f59e0b;
  margin-bottom: 0.5em;
}
.annonce-title {
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 0.7em;
  font-weight: 700;
}
.annonce-form-premium {
  margin: 0 auto;
  max-width: 420px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.annonce-form-premium label {
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.2em;
}
.annonce-form-premium input[type="text"],
.annonce-form-premium input[type="url"],
.annonce-form-premium textarea {
  background: #181c24;
  color: #f3f4f6;
  border: 1px solid #23272f;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 1em;
  margin-top: 6px;
  width: 100%;
  transition: border 0.18s;
}
.annonce-form-premium input[type="text"]:focus,
.annonce-form-premium input[type="url"]:focus,
.annonce-form-premium textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.13);
}
.annonce-form-premium textarea {
  min-height: 120px;
  resize: vertical;
}
.annonce-form-premium input[type="file"] {
  margin-top: 8px;
  color: var(--text-secondary);
}
.annonce-img-preview {
  margin: 1.2em 0 0.5em 0;
  text-align: center;
}
.annonce-img-preview img {
  max-width: 180px;
  border-radius: 10px;
  box-shadow: 0 2px 8px #0002;
}
.annonce-author-choice {
  display: flex;
  align-items: center;
  gap: 1.2em;
  margin: 0.7em 0 0.2em 0;
  font-size: 1em;
  color: var(--text-secondary);
}
.annonce-author-choice label {
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0.5em 0 0;
  cursor: pointer;
}
.annonce-actions {
  display: flex;
  gap: 1.2em;
  justify-content: center;
  margin-top: 1.2em;
}
.annonce-feedback {
  margin-top: 1.2em;
  font-weight: 600;
  text-align: center;
  min-height: 1.5em;
  font-size: 1.08em;
}
.annonce-apercu {
  margin-top: 2.2em;
  display: block;
  text-align: left;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 1.2em 1.5em 1.5em 1.5em;
  box-shadow: 0 2px 12px #0002;
  position: relative;
}
.annonce-apercu-header {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 0.7em;
}
.annonce-apercu-author {
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.annonce-apercu-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px #0002;
  border: 2px solid #23293a;
  background: #23293a;
}
.annonce-apercu-author-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.annonce-apercu-author-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.04em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.annonce-apercu-author-date {
  color: var(--text-secondary);
  font-size: 0.93em;
  margin-top: 1px;
}
.annonce-apercu-modif {
  margin-left: auto;
  color: #b8bcc8;
  font-size: 0.93em;
  font-style: italic;
  opacity: 0.8;
}
@media (max-width: 700px) {
  .annonce-apercu-header { flex-direction: column; align-items: flex-start; gap: 0.5em; }
  .annonce-apercu-modif { margin-left: 0; margin-top: 0.3em; }
}
@media (max-width: 700px) {
  .annonce-section-premium { padding: 0 0.5rem; }
  .annonce-card-premium { padding: 1.2rem 0.5rem; }
  .annonce-form-premium { max-width: 100%; }
}

/* ===== ANNONCES ADMIN PREMIUM (NOUVEAU DESIGN) ===== */
.annonce-section-premium {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0 auto 2.5rem auto;
  max-width: 800px;
  width: 100%;
}
.annonce-card-premium {
  background: var(--dark-card, #23272f);
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 2.2rem 2.2rem 1.5rem 2.2rem;
  width: 100%;
  max-width: 650px;
  text-align: center;
  border: 1.5px solid rgba(255,255,255,0.07);
  margin: 0 auto;
}
.annonce-title {
  font-size: 1.45rem;
  color: var(--text-primary);
  margin-bottom: 1.2em;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.annonce-author-selector {
  display: flex;
  gap: 1.2em;
  justify-content: center;
  margin-bottom: 1.5em;
  flex-wrap: wrap;
}
.author-card-select {
  background: var(--dark-surface, #181c24);
  border: 2px solid transparent;
  border-radius: 16px;
  box-shadow: 0 2px 12px #0002;
  padding: 1.1em 1.5em 1.1em 1.1em;
  display: flex;
  align-items: center;
  gap: 1em;
  cursor: pointer;
  transition: border 0.18s, box-shadow 0.18s, background 0.18s;
  min-width: 210px;
  max-width: 320px;
  position: relative;
}
.author-card-select.selected {
  border-color: #3b82f6;
  background: linear-gradient(90deg, #23293a 80%, #3b82f6 100%);
  box-shadow: 0 4px 18px #3b82f633, 0 2px 12px #0002;
}
.author-card-select:hover {
  border-color: #60a5fa;
  background: linear-gradient(90deg, #23293a 80%, #60a5fa 100%);
}
.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px #0002;
  border: 2px solid #23293a;
  background: #23293a;
}
.author-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.author-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-badge {
  color: #f59e0b;
  font-size: 1.1em;
  margin-left: 4px;
  vertical-align: middle;
}
.author-email {
  color: var(--text-secondary);
  font-size: 0.97em;
  margin-top: 2px;
}
.annonce-list {
  margin-bottom: 2.2em;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}
.annonce-list-item {
  background: var(--dark-surface, #181c24);
  border-radius: 13px;
  box-shadow: 0 1px 6px #0001;
  padding: 1em 1.2em;
  display: flex;
  align-items: center;
  gap: 1.2em;
  transition: background 0.15s, box-shadow 0.15s;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.annonce-list-item:hover {
  background: #23293a;
  border-color: #3b82f6;
  box-shadow: 0 4px 16px #3b82f622, 0 2px 12px #0002;
}
.annonce-list-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.08em;
  flex: 1 1 auto;
  text-align: left;
}
.annonce-list-date {
  color: var(--text-secondary);
  font-size: 0.97em;
  min-width: 120px;
  text-align: right;
}
.annonce-form-premium {
  margin: 0 auto;
  max-width: 420px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: none;
}
.annonce-form-premium label {
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.2em;
}
.annonce-form-premium input[type="text"],
.annonce-form-premium input[type="url"],
.annonce-form-premium textarea {
  background: #181c24;
  color: #f3f4f6;
  border: 1px solid #23272f;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 1em;
  margin-top: 6px;
  width: 100%;
  transition: border 0.18s;
}
.annonce-form-premium input[type="text"]:focus,
.annonce-form-premium input[type="url"]:focus,
.annonce-form-premium textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.13);
}
.annonce-form-premium textarea {
  min-height: 120px;
  resize: vertical;
}
.annonce-form-premium input[type="file"] {
  margin-top: 8px;
  color: var(--text-secondary);
}
.annonce-img-preview {
  margin: 1.2em 0 0.5em 0;
  text-align: center;
}
.annonce-img-preview img {
  max-width: 180px;
  border-radius: 10px;
  box-shadow: 0 2px 8px #0002;
}
.annonce-actions {
  display: flex;
  gap: 1.2em;
  justify-content: center;
  margin-top: 1.2em;
}
.annonce-feedback {
  margin-top: 1.2em;
  font-weight: 600;
  text-align: center;
  min-height: 1.5em;
  font-size: 1.08em;
}
.annonce-apercu {
  margin-top: 2.2em;
  display: block;
  text-align: left;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 1.2em 1.5em;
  box-shadow: 0 2px 12px #0002;
}
.annonce-apercu .apercu-title {
  font-size: 1.1em;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 0.3em;
}
.annonce-apercu .apercu-msg {
  margin-bottom: 0.7em;
  color: var(--text-primary);
}
.annonce-apercu img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 8px #0002;
  display: block;
  margin-top: 0.7em;
}
@media (max-width: 900px) {
  .annonce-card-premium { padding: 1.2rem 0.5rem; }
  .annonce-section-premium { padding: 0 0.5rem; }
}
@media (max-width: 700px) {
  .annonce-form-premium { max-width: 100%; }
  .annonce-list-item { flex-direction: column; align-items: flex-start; gap: 0.5em; }
  .annonce-list-date { min-width: 0; text-align: left; }
  .annonce-author-selector { gap: 0.7em; }
  .author-card-select { min-width: 140px; padding: 0.7em 0.7em; }
}

.meme-image-container.portrait {
  width: 60% !important;
  min-width: 120px !important;
  margin: 0 auto !important;
}
.meme-image-container.landscape {
  width: 100% !important;
}
.meme-image-container img,
.meme-image-container video {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

.notif-bell-btn {
    background: var(--dark-surface);
    border: var(--border-light);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 1.1rem;
    position: relative;
}

.notif-bell-btn:hover {
    background: var(--dark-card);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

.notif-bell-btn .fa-bell {
    font-size: 1.2em;
}

.notif-bell-btn #notifBellCount {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #f04747;
    color: white;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 10px;
    display: none;
    pointer-events: none;
}

.notif-dropdown-menu {
    position: absolute;
    top: 110%;
    right: 0;
    min-width: 260px;
    max-width: min(340px, calc(100vw - 24px));
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    z-index: 1002;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    display: block;
}
.notif-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* === Styles restaurés depuis 404.html (page d'erreur) === */
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    padding-top: 120px;
}
.error-container {
    max-width: 600px;
    z-index: 2;
    position: relative;
}
.error-code {
    font-size: clamp(6rem, 12vw, 10rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-steel));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1;
    filter: drop-shadow(var(--glow-blue));
    animation: glow-pulse 2s ease-in-out infinite alternate;
}
.error-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-primary);
    margin: 1rem 0;
    font-weight: 700;
}
.error-message {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 1.5rem 0 3rem;
    line-height: 1.6;
}
.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}
@keyframes glow-pulse {
    0% { filter: drop-shadow(var(--glow-blue)); }
    100% { filter: drop-shadow(var(--glow-steel)); }
}
@media (max-width: 768px) {
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    .btn {
        width: 100%;
        max-width: 250px;
    }
}
.countdown {
    font-weight: bold;
    color: var(--primary-blue);
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.68,-0.55,0.27,1.55), opacity 0.3s;
    font-variant-numeric: tabular-nums;
}
.countdown.animate {
    transform: scale(1.3);
    opacity: 0.7;
}


.categories-page .category-card[data-category="video"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-video.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="gif"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-gif.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="attaques"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-attaques.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="autres"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-autres.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="horny"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-horny.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="humm"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-humm.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="choque"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-choque.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="cursed"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-cursed.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="debile"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-debile.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="drole"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-drole.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="enerver"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-enerver.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="mytho"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-mytho.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="nonstop"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-nonstop.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="oui"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-oui.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="stickers"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-stickers.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="stickertiktok"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-stickertiktok.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="sueur"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-sueur.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="templates"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-templates.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="triste"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-triste.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="vol"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-vol.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="wtf"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-wtf.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="nouveautes"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('/uploads/category-bg-nouveautes.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card[data-category="soundboard"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
        url('uploads/category-bg-soundboard.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}

.categories-page .category-card.animate-on-scroll[data-category="video"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-video.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="gif"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-gif.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="attaques"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-attaques.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="autres"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-autres.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="horny"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-horny.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="humm"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-humm.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="choque"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-choque.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="cursed"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-cursed.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="debile"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-debile.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="drole"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-drole.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="enerver"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-enerver.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="mytho"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-mytho.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="nonstop"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-nonstop.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="oui"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-oui.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="stickers"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-stickers.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="stickertiktok"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-stickertiktok.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="sueur"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-sueur.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="templates"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-templates.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="triste"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-triste.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="vol"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-vol.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="wtf"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-wtf.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="nouveautes"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('/uploads/category-bg-nouveautes.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}
.categories-page .category-card.animate-on-scroll[data-category="soundboard"] {
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.5) 0%,
            rgba(0,0,0,0.12) 60%,
            rgba(0,0,0,0.6) 100%
        ),
        linear-gradient(
            to right,
            rgba(0,0,0,0.08) 0%,
            rgba(0,0,0,0.25) 60%,
            rgba(0,0,0,0.5) 100%
        ),
        url('uploads/category-bg-soundboard.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
}

.categories-page .category-card.animate-on-scroll[data-category] .category-icon {
    display: none;
}

/* ===== RECHERCHE GLOBALE DANS LES FILTRES ===== */
.search-results-dropdown {
    margin-top: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(135, 206, 235, 0.1);
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-result-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.search-result-author {
    font-weight: 500;
}

.search-result-category {
    background: rgba(135, 206, 235, 0.2);
    color: var(--primary-blue);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.search-result-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: var(--border-light);
}

.search-result-item.search-view-all {
    background: rgba(135, 206, 235, 0.1);
    border: 1px solid var(--primary-blue);
    border-radius: 8px;
    margin: 8px;
}

.search-result-item.search-view-all:hover {
    background: rgba(135, 206, 235, 0.2);
    transform: translateY(-1px);
}

.search-result-item.search-view-all .search-result-title {
    color: var(--primary-blue);
    font-weight: 600;
}

.search-results-dropdown .search-result-item.search-ask-assistant {
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.35);
    border-radius: 8px;
    margin: 8px;
    cursor: pointer;
}

.search-results-dropdown .search-result-item.search-ask-assistant:hover {
    background: rgba(167, 139, 250, 0.2);
}

.search-no-results {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Correction : n'appliquer le background qu'aux cards, pas à la page */
.categories-page .category-card.animate-on-scroll[data-category] {
    background-blend-mode: normal;
}

/* S'assurer que les cards sont visibles */
.categories-page .category-card.animate-on-scroll[data-category] {
    display: flex;
    opacity: 1;
    visibility: visible;
}



.categories {
    background: none !important;
}

.categories-page .category-card.animate-on-scroll {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    border-radius: 20px;
    padding: 2rem 2.2rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
    min-height: 340px;
    min-width: 0;
}

.categories-page .category-card.animate-on-scroll .category-info {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.categories-page .category-card.animate-on-scroll .category-title {
    margin: 0 0 0.5em 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 8px #0006;
}

.categories-page .category-card.animate-on-scroll .category-description {
    margin-bottom: 1.2em;
    font-size: 1.1rem;
    color: #ccc;
}

.categories-page .category-card.animate-on-scroll .category-stats {
    margin-top: auto;
    margin-bottom: 0;
    width: 100%;
    display: flex;
    gap: 0.8em;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.categories-page .category-card.animate-on-scroll .stat {
    font-size: 1rem;
    padding: 0.35em 0.9em;
    border-radius: 8px;
}

.categories-page {
    background: linear-gradient(135deg, #181c22 0%, #23272f 100%) !important;
    min-height: 100vh;
}

.categories-page {
    background: var(--dark-bg) !important;
    min-height: 100vh;
    position: relative;
}
.categories-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 20% 20%, rgba(135, 206, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(70, 130, 180, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(30, 58, 138, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.categories-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px
        );
    pointer-events: none;
    z-index: 0;
}


.categories-page::before,
.categories-page::after {
    display: none !important;
}

body.categories-page {
    --text-primary: #fff;
    --text-secondary: #b8bcc8;
    background: var(--dark-bg) !important;
}



.categories-page .category-card[data-category],
.categories-page .category-card.animate-on-scroll[data-category] {
    overflow: hidden;
    border-radius: 20px;
    position: relative;
    border: none;
}
.categories-page .category-card[data-category]::before,
.categories-page .category-card.animate-on-scroll[data-category]::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
}
.categories-page .category-card[data-category]::after,
.categories-page .category-card.animate-on-scroll[data-category]::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1.5px solid rgba(255,255,255,0.12);
    z-index: 2;
    pointer-events: none;
}
.categories-page .category-card .category-info,
.categories-page .category-card .category-title,
.categories-page .category-card .category-description,
.categories-page .category-card .category-stats,
.categories-page .category-card .stat {
    position: relative;
    z-index: 3;
}

/* ===== Flou NSFW (contenu a caractere sexuel) ===== */
.nsfw-shield {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 120px;
}
.meme-card .meme-image-container {
    position: relative;
}
.meme-card .meme-image-container .nsfw-shield {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: inherit;
}
.meme-card .nsfw-shield > .meme-thumb-video,
.meme-card .nsfw-shield > .meme-thumb-audio {
    width: 100%;
    height: 100%;
    min-height: 100%;
    aspect-ratio: auto;
    margin: 0;
}
@media (max-width: 900px) {
    .meme-card .meme-image-container .nsfw-shield {
        position: absolute;
        inset: 0;
        height: 100%;
    }
    .meme-card .nsfw-shield > .meme-thumb-video,
    .meme-card .nsfw-shield > .meme-thumb-audio,
    .meme-card .nsfw-shield > img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        min-height: 0;
        aspect-ratio: auto;
        margin: 0;
        object-fit: contain;
    }
    .meme-card .nsfw-shield > .meme-thumb-video,
    .meme-card .nsfw-shield > .meme-thumb-audio {
        object-fit: cover;
    }
}
.meme-modal .meme-image-container .nsfw-shield {
    position: relative;
    inset: auto;
    min-height: 240px;
    height: auto;
}
/* Le média reste net dans le DOM ; le voile le floute visuellement. */
@media (hover: hover) and (pointer: fine) {
    .meme-modal .nsfw-shield:not(.revealed) > img,
    .meme-modal .nsfw-shield:not(.revealed) .nsfw-video-cover {
        filter: blur(22px);
        transition: filter .25s ease;
    }
    .meme-modal .nsfw-shield.revealed > img,
    .meme-modal .nsfw-shield.revealed .nsfw-video-cover {
        filter: none;
    }
}
.nsfw-shield > video {
    filter: none !important;
    transform: none !important;
    display: block;
    max-width: 100%;
}
.nsfw-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1rem;
    text-align: center;
    color: #fff;
    background: rgba(8, 10, 16, 0.38);
    cursor: pointer;
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.nsfw-overlay i { font-size: 2rem; opacity: .9; }
.nsfw-overlay span { font-size: .85rem; line-height: 1.3; }
.nsfw-overlay small { opacity: .8; }
.nsfw-shield.revealed .nsfw-overlay { display: none; }
.nsfw-checkbox-label {
    display: flex;
    align-items: center;
    gap: .6rem;
    cursor: pointer;
    font-weight: 500;
}
.nsfw-checkbox-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; flex: none; }
.nsfw-checkbox-label i { color: #f5576c; }

/* ===== Metadonnees meme (modal + filtres) ===== */
.meme-meta { margin-top: 0.75rem; }
.meme-meta-empty { color: #94a3b8; font-size: 0.85rem; margin: 0; font-style: italic; }
.meme-meta-sections { display: flex; flex-direction: column; gap: 0.65rem; }
.meme-meta-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem 0.75rem; }
.meme-meta-label {
    flex: 0 0 auto;
    min-width: 5.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    padding-top: 0.35rem;
}
.meme-meta-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; flex: 1; }
.meta-chip {
    border: 1px solid rgba(102, 126, 234, 0.45);
    background: rgba(102, 126, 234, 0.12);
    color: #c7d2fe;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.meta-chip:hover {
    background: rgba(102, 126, 234, 0.28);
    border-color: #667eea;
    transform: translateY(-1px);
}
.meta-chip.meta-cat { border-color: rgba(118, 75, 162, 0.5); background: rgba(118, 75, 162, 0.15); }
.meta-chip.meta-tag { border-color: rgba(79, 172, 254, 0.45); background: rgba(79, 172, 254, 0.12); color: #bae6fd; }
.meta-chip.meta-person { border-color: rgba(245, 87, 108, 0.45); background: rgba(245, 87, 108, 0.12); color: #fecdd3; }
.category-page .sort-options,
.sort-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.filter-clear-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    border: 1px solid #444;
    background: #222;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}
.filter-clear-btn i {
    pointer-events: none;
}
.filter-clear-btn:hover { background: #333; color: #f5576c; }
.filter-active-badge {
    font-size: 0.78rem;
    color: #94a3b8;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.category-page .memes-container {
    position: relative;
    z-index: 1;
}
.filter-widget { position: relative; z-index: 130; }
.filter-widget.is-open { z-index: 400; }
.filter-widget-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #444;
    background: #222;
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
}
.filter-widget-btn:hover { border-color: #667eea; background: #2a2a2a; }
.filter-widget-btn.has-exclude .filter-count { color: #f9a8b4; }
.filter-nsfw-btn.is-active {
    border-color: rgba(245, 87, 108, 0.7);
    background: rgba(245, 87, 108, 0.18);
    color: #fecdd3;
}
.filter-nsfw-btn.is-exclude {
    border-color: rgba(248, 113, 113, 0.75);
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
    text-decoration: line-through;
}
.filter-count { color: #667eea; font-size: 0.78rem; }
.filter-cycle-hint {
    margin: 0;
    padding: 0.45rem 0.65rem 0.15rem;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.35;
}
.filter-widget-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 10050;
    min-width: 260px;
    max-width: 360px;
    max-height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    padding: 0.5rem;
}
#filterTypesPanel {
    min-width: 180px;
    max-height: none;
}
.filter-widget.filter-widget--persons .filter-widget-panel {
    left: auto;
    right: 0;
}
.category-page .sort-options {
    position: relative;
    z-index: 120;
    overflow: visible;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 42px;
}
.memes-grid.memes-loading {
    opacity: 0.55;
    pointer-events: none;
    min-height: 200px;
}
.memes-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: #94a3b8;
    padding: 3rem 1rem;
    font-size: 1rem;
}
.filter-widget-panel.hidden { display: none; }
.filter-search {
    width: 100%;
    padding: 0.4rem 0.55rem;
    margin-bottom: 0.45rem;
    border-radius: 6px;
    border: 1px solid #444;
    background: #111;
    color: #fff;
    font-size: 0.85rem;
}
.filter-check-list {
    overflow-y: auto;
    max-height: 340px;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.filter-check-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.35rem 0.45rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    color: #ddd;
    text-align: left;
    font-family: inherit;
}
.filter-check-item:hover { background: rgba(102, 126, 234, 0.12); }
.filter-check-mark {
    flex: 0 0 auto;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 3px;
    border: 1.5px solid #555;
    background: transparent;
    position: relative;
}
.filter-check-item.is-include {
    background: rgba(102, 126, 234, 0.16);
    color: #c7d2fe;
}
.filter-check-item.is-include .filter-check-mark {
    border-color: #818cf8;
    background: rgba(99, 102, 241, 0.85);
}
.filter-check-item.is-include .filter-check-mark::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.filter-check-item.is-exclude {
    background: rgba(245, 87, 108, 0.12);
    color: #fecaca;
}
.filter-check-item.is-exclude .filter-check-label {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}
.filter-check-item.is-exclude .filter-check-mark {
    border-color: #f87171;
    background: rgba(185, 28, 28, 0.85);
}
.filter-check-item.is-exclude .filter-check-mark::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 5px;
    width: 8px;
    height: 0;
    border-top: 2px solid #fff;
}
.filter-empty { font-size: 0.82rem; color: #888; padding: 0.5rem; text-align: center; }
.modal-admin-edit {
    padding: 0.5rem 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.edit-panel-head {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.edit-panel-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.edit-panel-hint {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
}
.edit-panel-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.edit-field { display: flex; flex-direction: column; gap: 0.4rem; }
.edit-field .nsfw-checkbox-label {
    margin-top: 0;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 87, 108, 0.25);
    background: rgba(245, 87, 108, 0.08);
}
.edit-field .nsfw-checkbox-label span { font-size: 0.88rem; color: #e6e9ee; font-weight: 500; }
.edit-field > span {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.edit-field input, .edit-field textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.edit-field input:focus, .edit-field textarea:focus {
    border-color: rgba(135, 206, 235, 0.55);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.12);
}
.edit-field textarea { resize: vertical; min-height: 4.5rem; }
.edit-cat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.edit-cat-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.8rem;
    cursor: pointer;
    position: relative;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.edit-cat-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.edit-cat-label:hover {
    border-color: rgba(135, 206, 235, 0.4);
    background: rgba(135, 206, 235, 0.1);
}
.edit-cat-label:has(input:checked) {
    border-color: rgba(135, 206, 235, 0.55);
    background: rgba(135, 206, 235, 0.18);
    color: #e0f2fe;
}
.edit-persons-list { display: flex; flex-direction: column; gap: 0.55rem; }
.edit-person-row {
    display: grid;
    grid-template-columns: 1fr 1fr 0.7fr auto;
    gap: 0.4rem;
    align-items: center;
    padding: 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}
.edit-person-row input {
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.85rem;
}
.edit-person-remove {
    width: 1.85rem;
    height: 1.85rem;
    border: none;
    border-radius: 8px;
    background: rgba(245, 87, 108, 0.15);
    color: #f5576c;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}
.edit-person-remove:hover { background: rgba(245, 87, 108, 0.28); }
.edit-add-person { align-self: flex-start; margin-top: 0.15rem; font-size: 0.82rem; }
.action-btn.edit-btn { color: #667eea; }
.action-btn.suggest-btn { color: #f59e0b; }
.action-btn.template-btn { color: #87CEEB; }
.action-btn.submit-suggest-btn { color: #22c55e; }
.action-btn.save-btn { color: #22c55e; }
.action-btn.cancel-btn { color: #94a3b8; }

/* ===== Mode edition : layout 2 colonnes PC / empilement mobile ===== */
.meme-modal .modal-content.is-editing,
.category-page .modal-content.is-editing {
    width: min(1120px, 96vw);
    max-width: min(1120px, 96vw);
    max-height: 92vh;
    min-height: min(620px, 88vh);
    overflow: hidden;
}
.category-page .modal-content.is-editing .modal-header {
    margin-top: 0;
    padding: 0.85rem 1.25rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.category-page .modal-content.is-editing .modal-close {
    position: absolute;
    top: 0.55rem;
    right: 0.7rem;
    margin: 0;
}
.category-page .modal-content.is-editing .modal-main,
.meme-modal .modal-content.is-editing .modal-main {
    display: grid;
    grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
        "form media"
        "actions media";
    align-items: stretch;
    column-gap: 1.25rem;
    row-gap: 0.75rem;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding: 0.85rem 1.25rem 1.1rem;
    overflow: hidden;
}
.modal-content.is-editing #modalMemeView { display: none !important; }
.modal-content.is-editing .modal-admin-edit {
    grid-area: form;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding: 0.85rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    gap: 0.7rem;
}
.modal-content.is-editing .edit-panel-head {
    flex-shrink: 0;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.modal-content.is-editing .edit-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(135, 206, 235, 0.45) transparent;
}
.modal-content.is-editing .meme-image-container {
    grid-area: media;
    width: 100%;
    max-width: none;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
}
.modal-content.is-editing .meme-image-container img,
.modal-content.is-editing .meme-image-container video,
.modal-content.is-editing .meme-image-full,
.modal-content.is-editing .category-page .meme-image-container video,
.category-page .modal-content.is-editing .meme-image-container video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    margin: 0;
    object-fit: contain;
    border-radius: 12px;
}
.modal-content.is-editing .meme-engagement-stats,
.modal-content.is-editing .meme-details-below,
.modal-content.is-editing .comments-section {
    display: none !important;
}
.modal-content.is-editing .meme-actions {
    grid-area: actions;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem;
    width: 100%;
    margin: 0;
    padding: 0.15rem 0 0;
    border-top: none;
}
.modal-content.is-editing .meme-actions .like-btn,
.modal-content.is-editing .meme-actions .comment-btn,
.modal-content.is-editing .meme-actions .download-btn,
.modal-content.is-editing .meme-actions .share-btn,
.modal-content.is-editing .meme-actions .delete-btn {
    display: none !important;
}
.modal-content.is-editing .meme-actions .action-btn.save-btn,
.modal-content.is-editing .meme-actions .action-btn.submit-suggest-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border-radius: 11px;
    padding: 0.62rem 1.15rem;
    font-weight: 700;
}
.modal-content.is-editing .meme-actions .action-btn.save-btn:hover,
.modal-content.is-editing .meme-actions .action-btn.submit-suggest-btn:hover {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #fff;
    transform: none;
}
.modal-content.is-editing .meme-actions .action-btn.cancel-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    padding: 0.62rem 1.05rem;
    font-weight: 650;
}
.modal-content.is-editing .meme-actions .action-btn.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: none;
}
.modal-content.is-editing .edit-person-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "nom remove"
        "oeuvre oeuvre"
        "type type";
}
.modal-content.is-editing .edit-person-nom { grid-area: nom; }
.modal-content.is-editing .edit-person-oeuvre { grid-area: oeuvre; }
.modal-content.is-editing .edit-person-type { grid-area: type; }
.modal-content.is-editing .edit-person-remove { grid-area: remove; }

body.light-theme .modal-content.is-editing .modal-admin-edit,
body.light-theme .modal-content.is-editing .meme-image-container {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}
body.light-theme .edit-field input,
body.light-theme .edit-field textarea,
body.light-theme .edit-person-row input,
body.light-theme #editMemeTagsInput {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.14);
    color: #0f172a;
}
body.light-theme .edit-field > span,
body.light-theme .edit-panel-hint,
body.light-theme .meta-suggest-hint { color: #64748b; }
body.light-theme .edit-panel-head h3 { color: #0f172a; }
body.light-theme .edit-cat-label { background: #fff; border-color: rgba(15, 23, 42, 0.12); color: #0f172a; }
body.light-theme .edit-person-row { background: #fff; border-color: rgba(15, 23, 42, 0.08); }
body.light-theme .edit-field .nsfw-checkbox-label span { color: #0f172a; }

@media (max-width: 900px) {
    .meme-modal .modal-content.is-editing,
    .category-page .modal-content.is-editing {
        width: min(100%, 520px);
        max-width: 100%;
        min-height: 0;
        height: calc(100dvh - var(--bottom-nav-total, 0px) - 8px);
        max-height: calc(100dvh - var(--bottom-nav-total, 0px) - 8px);
        margin: 0 auto;
        border-radius: 16px 16px 0 0;
        overflow: hidden;
    }
    .category-page .modal-content.is-editing .modal-header {
        padding: 0.65rem 0.9rem 0.5rem;
        padding-right: 2.8rem;
        flex-shrink: 0;
    }
    .category-page .modal-content.is-editing .modal-main,
    .meme-modal .modal-content.is-editing .modal-main {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        padding: 0.55rem 0.85rem 0;
        overflow: hidden;
        min-height: 0;
        flex: 1 1 auto;
    }
    .modal-content.is-editing .meme-image-container {
        order: -1;
        height: auto;
        max-height: 26vh;
        padding: 0.35rem;
        border-radius: 12px;
        flex: 0 0 auto;
    }
    .modal-content.is-editing .meme-image-container img,
    .modal-content.is-editing .meme-image-container video,
    .modal-content.is-editing .meme-image-full {
        max-height: 24vh;
    }
    .modal-content.is-editing .modal-admin-edit {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        overflow: hidden;
        padding: 0.75rem 0.75rem 0.5rem;
        border-radius: 12px;
    }
    .modal-content.is-editing .edit-panel-body {
        overflow-y: auto;
        padding-right: 0.15rem;
        flex: 1 1 auto;
        min-height: 0;
    }
    .modal-content.is-editing .edit-panel-head h3 {
        font-size: 1rem;
    }
    .modal-content.is-editing .edit-field textarea { min-height: 3.4rem; }
    .modal-content.is-editing .meta-suggest-hint { display: none; }
    .modal-content.is-editing .meme-actions {
        order: 20;
        position: static;
        justify-content: stretch;
        gap: 0.5rem;
        margin: 0 -0.85rem;
        width: calc(100% + 1.7rem);
        padding: 0.65rem 0.85rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
        background: var(--dark-card);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        flex-shrink: 0;
    }
    .modal-content.is-editing .meme-actions .action-btn.save-btn,
    .modal-content.is-editing .meme-actions .action-btn.submit-suggest-btn,
    .modal-content.is-editing .meme-actions .action-btn.cancel-btn {
        flex: 1;
        justify-content: center;
        min-height: 2.55rem;
    }
    body.light-theme .modal-content.is-editing .meme-actions {
        background: #fff;
        border-top-color: rgba(15, 23, 42, 0.08);
    }
}
@media (max-width: 640px) {
    .edit-person-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .filter-widget-panel {
        min-width: 0;
        max-width: calc(100vw - 16px);
    }
    .filter-widget.filter-widget--persons .filter-widget-panel {
        left: 0;
        right: auto;
    }
    #filterTypesPanel {
        min-width: 0;
    }
    .filter-widget-panel .filter-check-list {
        max-height: none;
        flex: 1 1 auto;
        min-height: 0;
    }
}
/* ===== Miniatures video grille (categories + index) ===== */
.meme-thumb-video,
.meme-thumb-audio {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    display: block;
}
.meme-image-container .meme-thumb-video .meme-thumb-image,
.meme-image-container .meme-thumb-audio .meme-thumb-image,
.nsfw-shield .meme-thumb-video .meme-thumb-image,
.nsfw-shield .meme-thumb-audio .meme-thumb-image,
.meme-thumb-video .meme-card-video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: #111;
}
.meme-thumb-video {
    cursor: pointer;
}
.meme-thumb-video.is-playing .meme-card-video {
    object-fit: contain !important;
}
.meme-thumb-video.is-playing .video-play-icon,
.meme-thumb-video.is-playing .fas.fa-play-circle.video-play-icon,
.meme-thumb-video.has-controls .video-play-icon,
.meme-thumb-video.has-controls .fas.fa-play-circle.video-play-icon {
    opacity: 0 !important;
    pointer-events: none !important;
}
.meme-thumb-video .video-play-icon,
.meme-thumb-video .fas.fa-play-circle.video-play-icon,
.meme-thumb-video > .fas.fa-play-circle {
    position: absolute !important;
    top: auto !important;
    left: auto !important;
    bottom: 2.5rem !important;
    right: 0.4rem !important;
    transform: none !important;
    z-index: 3 !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    opacity: 0.55 !important;
    pointer-events: none !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    display: block !important;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.9) !important;
}

@media (max-width: 900px) {
    .meme-thumb-video .video-play-icon,
    .meme-thumb-video .fas.fa-play-circle.video-play-icon,
    .meme-thumb-video > .fas.fa-play-circle {
        bottom: 0.35rem !important;
        right: 0.35rem !important;
        font-size: 0.8rem !important;
        opacity: 0.5 !important;
    }
}

/* Lecteur maison des cartes (pas les contrôles natifs du navigateur) */
.meme-thumb-video.has-player .video-play-icon,
.meme-thumb-video.has-player > .fas.fa-play-circle,
.meme-thumb-video.is-playing .video-play-icon {
    display: none !important;
}
.meme-thumb-video .meme-card-video {
    pointer-events: none;
}
.meme-thumb-video .meme-card-video::-webkit-media-controls,
.meme-thumb-video .meme-card-video::-webkit-media-controls-enclosure,
.meme-thumb-video .meme-card-video::-webkit-media-controls-panel {
    display: none !important;
    -webkit-appearance: none;
}
.card-player-hit {
    position: absolute;
    inset: 0;
    z-index: 1;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}
.card-player-big {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.2rem;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.meme-thumb-video.is-playing .card-player-big {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.15);
}
.card-player {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.55rem 0.6rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    box-sizing: border-box;
    overflow: visible;
}
.meme-thumb-video.is-playing .card-player,
.meme-thumb-video.player-active .card-player {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}
.nsfw-shield:not(.revealed) .card-player,
.nsfw-shield:not(.revealed) .card-player-hit,
.nsfw-shield:not(.revealed) .card-player-big {
    visibility: hidden;
    pointer-events: none;
}
.card-player-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.72rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.card-player-btn:hover {
    background: rgba(255, 255, 255, 0.26);
}
.card-player-track {
    position: relative;
    flex: 1 1 auto;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}
.card-player-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 8px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
}
.card-player-progress {
    position: relative;
    height: 4px;
    width: 0;
    border-radius: 999px;
    background: var(--primary-blue);
    transition: height 0.12s ease;
}
.card-player-progress::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%) scale(0);
    transition: transform 0.12s ease;
}
.card-player-track:hover .card-player-progress::after,
.card-player-track.is-seeking .card-player-progress::after {
    transform: translateY(-50%) scale(1);
}
.card-player-track.is-seeking .card-player-progress,
.card-player-track:hover .card-player-progress {
    height: 6px;
}
.card-player-time {
    flex: 0 0 auto;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.88);
    min-width: 2rem;
    font-variant-numeric: tabular-nums;
}
.card-player-volume {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    position: relative;
    z-index: 8;
    pointer-events: auto;
}
.card-player-vol-pop {
    position: absolute;
    left: 50%;
    bottom: 100%;
    z-index: 9;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 36px;
    height: auto;
    padding: 0 0 14px;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity 0.16s ease, visibility 0.16s ease;
    box-sizing: border-box;
    /* Pont souris : le padding bas recouvre le bouton, sans trou. */
    margin-bottom: -10px;
}
.card-player-volume:hover .card-player-vol-pop,
.card-player-volume:focus-within .card-player-vol-pop,
.card-player-volume.is-open .card-player-vol-pop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.card-player-vol-track {
    position: relative;
    width: 32px;
    height: 96px;
    flex: 0 0 auto;
    cursor: pointer;
    touch-action: none;
    border-radius: 999px;
    background: rgba(8, 10, 16, 0.82);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}
.card-player-vol-track::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 10px;
    bottom: 10px;
    width: 4px;
    margin-left: -2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}
.card-player-vol-fill {
    position: absolute;
    left: 50%;
    bottom: 10px;
    width: 4px;
    height: 80%;
    margin-left: -2px;
    border-radius: 999px;
    background: #fff;
    pointer-events: none;
}
.card-player-vol-fill::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    margin-top: -4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}
@media (max-width: 900px) {
    .card-player-vol-pop {
        left: auto;
        right: 0;
        transform: none;
        margin-bottom: -10px;
    }
    .card-player-vol-track {
        height: 84px;
    }
    .card-player-big {
        width: 48px;
        height: 48px;
        font-size: 1.05rem;
    }
}
.meme-card .meme-image-container:has(.meme-thumb-video),
.meme-card .meme-image-container:has(.meme-thumb-audio),
.category-page .meme-image-container:has(.meme-thumb-video),
.category-page .meme-image-container:has(.meme-thumb-audio) {
    position: relative;
    aspect-ratio: 16 / 9;
    max-height: none;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    isolation: isolate;
    z-index: 1;
}
.meme-card .meme-image-container > .meme-thumb-video,
.meme-card .meme-image-container > .meme-thumb-audio,
.meme-card .nsfw-shield > .meme-thumb-video,
.meme-card .nsfw-shield > .meme-thumb-audio {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    border-radius: inherit;
}

.meme-card .meme-image-container,
.category-page .meme-card .meme-image-container {
    margin-bottom: 0.25rem;
}

.meme-card .meme-content,
.category-page .meme-card .meme-content {
    padding-bottom: 0.2rem;
}

.meme-card .meme-actions,
.category-page .meme-card .meme-actions {
    padding-top: 0.3rem;
    padding-bottom: 0.35rem;
}

/* Contenu carte : jamais de debordement miniature */
.meme-content,
.category-page .meme-content {
    max-width: 100%;
    overflow: visible;
    box-sizing: border-box;
}
.meme-card .meme-image-container.has-letterbox,
.category-page .meme-card .meme-image-container.has-letterbox,
.meme-card .meme-image-container.has-pillarbox,
.category-page .meme-card .meme-image-container.has-pillarbox {
    background: var(--meme-matte, #12141c);
}
.meme-card .meme-image-container:not(:has(.meme-thumb-video)):not(:has(.meme-thumb-audio)) img,
.meme-card .meme-image-container:not(:has(.meme-thumb-video)):not(:has(.meme-thumb-audio)) .meme-thumb-image,
.category-page .meme-card .meme-image-container:not(:has(.meme-thumb-video)):not(:has(.meme-thumb-audio)) img,
.meme-card .meme-image-container:not(:has(.meme-thumb-video)):not(:has(.meme-thumb-audio)) .nsfw-shield > img {
    object-fit: contain !important;
    object-position: center center;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 auto;
    background: transparent;
}
.meme-card .meme-image-container:has(.meme-thumb-video) .meme-thumb-image,
.meme-card .meme-image-container:has(.meme-thumb-audio) .meme-thumb-image {
    object-fit: cover !important;
}
.meme-image-container,
.category-page .meme-image-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
}
.meme-image-container > .meme-thumb-image,
.category-page .meme-image-container > .meme-thumb-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    max-height: 420px;
    object-fit: contain !important;
    display: block;
}
.meme-card .meme-image-container:not(:has(.meme-thumb-video)):not(:has(.meme-thumb-audio)) {
    aspect-ratio: 3 / 4;
}
.meme-card .meme-image-container:not(:has(.meme-thumb-video)):not(:has(.meme-thumb-audio)) > .meme-thumb-image,
.category-page .meme-card .meme-image-container:not(:has(.meme-thumb-video)):not(:has(.meme-thumb-audio)) > .meme-thumb-image,
.meme-card .meme-image-container:not(:has(.meme-thumb-video)):not(:has(.meme-thumb-audio)) .meme-thumb-image {
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
}
.meme-thumb-video,
.meme-thumb-audio {
    max-width: 100%;
    box-sizing: border-box;
}

/* Autocomplete tags / personnes (edition meme) */
.meta-suggest-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-height: 0;
}
#editMemeTagsChips .meta-chip,
#submitMemeTagsChips .meta-chip {
    cursor: pointer;
}
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.45rem 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.18);
    border: 1px solid rgba(102, 126, 234, 0.45);
    color: #e2e8f0;
    font-size: 0.85rem;
}
.meta-chip-remove {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0 2px;
}
.meta-chip-remove:hover { color: #f87171; }
#editMemeTagsInput {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #181c24;
    color: #f3f4f6;
}
.meta-suggest-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

/* Bandeau cookies : n'intercepte pas les clics hors de la boite (recherche utilisable) */
#cookieBanner {
    pointer-events: none !important;
}

#cookieBanner .cookie-banner-content {
    pointer-events: auto;
}

/* === Favoris (étoile) et catégories privées === */
.action-btn.fav-btn:hover,
.action-btn.fav-btn:hover i,
.action-btn.fav-btn.is-fav,
.action-btn.fav-btn.is-fav i {
    color: #fbbf24;
}

.collection-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(8, 10, 16, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.collection-picker {
    width: 100%;
    max-width: 420px;
    background: #141a24;
    border: 1px solid rgba(135, 206, 235, 0.2);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    color: #e2e8f0;
}

.collection-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.collection-picker-head h3 {
    margin: 0;
    font-size: 1.1rem;
}

.collection-picker-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.collection-picker-list {
    list-style: none;
    margin: 0 0 0.9rem;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
}

.collection-pick {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.6rem;
    border-radius: 10px;
    cursor: pointer;
}

.collection-pick:hover {
    background: rgba(135, 206, 235, 0.08);
}

.collection-pick-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-pick-count {
    color: #94a3b8;
    font-size: 0.82rem;
}

.collection-picker-empty {
    color: #94a3b8;
    font-style: italic;
    padding: 0.5rem 0.6rem;
}

.collection-picker-new {
    display: flex;
    gap: 0.5rem;
}

.collection-picker-new input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f141d;
    color: #fff;
}

.collection-picker-hint {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

/* ===== Actions de la modale mème réparties en rangées ===== */
.meme-modal .modal-content .meme-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.6rem;
}

.meme-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
}

.meme-actions-row.is-empty {
    display: none !important;
}

.meme-actions .action-btn {
    white-space: nowrap;
}

/* En édition, les boutons restants tiennent sur une seule ligne */
.modal-content.is-editing .meme-actions {
    flex-direction: row;
}

.modal-content.is-editing .meme-actions .fav-btn,
.modal-content.is-editing .meme-actions .collection-btn,
.modal-content.is-editing .meme-actions .report-btn,
.modal-content.is-editing .meme-actions .template-btn {
    display: none !important;
}

@media (max-width: 768px) {
    .meme-actions-row {
        gap: 0.75rem;
    }

    .modal-content.is-editing .meme-actions-row {
        flex: 1;
    }
}

/* ===== Cartes de catégories compactes sur mobile ===== */
@media (max-width: 768px) {
    .categories-page .category-card {
        padding: 1.15rem 1.25rem;
    }

    .categories-page .category-info {
        margin-bottom: 0.9rem;
    }

    .categories-page .category-title {
        font-size: 1.15rem;
        margin-bottom: 0.35rem;
    }

    .categories-page .category-description {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .categories-page .category-stats {
        gap: 0.45rem;
        margin-bottom: 0.9rem;
        flex-wrap: nowrap;
    }

    .categories-page .category-stats .stat {
        flex: 1;
        min-width: 0;
        justify-content: center;
        gap: 0.35rem;
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
        border-radius: 10px;
        white-space: nowrap;
        overflow: hidden;
    }

    .categories-page .category-stats .stat:hover {
        transform: none;
    }

    .categories-page .category-stats .stat i {
        font-size: 0.85rem;
    }

    .categories-page .category-actions .btn {
        padding: 0.6rem 1.15rem;
        font-size: 0.9rem;
        gap: 0.5rem;
        border-radius: 10px;
    }
}

/* Sur téléphone la grille passe à 2 colonnes : seuls les chiffres tiennent */
@media (max-width: 620px) {
    .categories-page .category-card {
        padding: 0.9rem;
    }

    .categories-page .category-info {
        margin-bottom: 0.7rem;
    }

    .categories-page .category-title {
        font-size: 1.02rem;
    }

    .categories-page .category-description {
        font-size: 0.82rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .categories-page .category-stats {
        gap: 0.3rem;
        margin-bottom: 0.7rem;
    }

    .categories-page .category-stats .stat {
        padding: 0.3rem 0.2rem;
        font-size: 0.75rem;
        gap: 0.25rem;
    }

    .categories-page .category-stats .stat-label {
        display: none;
    }

    .categories-page .category-actions .btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.82rem;
        gap: 0.4rem;
    }
}


/* ===== glass.css ===== */
/* ===== LA BOITE A MEME — GLASS DESIGN SYSTEM (dark) ===== */

:root {
    --glass-bg-deep: #050508;
    --glass-bg-base: #0a0c12;
    --glass-surface: rgba(255, 255, 255, 0.06);
    --glass-surface-elevated: rgba(255, 255, 255, 0.09);
    --glass-surface-hover: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(135, 206, 235, 0.18);
    --glass-border-subtle: rgba(255, 255, 255, 0.08);
    --glass-blur: 16px;
    --glass-blur-strong: 24px;
    --glass-radius: 16px;
    --glass-radius-sm: 12px;
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    --glass-glow: 0 0 40px rgba(135, 206, 235, 0.12);
    --bottom-nav-height: 56px;
    --bottom-nav-total: var(--bottom-nav-height);
    --site-sidebar-width: 252px;
    --dark-bg: var(--glass-bg-deep);
    --dark-surface: rgba(15, 18, 28, 0.85);
    --dark-card: var(--glass-surface-elevated);
    --border-light: 1px solid var(--glass-border-subtle);
    --border-glow: 1px solid var(--glass-border);
}

/* Le site n'a qu'un thème sombre : on le déclare au navigateur pour que la zone
   hors page (overscroll mobile), les contrôles natifs et le flash de chargement
   ne repassent jamais en blanc. */
html {
    color-scheme: dark;
    background-color: var(--glass-bg-deep);
}

body {
    background-color: var(--glass-bg-deep);
}

/* Fond ambient + blobs */
body.glass-theme {
    background: linear-gradient(165deg, #0a0e18 0%, var(--glass-bg-deep) 45%, #0d1528 100%);
    color: var(--text-primary);
    min-height: 100dvh;
}

body.glass-theme::before {
    background:
        radial-gradient(ellipse 80% 50% at 15% 10%, rgba(135, 206, 235, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 85% 20%, rgba(70, 130, 180, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 50% 35% at 50% 90%, rgba(30, 58, 138, 0.1) 0%, transparent 55%);
}

body.glass-theme::after {
    opacity: 0.4;
}

body.glass-theme.has-bottom-nav {
    padding-bottom: calc(var(--bottom-nav-total) + env(safe-area-inset-bottom, 0px));
}

/* Utilitaire glass */
.glass-panel {
    background: var(--glass-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--glass-radius);
    box-shadow: var(--glass-shadow);
}

/* ===== TOP NAV (desktop + mobile header) ===== */
body.glass-theme .navbar {
    background: rgba(8, 10, 16, 0.72);
    backdrop-filter: blur(var(--glass-blur-strong));
    -webkit-backdrop-filter: blur(var(--glass-blur-strong));
    border-bottom: 1px solid var(--glass-border-subtle);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

body.glass-theme .news-ticker {
    background: rgba(8, 10, 16, 0.88);
    backdrop-filter: blur(var(--glass-blur-strong));
    -webkit-backdrop-filter: blur(var(--glass-blur-strong));
    border-bottom: 1px solid var(--glass-border);
}

body.glass-theme .nav-link {
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    transition: background 0.2s ease, color 0.2s ease;
}

body.glass-theme .nav-link:hover,
body.glass-theme .nav-link.active {
    background: var(--glass-surface-hover);
    color: var(--primary-blue);
}

body.glass-theme .search-container {
    background: rgba(8, 10, 16, 0.9);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border-subtle);
}

body.glass-theme .search-box input {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--glass-radius-sm);
    color: var(--text-primary);
}

body.glass-theme .discord-connect,
body.glass-theme .search-btn {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--glass-radius-sm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.glass-theme .discord-connect:hover,
body.glass-theme .search-btn:hover {
    background: var(--glass-surface-hover);
    border-color: var(--glass-border);
    box-shadow: var(--glass-glow);
}

/* ===== SIDEBAR (fenêtre trop étroite) ===== */
.site-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(var(--site-sidebar-width), 86vw);
    z-index: 10050;
    flex-direction: column;
    background: rgba(8, 10, 16, 0.96);
    backdrop-filter: blur(var(--glass-blur-strong));
    -webkit-backdrop-filter: blur(var(--glass-blur-strong));
    border-right: 1px solid var(--glass-border-subtle);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.28);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    pointer-events: none;
}

body.sidebar-open .site-sidebar {
    transform: translateX(0);
    pointer-events: auto;
}

.site-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
}

body.sidebar-open .site-sidebar-backdrop {
    display: block;
}

body.sidebar-open {
    overflow: hidden;
}

.site-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    height: 56px;
    padding: 0 0.75rem 0 1rem;
    flex-shrink: 0;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--glass-border-subtle);
}

.site-sidebar__brand > a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.site-sidebar__brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}

.site-sidebar__close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-sidebar__close:hover {
    color: var(--text-primary);
    background: var(--glass-surface-hover);
}

.site-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.75rem 0.65rem calc(var(--bottom-nav-total, 56px) + 1.25rem);
    overflow-y: auto;
    flex: 1;
}

.site-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}

.site-sidebar__link > i:first-child {
    width: 1.15rem;
    text-align: center;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.site-sidebar__link:hover {
    background: var(--glass-surface-hover);
    color: var(--text-primary);
}

.site-sidebar__link.is-active {
    background: rgba(135, 206, 235, 0.12);
    color: var(--text-primary);
}

.site-sidebar__chevron {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.site-sidebar__group.is-open .site-sidebar__chevron {
    transform: rotate(180deg);
}

.site-sidebar__sub {
    display: none;
    flex-direction: column;
    gap: 1px;
    padding: 0.2rem 0 0.45rem 0.55rem;
}

.site-sidebar__group.is-open .site-sidebar__sub {
    display: flex;
}

.site-sidebar__sub .site-sidebar__link {
    font-size: 0.8rem;
    padding: 0.38rem 0.6rem;
    font-weight: 450;
}

.site-sidebar__sub .site-sidebar__link > i:first-child {
    font-size: 0.78rem;
    opacity: 0.9;
}

@media (min-width: 901px) {
    .site-sidebar,
    .site-sidebar-backdrop {
        display: none !important;
    }

    body.sidebar-open {
        overflow: auto;
    }
}

body.feed-open .site-sidebar,
body.feed-open .site-sidebar-backdrop {
    display: none !important;
}

body.feed-open.sidebar-open {
    overflow: hidden;
}

/* ===== BOTTOM NAV (mobile app-style) ===== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    height: calc(var(--bottom-nav-total) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(8, 10, 16, 0.82);
    backdrop-filter: blur(var(--glass-blur-strong));
    -webkit-backdrop-filter: blur(var(--glass-blur-strong));
    border-top: 1px solid var(--glass-border-subtle);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}

.mobile-bottom-nav__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: var(--bottom-nav-height);
    height: var(--bottom-nav-total);
    max-width: 520px;
    margin: 0 auto;
}

.mobile-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 500;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav__item i {
    font-size: 1.1rem;
    line-height: 1;
}

.mobile-bottom-nav__item.is-active {
    color: var(--primary-blue);
}

.mobile-bottom-nav__item:active {
    transform: scale(0.94);
}

@media (max-width: 900px) {
    body.glass-theme .mobile-bottom-nav {
        display: block;
    }

    body.glass-theme .nav-menu,
    body.glass-theme .mobile-menu {
        display: none !important;
    }

    body.glass-theme .menu-toggle {
        display: flex !important;
    }

    body.glass-theme .nav-actions .menu-toggle {
        display: none !important;
    }

    body.glass-theme .nav-container > .menu-toggle {
        display: flex !important;
        flex-shrink: 0;
        margin-right: 8px;
        width: 40px;
        height: 40px;
    }

    .site-sidebar {
        display: flex;
    }

    body.glass-theme .nav-container {
        height: 56px;
        padding: 0 12px;
    }

    body.glass-theme .brand-text {
        font-size: 0.95rem;
    }

    body.glass-theme .discord-connect .discord-text {
        display: none !important;
    }

    body.glass-theme .discord-connect {
        padding: 0.5rem 0.65rem;
    }

    body.glass-theme .memes-container {
        padding: 0 10px;
    }

    body.glass-theme .category-page {
        padding-top: 64px;
    }

    body.glass-theme.has-news-banner.category-page {
        padding-top: calc(64px + var(--news-banner-height));
    }

    body.glass-theme .categories-page {
        padding-bottom: calc(var(--bottom-nav-total) + 16px);
    }

    body.glass-theme #cookieBanner {
        bottom: calc(var(--bottom-nav-total) + 12px + env(safe-area-inset-bottom, 0px));
    }
}

/* ===== GRILLE MEMES ===== */
body.glass-theme .memes-grid {
    display: grid;
    gap: 10px;
    width: 100%;
}

/* Desktop */
@media (min-width: 1201px) {
    body.glass-theme .memes-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    body.glass-theme .memes-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

@media (min-width: 901px) and (max-width: 1100px) {
    body.glass-theme .memes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

body.glass-theme .memes-grid.memes-grid--compact .meme-card .meme-header,
body.glass-theme .memes-grid.memes-grid--compact .meme-card .meme-actions,
body.glass-theme .memes-grid.memes-grid--compact .meme-card .meme-title {
    display: none;
}

body.glass-theme .memes-grid.memes-grid--compact .meme-card .meme-content {
    padding: 0;
}

body.glass-theme .memes-grid.memes-grid--compact .meme-image-container {
    margin: 0;
    border-radius: 10px;
    aspect-ratio: 3 / 4;
    min-height: 110px;
}

body.glass-theme .memes-grid.memes-grid--compact .meme-card {
    border-radius: 10px;
}

@media (min-width: 1201px) {
    body.glass-theme .memes-grid.memes-grid--compact {
        grid-template-columns: repeat(7, 1fr);
        gap: 12px;
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    body.glass-theme .memes-grid.memes-grid--compact {
        grid-template-columns: repeat(6, 1fr);
        gap: 10px;
    }
}

@media (min-width: 901px) and (max-width: 1100px) {
    body.glass-theme .memes-grid.memes-grid--compact {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Mobile : 2 colonnes par defaut */
@media (max-width: 900px) {
    body.glass-theme .memes-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    body.glass-theme .memes-grid.memes-grid--compact {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px;
    }

    /* Miniatures plus grandes en vue confort (2 colonnes) */
    body.glass-theme .meme-card .meme-image-container {
        aspect-ratio: 3 / 4;
        min-height: 160px;
    }

    body.glass-theme .meme-thumb-video,
    body.glass-theme .meme-thumb-audio,
    body.glass-theme .nsfw-shield > .meme-thumb-video,
    body.glass-theme .nsfw-shield > .meme-thumb-audio {
        min-height: 100%;
        height: 100%;
        aspect-ratio: auto;
    }

}

/* Toggle densite grille */
.grid-density-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--glass-radius-sm);
    border: 1px solid var(--glass-border-subtle);
    background: var(--glass-surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.grid-density-toggle:hover,
.grid-density-toggle.is-compact,
.shuffle-memes-btn.is-active {
    background: var(--glass-surface-hover);
    border-color: var(--glass-border);
    color: var(--primary-blue);
}

body.glass-theme .filter-nsfw-btn.is-active {
    border-color: rgba(245, 87, 108, 0.55);
    background: rgba(245, 87, 108, 0.16);
    color: #fecdd3;
}

/* ===== CARTES MEME GLASS ===== */
body.glass-theme .meme-card {
    background: var(--glass-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--glass-radius);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.glass-theme .meme-card:hover {
    transform: translateY(-3px);
    border-color: var(--glass-border);
    box-shadow: var(--glass-glow), var(--glass-shadow);
}

body.glass-theme .meme-card .meme-image-container {
    border-radius: var(--glass-radius-sm);
    overflow: hidden;
}

@media (max-width: 900px) {
    body.glass-theme .meme-card .meme-header {
        padding: 0.5rem 0.6rem 0.25rem;
    }

    body.glass-theme .meme-card .meme-title {
        line-height: 1.3;
        margin-bottom: 0.4rem;
        height: auto;
        min-height: 0;
        max-height: none;
        display: block;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        overflow: visible;
        font-size: 0.88rem;
    }
    body.glass-theme .meme-card .meme-title[data-len="short"] { font-size: 0.92rem; }
    body.glass-theme .meme-card .meme-title[data-len="medium"] { font-size: 0.8rem; }
    body.glass-theme .meme-card .meme-title[data-len="long"] { font-size: 0.76rem; }
    body.glass-theme .meme-card .meme-title[data-len="xl"] { font-size: 0.72rem; }

    body.glass-theme .meme-card .user-avatar-img {
        width: 28px;
        height: 28px;
    }

    body.glass-theme .meme-card .username {
        font-size: 0.72rem;
    }

    body.glass-theme .meme-card .post-time {
        font-size: 0.65rem;
    }

    body.glass-theme .meme-card .meme-actions {
        padding: 0.2rem 0.5rem 0.3rem;
    }

    body.glass-theme .meme-card .action-btn {
        font-size: 0.72rem;
        padding: 0.25rem 0.4rem;
    }
}

/* ===== CATEGORIES ===== */
body.glass-theme .category-card,
body.glass-theme .categories-grid .category-item {
    background: var(--glass-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--glass-radius);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.glass-theme .category-card:hover,
body.glass-theme .categories-grid .category-item:hover {
    border-color: var(--glass-border);
    box-shadow: var(--glass-glow);
    transform: translateY(-4px);
}

@media (max-width: 900px) {
    body.glass-theme .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
}

/* ===== MODALS ===== */
body.glass-theme .meme-modal .modal-content,
body.glass-theme .submission-modal-content {
    background: rgba(12, 14, 22, 0.88);
    backdrop-filter: blur(var(--glass-blur-strong));
    -webkit-backdrop-filter: blur(var(--glass-blur-strong));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow), var(--glass-glow);
}

body.glass-theme .meme-modal .modal-overlay,
body.glass-theme .submission-modal {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

@media (max-width: 900px) {
    body.glass-theme .meme-modal .modal-content {
        max-height: calc(100dvh - var(--bottom-nav-total) - 24px);
        margin-bottom: calc(var(--bottom-nav-total) + 8px);
    }
    body.glass-theme .meme-modal .modal-content.is-editing {
        max-height: calc(100dvh - var(--bottom-nav-total) - 10px);
        margin-bottom: calc(var(--bottom-nav-total) + 6px);
        border-radius: 16px 16px 0 0;
    }
}

/* ===== BOUTONS & FORMULAIRES ===== */
body.glass-theme .btn-primary,
body.glass-theme .action-btn.like-btn.liked {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.9), rgba(70, 130, 180, 0.95));
    border: 1px solid rgba(135, 206, 235, 0.35);
    box-shadow: 0 4px 16px rgba(70, 130, 180, 0.25);
}

body.glass-theme .btn-secondary,
body.glass-theme .filter-widget-btn,
body.glass-theme .sort-options select {
    background: var(--glass-surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border-subtle);
    color: var(--text-primary);
    border-radius: var(--glass-radius-sm);
}

body.glass-theme .form-input,
body.glass-theme .form-select,
body.glass-theme .form-textarea,
body.glass-theme .filter-search {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--glass-radius-sm);
    color: var(--text-primary);
}

body.glass-theme .form-input:focus,
body.glass-theme .form-select:focus,
body.glass-theme .form-textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.15);
}

/* ===== HERO & SECTIONS ===== */
body.glass-theme .hero-section {
    background: transparent;
}

body.glass-theme .section-header h2,
body.glass-theme .category-title {
    text-shadow: 0 0 24px rgba(135, 206, 235, 0.15);
}

/* ===== GUIDELINES / 404 ===== */
body.glass-theme .guidelines-content,
body.glass-theme .error-container {
    background: var(--glass-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--glass-radius);
    padding: 2rem;
}

/* ===== FILTRES GLASS ===== */
body.glass-theme .filter-widget-panel {
    background: rgba(12, 14, 22, 0.92);
    backdrop-filter: blur(var(--glass-blur-strong));
    -webkit-backdrop-filter: blur(var(--glass-blur-strong));
    border: 1px solid var(--glass-border);
}

body.glass-theme .meta-chip {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border-subtle);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ===== ACCESSIBILITE + PERF ===== */
@media (prefers-reduced-motion: reduce) {
    body.glass-theme .meme-card,
    body.glass-theme .category-card,
    body.glass-theme .mobile-bottom-nav__item {
        transition: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ===== discover.css ===== */
/* ===== Accueil « Découvrir » : carrousel des derniers mèmes ===== */

.discover-section {
    position: relative;
    padding: 118px 0 2rem;
    overflow: hidden;
}

.discover-section::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 760px;
    height: 340px;
    background: radial-gradient(closest-side, rgba(135, 206, 235, 0.18), transparent);
    pointer-events: none;
}

.discover-head {
    text-align: center;
    margin-bottom: 1.6rem;
}

.discover-title {
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    font-weight: 800;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    line-height: 1.25;
}

.discover-title i {
    color: var(--primary-blue);
}

.discover-subtitle {
    margin: 0.4rem 0 0;
    color: var(--text-secondary);
    font-size: 0.98rem;
}

.discover-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.discover-track {
    display: flex;
    gap: 1.1rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.4rem 0.2rem 1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    cursor: grab;
}

.discover-track.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.discover-track::-webkit-scrollbar {
    display: none;
}

.discover-card {
    position: relative;
    flex: 0 0 auto;
    width: 304px;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
    border: var(--border-light);
    border-radius: 18px;
    background: var(--dark-card);
    color: var(--text-primary);
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.discover-card:hover,
.discover-card:focus-visible {
    transform: translateY(-5px);
    border-color: rgba(135, 206, 235, 0.45);
    box-shadow: var(--shadow-dark);
    outline: none;
}

.discover-card--skeleton {
    height: 228px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 70%);
    background-size: 200% 100%;
    animation: discover-shimmer 1.4s linear infinite;
    cursor: default;
}

@keyframes discover-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.discover-card-media {
    position: relative;
    display: block;
    height: 228px;
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.discover-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
    transition: transform var(--transition-smooth);
}

.discover-card:hover .discover-card-media img {
    transform: scale(1.05);
}

.discover-card-open {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(6, 18, 28, 0.72);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.discover-card-open i {
    color: var(--primary-blue);
    margin-left: 3px;
}

.discover-card:hover .discover-card-open,
.discover-card:focus-visible .discover-card-open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.discover-card-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 1.6rem;
}

.discover-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
}

.discover-empty {
    color: var(--text-secondary);
    padding: 2rem 0;
}

.discover-arrow {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: var(--border-light);
    background: var(--dark-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.discover-arrow:hover {
    background: var(--primary-steel);
    transform: scale(1.06);
}

.discover-cta {
    text-align: center;
    margin-top: 0.6rem;
}

.discover-feed-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 2.2rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-steel), var(--primary-blue));
    color: #06121c;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--glow-blue);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.discover-feed-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-steel);
}

.discover-cta-hint {
    margin: 0.6rem 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .discover-section { padding-top: 96px; }
    .discover-arrow { display: none; }
    .discover-track { cursor: default; }
    .discover-card { width: 232px; }
    .discover-card-media { height: 176px; }
}

/* ===== Flux plein écran ===== */

body.feed-open.has-news-banner {
    padding-top: 0;
}

/* L'assistant IA ne doit pas flotter au-dessus du flux. */
body.feed-open #memehubChatbot,
body.feed-open #cookieBanner,
body.feed-open #newsTicker,
body.feed-open .mobile-bottom-nav,
body.feed-open .site-sidebar {
    display: none !important;
}

.feed-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    justify-content: center;
    background: #05070c;
}

.feed-overlay[hidden] {
    display: none;
}

.feed-stage {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    transition: margin-right var(--transition-smooth), height var(--transition-smooth);
}

.feed-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.9rem 1.2rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent);
}

.feed-modes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.15rem;
    flex: 1 1 auto;
    min-width: 0;
}

.feed-mode {
    margin: 0;
    padding: 0.45rem 0.35rem;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.42);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
    transition: color var(--transition-fast);
    touch-action: manipulation;
}

.feed-mode:hover {
    color: rgba(255, 255, 255, 0.78);
}

.feed-mode.is-active {
    color: #fff;
}

.feed-topbar-spacer {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    pointer-events: none;
}

.feed-close {
    pointer-events: auto;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.feed-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

.feed-scroller {
    position: relative;
    z-index: 1;
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    outline: none;
}

.feed-scroller::-webkit-scrollbar {
    display: none;
}

.feed-item {
    position: relative;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Flou de remplissage quand le média ne couvre pas tout l'écran. */
.feed-backdrop {
    position: absolute;
    inset: -8%;
    background-position: center;
    background-size: cover;
    filter: blur(38px) brightness(0.45) saturate(1.2);
    transform: scale(1.08);
    pointer-events: none;
}

.feed-backdrop--plain {
    background: radial-gradient(circle at 50% 40%, #1b2333, #05070c);
    filter: none;
}

.feed-frame {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-frame.has-ratio {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.feed-media-el {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

/* Zone cliquable qui couvre le média : un clic met en pause / relance. */
.feed-media-hit {
    position: absolute;
    inset: 0;
    z-index: 1;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.feed-frame--audio .feed-media-el {
    object-fit: cover;
    border-radius: 18px;
}

/* ----- Lecteur maison ----- */

.feed-player-big {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.7rem;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.feed-item.is-playing .feed-player-big {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(1.2);
}

.feed-player {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.9rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent);
    pointer-events: auto;
}

.feed-player-btn {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
}

.feed-player-btn:hover {
    background: rgba(255, 255, 255, 0.26);
}

.feed-player-track {
    position: relative;
    flex: 1 1 auto;
    height: 22px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.feed-player-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 9px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
}

.feed-player-progress {
    position: relative;
    height: 4px;
    width: 0;
    border-radius: 999px;
    background: var(--primary-blue);
    transition: height var(--transition-fast);
}

.feed-player-progress::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%) scale(0);
    transition: transform var(--transition-fast);
}

.feed-player-track:hover .feed-player-progress::after,
.feed-player-track.is-seeking .feed-player-progress::after {
    transform: translateY(-50%) scale(1);
}

.feed-player-track.is-seeking .feed-player-progress,
.feed-player-track:hover .feed-player-progress {
    height: 6px;
}

.feed-player-time {
    flex: 0 0 auto;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    min-width: 2.2rem;
    font-variant-numeric: tabular-nums;
}

.feed-volume {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    position: relative;
    z-index: 7;
    pointer-events: auto;
}

.feed-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 110px;
    height: 28px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    accent-color: #fff;
}

.feed-volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.feed-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.feed-volume-slider::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.feed-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: none;
}

@media (max-width: 900px) {
    .feed-volume-slider {
        width: 72px;
        height: 24px;
    }
}

/* ----- Légende dans le média ----- */

.feed-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    pointer-events: none;
    padding: 2.5rem 5.5rem 1rem 1.1rem;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.35) 55%, transparent);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.feed-frame--video .feed-caption,
.feed-frame--audio .feed-caption {
    padding-bottom: 3.2rem;
}

.feed-item-title {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.feed-item-desc {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
    max-height: 40vh;
    overflow-y: auto;
    scrollbar-width: none;
}

.feed-item-desc::-webkit-scrollbar {
    display: none;
}

/* Une fois dépliée, la description doit pouvoir être parcourue. */
.feed-item-desc.is-expanded {
    pointer-events: auto;
}

.feed-desc-more {
    margin-left: 0.35rem;
    padding: 0;
    border: none;
    background: none;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    pointer-events: auto;
    white-space: nowrap;
}

.feed-desc-more:hover {
    color: var(--primary-blue);
}

/* ----- Colonne d'actions ----- */

.feed-rail {
    position: absolute;
    right: 1rem;
    bottom: 5.4rem;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
}

.feed-rail-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.feed-act {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.feed-act:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: scale(1.06);
}

.feed-act.is-liked {
    color: var(--accent-pink);
    border-color: rgba(236, 72, 153, 0.55);
}

.feed-act-count {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.feed-status {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.feed-status[hidden] {
    display: none;
}

/* ===== Panneaux (commentaires, partage) ===== */

.feed-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100%;
    z-index: 6;
    display: flex;
    flex-direction: column;
    background: #10141d;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
}

.feed-panel.is-open {
    transform: translateX(0);
}

.feed-panel.is-dragging {
    transition: none;
}

.feed-panel-handle {
    display: none;
}

.feed-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-panel-head h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.feed-panel-head span {
    color: var(--text-muted);
    font-weight: 500;
}

.feed-panel-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    cursor: pointer;
}

.feed-comments-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feed-comment {
    display: flex;
    gap: 0.7rem;
}

.feed-comment img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.feed-comment-head {
    margin: 0 0 0.15rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.feed-comment-head time {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.feed-comment-text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.45;
    word-break: break-word;
}

.feed-comments-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin: auto 0;
}

.feed-comment-form {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-comment-form textarea {
    flex: 1 1 auto;
    min-height: 40px;
    max-height: 120px;
    resize: none;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    border: var(--border-light);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
}

.feed-comment-form textarea:focus {
    outline: none;
    border-color: rgba(135, 206, 235, 0.5);
}

.feed-comment-form button {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary-steel);
    color: #fff;
    cursor: pointer;
}

.feed-comment-form button:hover {
    background: var(--primary-blue);
    color: #06121c;
}

/* ----- Contenu du panneau partage ----- */

.feed-share-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.feed-share-list button {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 0.9rem;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.feed-share-list button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.feed-share-list button i {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(135, 206, 235, 0.15);
    color: var(--primary-blue);
    flex: 0 0 auto;
}

.feed-share-list button span {
    display: flex;
    flex-direction: column;
}

.feed-share-list button small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ----- Desktop : colonne format téléphone, centrée ----- */

@media (min-width: 901px) {
    .feed-stage {
        flex: 0 0 auto;
        width: min(420px, 100%);
        max-width: 420px;
        height: 100%;
        background: #05070c;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 80px rgba(0, 0, 0, 0.45);
    }

    /* Le panneau commentaires/partage libère la colonne à gauche, sans l’étirer. */
    body.feed-panel-open .feed-overlay {
        padding-right: 380px;
        box-sizing: border-box;
    }
}

/* ----- Mobile : feuille basse, le mème se réduit au-dessus ----- */

@media (max-width: 900px) {
    .feed-caption {
        padding: 2.2rem 4.6rem 0.9rem 0.9rem;
    }

    .feed-rail {
        right: 0.6rem;
        bottom: 5rem;
        gap: 0.9rem;
    }

    .feed-act {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    body.feed-panel-open .feed-stage {
        height: 38dvh;
    }

    .feed-panel {
        top: auto;
        bottom: 0;
        width: 100%;
        height: 62dvh;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 18px 18px 0 0;
        transform: translateY(100%);
    }

    .feed-panel.is-open {
        transform: translateY(0);
    }

    .feed-panel-handle {
        display: block;
        width: 44px;
        height: 4px;
        margin: 0.6rem auto 0.2rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.28);
        cursor: grab;
        touch-action: none;
    }

    .feed-panel-head {
        padding: 0.7rem 1rem;
        touch-action: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feed-stage,
    .feed-panel {
        transition: none;
    }
}


/* ===== generator.css ===== */
/* Générateur de mèmes */
html, body.generator-page {
    background: var(--dark-bg, #050508);
    color: var(--text-primary, #e2e8f0);
    min-height: 100vh;
}

.gen-main {
    padding: 7.2rem 0 4rem;
}

.gen-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.gen-hero h1 {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    margin: 0 0 0.4rem;
}

.gen-hero p {
    color: var(--text-secondary, #94a3b8);
    margin: 0 0 1.4rem;
    max-width: 780px;
    line-height: 1.55;
}

/* ------------------------------------------------------------- Barre d'outils */

.gen-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem;
    margin-bottom: 1.2rem;
    background: rgba(20, 26, 36, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    backdrop-filter: blur(10px);
}

.gen-toolbar-sep {
    flex: 1 1 auto;
}

.gen-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #1b2331;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.gen-btn:hover { background: #243047; border-color: #87CEEB; }
.gen-btn:active { transform: translateY(1px); }

.gen-btn-primary {
    background: linear-gradient(135deg, #4f9fd8, #87CEEB);
    color: #06121c;
    border-color: transparent;
}

.gen-btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, #4f9fd8, #87CEEB); }

.gen-btn-ok {
    background: #16a34a;
    border-color: transparent;
    color: #fff;
}

.gen-btn-ok:hover { background: #15803d; }

.gen-btn-ghost {
    background: transparent;
    color: #94a3b8;
}

.gen-btn-small {
    padding: 0.45rem 0.7rem;
    font-size: 0.82rem;
}

.gen-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gen-btn.is-on {
    background: #87CEEB;
    color: #06121c;
    border-color: transparent;
}

/* ------------------------------------------------------------------- Layout */

.gen-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.25rem;
    align-items: start;
}

.gen-stage {
    background: #0c1017;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    padding: 1rem;
    min-width: 0;
}

.gen-canvas-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        linear-gradient(45deg, #12161f 25%, transparent 25%) 0 0/24px 24px,
        linear-gradient(-45deg, #12161f 25%, transparent 25%) 0 12px/24px 24px,
        linear-gradient(45deg, transparent 75%, #12161f 75%) 12px -12px/24px 24px,
        linear-gradient(-45deg, transparent 75%, #12161f 75%) -12px 0/24px 24px,
        #0f141d;
    border-radius: 12px;
    padding: 0.75rem;
    min-height: 320px;
}

#genCanvas {
    max-width: 100%;
    max-height: 72vh;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    touch-action: none;
    cursor: move;
}

#genCanvas.is-drawing { cursor: crosshair; }

.gen-crop-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
    padding: 0.65rem 0.8rem;
    background: rgba(135, 206, 235, 0.1);
    border: 1px solid rgba(135, 206, 235, 0.35);
    border-radius: 10px;
    font-size: 0.88rem;
}

/* Sans cette règle, le display: flex ci-dessus l'emporterait sur l'attribut hidden. */
.gen-crop-bar[hidden] {
    display: none;
}

.gen-hint {
    margin: 0.8rem 0 0;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.5;
}

.gen-shortcuts {
    margin-top: 0.45rem;
    font-size: 0.78rem;
}

.gen-shortcuts kbd {
    display: inline-block;
    padding: 0.05rem 0.35rem;
    border-radius: 5px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #161d29;
    color: #cbd5f5;
    font-family: inherit;
    font-size: 0.74rem;
}

/* ------------------------------------------------------------------ Panneau */

.gen-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 112px);
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.25rem;
}

.gen-panel > * { flex: 0 0 auto; }

.gen-panel::-webkit-scrollbar { width: 8px; }
.gen-panel::-webkit-scrollbar-thumb { background: #1f2937; border-radius: 8px; }

.gen-section {
    background: #141a24;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
}

.gen-section > h2 {
    margin: 0;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.gen-section > h2::after {
    content: '\f077';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    font-size: 0.7rem;
    color: #64748b;
}

.gen-section.is-collapsed > h2::after { content: '\f078'; }
.gen-section.is-collapsed .gen-section-body { display: none; }

.gen-section-body {
    padding: 0 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

/* En colonne, une base flex est une hauteur : les enfants gardent leur taille naturelle. */
.gen-section-body > * { flex: 0 0 auto; }

.gen-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gen-label {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 600;
}

.gen-empty {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.5;
}

.gen-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.84rem;
    color: #cbd5e1;
    cursor: pointer;
}

.gen-slider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: #94a3b8;
    flex: 0 0 auto;
    min-width: 0;
}

/* Uniquement dans une rangée horizontale, le curseur peut occuper l'espace restant. */
.gen-row > .gen-slider,
.gen-text-row > .gen-slider {
    flex: 1 1 160px;
}

.gen-slider input[type="range"] {
    flex: 1;
    accent-color: #87CEEB;
    min-width: 90px;
}

.gen-effect-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    min-width: 0;
}

.gen-effect-row > .gen-slider {
    flex: 1 1 auto;
}

.gen-reset-dot {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #1b2331;
    color: #94a3b8;
    font-size: 0.72rem;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.gen-reset-dot:hover {
    color: #87CEEB;
    border-color: rgba(135, 206, 235, 0.6);
    background: #223044;
}

.gen-color {
    display: inline-flex;
    width: 38px;
    height: 34px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.3);
    flex-shrink: 0;
}

.gen-color input[type="color"] {
    width: 150%;
    height: 150%;
    margin: -25%;
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
}

.gen-swatch {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    cursor: pointer;
}

.gen-toggle-group {
    display: inline-flex;
    gap: 0.3rem;
}

.gen-toggle-group.gen-wrap { flex-wrap: wrap; }

.gen-toggle-group button {
    background: #1b2331;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    padding: 0.42rem 0.6rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.gen-toggle-group button.is-on {
    background: #87CEEB;
    color: #06121c;
    border-color: transparent;
}

/* ------------------------------------------------------------------ Calques */

.gen-layers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gen-layer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #0f141d;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    padding: 0.45rem;
}

.gen-layer img {
    width: 56px;
    height: 46px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.gen-layer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.gen-layer-actions button {
    background: #1b2331;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 7px;
    width: 30px;
    height: 28px;
    font-size: 0.75rem;
    cursor: pointer;
}

.gen-layer-actions button:hover { background: #243047; color: #87CEEB; }

/* -------------------------------------------------------------------- Textes */

.gen-texts {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.gen-text-card {
    background: #0f141d;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gen-text-card > * { flex: 0 0 auto; }

.gen-text-card.is-active {
    border-color: #87CEEB;
    box-shadow: 0 0 0 1px rgba(135, 206, 235, 0.35);
}

.gen-text-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
}

.gen-text-head button {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 0.85rem;
}

.gen-text-card textarea,
.gen-text-card select {
    width: 100%;
    box-sizing: border-box;
    background: #0b0f17;
    color: #fff;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    font: inherit;
    font-size: 0.86rem;
    resize: vertical;
}

.gen-text-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.gen-text-row select { flex: 1 1 130px; width: auto; }

/* ------------------------------------------------------------------ Stickers */

.gen-sticker-palette {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
}

.gen-sticker-btn {
    background: #0f141d;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 9px;
    padding: 0.35rem;
    cursor: pointer;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gen-sticker-btn:hover { border-color: #87CEEB; }

.gen-sticker-btn img {
    max-width: 100%;
    max-height: 100%;
}

.gen-sticker-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gen-sticker-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #0f141d;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 9px;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    color: #cbd5e1;
}

.gen-sticker-row.is-active { border-color: #87CEEB; }
.gen-sticker-row img { width: 32px; height: 28px; object-fit: contain; }
.gen-sticker-row span { flex: 1; }
.gen-sticker-row input[type="range"] { width: 70px; accent-color: #87CEEB; }

.gen-sticker-row button {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
}

.gen-sticker-row button:hover { color: #87CEEB; }

/* ------------------------------------------------------- Sélecteur de meme */

.gen-picker {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.gen-picker.is-open { display: flex; }

.gen-picker-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3, 6, 12, 0.82);
    backdrop-filter: blur(4px);
}

.gen-picker-box {
    position: relative;
    width: min(980px, 100%);
    height: min(88vh, 900px);
    display: flex;
    flex-direction: column;
    background: #101620;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    overflow: hidden;
}

.gen-picker-box > header,
.gen-picker-box > .gen-picker-filters,
.gen-picker-box > footer { flex: 0 0 auto; }

.gen-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.gen-picker-head h3 { margin: 0; font-size: 1.05rem; }

.gen-picker-head button {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
}

.gen-picker-filters {
    display: flex;
    gap: 0.6rem;
    padding: 0.85rem 1.1rem;
    flex-wrap: wrap;
}

.gen-picker-filters input,
.gen-picker-filters select {
    background: #0b0f17;
    color: #fff;
    border: 1px solid #334155;
    border-radius: 9px;
    padding: 0.55rem 0.7rem;
    font: inherit;
    font-size: 0.88rem;
}

.gen-picker-filters input { flex: 1 1 220px; }

.gen-picker-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    gap: 0.6rem;
    padding: 0 1.1rem 1rem;
}

.gen-picker-grid::-webkit-scrollbar { width: 10px; }
.gen-picker-grid::-webkit-scrollbar-thumb { background: #263041; border-radius: 8px; }

.gen-picker-card {
    background: #0f141d;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    color: #cbd5e1;
}

.gen-picker-card:hover { border-color: #87CEEB; }

.gen-picker-card img {
    width: 100%;
    height: 108px;
    object-fit: cover;
    display: block;
    background: #0b0f17;
}

.gen-picker-card span {
    display: block;
    padding: 0.4rem 0.5rem;
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gen-picker-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.8rem 1.1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: #64748b;
    font-size: 0.82rem;
}

.gen-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #1b2331;
    color: #87CEEB;
    border: 1px dashed rgba(135, 206, 235, 0.5);
    border-radius: 9px;
    padding: 0.55rem 0.8rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.gen-upload-btn:hover { background: #243047; }

.gen-canvas-wrap.is-dropping {
    outline: 2px dashed #87CEEB;
    outline-offset: -6px;
}

/* -------------------------------------------------------------------- Toast */

.gen-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    background: #16a34a;
    color: #fff;
    padding: 0.7rem 1.1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1400;
    max-width: 90vw;
    text-align: center;
}

.gen-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.gen-toast.is-error { background: #dc2626; }

/* ------------------------------------------------------------------- Mobile */

@media (max-width: 1080px) {
    .gen-layout { grid-template-columns: 1fr; }
    .gen-panel {
        position: static;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 640px) {
    .gen-main { padding: 6.2rem 0 5.5rem; }
    .gen-shell { padding: 0 0.9rem; }
    .gen-toolbar {
        padding: 0.6rem;
        gap: 0.4rem;
    }
    .gen-toolbar .gen-btn {
        flex: 1 1 calc(50% - 0.4rem);
        justify-content: center;
        padding: 0.55rem 0.5rem;
        font-size: 0.82rem;
    }
    .gen-toolbar-sep { display: none; }
    .gen-stage { padding: 0.6rem; }
    .gen-canvas-wrap { padding: 0.4rem; }
    #genCanvas { max-height: 56vh; }
    .gen-sticker-palette { grid-template-columns: repeat(5, 1fr); }
    .gen-picker { padding: 0.6rem; }
    .gen-picker-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}


/* ===== classement.css ===== */
/* Page Classement : podium + liste */

html, body.ranking-page {
    background: var(--dark-bg, #050508);
    color: var(--text-primary, #e2e8f0);
    min-height: 100vh;
}

.ranking-main {
    padding: 7.5rem 0 4rem;
    min-height: 100vh;
}

.ranking-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.ranking-hero {
    text-align: center;
    margin-bottom: 1.75rem;
}

.ranking-hero h1 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    margin: 0 0 0.4rem;
}

.ranking-hero h1 i {
    color: #ffd76a;
    margin-right: 0.35rem;
}

.ranking-hero p {
    color: var(--text-secondary, #94a3b8);
    margin: 0;
}

.ranking-loading,
.ranking-empty {
    text-align: center;
    color: var(--text-secondary, #94a3b8);
    padding: 2rem 1rem;
}

.ranking-me {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 auto 1.5rem;
    max-width: 520px;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    background: var(--glass-surface, rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(135, 206, 235, 0.28);
}

.ranking-me[hidden] {
    display: none !important;
}

.ranking-me a {
    color: inherit;
    text-decoration: none;
    font-weight: 650;
}

.ranking-me a:hover {
    color: #87ceeb;
}

.ranking-podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    align-items: end;
    gap: 0.85rem;
    margin-bottom: 2rem;
    min-height: 12rem;
}

.ranking-podium-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    padding: 1.1rem 0.7rem 1.2rem;
    border-radius: 18px;
    background: var(--glass-surface, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--glass-border-subtle, rgba(255, 255, 255, 0.08));
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.ranking-podium-card:hover {
    transform: translateY(-3px);
}

.ranking-podium-card.is-gold {
    order: 2;
    padding-top: 1.6rem;
    padding-bottom: 1.55rem;
    border-color: rgba(255, 215, 106, 0.55);
    box-shadow: 0 10px 36px rgba(255, 215, 106, 0.18);
}

.ranking-podium-card.is-silver {
    order: 1;
    border-color: rgba(192, 200, 216, 0.45);
}

.ranking-podium-card.is-bronze {
    order: 3;
    border-color: rgba(205, 127, 50, 0.5);
}

.ranking-podium-place {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.55rem;
}

.ranking-podium-card.is-gold .ranking-podium-place { color: #ffd76a; }
.ranking-podium-card.is-silver .ranking-podium-place { color: #c9d4e3; }
.ranking-podium-card.is-bronze .ranking-podium-place { color: #e0a46a; }

.ranking-podium-card img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid currentColor;
}

.ranking-podium-card.is-gold img {
    width: 92px;
    height: 92px;
    color: #ffd76a;
}

.ranking-podium-card.is-silver img { color: #c9d4e3; }
.ranking-podium-card.is-bronze img { color: #cd7f32; }

.ranking-podium-name {
    margin-top: 0.7rem;
    font-weight: 750;
    font-size: 1.02rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-podium-card.is-gold .ranking-podium-name { font-size: 1.15rem; }

.ranking-podium-points {
    margin-top: 0.2rem;
    color: var(--text-secondary, #94a3b8);
    font-variant-numeric: tabular-nums;
    font-size: 0.92rem;
}

.ranking-podium-card .certif-badge {
    color: #43b581;
    margin-left: 0.2rem;
    font-size: 0.85rem;
}

.ranking-board {
    border: 1px solid var(--glass-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    overflow: hidden;
    background: var(--glass-surface, rgba(255, 255, 255, 0.04));
}

.ranking-board-head,
.ranking-row {
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr) 6.5rem;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem 1rem;
}

.ranking-board-head {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary, #94a3b8);
    border-bottom: 1px solid var(--glass-border-subtle, rgba(255, 255, 255, 0.08));
}

.ranking-board-head span:last-child,
.ranking-row-points {
    text-align: right;
}

.ranking-row {
    color: inherit;
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.12s ease;
}

.ranking-row:hover {
    background: rgba(135, 206, 235, 0.08);
}

.ranking-row.is-me {
    background: rgba(135, 206, 235, 0.12);
}

.ranking-row-rank {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--text-secondary, #94a3b8);
}

.ranking-row-user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.ranking-row-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ranking-row-user span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 650;
}

.ranking-row-points {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.ranking-rules {
    margin: 0 0 1.75rem;
    border-radius: 14px;
    border: 1px solid var(--glass-border-subtle, rgba(255, 255, 255, 0.08));
    background: var(--glass-surface, rgba(255, 255, 255, 0.04));
}

.ranking-rules summary {
    cursor: pointer;
    padding: 0.95rem 1.1rem;
    font-weight: 650;
}

.ranking-rules table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 0.4rem;
}

.ranking-rules th,
.ranking-rules td {
    text-align: left;
    padding: 0.55rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.92rem;
}

.ranking-rules th:last-child,
.ranking-rules td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ranking-rules td:last-child {
    font-weight: 700;
    color: #ffd76a;
}

@media (max-width: 700px) {
    .ranking-podium {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .ranking-podium-card.is-gold,
    .ranking-podium-card.is-silver,
    .ranking-podium-card.is-bronze {
        order: 0;
    }

    .ranking-podium-card.is-gold { order: -1; }

    .ranking-board-head,
    .ranking-row {
        grid-template-columns: 3.2rem minmax(0, 1fr) 5.2rem;
        padding: 0.65rem 0.8rem;
    }
}


/* ===== profil.css ===== */
/* Page profil : favoris, catégories privées, mèmes, stats, historique, réglages */

html {
    background: var(--dark-bg, #050508);
}

body.profile-page {
    background: var(--dark-bg, #050508);
    min-height: 100vh;
}

.profile-main {
    padding: 110px 0 4rem;
    min-height: 100vh;
}

/* Les onglets vides ne doivent pas faire s'effondrer la page */
.profile-panel {
    min-height: 45vh;
}

.profile-gate {
    max-width: 520px;
    margin: 4rem auto;
    text-align: center;
    background: var(--dark-surface, #141a24);
    border: 1px solid rgba(135, 206, 235, 0.18);
    border-radius: 18px;
    padding: 2.5rem 2rem;
}

.profile-gate i {
    font-size: 2.5rem;
    color: #5865f2;
    margin-bottom: 1rem;
}

.profile-gate h1 {
    font-size: 1.5rem;
    margin: 0 0 0.6rem;
}

.profile-gate p {
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 1.5rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-left: auto;
}

.profile-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.profile-actions .btn[hidden] {
    display: none !important;
}

.profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(135, 206, 235, 0.35);
}

.profile-identity h1 {
    margin: 0;
    font-size: 1.7rem;
}

.profile-identity .certif-badge {
    color: #43b581;
    font-size: 1rem;
    vertical-align: middle;
}

body.profile-public .profile-tab[data-owner-only],
body.profile-public .profile-panel[data-owner-only],
body.profile-public .profile-owner-only {
    display: none !important;
}

.profile-identity p {
    margin: 0.3rem 0 0;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.92rem;
}

.profile-bio {
    max-width: 42rem;
    white-space: pre-wrap;
    line-height: 1.45;
    color: #cbd5e1 !important;
}

.profile-x-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.65rem;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.profile-x-link:hover {
    color: var(--primary-blue, #87ceeb);
}

.profile-x-icon {
    width: 1.05em;
    height: 1.05em;
    flex-shrink: 0;
}

.profile-x-link[hidden] {
    display: none !important;
}

.profile-badge-group {
    margin-bottom: 1.75rem;
}

.profile-badge-group h3 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary, #94a3b8);
    font-weight: 600;
}

.profile-badges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.profile-badge {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(135, 206, 235, 0.18);
    background: rgba(15, 20, 29, 0.7);
}

.profile-badge.is-earned {
    border-color: rgba(135, 206, 235, 0.38);
}

.profile-badge.is-locked {
    opacity: 0.48;
    filter: grayscale(0.7);
}

.profile-badge-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.profile-badge-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.profile-badge-hint {
    margin-top: 0.15rem;
    font-size: 0.8rem;
    color: var(--text-secondary, #94a3b8);
}

.profile-badge-progress {
    margin-top: 0.45rem;
    height: 4px;
    border-radius: 99px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.profile-badge-progress span {
    display: block;
    height: 100%;
    background: var(--primary-blue, #87ceeb);
}

.profile-badge-count {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary, #94a3b8);
}

.profile-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding-bottom: 0.75rem;
    margin-bottom: 1.75rem;
}

.profile-tab {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary, #94a3b8);
    padding: 0.55rem 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-tab:hover {
    color: #e2e8f0;
    background: rgba(135, 206, 235, 0.08);
}

.profile-tab.is-active {
    color: #fff;
    background: rgba(135, 206, 235, 0.16);
    border-color: rgba(135, 206, 235, 0.4);
}

.profile-panel {
    display: none;
}

.profile-panel.is-active {
    display: block;
}

.profile-panel:not(.is-active) {
    min-height: 0;
}

.profile-panel-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.profile-panel-head h2,
.profile-panel-head h3 {
    margin: 0;
    font-size: 1.25rem;
}

.profile-panel-head p {
    margin: 0;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.9rem;
    flex: 1;
    min-width: 220px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
}

.profile-item {
    position: relative;
    background: var(--dark-surface, #141a24);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .profile-item:hover {
        border-color: rgba(135, 206, 235, 0.45);
    }
}

.profile-item-media {
    aspect-ratio: 1 / 1;
    background: #0e131b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-item-media.is-blurred img {
    filter: blur(18px);
}

.profile-item-media i {
    font-size: 1.8rem;
    color: #475569;
}

.profile-item-body {
    padding: 0.65rem 0.75rem;
}

.profile-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-item-sub {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-secondary, #94a3b8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(12, 16, 24, 0.78);
    color: #e2e8f0;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.15s ease;
    z-index: 2;
    touch-action: manipulation;
}

@media (hover: hover) {
    .profile-item-remove {
        opacity: 0;
        pointer-events: none;
    }
    .profile-item:hover .profile-item-remove {
        opacity: 1;
        pointer-events: auto;
    }
    .profile-item-remove:hover {
        color: #f87171;
    }
}

.profile-status {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.profile-status.approved { background: rgba(16, 185, 129, 0.16); color: #34d399; }
.profile-status.pending { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.profile-status.rejected { background: rgba(244, 63, 94, 0.16); color: #fb7185; }

.profile-empty {
    color: var(--text-secondary, #94a3b8);
    font-style: italic;
    padding: 1.5rem 0;
}

.profile-notifications {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.profile-notification {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: var(--dark-surface, #141a24);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.profile-notification.is-unread {
    border-color: rgba(88, 101, 242, 0.55);
    background: rgba(88, 101, 242, 0.09);
}

.profile-notification-icon {
    flex-shrink: 0;
    font-size: 1.05rem;
    line-height: 1.5;
}

.profile-notification-body {
    min-width: 0;
}

.profile-notification-body p {
    margin: 0;
    color: var(--text-primary, #e2e8f0);
    overflow-wrap: anywhere;
}

.profile-notification-body time {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary, #94a3b8);
}

.profile-new-collection {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.profile-new-collection input {
    flex: 1;
    min-width: 220px;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f141d;
    color: #fff;
}

.profile-collections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}

.profile-collection {
    background: var(--dark-surface, #141a24);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    padding: 0.9rem;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .profile-collection:hover {
        border-color: rgba(135, 206, 235, 0.45);
    }
}

.profile-collection-covers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    aspect-ratio: 2 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #0e131b;
    margin-bottom: 0.7rem;
}

.profile-collection-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-collection-covers img.is-blurred {
    filter: blur(14px);
}

.profile-collection-covers .cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}

.profile-collection-name {
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.profile-collection-count {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.82rem;
    font-weight: 500;
}

.profile-collection-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.profile-collection-actions button {
    background: none;
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text-secondary, #94a3b8);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.profile-collection-actions button:hover {
    color: #fff;
    border-color: rgba(135, 206, 235, 0.5);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.9rem;
}

.profile-stat {
    background: var(--dark-surface, #141a24);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    padding: 1rem 1.1rem;
}

.profile-stat-value {
    font-size: 1.7rem;
    font-weight: 750;
}

.profile-stat-label {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.profile-settings {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    max-width: 560px;
}

.profile-switch {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.profile-switch input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
}

.profile-switch strong {
    display: block;
}

.profile-switch em,
.profile-field em {
    display: block;
    margin-top: 0.2rem;
    font-style: normal;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.85rem;
}

.profile-field span {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.profile-field input,
.profile-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f141d;
    color: #fff;
    font-family: inherit;
    resize: vertical;
}

.profile-settings-feedback {
    font-size: 0.88rem;
    color: #34d399;
}

.profile-settings-feedback.is-error {
    color: #fb7185;
}

.profile-danger {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    max-width: 560px;
}

.profile-danger h3 {
    margin: 0 0 0.9rem;
    font-size: 1.1rem;
}

.profile-danger-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.btn-danger {
    background: #be123c;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #9f1239;
}

.profile-danger-hint {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-secondary, #94a3b8);
}

/* Fiche mème du profil : pas d’auteur / date (déjà dans le contexte du compte). */
.profile-page .meme-modal .modal-user {
    display: none;
}

@media (max-width: 640px) {
    .profile-main { padding-top: 90px; }
    .profile-header { gap: 1rem; }
    .profile-avatar { width: 64px; height: 64px; }
    .profile-identity h1 { font-size: 1.35rem; }
    .profile-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}


/* ===== support.css ===== */
/* Pages FAQ / Contact / Signaler */
html, body.support-page {
    background: var(--dark-bg, #050508);
    color: var(--text-primary, #e2e8f0);
    min-height: 100vh;
}

.support-main {
    padding: 7.5rem 0 4rem;
    min-height: 100vh;
}

.support-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.support-hero {
    margin-bottom: 2rem;
}

.support-hero h1 {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    margin: 0 0 0.45rem;
}

.support-hero p {
    color: var(--text-secondary, #94a3b8);
    margin: 0;
    line-height: 1.55;
}

.support-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.support-links a {
    color: #87CEEB;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid rgba(135, 206, 235, 0.3);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

.support-links a:hover,
.support-links a.is-current {
    background: rgba(135, 206, 235, 0.12);
    border-color: #87CEEB;
}

.support-card {
    background: var(--dark-surface, #141a24);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    padding: 1.25rem 1.35rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.faq-item {
    background: var(--dark-surface, #141a24);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    overflow: hidden;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 0.95rem 1.1rem;
    font-weight: 650;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    color: #87CEEB;
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.faq-item[open] summary::after { content: '–'; }

.faq-item .faq-body {
    padding: 0 1.1rem 1.05rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.faq-item .faq-body a { color: #87CEEB; }

.support-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.support-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.support-field span,
.support-field label {
    font-size: 0.88rem;
    color: #cbd5e1;
    font-weight: 600;
}

.support-field em {
    font-style: normal;
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.8rem;
}

.support-field input,
.support-field select,
.support-field textarea {
    width: 100%;
    box-sizing: border-box;
    background: #0f141d;
    color: #fff;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    font: inherit;
}

.support-field textarea { min-height: 140px; resize: vertical; }

.support-anon {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.support-user-chip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(135, 206, 235, 0.08);
    border: 1px solid rgba(135, 206, 235, 0.22);
}

.support-user-chip img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.support-user-chip a {
    color: #87CEEB;
    font-size: 0.82rem;
}

.support-feedback {
    min-height: 1.2rem;
    font-size: 0.9rem;
}

.support-feedback.is-ok { color: #4ade80; }
.support-feedback.is-error { color: #f87171; }

.support-hidden { display: none !important; }

.support-target {
    font-size: 0.9rem;
    color: #94a3b8;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.support-target a { color: #87CEEB; }

@media (max-width: 640px) {
    .support-main { padding: 6.2rem 1rem 3rem; }
    .support-anon { grid-template-columns: 1fr; }
    .support-card { padding: 1rem; }
}


/* ===== chatbot-widget.css ===== */
/* Widget chatbot — styles */

/* Sur catégorie : pas de bulle assistant (le panel peut encore s’ouvrir via la recherche). */
body.category-page .chatbot-widget__toggle {
  display: none !important;
}

/* Pendant la consultation d’un mème : masquer tout le widget. */
body:has(.meme-modal.show) #memehubChatbot {
  display: none !important;
}

/* Remonter en haut — même emplacement que le bouton assistant IA */
.scroll-top-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--bottom-nav-total, 56px) + 0.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 100001;
  width: 3.5rem;
  height: 3.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(18, 22, 32, 0.92);
  color: #e2e8f0;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(135, 206, 235, 0.28);
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.scroll-top-fab.is-visible {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.scroll-top-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  color: #87CEEB;
}

body:has(.meme-modal.show) .scroll-top-fab {
  display: none !important;
}

@media (min-width: 901px) {
  .scroll-top-fab {
    bottom: 1.25rem;
  }
}

.chatbot-widget {
  position: fixed;
  right: 1rem;
  /* Se cale au-dessus de la barre de navigation mobile. */
  bottom: calc(var(--bottom-nav-total, 56px) + 0.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 100001;
  font-family: Inter, system-ui, sans-serif;
}

.chatbot-widget__toggle {
  width: 3.5rem;
  height: 3.5rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c5cff, #5b8def);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chatbot-widget__toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.chatbot-widget__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(22rem, calc(100vw - 2rem));
  height: min(32rem, calc(100vh - 8rem));
  display: none;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(18, 18, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

.chatbot-widget.is-open .chatbot-widget__panel {
  display: flex;
}

.chatbot-widget__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chatbot-widget__header strong {
  display: block;
  color: #fff;
  font-size: 1rem;
}

.chatbot-widget__header p {
  margin: 0.25rem 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  line-height: 1.35;
}

.chatbot-widget__close {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
}

.chatbot-widget__messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.chatbot-msg {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 100%;
  width: 100%;
}

.chatbot-msg--user {
  align-self: flex-end;
  max-width: 92%;
}

.chatbot-msg--assistant {
  align-self: flex-start;
}

.chatbot-msg__bubble {
  padding: 0.65rem 0.8rem;
  border-radius: 0.9rem;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.chatbot-msg--user .chatbot-msg__bubble {
  background: #5b8def;
  color: #fff;
  border-bottom-right-radius: 0.2rem;
}

.chatbot-msg--assistant .chatbot-msg__bubble {
  background: rgba(255, 255, 255, 0.08);
  color: #f2f2f7;
  border-bottom-left-radius: 0.2rem;
}

.chatbot-msg--typing .chatbot-msg__bubble {
  opacity: 0.7;
  font-style: italic;
}

.chatbot-results-hint {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.chatbot-msg__cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}

.chatbot-meme-card {
  display: flex;
  gap: 0.65rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.chatbot-meme-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chatbot-meme-card__media {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
  flex-shrink: 0;
  border-radius: 0.55rem;
  overflow: hidden;
  background: #111;
}

.chatbot-meme-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chatbot-meme-card__play {
  position: absolute;
  right: 0.25rem;
  bottom: 0.25rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  pointer-events: none;
}

.chatbot-meme-card__play--audio {
  font-size: 0.5rem;
}

.chatbot-meme-card--nsfw .chatbot-meme-card__media img {
  filter: blur(12px);
}

.chatbot-meme-card__nsfw {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}

.chatbot-meme-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.chatbot-meme-card__body strong {
  font-size: 0.84rem;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chatbot-meme-card__desc {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chatbot-meme-card__cat {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
}

.chatbot-load-more {
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(91, 141, 239, 0.45);
  border-radius: 999px;
  background: rgba(91, 141, 239, 0.12);
  color: #9ec5ff;
  font-size: 0.78rem;
  cursor: pointer;
}

.chatbot-load-more:hover {
  background: rgba(91, 141, 239, 0.22);
}

.chatbot-widget__form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chatbot-widget__form input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  outline: none;
}

.chatbot-widget__form input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.chatbot-widget__form button {
  width: 2.6rem;
  height: 2.6rem;
  border: none;
  border-radius: 999px;
  background: #5b8def;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.chatbot-widget__form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* La barre mobile disparaît au-delà de 900px : le widget reprend sa place basse. */
@media (min-width: 901px) {
  .chatbot-widget {
    bottom: 1.25rem;
  }
}

@media (min-width: 768px) {
  .chatbot-widget__panel {
    width: 24rem;
    height: 34rem;
  }

  .chatbot-meme-card__media {
    width: 4rem;
    height: 4rem;
  }
}

@media (max-width: 767px) {
  .chatbot-widget.is-open .chatbot-widget__panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
    z-index: 10060;
  }

  .chatbot-widget.is-open .chatbot-widget__toggle {
    display: none;
  }

  .chatbot-meme-card__media {
    width: 5.5rem;
    height: 5.5rem;
  }

  .chatbot-meme-card__body strong {
    font-size: 0.9rem;
  }

  .chatbot-meme-card__desc {
    font-size: 0.8rem;
  }
}


/* ===== perf-lite.css ===== */
/**
 * Mode performance : PC sans accélération GPU / rendu logiciel.
 * Activé via performance.js (classe html.perf-lite).
 */

/* Pas de backdrop-filter : repaint CPU très coûteux */
html.perf-lite *,
html.perf-lite *::before,
html.perf-lite *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Surfaces opaques à la place du verre */
html.perf-lite body.glass-theme .navbar,
html.perf-lite body.glass-theme .search-container,
html.perf-lite .mobile-bottom-nav,
html.perf-lite body.glass-theme .meme-card,
html.perf-lite body.glass-theme .filter-widget-panel,
html.perf-lite body.glass-theme .discord-connect,
html.perf-lite body.glass-theme .search-btn,
html.perf-lite .glass-panel,
html.perf-lite body.glass-theme .guidelines-content,
html.perf-lite body.glass-theme .error-container {
    background: rgba(12, 14, 22, 0.96) !important;
}

/* Cartes catégorie : garder les images de fond, couper seulement le blur glass */
html.perf-lite body.glass-theme .category-card,
html.perf-lite body.glass-theme .categories-grid .category-item {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.perf-lite body.glass-theme .meme-card:hover,
html.perf-lite body.glass-theme .category-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

/* Animations décoratives off */
html.perf-lite .hero-particles,
html.perf-lite .hero-glow,
html.perf-lite .particle-bg,
html.perf-lite .floating-card,
html.perf-lite section.hero *,
html.perf-lite .stat-card,
html.perf-lite .trending-item {
    animation: none !important;
    transform: none !important;
}

html.perf-lite .hero-particles {
    display: none !important;
}

html.perf-lite .hero-glow {
    opacity: 0.35 !important;
}

/* NSFW : overlay sombre au lieu de filter:blur sur l'image */
html.perf-lite .meme-image-container .nsfw-shield,
html.perf-lite .meme-card .nsfw-shield {
    position: relative;
    display: block;
    width: 100%;
    min-height: 200px;
}

html.perf-lite .nsfw-shield:not(.revealed) > img,
html.perf-lite .nsfw-shield:not(.revealed) .meme-thumb-image,
html.perf-lite .nsfw-shield:not(.revealed) .nsfw-video-cover {
    filter: none !important;
    transform: none !important;
}

html.perf-lite .nsfw-overlay {
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
    background: rgba(8, 10, 16, 0.4) !important;
    position: absolute;
    inset: 0;
    z-index: 5;
}

/* Scroll : ne pas animer chaque carte à l'entrée viewport */
html.perf-lite .animate-on-scroll,
html.perf-lite .category-card,
html.perf-lite .stat-card,
html.perf-lite .trending-item {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Grille : containment leger SANS content-visibility ni contain:paint.
   content-visibility:auto + contain:paint cassait les miniatures video
   (img en position:absolute → souvent jamais peintes / lazy load bloque). */
html.perf-lite .meme-card,
html.perf-lite .meme-card-v2,
html.perf-lite body.glass-theme .meme-card {
    contain: layout style;
}

html.perf-lite .memes-grid,
html.perf-lite #memesGrid {
    contain: layout style;
}

/* Miniatures video/audio : boite peinte garantie en mode lite */
html.perf-lite .meme-thumb-video,
html.perf-lite .meme-thumb-audio {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-height: 180px !important;
    aspect-ratio: 16 / 9;
    overflow: hidden !important;
    background: #111 !important;
}

html.perf-lite .meme-thumb-video .meme-thumb-image,
html.perf-lite .meme-thumb-audio .meme-thumb-image,
html.perf-lite .meme-image-container .meme-thumb-video .meme-thumb-image,
html.perf-lite .meme-image-container .meme-thumb-audio .meme-thumb-image,
html.perf-lite .nsfw-shield .meme-thumb-video .meme-thumb-image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;
}
html.perf-lite .meme-image-container > .meme-thumb-image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: contain !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;
}

html.perf-lite .meme-thumb-video .video-play-icon,
html.perf-lite .meme-thumb-video .fas.fa-play-circle.video-play-icon,
html.perf-lite .meme-thumb-video > .fas.fa-play-circle {
    position: absolute !important;
    top: auto !important;
    left: auto !important;
    bottom: 2.5rem !important;
    right: 0.4rem !important;
    transform: none !important;
    z-index: 3 !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    opacity: 0.55 !important;
    background: none !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.9) !important;
}

@media (max-width: 900px) {
    html.perf-lite .meme-thumb-video .video-play-icon,
    html.perf-lite .meme-thumb-video .fas.fa-play-circle.video-play-icon,
    html.perf-lite .meme-thumb-video > .fas.fa-play-circle {
        bottom: 0.35rem !important;
        right: 0.35rem !important;
        font-size: 0.8rem !important;
        opacity: 0.5 !important;
    }
}

/* NSFW : ne pas masquer le wrapper miniature (sinon écran vide après reveal sur mobile).
   L’overlay sombre suffit ; le média reste dans le flux. */
html.perf-lite .nsfw-shield:not(.revealed) > video {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
@media (max-width: 900px) {
    html.perf-lite .meme-card .nsfw-shield > .nsfw-video-cover,
    html.perf-lite .meme-card .nsfw-shield > .meme-thumb-video,
    html.perf-lite .meme-card .nsfw-shield > .meme-thumb-audio,
    html.perf-lite .meme-card .nsfw-shield > img {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: none !important;
        overflow: hidden !important;
        filter: none !important;
        transform: none !important;
    }
}

/* Pas de drop-shadow animé au survol */
html.perf-lite .floating-card,
html.perf-lite .category-card,
html.perf-lite .meme-card {
    filter: none !important;
}

/* Titres : pas de glow animé */
html.perf-lite .hero-title,
html.perf-lite .category-title,
html.perf-lite .title-gradient {
    animation: none !important;
    text-shadow: none !important;
}

/* Spinners de chargement conservés */
html.perf-lite .fa-spin,
html.perf-lite .memes-loading::after {
    animation-duration: 1s !important;
    animation-iteration-count: infinite !important;
}

