/* =======================
   Layout global + footer sticky
   ======================= */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
}

main {
    flex: 1; /* occupe tout l'espace entre header et footer */
}

/* =======================
   Header
   ======================= */
header {
    background: #4498db;
    color: white;
    padding: 20px;
    text-align: center;
}

#user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: none; /* caché quand non connecté */
}

/* =======================
   Bouton retour site principal
   ======================= */
.btn-back {
    position: fixed;
    top: 10px;
    left: 10px;
    padding: 8px 12px;
    background: #141414;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-back:hover {
    background: #0F0F0F;
}

/* =======================
   Sections
   ======================= */
section {
    padding: 20px;
    max-width: 800px;
    margin: 20px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* =======================
   Titres
   ======================= */
h1, h2, h3 {
    margin: 10px 0;
}

/* =======================
   Formulaires
   ======================= */
input {
    padding: 5px;
    margin-right: 5px;
}

#testButton {
    padding: 5px 10px;
    background: #4498db;
    color: white;
    border: none;
    cursor: pointer;
}

#testButton:hover {
    background: #347bb5;
}

/* =======================
   Résultats API
   ======================= */
#avatarResult img {
    max-width: 150px;
    margin-top: 10px;
}

/* =======================
   Footer
   ======================= */
footer {
    text-align: center;
    padding: 10px;
    background: #eee;
}

/* =======================
   Nav
   ======================= */

nav {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bouton */
nav button {
    background: linear-gradient(90deg, #121214, #0a0a0f); /* fond du bouton */
    border: none;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    outline: none;
    position: relative;
    overflow: hidden;
}

/* Texte dans le bouton */
nav button .login {
    display: inline-block;
    background: linear-gradient(90deg, #121214, #0a0a0f); /* ou une autre base */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: #ffffff; /* texte blanc au repos */
}

/* Hover : dégradé animé uniquement sur le texte */
nav button:hover .login {
    background-image: linear-gradient(270deg, #4498db, #00f0ff, #4498db);
    background-size: 200% auto;
    animation: electric-gradient 2s linear infinite;
    -webkit-text-fill-color: transparent;
}

@keyframes electric-gradient {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}
