/* ==========================================================================
   1. STRUCTURE & DEGRADE DE FOND
   ========================================================================== */
   :root {
    --twitch-purple: #9147ff;
    --card-bg: #1f1f23;
    --neon-cyan: #00f2ff;
    --neon-green: #00ff7f;
}

html { height: 100%; }

body {
    background: linear-gradient(to bottom, rgb(22, 22, 22) 0%, rgb(31, 31, 31) 55%, rgb(70, 7, 70) 100%);
    background-attachment: fixed;
    background-size: cover;
    color: aliceblue;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
}

.content-wrapper { flex: 1 0 auto; }

/* ==========================================================================
   2. HEADER (SUR UNE SEULE LIGNE COMME SUR L'IMAGE)
   ========================================================================== */
header {
    background-color: black;
    height: 90px;
    position: fixed;
    width: 100%;
    z-index: 9999;
    border-radius: 0 0 35px 35px;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: row; /* Sur une seule ligne ! */
    justify-content: center;
    align-items: center;
    gap: 40px; /* Espace entre le titre et les boutons */
    border-bottom: 2px solid var(--twitch-purple);
}

.header-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-main { height: 50px; width: auto; display: block; }

header h1 {
    font-family: "Comic Sans MS", "Comic Sans", cursive;
    font-style: italic;
    margin: 0;
    font-size: 2.2rem;
}

.navbar { display: flex; gap: 20px; }

.nav-link {
    text-decoration: none;
    color: #aaa;
    font-size: 1rem;
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 20px;
    transition: 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: white;
    background: var(--twitch-purple);
}

/* ==========================================================================
   3. OUTILS ET GRILLES (AVEC PADDING CORRIGÉ)
   ========================================================================== */
.main-container {
    padding: 140px 80px 50px 80px; /* Pousse le contenu SOUS le header */
    max-width: 1400px;
    margin: 0 auto;
}

.header-tools {
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    margin-bottom: 40px;
}

.search-bar {
    flex: 1;
    background: #1f1f23;
    border: 1px solid #333;
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    outline: none;
}

.tools-right { display: flex; align-items: center; gap: 15px; }

#cityFilter {
    background: #1f1f23;
    border: 1px solid #333;
    color: white;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-sort {
    background: #2f2f35;
    border: none;
    color: #ccc;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-sort.active { background: var(--twitch-purple); color: white; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* ==========================================================================
   4. VIGNETTES ET NEONS
   ========================================================================== */
.vignette { background: var(--card-bg); border-radius: 12px; overflow: hidden; border: 1px solid transparent; transition: 0.3s; }
.vignette:hover { border-color: var(--twitch-purple); transform: translateY(-5px); }
.image-container { height: 180px; position: relative; overflow: hidden; }
.image-container img { width: 100%; height: 100%; object-fit: cover; }
.status-badge { position: absolute; top: 10px; right: 10px; padding: 5px 10px; border-radius: 4px; font-size: 0.7em; background: rgba(0,0,0,0.8); z-index: 2; }
.status-connecté { color: var(--neon-green); border: 1px solid var(--neon-green); }
.status-déconnecté { color: #ff4655; border: 1px solid #ff4655; }
.infos { padding: 15px; }
.city { color: var(--neon-cyan); font-size: 0.9em; display: block; margin-bottom: 5px; }

/* NEONS ANIMES */
.neon-bar { position : fixed; top: 0; width: 6px; height: 100%; border-radius: 10px; filter: blur(1px); z-index: 100; background-size: 100% 200%; animation: flow 3s linear infinite, pulse 2s ease-in-out infinite; }
.left { left: 20px; background: linear-gradient(#00f0ff, #ff00ff, #00f0ff); box-shadow: 0 0 10px #00f0ff, 0 0 40px #ff00ff; }
.right { right: 20px; background: linear-gradient(#ff00ff, #00f0ff, #ff00ff); box-shadow: 0 0 10px #ff00ff, 0 0 40px #00f0ff; }
@keyframes flow { 0% { background-position: 0% 0%; } 100% { background-position: 0% 200%; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ==========================================================================
   5. PAGES ANNEXES (Accueil, A propos)
   ========================================================================== */
.welcome-box { background: rgba(145, 71, 255, 0.15); border: 2px solid var(--twitch-purple); border-radius: 20px; padding: 40px; max-width: 700px; margin: 50px auto; text-align: center; box-shadow: 0 0 20px rgba(145, 71, 255, 0.3); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.welcome-box:hover { transform: scale(1.08); }
.text-box { background: var(--card-bg); border: 1px solid #333; border-radius: 15px; padding: 30px; max-width: 800px; margin: 30px auto; }
.text-box h2 { color: var(--neon-cyan); margin-top: 0; }
.text-box p { line-height: 1.6; color: #ccc; }

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer { flex-shrink: 0; background-color: black; color: #888; padding: 30px 20px; text-align: center; border-top: 1px solid #333; }
.footer-content a { color: var(--twitch-purple); text-decoration: none; }