/**
 * =====================================================
 * IFRELO
 * Connexion
 * Base commune de l'application
 * =====================================================
 */


/************************************************
PAGE
************************************************/

.ifrelo-login-page {
    min-height: 100vh;
    margin: 0;
    background: var(--ifrelo-fond);
    color: var(--ifrelo-texte, #2f3136);
}


/************************************************
MISE EN PAGE
************************************************/

.ifrelo-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    box-sizing: border-box;
}


/************************************************
CARTE PRINCIPALE
************************************************/

.ifrelo-card {
    width: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    box-shadow: var(--ifrelo-shadow, 0 12px 35px rgba(0, 0, 0, 0.08));
    box-sizing: border-box;
}

.ifrelo-login-card {
    max-width: 650px;
    padding: 32px 42px;
}


/************************************************
EN-TÊTE
************************************************/

.ifrelo-login-header {
    text-align: center;
    margin-bottom: 24px;
}

.ifrelo-logo {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--ifrelo-rouge);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 5px;
    line-height: 1;
    text-decoration: none;
}

.ifrelo-logo:hover {
    color: var(--ifrelo-rouge);
}

.ifrelo-page-title {
    margin: 0 0 10px;
    font-size: 27px;
    font-weight: 650;
    line-height: 1.25;
}

.ifrelo-page-subtitle {
    max-width: 520px;
    margin: 0 auto;
    color: var(--ifrelo-gris);
    font-size: 15px;
    line-height: 1.55;
}


/************************************************
ALERTES
************************************************/

.ifrelo-alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.45;
}

.ifrelo-alert p {
    margin: 0;
}

.ifrelo-alert-warning {
    background-color: #fff8e6;
    border: 1px solid #ffe58f;
    color: #8c6b00;
}

.ifrelo-alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.ifrelo-alert-icon {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1.2;
}


/************************************************
FORMULAIRE
************************************************/

.ifrelo-login-form {
    width: 100%;
}

.ifrelo-form-group {
    margin-bottom: 16px;
}

.ifrelo-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}

.ifrelo-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.ifrelo-label-row .ifrelo-label {
    margin-bottom: 0;
}

.ifrelo-input {
    width: 100%;
    height: 46px;
    box-sizing: border-box;
}

.ifrelo-forgot-link {
    flex: 0 0 auto;
    color: var(--ifrelo-rouge);
    font-size: 13px;
    text-decoration: none;
}

.ifrelo-forgot-link:hover {
    text-decoration: underline;
}


/************************************************
CASE À COCHER
************************************************/

.ifrelo-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    color: var(--ifrelo-gris);
    font-size: 14px;
    cursor: pointer;
}

.ifrelo-remember input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--ifrelo-rouge);
}


/************************************************
BOUTONS
************************************************/

.ifrelo-login-card .ifrelo-btn {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
}

.ifrelo-btn-primary {
    background: var(--ifrelo-rouge);
    border: 1px solid var(--ifrelo-rouge);
    color: #fff;
}

.ifrelo-btn-secondary {
    background: #fff;
    border: 1px solid var(--ifrelo-rouge);
    color: var(--ifrelo-rouge);
}

.ifrelo-btn-secondary:hover {
    background: rgba(193, 24, 40, 0.05);
    color: var(--ifrelo-rouge);
}


/************************************************
SÉPARATEUR
************************************************/

.ifrelo-separator {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
    color: var(--ifrelo-gris);
    font-size: 13px;
}

.ifrelo-separator::before,
.ifrelo-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ifrelo-gris-clair);
}


/************************************************
RESPONSIVE
************************************************/

@media (max-width: 700px) {

    .ifrelo-login-wrapper {
        align-items: flex-start;
        padding: 16px;
    }

    .ifrelo-login-card {
        padding: 28px 24px;
        border-radius: 14px;
    }

    .ifrelo-logo {
        font-size: 29px;
    }

    .ifrelo-page-title {
        font-size: 24px;
    }

}

@media (max-width: 460px) {

    .ifrelo-login-wrapper {
        padding: 0;
    }

    .ifrelo-login-card {
        min-height: 100vh;
        padding: 25px 20px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .ifrelo-label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .ifrelo-page-subtitle {
        font-size: 14px;
    }

}


/************************************************
ÉCRANS PEU HAUTS
Évite le défilement sur la majorité des écrans
************************************************/

@media (max-height: 720px) and (min-width: 461px) {

    .ifrelo-login-wrapper {
        align-items: flex-start;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .ifrelo-login-card {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .ifrelo-login-header {
        margin-bottom: 18px;
    }


.ifrelo-logo {

      display: block;

    width: 180px;
    max-width: 100%;

    height: auto;

    margin: 0 auto 24px auto;

}
    .ifrelo-page-title {
        font-size: 24px;
    }

    .ifrelo-form-group {
        margin-bottom: 13px;
    }

    .ifrelo-separator {
        margin: 14px 0;
    }

}

/************************************************
MOT DE PASSE — AFFICHER / MASQUER
************************************************/
.ifrelo-password-field {
    position: relative;
}

.ifrelo-password-field .ifrelo-input {
    padding-right: 48px;
}

.ifrelo-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ifrelo-gris);
    cursor: pointer;
}

.ifrelo-password-toggle:hover,
.ifrelo-password-toggle:focus-visible {
    background: rgba(193, 24, 40, 0.07);
    color: var(--ifrelo-rouge);
    outline: none;
}

.auth-validation-card {
    max-width: 520px;
}

.auth-validation-card .ifrelo-alert-content p + p {
    margin-top: 6px;
}
