/* ==========================================================================
   1. HERO SECTION (Visual, Particles & Content)
   ========================================================================== */
.hero-visual {
    position: relative;
    padding: 140px 0 100px;
    background: var(--bg-darker);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

/* --- Système de particules --- */
.animated-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#particules, .animated-bg span {
    position: absolute;
    z-index: 1;
}

.animated-bg span:nth-child(1) {
    width: 6px; 
    height: 6px;
    background: transparent;
    border-radius: 50%;
    box-shadow: 
        10vw 20vh var(--accent), 30vw 50vh #fff, 50vw 10vh var(--accent), 
        70vw 80vh #fff, 90vw 30vh var(--accent), 15vw 75vh #fff, 
        45vw 85vh var(--accent), 65vw 15vh #fff, 85vw 55vh var(--accent),
        5vw 5vh #fff, 25vw 95vh var(--accent), 95vw 95vh #fff;
    animation: hyper-float 25s infinite linear;
    opacity: 0.4;
}

/* --- Contenu du Hero --- */
.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text-wrapper {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
}

.glitch-title {
    font-size: clamp(3.5rem, 12vw, 6rem);
    font-weight: 900;
    margin: 20px 0;
    letter-spacing: -4px;
    background: linear-gradient(to bottom, #fff 40%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.3));
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* --- Stats du Hero (Heure, Date, Compteurs) --- */
.hero-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 60px;
    margin: 25px 0 45px;
}

.stat-item { text-align: center; }

.stat-item strong {
    display: block;
    font-size: 3rem;
    color: #fff;
    line-height: 1;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.stat-item span {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
    display: block;
}

/* Style spécifique pour l'horloge et la date */
#hero-clock, #hero-date {
    font-family: 'Courier New', Courier, monospace; 
    font-weight: bold;
    color: var(--text-main);
    position: relative;
    display: inline-block;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums; /* Évite les sauts de pixels */
    animation: glitch-intro 1.5s ease-out forwards;
}

#hero-day {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    display: block;
}

.badge-new {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-darker);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    margin-bottom: 15px;
}

/* ==========================================================================
   2. BOUTONS & ÉLÉMENTS D'ACTION
   ========================================================================== */
.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-main {
    position: relative;
    z-index: 11;
    background: var(--accent);
    color: var(--bg-darker);
    padding: 16px 40px;
    border-radius: 12px;
    font-weight: 800;
    display: inline-block;
    text-decoration: none;
    transition: 0.4s;
    border: none;
    cursor: pointer;
}

.btn-main:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
}

.btn-outline {
    position: relative;
    z-index: 11;
    border: 1px solid var(--border);
    padding: 16px 40px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.02);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
}

.btn-full-width {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    margin-top: 20px;
}

.btn-full-width:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ==========================================================================
   3. GRILLE DE CRÉATIONS (Tendances)
   ========================================================================== */
.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 40px 0 25px;
}

.section-label { font-size: 1.3rem; font-weight: 600; white-space: nowrap; }
.line { flex-grow: 1; height: 1px; background: var(--border); }

.view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 5;
}

.view-all i { transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.view-all:hover { color: #fff; text-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
.view-all:hover i { transform: translateX(5px); }

.creations-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.art-card-modern {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s ease;
}

.art-card-modern:hover { border-color: var(--accent); transform: translateY(-5px); }

.card-img-wrapper { position: relative; height: 200px; overflow: hidden; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.art-card-modern:hover .card-img-wrapper img { transform: scale(1.1); }

.card-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.3s;
}
.art-card-modern:hover .card-overlay { opacity: 1; }

.btn-circle {
    width: 45px; height: 45px; background: #fff; color: var(--accent);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    text-decoration: none;
}

.card-body-modern { padding: 15px; }
.user-tag { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.8rem; }
.user-tag img { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--user-color); }

/* ==========================================================================
   4. LAYOUT DOUBLE COLONNE (Forum & Sidebar)
   ========================================================================== */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    margin-top: 50px;
}

/* Gestion du plein écran si pas d'aside */
.home-layout:not(:has(aside)) .content-column {
    flex: 0 0 100%;
    max-width: 100%;
}

/* --- Forum / Entraide --- */
.forum-row {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    align-items: center;
}

.vote-mini {
    background: rgba(255,255,255,0.05);
    min-width: 50px; height: 50px;
    border-radius: 10px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-weight: 700;
}

.vote-mini span { font-size: 0.6rem; opacity: 0.5; }
.forum-info .title { color: #fff; font-weight: 500; text-decoration: none; display: block; margin-bottom: 2px; }
.forum-info .meta { font-size: 0.75rem; color: var(--text-muted); }

/* --- Sidebar Glass Card --- */
.glass-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.side-title { font-size: 1.1rem; margin-bottom: 20px; color: var(--accent); }

/* --- Bloc Top Créateur (Sidebar) --- */
.top-creator-card {
    text-align: center;
    padding: 20px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s ease;
}

.top-creator-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
}

.creator-avatar-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
}

.creator-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    padding: 5px;
    border: 3px solid var(--user-color, var(--accent));
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.rank-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #ffca28;
    color: #000;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.8rem;
    border: 3px solid var(--card);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.creator-info { display: flex; flex-direction: column; gap: 4px; }
.creator-name { font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.creator-stats { font-size: 0.8rem; color: var(--accent); text-transform: uppercase; font-weight: 600; }

.sidebar-promo {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

/* --- Messenger Mini Items --- */
.msg-item {
    display: flex; align-items: center; gap: 12px; padding: 12px; 
    border-radius: 10px; margin-bottom: 8px; transition: 0.2s; 
    background: rgba(255,255,255,0.02); text-decoration: none;
}
.msg-item:hover { background: rgba(255,255,255,0.08); transform: translateX(5px); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.online { background: #00ff88; box-shadow: 0 0 8px #00ff88; }
.status-dot.offline { background: #444; }

/* ==========================================================================
   5. ANIMATIONS (Keyframes)
   ========================================================================== */
@keyframes hyper-float {
    from { transform: translateY(0); }
    to { transform: translateY(-100vh); }
}

@keyframes glitch-intro {
    0% { opacity: 0; transform: translateY(10px); text-shadow: 2px 0 red, -2px 0 blue; }
    10% { opacity: 1; transform: translateY(0); text-shadow: -2px 0 red, 2px 0 blue; }
    20% { text-shadow: 1px 0 red, -1px 0 blue; color: rgba(255, 255, 255, 0.2); }
    30% { text-shadow: none; color: var(--text-main); }
    80% { text-shadow: 2px 0 var(--accent), -2px 0 rgba(255,0,0,0.3); }
    100% { opacity: 1; transform: translateY(0); color: var(--text-main); }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   6. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1000px) {
    .home-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero-stats { gap: 30px; }
    .stat-item strong { font-size: 2.2rem; }
    .hero-btns { flex-direction: column; align-items: center; }
    .btn-main, .btn-outline { width: 100%; max-width: 300px; text-align: center; }
}

@media (max-width: 600px) {
    .hero-stats { gap: 20px; }
    .stat-item strong { font-size: 1.5rem; }
    .hero-visual { padding: 100px 0 60px; }
}