:root {
    --bg-dark: #050505;
    --sidebar-bg: #0d0d0f;
    --accent-white: #ffffff;
    --neon-glow: rgba(255, 255, 255, 0.4); /* Lueur plus douce */
    --metal-border: #2a2a2e;
    --text-dim: #666666;
    --terminal-black: #000000;
    --neon-white: #ffffff;
    /* On change le vert par un blanc pur pour l'effet global */
    --neon-ice: #ffffff; 
    --neon-glow-ice: rgba(255, 255, 255, 0.3);
}

/* --- ANIMATIONS --- */
@keyframes ammoSlide {
    from { opacity: 0; transform: translateY(20px); filter: blur(5px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-dark);
    color: #ffffff;
    overflow: hidden; /* Garde hidden pour éviter le double scroll bizarre */
}

.app-container { display: flex; height: 100vh; }

/* --- SIDEBAR --- */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    padding: 30px 20px;
    border-right: 1px solid var(--metal-border);
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 26px; font-weight: 900; color: #fff;
    margin-bottom: 50px; letter-spacing: 6px; text-transform: uppercase;
    display: flex; align-items: center; gap: 12px;
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px var(--neon-glow);
}

.logo img { width: 32px; height: 32px; filter: drop-shadow(0 0 5px #fff); }

.menu-item {
    padding: 14px 18px; margin-bottom: 10px; border-radius: 6px;
    cursor: pointer; color: var(--text-dim); text-transform: uppercase;
    font-size: 0.85rem; font-weight: 700; display: flex;
    align-items: center; gap: 12px; transition: 0.3s;
    border-left: 4px solid transparent;
}

.menu-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.menu-item.active { 
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-left: 4px solid #fff !important;
}

/* --- CONTENU --- */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;

    align-items: center; /* 👈 AJOUTE JUSTE ÇA */

    padding: 60px 40px;
    height: 100vh;
    box-sizing: border-box;
    padding-right: 15px;
    overflow: auto;
}
.content section {
    display: flex;
    flex-direction: column; /* 🔥 IMPORTANT */
    align-items: center;    /* 🔥 centre horizontal */
}

#generator-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

h1 {
    font-weight: 800; text-transform: uppercase;
    margin-bottom: 50px; text-align: center; width: 100%;
    letter-spacing: 2px;
}

.gen-card.small-card {
    background: #0d0d0f; padding: 35px; border-radius: 12px;
    border: 1px solid var(--metal-border); width: 480px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.pass-container { display: flex; gap: 10px; width: 100%; margin-bottom: 25px; }

#pass-display {
    flex: 1; background-color: var(--terminal-black);
    border: 1px solid #1a1a1a; padding: 20px; color: #fff;
    font-family: 'Consolas', monospace; font-size: 1.5rem;
    font-weight: bold; text-align: center; border-radius: 6px; outline: none;
}

#copy-btn {
    width: 60px; background: #111; border: 1px solid var(--metal-border);
    color: #fff; border-radius: 6px; cursor: pointer; transition: 0.2s;
    display: flex; align-items: center; justify-content: center;
}

#copy-btn:hover { background: #fff; color: #000; }

.switches-compact {
    display: flex; justify-content: center; gap: 40px; margin: 25px 0;
    padding: 15px; background: rgba(255, 255, 255, 0.02); border-radius: 8px;
}

.switches-compact label {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-dim); font-weight: bold; cursor: pointer;
}

 #gen-btn { 
    width: 100%; 
    padding: 20px; 
    background: transparent; 
    color: #fff;
    border: 1px solid #fff;
    font-weight: 900; 
    text-transform: uppercase; 
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 10px var(--neon-glow-ice);
    letter-spacing: 2px;
}

#gen-btn:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px #ffffff;
    transform: translateY(-2px);
}

/* --- LOGIN SCREEN : LOOK NÉON BLANC & VERT --- */
#login-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #0D0D0F; 
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card {
    background: #121214; 
    padding: 40px 35px;
    border-radius: 40px; 
    width: 380px; 
    box-shadow: 0 40px 80px rgba(0,0,0,0.8);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-icon-header {
    margin-bottom: 35px;
}

.login-icon-header img {
    width: 65px;
    height: auto;
    filter: drop-shadow(0 0 8px var(--neon-white)) 
            drop-shadow(0 0 15px var(--neon-glow));
}

.login-inputs {
    margin-bottom: 25px;
}

#nickname, #master-password {
    background: #1C1C1E;
    border: 2px solid #3A3A3C; 
    padding: 15px 22px;
    color: #fff;
    border-radius: 20px;
    width: 100%;
    margin-bottom: 15px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#nickname::placeholder, #master-password::placeholder {
    color: #8E8E93;
}

#nickname:focus, #master-password:focus {
    border-color: var(--neon-white) !important; 
    box-shadow: 0 0 12px var(--neon-glow);
    background: #121214;
}

#unlock-btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: transparent; /* Fond transparent */
    color: #fff; 
    border: 1px solid #fff; /* Bordure blanche fine */
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 20px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--neon-glow-ice); /* Effet néon */
    letter-spacing: 2px;
}

#unlock-btn:hover {
    background: #fff; /* Devient plein au survol */
    color: #000;
    box-shadow: 0 0 25px #ffffff;
    transform: translateY(-2px);
}

#unlock-btn:active {
    transform: scale(0.97);
}

.login-error-msg {
    color: #FF453A;
    font-size: 0.8rem;
    font-weight: bold;
    display: none;
    margin-bottom: 10px;
}

.hidden-login {
    opacity: 0 !important;
    pointer-events: none;
    transform: scale(1.1) translateY(-20px);
}

/* Style additionnel pour l'alerte de sécurité que j'avais ajouté */
#setup-warning {
    background: rgba(255, 204, 0, 0.1);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 204, 0, 0.3);
    line-height: 1.4;
    text-align: left;
    margin-bottom: 15px;
}


/* Le fond qui assombrit l'écran */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Très haut pour passer devant tout */
}

.custom-modal {
    background: #0d0d0f;
    border: 1px solid #ffffff; /* Bordure blanche */
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    min-width: 280px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.15); /* Lueur blanche */
}

.modal-title {
    color: #ffffff;
    font-weight: 900;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); /* Titre qui brille */
}

.modal-btn {
    background: #ffffff;
    color: black;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 0.7rem;
    letter-spacing: 1px;
    transition: 0.3s;
}

.modal-btn:hover {
    box-shadow: 0 0 15px #ffffff;
    transform: scale(1.05);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.btn-neon {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;

    padding: 10px 20px;
    border-radius: 8px;

    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.8rem;

    cursor: pointer;
    transition: 0.25s;

    box-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.btn-neon:hover {
    background: #fff;
    color: #000;

    box-shadow: 
        0 0 10px #fff,
        0 0 20px #fff,
        0 0 30px rgba(255,255,255,0.6);

    transform: translateY(-1px);
}

 
@keyframes popupIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.content::-webkit-scrollbar {
    width: 10px;
}

.content::-webkit-scrollbar-track {
    margin-top: 20px;
    margin-bottom: 20px;
}

.content::-webkit-scrollbar-thumb {
    background: #121212;
    border-radius: 10px;
    border: 2px solid transparent; /* 🔥 crée un espace visuel */
    background-clip: content-box;
}

.content::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

section {
    display: none;
}
main {
    display: flex;
    justify-content: center; /* centre horizontal */
}

main section {
    width: 100%;
    max-width: 1000px;
}
.spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}