/**
 * Wiki MixMaster Online - Home Page Styles (v4)
 * Conforme à wiki_maquette_v4
 */

/* ========================================
   CSS VARIABLES - THÈME MMORPG
======================================== */
:root {
    --accent-primary: #5E72AF;
    --accent-hover: #4a5a94;
    --accent-light: #7889c4;
    --accent-secondary: #7B68EE;
    --accent-gold: #FFD700;
    --accent-fire: #FF6B35;
    
    --gradient-epic: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-header: linear-gradient(135deg, #1a1c2e 0%, #2d3154 50%, #1a1c2e 100%);
    --gradient-search: linear-gradient(135deg, #5E72AF 0%, #4a5a94 50%, #3d4b7a 100%);
    
    --bg-primary: #f0f2f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8ebf4;
    --bg-card: #ffffff;
    
    --text-primary: #1a1d2e;
    --text-secondary: #5a6178;
    --text-muted: #8b91a7;
    
    --border-color: #e0e4ef;
    --border-glow: rgba(94, 114, 175, 0.3);
    
    --shadow-sm: 0 2px 8px rgba(30, 40, 80, 0.08);
    --shadow-md: 0 4px 24px rgba(30, 40, 80, 0.12);
    --shadow-lg: 0 8px 40px rgba(30, 40, 80, 0.16);
    --shadow-glow: 0 0 30px rgba(94, 114, 175, 0.25);
    
    --footer-bg: #30323d;
}

[data-theme="dark"] {
    --bg-primary: #2a2c37;
    --bg-secondary: #363a4a;
    --bg-tertiary: #3d4152;
    --bg-card: #363a4a;
    
    --text-primary: #e8eaf0;
    --text-secondary: #b8bdd0;
    --text-muted: #8890a8;
    
    --border-color: #4a4f65;
    --border-glow: rgba(123, 104, 238, 0.4);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.3);
}

/* ========================================
   SEARCH SECTION - AVEC DÉCORATIONS
======================================== */
.search-section {
    background: var(--gradient-search);
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Pattern subtil */
.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

/* Décoration gauche (devil_04) - avec animation flottante */
.search-deco-left {
    position: absolute !important;
    left: 5% !important;
    top: 15% !important;
    width: 180px !important;
    height: auto !important;
    opacity: 0.4 !important;
    pointer-events: none !important;
    z-index: 1 !important;
    animation: floatLeft 6s ease-in-out infinite !important;
    filter: drop-shadow(0 0 15px rgba(255, 100, 50, 0.3)) !important;
}

/* Décoration droite (bete-petit) - agrandie avec animation */
.search-deco-right {
    position: absolute !important;
    right: 5% !important;
    top: 19% !important;
    width: 180px !important;
    height: auto !important;
    opacity: 0.5 !important;
    pointer-events: none !important;
    z-index: 1 !important;
    animation: floatRight 5s ease-in-out infinite !important;
    filter: drop-shadow(0 0 15px rgba(100, 200, 50, 0.3)) !important;
}

/* Animations flottantes légères */
@keyframes floatLeft {
    0%, 100% { 
        transform: translateX(0) rotate(0deg); 
    }
    50% { 
        transform: translateX(-5px) rotate(-2deg); 
    }
}

@keyframes floatRight {
    0%, 100% { 
        transform: translateX(0) rotate(0deg); 
    }
    50% { 
        transform: translateX(5px) rotate(2deg); 
    }
}

.search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ========================================
   TITRE STYLISÉ
======================================== */
.search-title-wrapper {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding: 0.5rem 0;
}

.epic-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.title-prefix {
    font-family: 'Raleway', 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.mixmaster-epic {
    font-family: 'Raleway', 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 2.8rem;
    line-height: 1;
    letter-spacing: -1px;
    background: linear-gradient(180deg, 
        #FFE566 0%,
        #FFD700 25%,
        #FFAA00 50%, 
        #FF8C00 75%,
        #E65C00 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: 
        drop-shadow(2px 0 0 #B22222)
        drop-shadow(-2px 0 0 #B22222)
        drop-shadow(0 2px 0 #B22222)
        drop-shadow(0 -2px 0 #B22222)
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Search Box */
.search-box {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

.search-input {
    width: 100% !important;
    height: 58px !important;
    padding: 0 150px 0 50px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 14px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #1a1d2e !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    transition: box-shadow 0.3s ease !important;
    box-sizing: border-box !important;
}

[data-theme="dark"] .search-input {
    background: rgba(20, 22, 31, 0.95) !important;
    color: #f0f1f5 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.search-input:hover,
.search-input:focus {
    outline: none !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
}

.search-input::placeholder {
    color: #8b91a7 !important;
}

.search-icon {
    position: absolute !important;
    left: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--accent-primary) !important;
    font-size: 1.1rem !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

.search-btn {
    position: absolute !important;
    right: 6px !important;
    top: 6px !important;
    bottom: 6px !important;
    height: auto !important;
    padding: 0 24px !important;
    background: var(--accent-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: background 0.3s ease, box-shadow 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

.search-btn:hover {
    background: var(--accent-hover) !important;
    box-shadow: 0 4px 15px rgba(94, 114, 175, 0.4) !important;
}

.search-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* ========================================
   CATEGORIES NAV
======================================== */
.categories-nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    overflow-x: auto;
}

.categories-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.cat-pill:hover {
    background: var(--bg-card);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.cat-pill.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* ========================================
   MAIN LAYOUT
======================================== */
.wiki-main-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
}

.main-content {
    min-width: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.section-title i {
    color: var(--accent-primary);
}

.section-link {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    text-decoration: none;
}

.section-link:hover {
    text-decoration: none;
}

.section-link:hover i {
    transform: translateX(4px);
}

.section-link i {
    transition: transform 0.3s ease;
}

/* ========================================
   RECENT CARDS
======================================== */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.recent-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.recent-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.recent-card-img {
    width: 100%;
    height: 140px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.recent-card-img img {
    max-width: 80%;
    max-height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

.recent-card:hover .recent-card-img img {
    transform: scale(1.1);
}

.recent-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.3;
}

.recent-card-body {
    padding: 1.25rem;
}

.recent-card-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.type-guide { background: rgba(74, 222, 128, 0.15); color: #22c55e; }
.type-hench { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.type-map { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.type-quest { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.type-mix { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.type-item { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }

.recent-card-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.recent-card-title a {
    color: inherit;
    text-decoration: none;
}

.recent-card-title a:hover {
    color: var(--accent-primary);
}

.recent-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.recent-card-stats {
    display: flex;
    gap: 12px;
}

.recent-card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.recent-card-stats .fa-heart { color: #ef4444; }
.recent-card-stats .fa-comment { color: var(--accent-primary); }

/* ========================================
   ARTICLE CARDS WITH VOTES
======================================== */
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.25rem;
    transition: all 0.3s ease;
}

.article-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateX(8px);
}

.article-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 50px;
}

.vote-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vote-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.vote-btn.up:hover { border-color: #22c55e; color: #22c55e; }
.vote-btn.down:hover { border-color: #ef4444; color: #ef4444; }
.vote-btn.active.up { background: #22c55e; color: white; border-color: #22c55e; }

.vote-count {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.article-content { flex: 1; min-width: 0; }

.article-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.article-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.article-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.article-title a {
    color: inherit;
    text-decoration: none;
}

.article-title a:hover {
    color: var(--accent-primary);
}

.article-author {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.article-author a { color: var(--accent-primary); font-weight: 600; text-decoration: none; }

.article-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.article-tags { display: flex; gap: 6px; }

.article-tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.article-stats {
    display: flex;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.article-stats span { display: flex; align-items: center; gap: 5px; }

/* ========================================
   SIDEBAR WIDGETS
======================================== */
.wiki-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.widget-header i {
    font-size: 1.2rem;
    color: var(--accent-primary);
}

.widget-header h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 14px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

/* Hench List */
.hench-list { 
    list-style: none; 
    padding: 0;
    margin: 0;
}

.hench-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.hench-item:last-child { border-bottom: none; }

.hench-rank {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.hench-rank.gold { background: linear-gradient(135deg, #FFD700, #FFA500); color: #7a5c00; }
.hench-rank.silver { background: linear-gradient(135deg, #E8E8E8, #B0B0B0); color: #505050; }
.hench-rank.bronze { background: linear-gradient(135deg, #CD7F32, #A0522D); color: #fff; }
.hench-rank.normal { background: var(--bg-tertiary); color: var(--text-muted); }

.hench-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.hench-info { flex: 1; min-width: 0; }
.hench-name { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); display: block; }
.hench-type { font-size: 0.75rem; color: var(--accent-primary); font-weight: 600; }

.hench-stats { text-align: right; }
.hench-views, .hench-votes { font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.hench-votes { color: #22c55e; font-weight: 600; }

/* Map List */
.map-list { 
    list-style: none; 
    padding: 0;
    margin: 0;
}

.map-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.map-item:last-child { margin-bottom: 0; }

.map-item:hover { 
    transform: translateX(6px); 
    box-shadow: var(--shadow-sm); 
}

.map-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.map-info { flex: 1; }
.map-name { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); display: block; }
.map-level { font-size: 0.75rem; color: var(--text-muted); }
.map-votes { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: #22c55e; font-weight: 700; }

/* Tags Cloud */
.tags-cloud { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
}

.tag {
    padding: 7px 14px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    text-decoration: none;
}

.tag:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.05);
    text-decoration: none;
}

/* ========================================
   COMMENTS LIST
======================================== */
.comments-list { 
    list-style: none; 
    padding: 0;
    margin: 0;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child { border-bottom: none; }

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.comment-content { flex: 1; min-width: 0; }
.comment-content .comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-author { font-weight: 700; font-size: 0.85rem; color: var(--accent-primary); }
.comment-time { font-size: 0.72rem; color: var(--text-muted); }
.comment-text { font-size: 0.82rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.comment-article { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.comment-article a { color: var(--accent-primary); text-decoration: none; }

/* ========================================
   SPARKLES (Paillettes)
======================================== */
.search-section .sparkle {
    position: absolute;
    font-size: 8px;
    color: #FFD700;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    animation: sparkleFloat 4s ease-in-out infinite;
}

.sparkle::before { content: '✦'; }

@keyframes sparkleFloat {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
    50% { opacity: 1; transform: translateY(-8px) scale(1); }
}

/* Positions des paillettes */
.sparkle:nth-child(1) { left: 4%; top: 15%; animation-delay: 0s; font-size: 6px; }
.sparkle:nth-child(2) { left: 8%; top: 30%; animation-delay: 0.5s; font-size: 8px; }
.sparkle:nth-child(3) { left: 12%; top: 45%; animation-delay: 1s; font-size: 7px; }
.sparkle:nth-child(4) { left: 6%; top: 55%; animation-delay: 1.5s; font-size: 9px; }
.sparkle:nth-child(5) { left: 15%; top: 65%; animation-delay: 2s; font-size: 6px; }
.sparkle:nth-child(6) { left: 10%; top: 78%; animation-delay: 2.5s; font-size: 8px; }
.sparkle:nth-child(7) { left: 3%; top: 40%; animation-delay: 3s; font-size: 7px; }
.sparkle:nth-child(8) { left: 18%; top: 25%; animation-delay: 3.5s; font-size: 6px; }
.sparkle:nth-child(9) { left: 20%; top: 50%; animation-delay: 0.3s; font-size: 8px; }
.sparkle:nth-child(10) { left: 7%; top: 85%; animation-delay: 0.8s; font-size: 7px; }
.sparkle:nth-child(11) { right: 4%; top: 18%; animation-delay: 0.2s; font-size: 7px; }
.sparkle:nth-child(12) { right: 9%; top: 32%; animation-delay: 0.7s; font-size: 6px; }
.sparkle:nth-child(13) { right: 13%; top: 48%; animation-delay: 1.2s; font-size: 8px; }
.sparkle:nth-child(14) { right: 6%; top: 58%; animation-delay: 1.7s; font-size: 7px; }
.sparkle:nth-child(15) { right: 16%; top: 68%; animation-delay: 2.2s; font-size: 9px; }
.sparkle:nth-child(16) { right: 11%; top: 80%; animation-delay: 2.7s; font-size: 6px; }
.sparkle:nth-child(17) { right: 3%; top: 42%; animation-delay: 3.2s; font-size: 8px; }
.sparkle:nth-child(18) { right: 19%; top: 22%; animation-delay: 3.7s; font-size: 7px; }
.sparkle:nth-child(19) { right: 21%; top: 52%; animation-delay: 0.4s; font-size: 6px; }
.sparkle:nth-child(20) { right: 8%; top: 88%; animation-delay: 0.9s; font-size: 8px; }
.sparkle:nth-child(21) { left: 28%; top: 8%; animation-delay: 0.1s; font-size: 7px; }
.sparkle:nth-child(22) { left: 35%; top: 18%; animation-delay: 0.6s; font-size: 8px; }
.sparkle:nth-child(23) { left: 42%; top: 5%; animation-delay: 1.1s; font-size: 6px; }
.sparkle:nth-child(24) { left: 50%; top: 12%; animation-delay: 1.6s; font-size: 9px; }
.sparkle:nth-child(25) { right: 28%; top: 10%; animation-delay: 2.1s; font-size: 7px; }
.sparkle:nth-child(26) { right: 35%; top: 20%; animation-delay: 2.6s; font-size: 6px; }
.sparkle:nth-child(27) { right: 42%; top: 6%; animation-delay: 3.1s; font-size: 8px; }
.sparkle:nth-child(28) { left: 32%; top: 28%; animation-delay: 3.6s; font-size: 7px; }
.sparkle:nth-child(29) { right: 32%; top: 26%; animation-delay: 0.35s; font-size: 6px; }
.sparkle:nth-child(30) { left: 45%; top: 22%; animation-delay: 0.85s; font-size: 8px; }
.sparkle:nth-child(31) { left: 26%; top: 55%; animation-delay: 1.3s; font-size: 6px; }
.sparkle:nth-child(32) { left: 32%; top: 68%; animation-delay: 1.8s; font-size: 7px; }
.sparkle:nth-child(33) { left: 38%; top: 80%; animation-delay: 2.3s; font-size: 8px; }
.sparkle:nth-child(34) { left: 44%; top: 90%; animation-delay: 2.8s; font-size: 6px; }
.sparkle:nth-child(35) { right: 26%; top: 58%; animation-delay: 3.3s; font-size: 7px; }
.sparkle:nth-child(36) { right: 32%; top: 70%; animation-delay: 3.8s; font-size: 8px; }
.sparkle:nth-child(37) { right: 38%; top: 82%; animation-delay: 0.15s; font-size: 6px; }
.sparkle:nth-child(38) { right: 44%; top: 92%; animation-delay: 0.65s; font-size: 7px; }
.sparkle:nth-child(39) { left: 50%; top: 75%; animation-delay: 1.15s; font-size: 9px; }
.sparkle:nth-child(40) { right: 50%; top: 85%; animation-delay: 1.65s; font-size: 6px; }

/* ========================================
   MODAL CONNEXION
======================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: modalSlide 0.4s ease;
}

@keyframes modalSlide {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: var(--accent-primary);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px; right: 15px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-header h2 { color: white; font-size: 1.5rem; margin: 0; }

.modal-body { padding: 2rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 8px; }

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(94, 114, 175, 0.15);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: var(--bg-tertiary);
    text-align: center;
}

.modal-footer p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }
.modal-footer a { font-size: 0.9rem; font-weight: 600; color: var(--accent-primary); text-decoration: none; }

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1200px) {
    .recent-grid { grid-template-columns: repeat(2, 1fr); }
    .search-deco-left { width: 160px; opacity: 0.25; left: 3%; }
    .search-deco-right { width: 100px; opacity: 0.3; right: 3%; }
}

@media (max-width: 1024px) {
    .wiki-main-layout { grid-template-columns: 1fr; }
    .wiki-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .search-section { padding: 3rem 1rem; }
    .search-input { padding: 16px 16px 16px 50px; font-size: 0.95rem; }
    .search-btn { 
        position: relative; 
        right: auto; 
        width: 100%; 
        margin-top: 1rem;
        justify-content: center;
    }
    .search-box { flex-direction: column; }
    .search-deco-left, .search-deco-right { display: none; }
    
    .categories-nav { padding: 0.75rem 1rem; }
    .categories-container { justify-content: flex-start; flex-wrap: nowrap; }
    .cat-pill { padding: 8px 16px; font-size: 0.82rem; }
    
    .wiki-main-layout { padding: 1.5rem 1rem; }
    .recent-grid { grid-template-columns: 1fr; }
    .wiki-sidebar { grid-template-columns: 1fr; }
    
    .article-card { flex-direction: column; }
    .article-vote { flex-direction: row; }
    
    .epic-title { flex-direction: column; gap: 0.2rem; }
    .title-prefix { font-size: 1.1rem; }
    .mixmaster-epic { font-size: 2rem; }
}

@media (max-width: 480px) {
    .section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .recent-card-img { height: 120px; }
}
