/* ==========================================================================
   Moverseas — Écrans de connexion publics (agence, client, déménageur,
   partenaire). Complète public/css/accueil.css (tokens, navbar, footer,
   boutons) ; ces pages n'utilisent plus le thème INSPINIA (style.css).
   ========================================================================== */

.ms-auth {
    position: relative;
    padding: 64px 0 80px;
    background:
        radial-gradient(900px 420px at 12% -8%, var(--halo-a) 0%, rgba(255, 255, 255, 0) 62%),
        radial-gradient(760px 380px at 92% 108%, var(--halo-b) 0%, rgba(255, 255, 255, 0) 60%),
        var(--ms-bg);
    border-bottom: 1px solid var(--ms-line);
    min-height: calc(100vh - var(--ms-nav-h) - 300px);
}

/* Teintes par espace — mêmes familles que les cartes de l'accueil */
.ms-auth--agence {
    --c1: #4f5bd5;
    --c2: #8e3fb0;
    --glow: rgba(79, 91, 213, .26);
    --halo-a: rgba(79, 91, 213, .13);
    --halo-b: rgba(142, 63, 176, .11);
}

.ms-auth--client {
    --c1: #0f9b8e;
    --c2: #2aa8cf;
    --glow: rgba(15, 155, 142, .24);
    --halo-a: rgba(15, 155, 142, .13);
    --halo-b: rgba(42, 168, 207, .12);
}

.ms-auth--demenageur {
    --c1: #f28b22;
    --c2: #e84324;
    --glow: rgba(232, 67, 36, .24);
    --halo-a: rgba(242, 139, 34, .14);
    --halo-b: rgba(232, 67, 36, .11);
}

.ms-auth--partenaire {
    --c1: #cb1781;
    --c2: #821859;
    --glow: rgba(203, 23, 129, .26);
    --halo-a: rgba(203, 23, 129, .13);
    --halo-b: rgba(130, 24, 89, .11);
}

.ms-auth__card {
    position: relative;
    width: 100%;
    max-width: 470px;
    margin: 0 auto;
    padding: 46px 42px 34px;
    background: #fff;
    border: 1px solid var(--ms-line);
    border-radius: var(--ms-radius);
    box-shadow: var(--ms-shadow-lg);
    text-align: center;
    overflow: hidden;
}

.ms-auth__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--c1) 0%, var(--c2) 100%);
}

.ms-auth__icon {
    width: 66px;
    height: 66px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
    color: #fff;
    font-size: 27px;
    box-shadow: 0 12px 26px var(--glow);
}

.ms-auth__title {
    font-size: 26px;
    margin-bottom: 8px;
}

.ms-auth__sub {
    font-size: 15px;
    color: var(--ms-body);
    margin-bottom: 28px;
}

/* --- Messages --- */

.ms-auth__alert,
.ms-auth__notice {
    display: flex;
    gap: 12px;
    padding: 13px 16px;
    margin-bottom: 22px;
    border-radius: var(--ms-radius-sm);
    font-size: 14.5px;
    text-align: left;
}

.ms-auth__alert {
    background: #fdecef;
    border: 1px solid #f6c9d2;
    color: #98243a;
}

.ms-auth__notice {
    background: #ecf8f2;
    border: 1px solid #c4e7d6;
    color: #1d6b48;
}

.ms-auth__alert i,
.ms-auth__notice i {
    margin-top: 3px;
    font-size: 15px;
}

.ms-auth__alert p,
.ms-auth__notice p {
    margin: 0;
}

.ms-auth__alert p+p {
    margin-top: 4px;
}

/* --- Formulaire --- */

.ms-auth__form {
    text-align: left;
}

.ms-field {
    margin-bottom: 18px;
}

.ms-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--ms-ink);
    font-size: 13.5px;
    font-weight: 600;
}

.ms-field__control {
    position: relative;
    display: flex;
    align-items: center;
}

.ms-field__control>i {
    position: absolute;
    left: 15px;
    color: var(--ms-muted);
    font-size: 15px;
    pointer-events: none;
    transition: color .16s ease;
}

.ms-field__control input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 43px;
    background: #fff;
    border: 1px solid #dcdfe8;
    border-radius: 12px;
    color: var(--ms-ink);
    font-size: 15px;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.ms-field__control input::placeholder {
    color: #a9adbb;
}

.ms-field__control input:focus {
    outline: none;
    border-color: var(--c1);
    box-shadow: 0 0 0 4px var(--glow);
}

.ms-field__control input:focus~i,
.ms-field__control input:focus+i {
    color: var(--c1);
}

/* Le bouton œil est après l'input : on cible l'icône de gauche au focus */
.ms-field__control:focus-within>i {
    color: var(--c1);
}

.ms-field__control input[type="password"],
.ms-field__control input#password {
    padding-right: 48px;
}

.ms-field__reveal {
    position: absolute;
    right: 6px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--ms-muted);
    font-size: 15px;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease;
}

.ms-field__reveal:hover {
    background: var(--ms-bg);
    color: var(--ms-ink);
}

.ms-auth__submit {
    width: 100%;
    justify-content: center;
    height: 50px;
    margin-top: 8px;
    background: linear-gradient(120deg, var(--c1) 0%, var(--c2) 100%);
    box-shadow: 0 12px 26px var(--glow);
}

.ms-auth__submit:hover,
.ms-auth__submit:focus {
    box-shadow: 0 16px 32px var(--glow);
}

/* --- Bas de carte --- */

.ms-auth__help {
    margin: 22px 0 0;
    font-size: 14px;
    color: var(--ms-body);
}

.ms-auth__help a {
    color: var(--ms-magenta-dark);
    font-weight: 600;
}

.ms-auth__help a:hover {
    text-decoration: underline;
}

.ms-auth__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 22px;
    padding-top: 20px;
    color: var(--ms-muted);
    font-size: 14px;
    font-weight: 600;
}

.ms-auth__back:hover {
    color: var(--ms-magenta-dark);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 575.98px) {
    .ms-auth {
        padding: 40px 0 56px;
    }

    .ms-auth__card {
        padding: 36px 24px 28px;
        border-radius: var(--ms-radius-sm);
    }

    .ms-auth__title {
        font-size: 22px;
    }
}
