* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: rgb(251, 251, 251);
    font-family: Verdana, Geneva, Tahoma, sans-serif ;
}

html body {
    height: 100%;
    font-size: 2vh;
    touch-action: pan-x pan-y; /* autorise le scroll mais bloque les zooms */
}

.error-message {
    background-color: #ffdddd;
    color: #d8000c;
    padding: 5px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
    font-size: 15px;
}

/* Style pour le header */
header {
    position: fixed; /* Nécessaire pour positionner le bouton hamburger */
    z-index: 3;
    width: 100vw;
    background-color: rgb(2, 2, 2);
    padding: 10px 20px;
    overflow: hidden;  /* Permet d'afficher le menu même si déborde du header */
    justify-content: space-between;
    border-top: 2px solid rgb(15, 94, 12);       /* Bordure verte */
    border-bottom: 2px solid rgb(15, 94, 12);       /* Bordure verte */
    
}

/* Style pour le menu de navigation sur grand écran */
nav ul {
    list-style: none;        /* Supprime les puces */
    display: flex;           /* Affiche les éléments en ligne */
    justify-content: right; /* Centre le menu horizontalement */
    height: 50px;
    align-items: center;
    
}

nav li {
    margin: 0 15px;          /* Espace entre les items */
}

nav a {
    color: rgb(251, 251, 251);            
    text-decoration: none;   /* Supprime le soulignement */
    font-size: 12px;
    font-weight: bold;
    transition: color 0.3s;
}

nav a:hover {
    color: rgb(15, 94, 12);             /* Changement de couleur au survol */
}

/* Bouton hamburger caché par défaut */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

#logo {
    position: fixed;
    z-index: 4;
    top: -35px;
    left: 5px;
    width: 150px;
    height: auto;
}

.boutton_header{
    background-color: rgb(15, 94, 12);
    align-items: center;
    border-radius: 10px;
    text-align: center;
    width: 130px;
    height: 30px;
}

.boutton_header:hover{
    background-color: rgb(25, 178, 20);
    cursor: pointer;  
}

.bloc{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

#formulaire_login{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    background: rgba(25, 178, 20, 0.7); /* fond blanc semi-transparent */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    text-align: center;
}

#formulaire_login h1{
    color: black;
    text-align: center;
    margin-bottom: 20px;
}

.input_box{
    width: 100%;
    position: relative;
    margin-bottom: 25px;
}

.input_box input{
    width: 100%;
    padding: 15px;
    border-radius: 25px;
    outline : none;
    background: transparent;
    border: 2px solid rgba(0, 0, 0, 0.2);
    color: black;
    padding-right: 40px;
}


.input_box input::placeholder{
    color: black;

}
.registered{
    transition: 0.5s;
    font-size: 15px;
    margin-top: 10px;
}

.registered a :hover {
    text-decoration: none;
}

.login_bouton{
    width: 100%;
    padding: 15px;
    border-radius: 25px;
    outline: none;
    font-weight: bold;
    color: black;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.5s;
}

.login_bouton:hover{
    background-color: transparent;
    border: 2px solid rgba(0, 0, 0, 0.2);
    color: rgb(251, 251, 251);
}

.image_login{
    width: 100%;
    height: 100vh; /* hauteur = 100% de la fenêtre */
    overflow: hidden; /* pour ne pas voir de débordement */
}

.image_login img{
    width: 100%;
    height: 100%;
    object-fit: cover; /* couvre toute la div sans se déformer */
    display: block;
}

/* Pour la partie register */

#formulaire_register h1{
    color: black;
    text-align: center;
    margin-bottom: 10px;
}

#formulaire_register label{
    padding-left: 10px;
}

.input_box{
    width: 100%;
    position: relative;
    margin-bottom: 5px;
}

input[type="date"] {
    position: relative;
    cursor: pointer; /* le curseur devient une main sur tout le champ */
}

/* Supprimer les styles par défaut dans certains navigateurs */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer; /* le curseur change sur l’icône calendrier */
}

.input_box input{
    width: 100%;
    padding: 15px;
    border-radius: 25px;
    outline : none;
    background: transparent;
    border: 2px solid rgba(0, 0, 0, 0.2);
    color: black;
    padding-right: 40px;
}


.input_box input::placeholder{
    color: black;
}

.input_box select {
    width: 100%;
    padding: 15px;
    border-radius: 25px;
    outline : none;
    background: transparent;
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.2);
    color: black;
    padding-right: 40px;
    appearance: none; /* supprime le style par défaut */
    -webkit-appearance: none;
    -moz-appearance: none;
}

.input_box select option{
    color: black;
}

.login_part{
    transition: 0.5s;
    font-size: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.login_part a :hover {
    text-decoration: none;
}

.registger_bouton{
    width: 100%;
    padding: 15px;
    border-radius: 25px;
    outline: none;
    font-weight: bold;
    color: black;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.5s;
}

.registger_bouton:hover{
    background-color: transparent;
    border: 2px solid rgba(0, 0, 0, 0.2);
    color: rgb(251, 251, 251);
}

.image_formation{
    width: 100%;
    height: 120vh; /* hauteur = 100% de la fenêtre */
    overflow: hidden; /* pour ne pas voir de débordement */
}

.image_formation img{
    width: 100%;
    height: 100%;
    object-fit: cover; /* couvre toute la div sans se déformer */
    display: block;
}


/* Media Query pour les petits écrans ----------------------------- */
@media screen and (max-width: 980px) {

    #logo{
        position: fixed;
        z-index: 4;
        top: -20px;
        left: 85vw;
        width: 100px;
        height: auto;
    }

    /* Affichage du bouton hamburger */
    .hamburger {
        display: block;
        position: relative;
        top: 15px;                 /* Place le coin supérieur du bouton à 50% du header */
        right: 0;              /* 20px du bord droit */
        transform: translateY(-50%); /* Centre verticalement */
        font-size: 28px;
        color:rgb(15, 94, 12);
        background: none;
        border: none;
    }

    /* Cache le menu initialement */
    nav ul {
        flex-direction: column;   /* Items en colonne */
        height: 0;
        text-align: left;        /* aligne les lignes à gauche */
        margin: 0 auto;          /* centre le bloc horizontalement */
        top: 0;
        right: 0;
        display: none;            /* Menu caché par défaut */
        padding-bottom: 0;
        background-color: transparent;   /* Fond noir pour le menu */
    }

    /* Lorsque la classe active est présente, on affiche le menu */
    nav ul.active {
        display: inline-block;
        height: 150px; /* Assez grand pour contenir tous les éléments */
    }

    nav li {
        margin: 10px 0;
    }

    @media screen and (max-width: 662px) {
        #logo{
            left: 75vw;
        }
    }
}