/* Page de connexion ONFP — palette issue du logo */

/* La couleur principale vient de --green (définie dans votre thème) */
:root {
    --login-accent: var(--green, #3fa350);
    --login-accent-dark: color-mix(in srgb, var(--login-accent) 78%, #000);
    --login-accent-light: color-mix(in srgb, var(--login-accent) 70%, #fff);
    --login-accent-soft: color-mix(in srgb, var(--login-accent) 10%, #fff);

    /* Couleurs du logo */
    --logo-yellow: #ffc914;
    --logo-orange: #ff7a00;
    --logo-red: #e3262e;
    --logo-slate: #2b3742;

    --onfp-navy: #1d2833;
    --onfp-text: #1f2a3d;
    --onfp-muted: #6b778c;
    --onfp-border: #e3e8ef;
}

body.login-page {
    font-family: "Inter", sans-serif;
    background: #fff;
    color: var(--onfp-text);
    min-height: 100vh;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
}

/* Barre tricolore (vert / jaune / rouge) */
.tricolor {
    display: block;
    height: 5px;
    border-radius: 99px;
    background: linear-gradient(90deg,
            var(--login-accent) 0 34%,
            var(--logo-yellow) 34% 67%,
            var(--logo-red) 67% 100%);
}

/* ---------- Panneau gauche (marque) ---------- */
.login-brand {
    position: relative;
    flex: 1 1 50%;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(620px 420px at 100% 0%, rgba(255, 122, 0, .50), transparent 62%),
        radial-gradient(520px 380px at 0% 100%, rgba(227, 38, 46, .38), transparent 62%),
        radial-gradient(480px 340px at 85% 100%, rgba(255, 201, 20, .38), transparent 62%),
        linear-gradient(145deg, var(--login-accent-light) -25%, var(--login-accent) 40%, var(--login-accent-dark) 110%);
}

@media (min-width: 992px) {
    .login-brand {
        display: flex;
    }
}

.login-brand::before,
.login-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-brand::before {
    width: 520px;
    height: 520px;
    right: -180px;
    bottom: -200px;
    background: rgba(255, 255, 255, .09);
}

.login-brand::after {
    width: 280px;
    height: 280px;
    right: 120px;
    top: -120px;
    background: rgba(255, 255, 255, .08);
}

.brand-top,
.brand-middle,
.brand-bottom {
    position: relative;
    z-index: 1;
}

/* Logo dans une carte blanche (le logo a des lettres sombres) */
.brand-logo-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .9rem 1.3rem;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
    text-decoration: none;
    transition: transform .25s ease;
}

.brand-logo-card:hover {
    transform: translateY(-2px) rotate(-1deg);
}

.brand-logo-card img {
    height: 92px;
    width: auto;
    display: block;
}

.brand-middle h1 {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: 2.6rem;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.brand-middle p.lead {
    font-size: 1.05rem;
    opacity: .94;
    max-width: 460px;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    gap: .9rem;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-weight: 500;
}

.brand-features .ico {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
}

.brand-features li:nth-child(1) .ico {
    background: var(--logo-yellow);
    color: var(--logo-slate);
}

.brand-features li:nth-child(2) .ico {
    background: var(--logo-orange);
}

.brand-features li:nth-child(3) .ico {
    background: var(--logo-red);
}

.brand-bottom {
    font-size: .85rem;
}

.brand-bottom .tricolor {
    width: 120px;
    margin-bottom: .8rem;
}

.brand-bottom span {
    opacity: .9;
}

/* ---------- Panneau droit (formulaire) ---------- */
.login-form-side {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background:
        radial-gradient(700px 420px at 100% 0%, rgba(255, 201, 20, .16), transparent 60%),
        radial-gradient(600px 420px at 0% 100%, var(--login-accent-soft), transparent 60%),
        #fff;
}

.login-card {
    width: 100%;
    max-width: 440px;
    animation: fadeUp .6s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-logo {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.mobile-logo img {
    height: 78px;
    width: auto;
    display: block;
}

@media (min-width: 992px) {
    .mobile-logo {
        display: none;
    }
}

.login-card .tricolor.short {
    width: 72px;
    margin-bottom: 1rem;
}

.login-card h2 {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: 1.9rem;
    color: var(--onfp-navy);
    margin-bottom: .35rem;
}

.login-card .subtitle {
    color: var(--onfp-muted);
    margin-bottom: 1.75rem;
}

/* Bouton Google */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    background: #fff;
    border: 1px solid var(--onfp-border);
    border-radius: 12px;
    padding: .8rem 1rem;
    font-weight: 600;
    color: var(--onfp-text);
    transition: all .2s ease;
}

.btn-google:hover {
    border-color: #cfd6e1;
    box-shadow: 0 6px 18px rgba(29, 40, 51, .08);
    transform: translateY(-1px);
    color: var(--onfp-text);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--onfp-muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--onfp-border);
}

/* Champs */
.field-label {
    font-weight: 600;
    font-size: .88rem;
    color: var(--onfp-navy);
    margin-bottom: .4rem;
}

.field {
    position: relative;
}

.field>.bi {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa5b8;
    font-size: 1.05rem;
    pointer-events: none;
    transition: color .2s;
}

.field .form-control {
    height: 50px;
    padding-left: 44px;
    border: 1.5px solid var(--onfp-border);
    border-radius: 12px;
    background: #f9fafc;
    font-size: .95rem;
    transition: all .2s ease;
}

.field .form-control:focus {
    background: #fff;
    border-color: var(--login-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--login-accent) 16%, transparent);
}

.field:focus-within>.bi {
    color: var(--login-accent);
}

.field .form-control.is-invalid {
    border-color: var(--logo-red);
    background-image: none;
}

.field .form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(227, 38, 46, .15);
}

.field .toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #9aa5b8;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    transition: all .2s;
}

.field .toggle-pass:hover {
    color: var(--logo-orange);
    background: rgba(255, 122, 0, .10);
}

.field.has-toggle .form-control {
    padding-right: 52px;
}

.invalid-text {
    color: var(--logo-red);
    font-size: .82rem;
    margin-top: .35rem;
    display: block;
}

.form-check-input:checked {
    background-color: var(--login-accent);
    border-color: var(--login-accent);
}

.form-check-input:focus {
    border-color: var(--login-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--login-accent) 16%, transparent);
}

