/* Style global */

* {
    box-sizing: border-box;
}  

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #1a1a1a; /* Fond sombre */
    color: #fff;
}

/* Header */
header {
    z-index: 1000;
    background-color: #1a1a1a;
    padding: 8px 20px; /* ↓ réduit verticalement */
    height: 85px;      /* hauteur fixe plus fine */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;            /* Active le mode flex (flexbox) pour aligner gauche/droite */
    justify-content: space-between; /* Espace entre le texte gauche et l'icône droite */
    align-items: center;      /* Centre verticalement */
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.head-link {
    color: #FFFF00; /* jaune fluo */
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    transition: color 0.3s; /* la couleur changera en 0.3s */
}

.head-link:hover {
    color: #999900; /* jaune plus clair au survol */
}

.logo {
    width: 180px;   /* ajuste ici (ex: 160px, 180px…) */
    height: auto;
    display: block;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.logo-link {
    display: flex;
    align-items: center;
    transition: transform 0.1s ease;
}

.logo-link:hover .logo {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(255, 255, 0, 0.6));
    cursor: pointer;
}

.logo-link:active .logo {
    transform: scale(0.95);
    filter: drop-shadow(0 0 4px rgba(255, 255, 0, 0.8));
    transform: translateY(1px);
}
.user-greeting {
    color: #FFFF00;
    font-weight: 600;
    margin-right: 10px;
    font-size: 16px;
}

.login-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: transparent;
    color: #FFFF00;
    font-weight: 700;
    border: 2px solid #FFFF00;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-button:hover {
    background-color: #FFFF00;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 0, 0.4);
    cursor: pointer;
}



/* Icône et texte à droite */
/* Container du dropdown */
.user-dropdown {
    position: relative;
    display: inline-block;
}

/* Bouton déclencheur */
.user-menu-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    color: #FFFF00;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.user-menu-btn:hover {
    background-color: rgba(255, 255, 0, 0.1);
}

.user-icon svg {
    width: 24px;
    height: 24px;
    margin-left: 10px;
    stroke: #FFFF00;
}

/* Le menu caché par défaut */
.dropdown-content {
    display: none; /* Caché via JS */
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #222; /* Fond sombre comme tes cartes */
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    border: 1px solid #333;
    border-radius: 8px;
    z-index: 1001;
    margin-top: 10px;
    overflow: hidden;
}

/* Classe pour afficher le menu via JS */
.dropdown-content.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Éléments du menu */
.dropdown-header {
    padding: 12px 16px;
    font-size: 12px;
    color: #777;
    text-transform: uppercase;
    font-weight: bold;
}

.dropdown-item {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-item:hover {
    background-color: #FFFF00;
    color: #1a1a1a;
}

.dropdown-divider {
    border: 0;
    border-top: 1px solid #333;
    margin: 0;
}

.logout-btn {
    color: #FF6347; /* Rouge/Orange pour la déconnexion */
    font-weight: bold;
}

header h1 {
    margin: 0;
    color: #FFFF00; /* Fluo jaune */
    font-size: 24px;
}

/* Contenu principal */
main {
    padding: 100px 20px 20px 20px; /* Pour que le contenu ne soit pas caché par le header */
}

.link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.link:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 255, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.scroll-container {
    display: flex;
    flex-direction: row;
    gap: 20px;

    overflow-x: auto;
    overflow-y: hidden;

    padding: 10px 20px;
    scroll-snap-type: x mandatory;
}

/* Carte bloc */
.card {
    min-width: 220px;
    max-width: 90vw;

    background-color: #222;
    border: 1px solid #333;
    border-radius: 14px;
    padding: 16px;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);

    scroll-snap-align: start;
    flex-shrink: 0;
}

.card .title {
    font-size: 20px;
    font-weight: 700;
    color: #FFFF00;
    margin-bottom: 6px;
    border-bottom: 1px solid #444;
    padding-bottom: 6px;
    text-align: center; /* Centre uniquement le texte du titre */
}

/* Sous-titre */
.card .subtitle {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 10px;
}

/* Top set */
.card .set {
    margin-bottom: 8px;
    font-size: 16px;
}

.card .set .series {
    font-weight: 600;
    color: #FFD700; /* doré pour les séries */
}

.card .set .reps {
    font-weight: 500;
    color: #FFD700; /* bleu clair pour les reps */
}

.card .set .weight {
    font-weight: 700;
    color: #FF6347; /* rouge/orange pour le poids */
}
.card .set:last-child {
    border-bottom: none;
}

.card .set strong {
    color: #fff;
}

.card em {
    color: #aaa;
}

.at-symbol {
    color: #FFFF00;  /* couleur différente */
    font-weight: bold; /* gras si tu veux */
}


.navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.navigation .title{
    font-size: 22px;
    font-weight: bold;
    color: #FFFF00;
}

.navigation .arrow {
    font-size: 28px;
    color: #FFFF00;
    text-decoration: none;
    transition: transform 0.2s, color 0.2s;
}

.navigation .arrow:hover {
    transform: scale(1.2);
    color: #999900;
}

.navigation .arrow.disabled {
    color: #555;
    cursor: default;
    pointer-events: none;
}

.head-content {
    text-align: center;
    margin-bottom: 25px;
}

.head-content .title {
    font-size: 26px;
    font-weight: 800;
    color: #FFFF00;
    letter-spacing: 1px;
    margin: 0;
}

.head-content .underline {
    width: 60px;
    height: 3px;
    background-color: #FFFF00;
    margin: 8px auto 0 auto;
    border-radius: 2px;
    opacity: 0.8;
}


/* Bouton retour */
.back-button {
    position: fixed;
    top: 100px;       /* aligné avec le padding du header */
    left: 20px;
    padding: 8px 14px;
    background-color: #1a1a1a; /* même que le header pour fondu */
    color: #FFFF00;             /* jaune fluo */
    text-decoration: none;
    font-weight: 700;
    border: 2px solid #FFFF00;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 1000;   /* au-dessus de tout */
}

.back-button:hover {
    background-color: #FFFF00;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 0, 0.4);
    cursor: pointer;
}


/* Mobile */
@media (max-width: 600px) {
    .head-content {
        font-size: 22px;
    }

    header {
        flex-direction: column;
        align-items: center;
        padding: 6px 10px;
        height: 65px;
        flex-direction: row; /* évite qu'il reprenne trop de hauteur */
        gap: 10px;
    }

    header h1 {
        font-size: 18px;
        text-align: center;
        line-height: 1.3;
    }

    .logo {
        width: 130px;
    }

    .training {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .login-container {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    main {
        padding-top: 90px; /* IMPORTANT : header plus haut sur mobile */
    }

    .scroll-container {
        padding: 10px;
        gap: 15px;
    }

    .card {
        min-width: 240px;
        max-width: 240px;
    }
    
    
    .login-button {
        padding: 6px 10px;
        font-size: 14px;
        border-radius: 6px;
    }

    .user-greeting {
        font-size: 14px;
    }

    .back-button {
        padding: 6px 10px;
        font-size: 14px;
        border-radius: 6px;
        position: static;
        margin: 10px auto;
        display: inline-block;
    }

    .navigation {
        margin-top: 10px;
    }
}


