/* ========================================
   STYLES COSMIQUES POUR HEADER ET SECTIONS
   ======================================== */

/* Container des boutons header */
.header-buttons-cosmic {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: 15px;
    border: 1px solid rgba(100, 149, 237, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Boutons cosmiques - Style de base */
.cosmic-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 2px solid;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.cosmic-btn .btn-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 3px currentColor);
}

.cosmic-btn .btn-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
}

/* Effet brillant au survol */
.cosmic-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.cosmic-btn:hover::before {
    left: 100%;
}

/* Bouton Mode Nuit - Bleu nuit */
.cosmic-btn-dark {
    background: linear-gradient(135deg, rgba(25, 25, 112, 0.8), rgba(0, 0, 139, 0.6));
    border-color: rgba(100, 149, 237, 0.6);
    color: #e6f2ff;
}

.cosmic-btn-dark:hover {
    background: linear-gradient(135deg, rgba(25, 25, 112, 0.95), rgba(0, 0, 139, 0.8));
    border-color: rgba(135, 206, 250, 0.8);
    box-shadow: 0 0 20px rgba(100, 149, 237, 0.6),
                0 0 40px rgba(100, 149, 237, 0.3);
    transform: translateY(-2px);
}

/* Bouton Langue - Cyan cosmique */
.cosmic-btn-lang {
    background: linear-gradient(135deg, rgba(0, 139, 139, 0.7), rgba(0, 206, 209, 0.5));
    border-color: rgba(64, 224, 208, 0.6);
    color: #e0ffff;
}

.cosmic-btn-lang:hover {
    background: linear-gradient(135deg, rgba(0, 139, 139, 0.9), rgba(0, 206, 209, 0.7));
    border-color: rgba(64, 224, 208, 0.9);
    box-shadow: 0 0 20px rgba(64, 224, 208, 0.6),
                0 0 40px rgba(64, 224, 208, 0.3);
    transform: translateY(-2px);
}

/* Bouton Connexion - Vert cosmique */
.cosmic-btn-login {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.8), rgba(50, 205, 50, 0.6));
    border-color: rgba(144, 238, 144, 0.7);
    color: #f0fff0;
}

.cosmic-btn-login:hover {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.95), rgba(50, 205, 50, 0.8));
    border-color: rgba(144, 238, 144, 0.9);
    box-shadow: 0 0 20px rgba(50, 205, 50, 0.6),
                0 0 40px rgba(50, 205, 50, 0.3);
    transform: translateY(-2px);
}

/* Bouton Profil - Violet cosmique */
.cosmic-btn-profile {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.8), rgba(147, 112, 219, 0.6));
    border-color: rgba(186, 85, 211, 0.7);
    color: #f8f0ff;
}

.cosmic-btn-profile:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.95), rgba(147, 112, 219, 0.8));
    border-color: rgba(186, 85, 211, 0.9);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.6),
                0 0 40px rgba(138, 43, 226, 0.3);
    transform: translateY(-2px);
}

/* Animation de pulsation pour bouton connexion */
@keyframes pulse-login {
    0%, 100% { box-shadow: 0 0 10px rgba(50, 205, 50, 0.4); }
    50% { box-shadow: 0 0 20px rgba(50, 205, 50, 0.7), 0 0 30px rgba(50, 205, 50, 0.4); }
}

.cosmic-btn-login {
    animation: pulse-login 3s ease-in-out infinite;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .header-buttons-cosmic {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.4rem;
    }

    .cosmic-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .cosmic-btn .btn-text {
        display: none; /* Cache le texte sur mobile, garde seulement l'icône */
    }

    .cosmic-btn .btn-icon {
        font-size: 1.4rem;
    }
}

/* ========================================
   FOND ÉTOILÉ POUR HIÉROGLYPHES
   ======================================== */

#hieroglyphes {
    position: relative;
    background: linear-gradient(135deg,
        rgba(10, 10, 40, 0.95) 0%,
        rgba(20, 20, 60, 0.9) 50%,
        rgba(30, 15, 50, 0.95) 100%
    );
    overflow: hidden;
}

/* Fond étoilé animé */
#hieroglyphes::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 90%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    opacity: 0.6;
    animation: starfield 120s linear infinite;
    pointer-events: none;
    z-index: 0;
}

/* Étoiles scintillantes (couche 2) */
#hieroglyphes::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 215, 0, 0.8), transparent),
        radial-gradient(1px 1px at 70% 40%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(173, 216, 230, 0.7), transparent),
        radial-gradient(2px 2px at 85% 85%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 25% 45%, rgba(255, 215, 0, 0.6), transparent);
    background-size: 300% 300%;
    animation: twinkle 8s ease-in-out infinite;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* S'assurer que le contenu est au-dessus */
#hieroglyphes > * {
    position: relative;
    z-index: 1;
}

/* Animation du champ d'étoiles */
@keyframes starfield {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Animation scintillement */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

/* Ajout d'une lueur dorée pour le titre de la section hiéroglyphes */
#hieroglyphes h2 {
    text-shadow:
        0 0 10px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.2);
    animation: glow-title 3s ease-in-out infinite;
}

@keyframes glow-title {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(255, 215, 0, 0.5),
            0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        text-shadow:
            0 0 20px rgba(255, 215, 0, 0.7),
            0 0 30px rgba(255, 215, 0, 0.5),
            0 0 40px rgba(255, 215, 0, 0.3);
    }
}

/* Effet de brillance sur les cartes de niveaux dans la section hiéroglyphes */
#hieroglyphes .card {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#hieroglyphes .card:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(255, 215, 0, 0.3);
    transform: translateY(-5px) scale(1.02);
}
