/* Reset et base */
*
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables de thème */
:root
{
    --header-footer-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body
{
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* Header */
.header
{
    display: flex;
    flex-direction: column;
    /* haut : titre+logo, bas : bouton */
    background: var(--header-footer-gradient);
    color: white;
    padding: 20px 24px;
    position: relative;
    gap: 10px;
}

/* Ligne du haut : titre/sous-titre + logo */
.header-top
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Bloc texte centré entre bord gauche et logo */
.logo
{
    flex: 1 1 auto;
    text-align: center;
    min-width: 0;
}

/* Logo à droite */
.logo-container
{
    flex: 0 0 auto;
    display: inline-flex;
}



.logo-frame
{
    position: relative;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #fff8, #0002);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}



.logo-label
{
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Pinyon Script", "Segoe Script", "Brush Script MT", cursive;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #1a3c5e;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    z-index: 2;
    padding: 1px 5px;
    border-radius: 4px;
}

.logo p.page-subtitle
{
    font-size: 1.2rem;
    /* Taille intermédiaire entre le h1 et le texte normal */
    margin: 5px 0 0 0;
    /* Espacement ajusté */
    color: #666;
    /* Couleur plus douce pour le sous-titre */
    font-weight: 400;
    /* Poids normal, moins gras que le h1 */
}

.logo-img
{
    width: 36px;
    height: 36px;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* Bouton sous le titre */
.btn-back
{
    align-self: flex-start;
    /* sous le titre, à gauche */
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    /* autoriser le retour à la ligne sur petits écrans */
    white-space: normal;
    max-width: 100%;
}

.btn-back:hover
{
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}



/* Responsif header */

@media (max-width: 768px)
{
    .header
    {
        padding: 18px 16px;
    }

    .header-top
    {
        flex-direction: column;
        /* empile texte et logo */
        align-items: center;
        text-align: center;
    }

    .logo
    {
        text-align: center;
    }

    .btn-back
    {
        align-self: center;
        /* centré sous le titre */
        text-align: center;
    }
}

/* Très petits écrans : ajuste le logo */
@media (max-width: 430px)
{
    .logo-frame
    {
        width: 48px;
        height: 48px;
    }

    .logo-img
    {
        width: 32px;
        height: 32px;
    }

    .logo-label
    {
        font-size: 18px;
        top: 3px;
    }
}

/* Alertes */
.alert
{
    padding: 15px 25px;
    margin: 25px;
    border-radius: 15px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.alert a
{
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.alert-success
{
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.alert-danger
{
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.alert-warning
{
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

.alert-info
{
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

/* contenude la page */
.page-content
{
    padding: 30px 0 30px;
    /* espace blanc haut / bas dans la carte */
}

/* un peu plus d’air : */
@media (min-width: 769px)
{
    .page-content
    {
        padding: 40px 0 40px;
    }
}

.username
{
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}
/* Boutons génériques */
.btn
{
    padding: 18px 30px;
    border: none;
    border-radius: 15px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.btn-primary
{
    background: var(--header-footer-gradient);
    color: white;
}

.btn-secondary
{
    background: #6c757d;
    color: white;
}

.btn:hover:not(:disabled)
{
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.btn:disabled
{
    opacity: 0.7;
    cursor: not-allowed;
}



.btn-loading
{
    display: inline-block;
}



.btn-loading::after
{
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    display: inline-block;
}



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



/* Carte principale */
.page-parent-container
{
    backdrop-filter: blur(10px);
    padding: 45px;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

@media (max-width: 480px)
{
    .page-parent-container
    {
        margin: 10px;
        border-radius: 15px;
        padding: 30px 20px;
    }
}

/* Footer */
.footer
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 20px;
    background: var(--header-footer-gradient);
    /* même dégradé que le header */
    color: #ffffff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
}

.footer-left
{
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-right 
{
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.footer-right p 
{
    margin: 0;
    width: 100%;
    text-align: right;       /* ← Renforce l'alignement du texte */
}

.footer-brand
{
    display: flex;
    flex-direction: column;
}

.footer-title
{
    font-weight: 600;
}

.footer-subtitle
{
    opacity: 0.8;
    font-size: 0.8rem;
}

.footer-center
{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo
{
    height: 40px;
    width: auto;
    border-radius: 8px;
    background: #ffffff;
    padding: 4px;
}

.footer-my
{
    position: absolute;
    top: -6px;
    right: -8px;
    font-family: 'Pinyon Script', cursive;
    font-size: 0.9rem;
    color: #ffd54f;
}

.footer-copy,.footer-version 
{
    white-space: nowrap;     /* ← Garde copyright+version sur 1 ligne */
    /* ou  display: inline-flex;    /* Alternative : flex inline */
}

.footer-link
{
    color: #ffffff;
    text-decoration: none;
    opacity: 0.9;
}

.footer-link:hover
{
    text-decoration: underline;
    opacity: 1;
}



@media (max-width: 768px)
{
    .footer
    {
        flex-direction: column;
        text-align: center;
    }

    .footer-left, .footer-right
    {
        justify-content: center;
        flex-wrap: wrap;
    }
}


/* Couleurs de stages */
.bg-psychomotFun
{
    background-color: #4894B6;
    color: #ffffff;
}

.bg-sportFun
{
    background-color: #CD2CF4;
    color: #ffffff;
}

.bg-AquaFun
{
    background-color: #f4131f;
    color: #ffffff;
}

.bg-RideFun
{
    background-color: #EE09E7;
    color: #ffffff;
}

.bg-RideProFun
{
    background-color: #F75860;
    color: #ffffff;
}

.bg-CooknFun
{
    background-color: #0AE7F2;
    color: #ffffff;
}

.bg-AventureFun
{
    background-color: #F1C50E;
    color: #ffffff;
}

.bg-NautiqueFun
{
    background-color: #65CA5A;
    color: #ffffff;
}


/* Couleurs de texte */
.font-psychomotFun
{
    color: #4894B6;
}

.font-sportFun
{
    color: #CD2CF4;
}

.font-AquaFun
{
    color: #f4131f;
}

.font-RideFun
{
    color: #EE09E7;
}

.font-RideProFun
{
    color: #F75860;
}

.font-CooknFun
{
    color: #0AE7F2;
}

.font-AventureFun
{
    color: #F1C50E;
}

.font-NautiqueFun
{
    color: #65CA5A;
}