/* Conteneur global du formulaire */
.container_elements {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #303030;
    color: white;
}

/* Boîte du formulaire d'inscription */
.register_box,.login_container {
    background-color: #1a1a1a;
    padding:10px 30px;
    border-radius: 8px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5);
    width: auto;
}

/* Titre du formulaire */
.register_box h2 {
    margin-bottom: 20px;
}

/* Champs de texte et images */
.register_form input[type="text"],
.register_form input[type="email"],
.login_container input[type="text"],
.register_form input[type="password"],
.login_container input[type="password"],
.register_form input[type="date"],
.activation_form input[type="text"],
.activation_form input[type="email"],
.register_form select {
    width: 100%;
    padding: 10px 10px 10px 35px; /* Padding pour les icônes */
    height: 40px;
    min-width:186px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #272727;
    color: white;
    transition: border-color 0.3s;
    box-sizing: border-box; /* S'assure que le padding ne dépasse pas la largeur */
}

/* Styles pour l'effet au focus OK ou NOK*/
.register_form input:focus,
.register_form select:focus,
.activation_form input:focus,
.activation_form select:focus,
.login_container input:focus,
.login_container select:focus {
    border-color: #904545; /* Rouge pour les champs non valides au focus */
    outline: none;
}

.register_form input.valid,
.activation_form input.valid, 
.register_form select.valid,
.login_form input.valid  {
    border-color: #45904b; /* Vert pour les champs valides */
}

.register_form input.invalid,
.activation_form input.invalid,
.register_form select.invalid {
    border-color: #904545; /* Rouge pour les champs invalides */
}
.register_btn:disabled,
.activate_btn:disabled,
.login_btn:disabled {
    background-color: #777; /* Couleur des boutons action grisée */
    cursor: not-allowed; /* Curseur interdit pour indiquer qu'il est désactivé */
}
/* Icônes dans les champs */
.register_form table tr td img,
.activation_form table tr td img {
    height: 20px;
    position: absolute;
    left: 39px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
}
.pseudo_label img,
.password_label img{
        height: 20px;
    position: absolute;
    left: 39px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
}
/* Style des champs et des labels dans les checkbox */
.checkbox_td label {
    color: #d3d3d3;
    font-size: 0.9rem;
    margin-left: 8px;
}

.checkbox_td input[type="checkbox"] {
    accent-color: #45904b; /* Personnalise la couleur de la case à cocher */
}

/* Style du bouton d'incription*/
.register_btn,
.login_btn,
.activate_btn {
    background-color: #455190;
    color: white;
    border: none;
    width: 100%;
    border-radius: 5px;
    padding: 10px 0;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
}

.register_btn:hover,
.login_btn:hover,
.activate_btn:hover {
    background-color: #45904b;
}

/* Style du conteneur des champs et des labels */
.register_form table tr td,
.login_container table tr td,
.activation_form table tr td {
    position: relative;
    padding: 18px 30px;
    color: white;
}
/* Style des select */
.register_form select,
.login_container select,
.activation_form select {
    appearance: none;
    background-size: 15px;
    color: #d3d3d3;
}
/* Indicateur sécurité password*/
.strength-indicator {
    margin-top: 5px;
    font-size: 14px;
    font-weight: bold;
    color:red;
    position:absolute;
}
/* Définis la couleur du mdp si bon ou non*/
.weak {
    color: red;
}

.medium {
    color: orange;
}

.strong {
    color: green;
}
/* Style des boutons de connexion via plateforme */
.social-login {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
    cursor: pointer;
    overflow: auto;
    background-color: transparent;
    border: none;
}

.social-btn img {
    width: 40px;
    height: 40px;
    opacity: 0.8;
}

.social-btn:hover {
    transform: scale(1.1);
}

.stay_logged{
    margin-right: 10px;
}

.separator-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.separator-text {
    padding: 0 10px;
    color: #d8d8d8; /* Couleur du texte */
    font-weight: bold;
    font-size: 1.1em; /* Taille du texte */
}
.test{
    background-color: #f4f4f4;
}
/* Positionnement de l'alerte au centre en bas */
.alert {
    position: fixed !important;          /* Position fixe pour qu’elle reste en bas de la page */
    bottom: 0px;             /* Distance depuis le bas de la page */
    left: 50%;                /* Positionnement horizontal au centre */
    transform: translateX(-50%); /* Centre parfaitement l’alerte */
    max-width: 90%;
    min-width: 400px;             /* Largeur fixe sur grands écrans */
    z-index: 9999;            /* La rend prioritaire sur d’autres éléments */
    padding: 15px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    color: #fff;
    opacity: 0;
    transform: translate(-50%, 10px); /* Ajuste le positionnement avec l’animation */
    animation: fadeIn 0.5s forwards;
}

/* Animation d’apparition */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translate(-50%, 0); /* Ajuste la translation */
    }
}

/* Animation de disparition */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
}
/* Ecran de chargement*/
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #8686865d; /* Couleur semi-transparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    border: 4px solid #f3f3f3; /* Couleur du fond */
    border-top: 4px solid #333; /* Couleur de l'animation */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


@media only screen and (max-width: 768px) {
    .container_elements{
        margin-top:45px;
        padding-bottom: 50px;
    }.register_box{
        margin-top: 40px;
    }

}
@media only screen and (max-width: 600px) {
    .register_box {
        padding: 0px 1px;
    }
    .register_form table tr td {
        padding: 18px 4px;
    }
    .register_box h2 {
        font-size: 1.5rem;
    }

    .register_form input[type="text"],
    .register_form input[type="email"],
    .register_form input[type="password"],
    .register_form input[type="date"],
    .register_form select {
        font-size: 0.9rem;
    }
    .register_form table tr td img {
        left:12px;
    }
    .register_btn,
    .login_btn {
        padding: 8px 0;
        font-size: 0.9rem;
    }
    .strength-indicator{
        font-size: 0.6em;
    }

}

