/* --- CONFIGURATION GLOBALE --- */
:root {
    --bg-color: #050505;
    --card-bg: #0f0f0f;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent: #ff0000;
    --accent-dark: #cc0000;
    --glow: rgba(255, 0, 0, 0.5);
    --border: #222;
    --main-font: 'Raleway', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--main-font);
    overflow-x: hidden;
}

/* --- FOND GRILLE (Effet visuel) --- */
body::after {
    content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none; z-index: -1;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- BARRE DU HAUT --- */
.top-bar {
    display: flex; justify-content: flex-end; align-items: center;
    padding: 10px 20px; background: rgba(0,0,0,0.8);
    border-bottom: 1px solid var(--border);
    position: fixed; top: 0; width: 100%; z-index: 100;
    z-index: 200 !important;
    position: relative;
}

.time-badge {
    font-family: monospace; font-size: 1.1rem;
    color: var(--accent); margin-right: 15px;
    text-shadow: 0 0 10px var(--glow);
}

/* L'IMAGE (L'engrenage) */
.settings-btn img, .gear-icon-img {
    width: 26px !important; 
    height: 26px !important;
    max-width: 26px;
    display: block;
    transition: transform 0.5s ease;
    filter: invert(1) brightness(100%);    
    cursor: pointer;
}

/* L'ANIMATION */
.settings-btn:hover img { 
    transform: rotate(90deg);
    filter: invert(1) brightness(100%); 
    cursor: pointer;
}

.settings-panel {
    position: absolute; top: 60px; right: 20px;
    background: var(--card-bg); border: 1px solid var(--accent);
    padding: 15px; display: none; min-width: 200px;
    z-index: 200;
}
.settings-panel.show { display: block; }
.settings-group { margin-bottom: 10px; }
.settings-label { font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 5px; }
select { width: 100%; background: #000; color: white; border: 1px solid #333; padding: 5px; }

/* --- NAVIGATION --- */
nav {
    padding: 100px 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo { font-weight: 800; font-size: 1.5rem; letter-spacing: -1px; }
.nav-links { list-style: none; display: flex; gap: 20px; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.9rem; transition: 0.3s; }
.nav-links a:hover { color: white; text-shadow: 0 0 5px var(--glow); }

/* --- HERO --- */
.hero { text-align: center; padding: 80px 0; }
.hero-title { font-size: 4rem; font-weight: 900; line-height: 1.1; margin-bottom: 20px; }
.gradient-text { color: var(--accent); text-shadow: 0 0 30px var(--glow); }
.hero-description { color: var(--text-muted); font-size: 1.2rem; margin-bottom: 40px; }

.cta-button {
    display: inline-block; padding: 15px 40px;
    background: var(--accent); color: white;
    text-decoration: none; font-weight: 800; text-transform: uppercase;
    box-shadow: 0 0 20px var(--glow); transition: 0.3s;
}
.cta-button:hover { background: var(--accent-dark); transform: scale(1.05); }

/* --- CARTES --- */
.cards-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; margin-bottom: 80px;
}

.card {
    background: var(--card-bg); padding: 30px;
    border: 1px solid var(--border); transition: 0.3s;
}
.card:hover { border-color: var(--accent); transform: translateY(-5px); }

.card-icon { font-size: 2rem; margin-bottom: 15px; }
.card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); margin-bottom: 20px; }

.tags { display: flex; gap: 10px; }
.tag {
    border: 1px solid var(--accent); color: var(--accent);
    padding: 5px 10px; font-size: 0.8rem; font-weight: bold;
}

/* --- FOOTER --- */
footer {
    text-align: center; padding: 40px 0; border-top: 1px solid var(--border);
    color: var(--text-muted); font-size: 0.9rem;
}
.footer-links { margin-top: 10px; }
.footer-links a { color: var(--accent); text-decoration: none; margin: 0 10px; }

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .nav-links { display: none; }
}

/* --- L'arrière-plan sombre --- */
.modal-overlay {
    visibility: hidden; 
    opacity: 0;
    pointer-events: none;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.90);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--main-font);
    
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: #050505;
    border: 2px solid #ff0000;
    border-radius: 12px;
    padding: 40px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
    color: white;
    position: relative;

    opacity: 0;
    transform: scale(0.9) translateY(30px);
    transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-box {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.modal-icon svg { display: block; margin: 0 auto 20px auto; }
.modal-box h2 { font-size: 22px; font-weight: 700; margin: 0 0 10px 0; color: #fff; }
.modal-box p { color: #bbb; margin-bottom: 15px; font-size: 15px; }
.url-container { background: #111; padding: 12px; border-radius: 6px; margin-bottom: 30px; font-family: monospace; color: #ff3333; word-break: break-all; font-size: 14px; border: 1px solid #333; }
.modal-actions button {
    padding: 12px 0;
    width: 120px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.modal-actions button {
    padding: 12px 0;
    width: 120px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit; 
    text-transform: uppercase;
}
.btn-cancel { background: transparent; border: 1px solid #555; color: #fff; }
.btn-cancel:hover { background: #222; border-color: #fff; }
.btn-continue { background: #ff0000; border: 1px solid #ff0000; color: #000; }
.btn-continue:hover { background: #cc0000; transform: scale(1.05); }

.hamburger-btn, .mobile-menu-overlay {
    display: none;
}

@media (max-width: 768px) {

    .nav-links.desktop-only {
        display: none;
    }

    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 100 !important;
        position: relative;
    }

    .hamburger-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: white;
        border-radius: 3px;
        transition: 0.3s;
    }

    .mobile-menu-overlay {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        z-index: 99999;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease-in-out;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .close-menu-btn {
        position: absolute;
        top: 30px;
        right: 30px;
        background: none;
        border: none;
        color: white;
        font-size: 40px;
        cursor: pointer;
    }

    .mobile-links {
        display: flex;
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .mobile-links a {
        font-family: 'Inter', sans-serif;
        font-size: 2rem;
        font-weight: 800;
        color: white;
        text-decoration: none;
        text-transform: uppercase;
        transition: color 0.3s;
    }

    .mobile-links a:hover {
        color: #ff0000;
    }
}