/* ---------- Fond général ---------- */
body.page-id-1351 {
    background: #3f0267 !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    position: relative;
    overflow-y: auto !important;
    padding-bottom: 10vh !important;
    /* Espace supplémentaire en bas */
    box-sizing: border-box !important;
    overscroll-behavior-y: contain !important;
    scrollbar-gutter: stable both-edges !important;
}

/* Assurer un scroll fluide et de l'espace supplémentaire */
html {
    scroll-behavior: smooth !important;
    height: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ---------- Motif SVG en background ---------- */
body.page-id-1351:before {
    content: '';
    position: fixed;
    width: 150vw;
    height: 150vh;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='2116' height='1717' viewBox='0 0 2116 1717' fill='none'><path opacity='0.1' d='M320.548 352.463C98.9235 743.73 -26.2316 1523.36 552.193 1522.2C1188.43 1520.93 1361.32 426.497 991.412 426.497C621.508 426.497 754.763 1571.38 1316.93 1581.43C1952.51 1592.8 2109.98 431.144 1879.69 74' stroke='%23C66FFF' stroke-width='270.002'/></svg>");
    background-size: 70%;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.2 !important;
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ---------- Conteneur principal ---------- */
.eael-login-registration-wrapper,
.eael-lr-form-wrapper.eael-login-registration-wrapper,
.eael-lr-form-wrapper.eael-register-wrapper,
.eael-lr-form-wrapper.eael-lostpassword-wrapper,
.wagas-login-form {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(15px) !important;
    padding: 2.5rem !important;
    /* Padding augmenté pour assurer l'espace interne */
    border-radius: 16px !important;
    max-width: 520px !important;
    /* Largeur augmentée de 460px à 520px */
    margin: 4vh auto 6vh auto !important;
    /* Ajout de marge en bas pour l'espace */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important;
    position: relative;
    z-index: 1;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* Ajout du style pour lr-form-wrapper */
.lr-form-wrapper {
    width: 100% !important;
    max-width: 762px !important;
    /* Augmentation de la largeur à 762px */
    margin: 0 auto !important;
}

/* Force 100% width for wagas containers to avoid inheritance issues */
.wagas_up_container {
    width: 100% !important;
    max-width: 100% !important;
}

/* ---------- Champs formulaire ---------- */
.eael-lr-form-control,
.eael-register-form-control,
.eael-lostpassword-form-control,
.wagas-login-form input {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    padding: 1.3rem 1.5rem !important;
    width: 100% !important;
    font-size: 16px !important;
    margin-bottom: 1rem !important;
    position: relative;
    /* Pour positionner les icônes */
}

/* Style spécifique pour les champs password avec wrapper */
.eael-lr-password-wrapper,
.eael-lr-password-wrapper-register {
    position: relative !important;
    width: 100% !important;
}

.eael-lr-password-wrapper input,
.eael-lr-password-wrapper-register input {
    padding-right: 50px !important;
    /* Espace pour l'icône */
}

/* ---------- Labels ---------- */
.eael-field-label {
    color: rgba(255, 255, 255, 1) !important;
    /* Amélioration du contraste */
    font-weight: 500 !important;
}

/* ---------- Style pour les icônes de visibilité du mot de passe ---------- */
/* Bouton toggle password */
.wp-hide-pw {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    width: 30px !important;
    /* Largeur fixe, pas 100% */
    height: 30px !important;
    cursor: pointer !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

/* Icônes dashicons dans le bouton */
.dashicons-visibility,
.dashicons-hidden {
    color: rgba(63, 2, 103, 0.6) !important;
    font-size: 20px !important;
    transition: color 0.2s ease !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
    padding: 5px !important;
}

.dashicons-visibility:hover,
.dashicons-hidden:hover,
.wp-hide-pw:hover .dashicons-visibility,
.wp-hide-pw:hover .dashicons-hidden {
    color: rgba(63, 2, 103, 0.9) !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ---------- Boutons ---------- */
#eael-login-submit,
#eael-register-submit,
#eael-lostpassword-submit,
button.eael-lr-btn.eael-lr-btn-block,
.wagas-login-form button {
    background: #fece1f !important;
    color: #3f0267 !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    font-weight: 600 !important;
    width: 100% !important;
    min-width: 240px !important;
    margin: 1.5rem auto 0 !important;
    display: block !important;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease !important;
}

#eael-login-submit:hover,
#eael-register-submit:hover,
#eael-lostpassword-submit:hover,
button.eael-lr-btn.eael-lr-btn-block:hover,
.wagas-login-form button:hover {
    transform: scale(1.02) !important;
    background-color: #eab308 !important;
}

/* Correction du bouton submit qui sort du container en mobile */
.eael-lr-form-loader-wrapper {
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
}

.eael-lr-form-loader-wrapper .eael-lr-btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ---------- Liens ---------- */
.eael-lr-link,
.wagas-login-form a {
    color: rgba(254, 206, 31, 0.95) !important;
    /* Amélioration du contraste */
    text-decoration: underline !important;
    font-size: 0.95em !important;
}

/* ---------- Styles spécifiques pour le formulaire d'inscription ---------- */
/* Ciblage précis des groupes de champs dans le formulaire d'inscription */
.eael-register-form .eael-lr-form-group {
    margin-bottom: 0.2rem !important;
    /* Réduction drastique des marges */
}

.eael-register-form-container .eael-field-group {
    margin-bottom: 0.2rem !important;
    /* Réduction de l'espace entre les champs */
}

.eael-register-form-container .recaptcha-checkbox-border {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 6px !important;
}

/* Réduction des marges pour le formulaire d'inscription */
.eael-lr-form-wrapper.eael-register-wrapper {
    padding: 1.5rem !important;
    /* Réduction du padding */
    /* Retrait du scroll spécifique - maintenant géré par le body */
}

/* Réduction spécifique des espacements dans le formulaire d'inscription */
.eael-register-form .eael-lr-form-control {
    margin-bottom: 0.2rem !important;
    /* Réduction drastique de l'espace entre les inputs */
    padding: 0.8rem 1rem !important;
    /* Padding réduit des inputs */
}

.eael-register-form .eael-field-label {
    margin-bottom: 0.1rem !important;
    /* Réduction de l'espace sous les labels */
    font-size: 0.9rem !important;
    /* Labels plus petits */
}

/* Réduction de l'espace du footer dans le formulaire d'inscription */
.eael-register-form .eael-lr-footer {
    margin-top: 0.5rem !important;
    /* Réduction de la marge du footer */
}

/* Message de confirmation, erreur et info */

.eael-form-msg,
.lr-form-wrapper .eael-form-msg {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(5px) !important;
    border-left: 4px solid #fece1f !important;
}

/* Afficher le texte d'erreur en rouge dans le formulaire d'inscription */
.eael-register-form .eael-form-msg.error,
.eael-register-form .eael-form-msg.eael-lr-error-message,
.eael-register-form .eael-lr-form-message.eael-lr-error-message {
    color: #e63c3c !important;
}

.eael-form-msg.error {
    border-left-color: #e63c3c !important;
}

.eael-form-msg.success {
    border-left-color: #2ecc71 !important;
}

/* Cases à cocher et conditions d'utilisation */
.eael-checkbox-wrap {
    display: flex !important;
    align-items: center !important;
    margin: 1rem 0 !important;
}

.eael-checkbox-wrap input[type="checkbox"] {
    margin-right: 8px !important;
    width: auto !important;
}

.eael-checkbox-wrap label {
    color: rgba(255, 255, 255, 0.9) !important;
    /* Amélioration du contraste */
    font-size: 0.95em !important;
    margin: 0 !important;
}

/* ---------- Styles pour les tabs de navigation entre login/register ---------- */
.eael-lr-tabs {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px 10px 0 0 !important;
    display: flex !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
}

.eael-lr-tab {
    flex: 1 !important;
    text-align: center !important;
    padding: 1rem 0.5rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.eael-lr-tab.active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fece1f !important;
}

/* Support pour la navigation au clavier */
.eael-lr-tab:focus {
    outline: 2px solid #fece1f !important;
    outline-offset: -2px !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .lr-form-wrapper {
        width: 100% !important;
        max-width: 500px !important;
        padding: 0 15px !important;
    }

    .eael-login-registration-wrapper,
    .eael-lr-form-wrapper.eael-register-wrapper,
    .eael-lr-form-wrapper.eael-lostpassword-wrapper,
    .wagas-login-form {
        padding: 2rem !important;
        border-radius: 16px !important;
        max-width: 460px !important;
    }
}

@media (max-width: 768px) {

    .eael-login-registration-wrapper,
    .eael-lr-form-wrapper.eael-register-wrapper,
    .eael-lr-form-wrapper.eael-lostpassword-wrapper,
    .wagas-login-form {
        padding: 1.5rem !important;
        margin: 3vh auto 8vh auto !important;
        /* Plus d'espace en bas sur mobile */
        max-width: 460px !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    body.page-id-1351 {
        padding-bottom: 15vh !important;
        /* Plus d'espace en bas sur mobile */
        min-height: 100dvh !important;
        overscroll-behavior-y: contain !important;
    }

    body.page-id-1351:before {
        background-size: 120%;
        opacity: 0.15 !important;
    }

    /* Ajustement des tabs pour le mobile */
    .eael-lr-tabs {
        flex-direction: row !important;
        gap: 2px !important;
    }

    .eael-lr-tab {
        padding: 0.8rem 0.5rem !important;
        font-size: 0.95rem !important;
    }

    /* Ajustements responsives spécifiques pour le formulaire d'inscription */
    .eael-lr-form-wrapper.eael_register-wrapper {
        padding: 1rem !important;
    }

    .eael_register-form .eael-lr-form-group {
        margin-bottom: 0.1rem !important;
        /* Encore moins d'espace sur mobile */
    }

    .eael_register-form .eael-lr-form-control {
        margin-bottom: 0.1rem !important;
        padding: 0.7rem 1rem !important;
        /* Padding encore plus réduit sur mobile */
        font-size: 15px !important;
    }

    .eael-register-form .eael-field-label {
        font-size: 0.85rem !important;
        margin-bottom: 0.05rem !important;
    }

    html,
    body {
        height: 100%;
        min-height: 100dvh;
        overflow-x: hidden;
    }
}

@media (max-width: 767px) {

    .eael-lr-form-control,
    .eael-register-form-control,
    .eael-lostpassword-form-control,
    .wagas-login-form input {
        padding: 1.1rem !important;
    }

    button.eael-lr-btn.eael-lr-btn-block,
    .wagas-login-form button {
        min-width: 100% !important;
    }

    .eael-lr-form-loader-wrapper {
        padding: 0 !important;
    }

    /* Ajuster la disposition des liens dans le footer du formulaire */
    .eael-login-form .eael-lr-footer {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
    }

    /* Ajustement pour le message de récupération de mot de passe */
    .eael-form-msg {
        font-size: 0.95rem !important;
        padding: 0.8rem !important;
    }
}

@media (max-width: 480px) {

    .eael-lr-form-control,
    .eael-register-form-control,
    .eael-lostpassword-form-control,
    .wagas-login-form input {
        padding: 1rem !important;
        font-size: 15px !important;
        /* Texte légèrement plus petit pour mobile */
    }

    #eael-login-submit,
    #eael-register-submit,
    #eael-lostpassword-submit,
    .wagas-login-form button {
        padding: 1rem !important;
        font-size: 16px !important;
    }

    /* Optimisation de l'espace sur très petits écrans */
    .eael-login-registration-wrapper,
    .eael-lr-form-wrapper.eael-register-wrapper,
    .eael-lr-form-wrapper.eael-lostpassword-wrapper,
    .wagas-login-form {
        padding: 1.2rem !important;
        margin: 2vh auto 10vh auto !important;
        /* Encore plus d'espace en bas sur très petits écrans */
        max-width: calc(100% - 24px) !important;
        /* Largeur adaptative avec marge */
        border-radius: 12px !important;
        /* Coins légèrement moins arrondis */
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    body.page-id-1351 {
        padding-bottom: 20vh !important;
        /* Maximum d'espace en bas sur très petits écrans */
        min-height: 100dvh !important;
        overscroll-behavior-y: contain !important;
    }

    .eael-field-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.3rem !important;
    }

    /* Ajustements spécifiques pour le formulaire d'inscription sur très petits écrans */
    .eael-lr-form-wrapper.eael-register-wrapper {
        padding: 0.8rem !important;
    }

    .eael_register-form .eael-lr-form-control {
        padding: 0.6rem 0.8rem !important;
        /* Padding minimal */
        font-size: 14px !important;
    }

    html,
    body {
        height: 100%;
        min-height: 100dvh;
        overflow-x: hidden;
    }
}

@media (max-width: 1024px) {
    .eael-lr-form-wrapper {
        width: 100% !important;
        max-width: 500px !important;
        /* Augmentation de la largeur en responsive */
    }
}

@media (max-width: 767px) {
    .eael-lr-form-wrapper {
        width: 100% !important;
        max-width: 460px !important;
        /* Ajustement de la largeur en responsive */
    }
}

/* Footer du formulaire en colonne */
.eael-login-form .eael-lr-footer,
.eael-lr-form-wrapper .eael-lr-footer,
.eael-register-form .eael-lr-footer,
.eael-lostpassword-form .eael-lr-footer {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
}

/* ---------- Accessibilité ---------- */
/* Amélioration du focus pour le clavier - SANS activation du toggle password */
.eael-login-registration-wrapper button:focus,
.eael-login-registration-wrapper a:focus,
.eael-lr-form-wrapper:focus-within {
    outline: 2px solid #fece1f !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 5px rgba(254, 206, 31, 0.5) !important;
}

/* Focus spécifique pour les inputs SANS déclencher le toggle password */
.eael-lr-form-control:focus,
.eael-register-form-control:focus,
.eael-lostpassword-form-control:focus {
    outline: 2px solid #fece1f !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 5px rgba(254, 206, 31, 0.5) !important;
    border-width: 2px !important;
    border-color: #fece1f !important;
}

/* DÉSACTIVATION du focus sur les inputs qui causent le problème de toggle password */
.eael-login-registration-wrapper input:focus,
.eael-register-form-container input:focus,
.eael-lostpassword-form-container input:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Désactivation spécifique pour le login */
.eael-login-container input[type="text"]:focus,
.eael-login-container input[type="email"]:focus,
.eael-login-container input[type="password"]:focus,
.eael-login-container button:focus {
    outline: none !important;
    box-shadow: none !important;
    pointer-events: auto !important;
    /* Garder la saisie possible */
}

/* Restauration du focus normal uniquement pour l'icône de toggle password */
.dashicons-visibility:focus,
.dashicons-hidden:focus {
    outline: 2px solid #fece1f !important;
    outline-offset: 2px !important;
}

/* Support pour la réduction des animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Compatibilité WordPress et fixes Elementor ---------- */
/* Fix pour les conflits de z-index avec le header WordPress */
body.page-id-1351 .eael-login-registration-wrapper {
    z-index: 9 !important;
}

/* Fix pour le problème de backdrop-filter non supporté sur certains navigateurs */
@supports not (backdrop-filter: blur(15px)) {

    .eael-login-registration-wrapper,
    .eael-lr-form-wrapper.eael-login-registration-wrapper,
    .eael-lr-form-wrapper.eael-register-wrapper,
    .eael-lr-form-wrapper.eael-lostpassword-wrapper,
    .wagas-login-form,
    .eael-form-msg {
        background: rgba(61, 2, 103, 0.8) !important;
        /* Fallback plus opaque pour les navigateurs ne supportant pas le blur */
    }
}

/* Correction des marges et paddings WordPress */
.eael-lr-form-wrapper .eael-lr-form-group {
    margin-bottom: 1rem !important;
    padding: 0 !important;
}

/* Fix pour les boutons qui peuvent être affectés par d'autres styles WordPress */
.eael-lr-form-wrapper button.eael-lr-btn {
    line-height: normal !important;
    height: auto !important;
    min-height: unset !important;
    white-space: normal !important;
}

/* ---------- Accessibilité ARIA et styles pour les états de formulaire ---------- */
/* Styles pour les éléments ARIA et les messages d'erreur */
[aria-invalid="true"] {
    border-color: #e63c3c !important;
    border-width: 2px !important;
}

[aria-required="true"] .eael-field-label::after {
    content: " *";
    color: #e63c3c;
}

.eael-lr-form-message-text,
.eael-lr-form-message.eael-lr-error-message {
    color: #e63c3c !important;
    font-size: 0.9rem !important;
    margin-top: -0.5rem !important;
    margin-bottom: 1rem !important;
    display: block !important;
}

/* Accessibilité pour les lecteurs d'écran */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Améliorer le contraste des placeholders */
::placeholder {
    color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
}

/* Support meilleur pour les écrans à contraste élevé */
@media (prefers-contrast: more) {

    .eael-login-registration-wrapper,
    .eael-lr-form-wrapper.eael-register-wrapper,
    .eael-lr-form-wrapper.eael-lostpassword-wrapper {
        background: #3f0267 !important;
        backdrop-filter: none !important;
        border: 2px solid white !important;
    }

    .eael-lr-form-control,
    .eael-register-form-control,
    .eael-lostpassword-form-control {
        background: white !important;
        border: 2px solid black !important;
    }

    .eael-field-label,
    .eael-checkbox-wrap label {
        color: white !important;
    }

    .eael-lr-link {
        color: #fece1f !important;
        text-decoration: underline !important;
        font-weight: bold !important;
    }
}

/* Fix spécifique pour le problème de toggle password sur input focus */
/* Empêcher l'activation du toggle password lors du focus sur l'input */
.eael-lr-password-wrapper input:focus,
.eael-lr-password-wrapper-register input:focus {
    pointer-events: auto !important;
    /* Garder la possibilité de saisir */
    cursor: text !important;
    /* Curseur de texte normal */
    padding-right: 50px !important;
    /* Maintenir l'espace pour l'icône */
}

/* S'assurer que seul le bouton toggle est cliquable pour la fonction afficher/masquer */
.wp-hide-pw {
    pointer-events: auto !important;
    position: absolute !important;
    z-index: 10 !important;
    /* Retrait de width: 100% - largeur fixe maintenant */
}

/* Focus spécifique pour le bouton toggle password */
.wp-hide-pw:focus {
    outline: 2px solid #fece1f !important;
    outline-offset: 2px !important;
}

/* Désactiver tout événement sur le wrapper qui pourrait interférer */
.eael-lr-password-wrapper,
.eael-lr-password-wrapper-register {
    position: relative !important;
}