.form-check-label,
.link-forgot {
    font-size: .88rem;
}

.login-card a.link {
    color: var(--login-accent);
    font-weight: 600;
    text-decoration: none;
}

.login-card a.link:hover {
    color: var(--logo-orange);
    text-decoration: underline;
}

/* Bouton principal */
.btn-onfp {
    position: relative;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(90deg, var(--green, #3fa350), var(--green, #3fa350));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--login-accent) 35%, transparent);
    transition: all .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    overflow: hidden;
}

/* fine barre tricolore sous le bouton */
.btn-onfp::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--logo-orange) 0 34%,
            var(--logo-yellow) 34% 67%,
            var(--logo-red) 67% 100%);
    opacity: .95;
}

.btn-onfp:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px color-mix(in srgb, var(--login-accent) 45%, transparent);
    color: #fff;
}

.btn-onfp:active {
    transform: translateY(0);
}

.btn-onfp:disabled {
    opacity: .8;
    cursor: wait;
    transform: none;
}

.login-footer {
    margin-top: 1.75rem;
    text-align: center;
    font-size: .9rem;
    color: var(--onfp-muted);
}

.login-footer .back-home {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .75rem;
    color: var(--onfp-muted);
    text-decoration: none;
    font-size: .85rem;
}

.login-footer .back-home:hover {
    color: var(--logo-orange);
}

.credits {
    margin-top: 2rem;
    text-align: center;
    font-size: .8rem;
    color: #9aa5b8;
}

.credits a {
    color: var(--onfp-muted);
    text-decoration: none;
}

.credits a:hover {
    color: var(--logo-orange);
}

/* Lien « termes et conditions » (bouton qui ouvre la modale) */
.btn-terms {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--login-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color .2s;
}

.btn-terms:hover {
    color: var(--logo-orange);
}

.form-check-input.is-invalid {
    border-color: var(--logo-red);
}

/* Messages d'information (ex. lien de réinitialisation envoyé) */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    border: 0;
    border-radius: 12px;
    padding: .9rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .9rem;
    font-weight: 500;
}

.login-alert>i {
    font-size: 1.1rem;
    line-height: 1.4;
}

.login-alert .btn-close {
    position: static;
    margin-left: auto;
    padding: .35rem;
}

.login-alert-success {
    background: var(--login-accent-soft);
    color: var(--login-accent-dark);
    border-left: 4px solid var(--login-accent);
}

.login-alert-danger {
    background: rgba(227, 38, 46, .08);
    color: #a8141b;
    border-left: 4px solid var(--logo-red);
}

.grecaptcha-badge {
    visibility: hidden;
}
