/* --- PAGE CONNEXION ORIENTALE --- */

/* Empêcher le scroll sur grand écran */
html, body {
    overflow: hidden;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: rgb(0, 0, 0);
}

.connexion-section {
    /* On prend tout l'écran mais on décale le contenu du haut de la hauteur exacte du header (ex: 70px) */
    min-height: 100vh;
    box-sizing: border-box;
    padding-top: 50px; /* Espace réservé pour que rien ne passe sous le header */
    padding-bottom: 20px;
    padding-left: 15px;
    padding-right: 15px;

    background-image: url("../images/page-de-connexion-1.png");
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-color: rgb(0, 0, 0);

    display: flex;
    flex-direction: column;
    justify-content: center; /* Centre verticalement le bloc titre + formulaire dans l'espace restant */
    align-items: center;
}

.connexion-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 25px;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255,255,255,0.4);
}

/* Boîte du formulaire */
.connexion-form {
    width: 420px;
    background: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 12px;

    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);

    box-shadow: 0 0 25px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

/* Labels */
.connexion-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #f5f5f5;
}

/* Champs */
.connexion-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 18px;

    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;

    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
}

.connexion-form input::placeholder {
    color: #ddd;
}

/* Effet focus */
.connexion-form input:focus {
    border-color: #ff9a51;
    box-shadow: 0 0 8px rgba(255,154,81,0.6);
}

/* Bouton */
.connexion-btn {
    width: 100%;
    padding: 12px;
    background: #ff9a51;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.connexion-btn:hover {
    background: #e57f33;
    transform: translateY(-2px);
}

/* Lien mot de passe oublié */
.connexion-form a {
    display: block;
    margin-top: 12px;
    text-align: center;
    color: #ff9a51;
    font-size: 15px;
    text-decoration: none;
}

.connexion-form a:hover {
    text-decoration: underline;
}

/* --- VERSION MOBILE & TABLETTE --- */
@media (max-width: 768px) {

    html, body {
        overflow: hidden;
        height: 100%;
        background-color: #ffffff;
        margin: 0;
        padding: 0;
    }

    .connexion-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        
        /* Utilisation de 100dvh pour s'adapter à la barre d'URL des vrais mobiles */
        height: 100dvh;
        min-height: 100dvh;
        width: 100vw;
        
        padding-top: 60px; /* Espace pour le header fixe */
        padding-bottom: 10px;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;

        background-color: #0b0b0b;
        /* On force le décor à s'aligner en bas de l'écran visible */
        background-position: bottom center;
        background-size: cover;
    }

    /* Header fixe tout en haut */
    header {
        position: fixed;
        top: 0px;
        left: 0;
        width: 100%;
        height: 69px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
        background: #ffffff;
        z-index: 1000;
        box-sizing: border-box;
        margin: 0;
        border: none;
    }

    header img, header .logo {
        max-height: 60px;
        width: auto;
    }

    /* --- STYLE DU LOGO ROND SUR MOBILE & TABLETTE --- */
    .connexion-logo-mobile {
        display: block;
        width: 170px;        /* Augmenté pour ne plus faire "ridiculement petit" */
        height: 170px;       /* Doit être égal à la largeur pour rester parfaitement rond */
        object-fit: cover;
        border-radius: 50%;  
        margin: -20px auto 15px auto; /* Centre le logo et espace un peu plus le titre en dessous */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        border: 3px solid rgba(255, 255, 255, 0.25);
    }

    .connexion-title {
        font-size: 18px;
        margin-top: 0;
        margin-bottom: 10px;
        text-align: center;
    }

    .connexion-form {
        width: 92%;
        max-width: 380px;
        margin: 0 auto;
        padding: 14px;
        border-radius: 10px;
        backdrop-filter: blur(6px);
        box-sizing: border-box;
    }

    .connexion-form input {
        padding: 8px;
        font-size: 14px;
        margin-bottom: 8px;
        box-sizing: border-box;
    }

    .connexion-btn {
        padding: 10px;
        font-size: 15px;
    }
}

/* --- VERSION DESKTOP (Ordinateur) --- */
@media (min-width: 769px) {
    /* Masque le logo rond mobile sur grand écran si nécessaire */
    .connexion-logo-mobile {
        display: none;
    }
}