/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* BODY */
body {
    height: 100vh;
    background: #0a0f2c;
    overflow: hidden;
    color: white;
    position: relative;
}

/* 🌌 HALO */
body::before,
body::after {
    content: "";
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 132, 255, 0.2), transparent 60%);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

body::before {
    top: 50%;
    left: 20%;
    transform: translate(-50%, -50%);
}

body::after {
    top: 50%;
    left: 80%;
    transform: translate(-50%, -50%);
}

/* ✨ ÉTOILES */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.stars span {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    opacity: 0.7;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* HEADER */
.header::before {
    pointer-events: none;
}

.header {
    position: relative;
    z-index: 10;
    pointer-events: auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 15px 40px;

    background: rgba(10, 15, 44, 0.6);
    backdrop-filter: blur(10px);

    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(0, 132, 255, 0.2);
}

/* LOGO */
.logo-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

/* USER ICON */
.user-icon {
    font-size: 24px;
    cursor: pointer;
    transition: 0.3s;
}

.user-icon:hover {
    color: #00c6ff;
    transform: scale(1.2);
}

/* CENTER */
.center {
    position: relative;
    z-index: 1;

    height: calc(100vh - 80px);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* MESSAGE */
.login-warning {
    margin-bottom: 20px;
    opacity: 0.7;
}

/* CARDS CONTAINER */
.cards {
    display: flex;
    justify-content: center;
    gap: 80px;
}

/* CARD */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

/* ICON */
.card i {
    font-size: 50px;
    margin-bottom: 10px;
    transition: 0.3s;
}

/* TEXT */
.card span {
    font-size: 14px;
    opacity: 0.8;
}

/* HOVER (connecté uniquement) */
.cards.active .card:hover {
    transform: translateY(-8px);
}

.cards.active .card:hover i {
    color: #00c6ff;
}

/* 🔒 LOCK MODE */
.cards.disabled .card {
    opacity: 0.3;
    filter: blur(1px);
    pointer-events: none;
}

/* CADENAS */
.cards.disabled .card::after {
    content: "🔒";
    position: absolute;
    font-size: 18px;
    top: 10px;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;

    top: 0;      /* 🔥 AJOUT */
    left: 0;     /* 🔥 AJOUT */

    width: 100%;
    height: 100%;

    z-index: 9999; /* 🔥 augmente au passage */

    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);

    justify-content: center;
    align-items: center;
}

/* BOX */
.modal-box {
    width: 320px;
    padding: 30px;
    border-radius: 20px;

    background: rgba(10, 15, 44, 0.9);
    backdrop-filter: blur(20px);

    box-shadow:
        0 0 50px rgba(0, 0, 0, 0.8),
        0 0 80px rgba(0, 132, 255, 0.2);

    text-align: center;
}

/* INPUT */
.modal-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;

    border-radius: 25px;
    border: none;
    outline: none;

    background: rgba(255,255,255,0.08);
    color: white;
}

/* BUTTON */
.login-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;

    background: linear-gradient(135deg, #6a5cff, #b44cff);
    color: white;
    font-weight: 600;

    cursor: pointer;
    transition: 0.3s;

    box-shadow: 0 0 20px rgba(150, 80, 255, 0.5);
}

.login-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(150, 80, 255, 0.8);
}

/* LOGOUT */
.logout-btn {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 20px;
    transition: 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2);
}

.profile-menu {
    position: relative;
    z-index: 10000; /* 🔥 au-dessus de tout */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AVATAR */
.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}


/* DROPDOWN */
.dropdown {
    position: absolute;
    top: 60px;

    right: 50%; /* 🔥 point de départ au centre */
    transform: translateX(50%); /* 🔥 recentrage */

    background: rgba(20, 30, 70, 0.95);
    backdrop-filter: blur(15px);

    border-radius: 12px;
    padding: 8px;

    min-width: 180px;

    opacity: 0;
    pointer-events: none;
    transition: 0.2s;

    z-index: 10001;

}


/* ACTIF */
.dropdown.active {
    opacity: 1;
    pointer-events: auto;
}

/* ITEMS */
.dropdown a {
    display: block; /* 🔥 IMPORTANT */

    padding: 12px 15px;
    width: 100%; /* 🔥 prend toute la largeur */

    color: white;
    text-decoration: none;
    font-size: 14px;

    box-sizing: border-box; /* 🔥 FIX HITBOX */

    transition: 0.2s;
}

/* ICON */
.dropdown a i {
    width: 18px;
    text-align: center;
    color: inherit;
}

/* HOVER */
.dropdown a:hover {
    color: #00c6ff;
}