/* --- VARIABLES --- */
:root {
    --black: #050505; 
    --dark-red: #3d0000; 
    --fire: #ff0000; 
    --gold: #ff4d00; 
    --text: #ffffff;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--black); 
    color: var(--text);
    font-family: 'Inter', sans-serif; 
    overflow-x: hidden;
}

.grain {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://upload.wikimedia.org/wikipedia/commons/7/76/1k_Resolution_White_Noise_Video_Frame.png');
    opacity: 0.02; pointer-events: none; z-index: 99;
}

/* --- NAVIGATION & MENU --- */
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 6%; position: relative; width: 100%; z-index: 100;
}

.logo { font-family: 'Syncopate', sans-serif; font-weight: 900; font-size: 1.1rem; letter-spacing: -1px; }
.logo span { color: var(--fire); text-shadow: 0 0 15px var(--fire); }

nav { display: flex; align-items: center; }
nav a {
    color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.7rem; 
    font-weight: 700; margin-left: 20px; transition: 0.3s; letter-spacing: 1px;
}
nav a:hover, nav a.active { color: var(--text); text-shadow: 0 0 10px var(--fire); }

/* Boutons spéciaux Header */
.btn-login-nav { 
    background: var(--fire) !important; 
    padding: 8px 15px !important; 
    border-radius: 5px; 
    color: white !important; 
    font-weight: 900 !important;
}

.btn-admin-nav { 
    border: 1px solid var(--gold); 
    color: var(--gold) !important; 
    padding: 8px 15px; 
    border-radius: 5px; 
    font-size: 0.7rem; 
    font-weight: 900; 
}

.user-menu { display: flex; align-items: center; gap: 15px; margin-left: 20px; }
.welcome-txt { font-size: 0.7rem; font-weight: 900; color: #888; }
.welcome-txt span { color: var(--fire); text-shadow: 0 0 10px var(--fire); }
.btn-logout { padding: 7px 15px; border: 1px solid var(--fire); border-radius: 5px; font-size: 0.65rem; color: white; text-decoration: none; }

/* --- HERO SLIDER / PAGE HEADER --- */
.hero-slider, .page-header {
    height: 40vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, #3d0000, #050505);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: -85px; /* Pour remonter sous le header transparent */
    padding-top: 85px;
}

.slide-content h1, .page-header h1 { font-family: 'Syncopate'; font-size: 2.5rem; margin: 10px 0; text-transform: uppercase; }
.slide-content h1 span, .page-header h1 span { color: var(--fire); text-shadow: 0 0 20px var(--fire); }

/* --- GRILLE DE SCRIPTS --- */
.content { padding: 60px 4%; max-width: 1400px; margin: 0 auto; }
.section-header { margin-bottom: 40px; text-align: center; }
.section-header h2 { font-family: 'Syncopate'; font-size: 2rem; }
.section-header h2 span { color: var(--fire); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 300px);
    gap: 30px; justify-content: center; margin-top: 40px;
}

.card {
    width: 300px; background: #0f0f0f; border: 1px solid rgba(255,255,255,0.05);
    padding: 15px; border-radius: 15px; transition: 0.3s ease; position: relative;
}
.card:hover { transform: translateY(-10px); border-color: var(--fire); box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2); }

.card img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: 15px; }

.download-btn {
    display: block; width: 100%; padding: 12px; background: var(--fire); color: white;
    text-align: center; text-decoration: none; font-weight: 900; font-size: 0.8rem;
    border-radius: 8px; transition: 0.3s; cursor: pointer; border: none;
}

/* --- MESSENGER LIVE --- */
#chat-trigger {
    position: fixed !important; bottom: 30px !important; right: 30px !important;
    width: 60px; height: 60px; background: var(--fire); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    z-index: 10000; font-size: 1.5rem; box-shadow: 0 10px 25px rgba(255, 0, 0, 0.4);
}

#chat-window {
    position: fixed !important; bottom: 100px !important; right: 30px !important;
    width: 350px; height: 480px; background: #0a0a0a; border: 1px solid #222;
    border-radius: 15px; display: none; flex-direction: column; z-index: 9999;
    overflow: hidden; box-shadow: 0 15px 50px rgba(0,0,0,0.8);
}

#chat-messages { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: #050505; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 0.85rem; line-height: 1.4; }
.msg.client { background: #222; align-self: flex-start; color: #eee; }
.msg.admin { background: var(--fire); align-self: flex-end; color: #fff; }

/* --- FOOTER --- */
footer { background: #080808; padding: 60px 6% 40px 6%; margin-top: 100px; border-top: 1px solid #111; }
.footer-wrap { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    header { flex-direction: column; padding: 15px 4%; position: relative; gap: 15px; }
    nav { flex-wrap: wrap; justify-content: center; gap: 10px; }
    nav a { margin: 0; font-size: 0.65rem; }
    .user-menu { margin-left: 0; }
    
    .hero-slider, .page-header { height: 35vh; margin-top: 0; padding-top: 20px; }
    .slide-content h1, .page-header h1 { font-size: 1.8rem; text-align: center; }

    .grid { grid-template-columns: 1fr; padding: 20px; }
    .card { width: 100%; max-width: 340px; margin: 0 auto; }
    
    .footer-wrap { flex-direction: column; gap: 30px; text-align: center; }
    #chat-window { width: 90%; right: 5%; bottom: 85px; }
}