/* =========================================================
   MAHD Assistance — Page de connexion
   ========================================================= */

:root {
    --navy: #08284a;
    --navy-dark: #051d37;
    --navy-soft: #123d68;
    --blue: #1667c7;
    --gold: #d9aa45;
    --gold-light: #efc46a;

    --white: #ffffff;
    --page: #f7f9fc;
    --text: #10213a;
    --muted: #68758a;
    --border: #dce3ec;
    --danger-bg: #fff2f2;
    --danger: #a72929;

    --shadow:
        0 20px 55px rgba(7, 33, 63, 0.10),
        0 4px 16px rgba(7, 33, 63, 0.06);

    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    color: var(--text);
    background: var(--page);
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   STRUCTURE
   ========================================================= */

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(430px, 1fr) minmax(560px, 1.08fr);
}


/* =========================================================
   PANNEAU GAUCHE
   ========================================================= */

.brand-panel {
    position: relative;
    overflow: hidden;
    min-height: 100vh;

    background:
        linear-gradient(
            145deg,
            rgba(4, 27, 53, 0.97),
            rgba(8, 44, 81, 0.92)
        ),
        url("../images/login-building.jpg");

    background-size: cover;
    background-position: center;

    color: var(--white);
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -200px;
    top: 40px;
    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(217, 170, 69, 0.16),
            transparent 68%
        );
}

.brand-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(3, 20, 39, 0.62),
            transparent 45%
        );
}

.brand-content {
    position: relative;
    z-index: 2;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    padding:
        clamp(32px, 5vw, 68px)
        clamp(34px, 6vw, 76px);
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    align-self: flex-start;
}

.brand-logo img {
    width: 105px;
    height: 75px;
    object-fit: contain;

    padding: 5px;

    background: var(--white);
    border-radius: 8px;
}

.brand-name strong,
.brand-name span {
    display: block;
}

.brand-name strong {
    font-size: 2rem;
    line-height: 1;
    letter-spacing: 0.03em;
}

.brand-name span {
    margin-top: 6px;

    font-size: 1.17rem;
    letter-spacing: 0.10em;
}

.brand-copy {
    max-width: 690px;
    margin: auto 0;
    padding: 55px 0;
}

.eyebrow {
    margin: 0 0 12px;

    color: var(--gold-light);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.brand-copy h1 {
    max-width: 680px;
    margin: 0;

    font-size: clamp(2.3rem, 4vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.brand-copy h1 span {
    display: block;
    color: var(--gold-light);
}

.gold-line {
    width: 74px;
    height: 3px;

    margin: 25px 0;

    border-radius: 100px;

    background: var(--gold);
}

.intro {
    max-width: 640px;
    margin: 0 0 38px;

    color: rgba(255, 255, 255, 0.88);

    font-size: 1.11rem;
    line-height: 1.75;
}

.benefits {
    display: grid;
    gap: 24px;
}

.benefit {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 18px;
    align-items: start;
}

.benefit-icon {
    width: 54px;
    height: 54px;

    display: grid;
    place-items: center;

    border: 2px solid var(--gold);
    border-radius: 50%;

    color: var(--gold-light);

    font-size: 1.25rem;
    font-weight: 900;
}

.benefit strong {
    display: block;
    margin: 1px 0 3px;

    font-size: 1.02rem;
}

.benefit p {
    margin: 0;

    color: rgba(255, 255, 255, 0.77);

    font-size: 0.93rem;
    line-height: 1.5;
}

.brand-bottom {
    padding-top: 22px;

    border-top: 1px solid rgba(255, 255, 255, 0.16);

    color: rgba(255, 255, 255, 0.74);

    font-size: 0.9rem;
}


/* =========================================================
   PANNEAU CONNEXION
   ========================================================= */

.login-panel {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background:
        radial-gradient(
            circle at 80% 8%,
            rgba(22, 103, 199, 0.055),
            transparent 32%
        ),
        var(--page);
}

.secure-label {
    align-self: flex-end;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin: 34px 50px 0;

    color: var(--navy);

    font-size: 0.9rem;
    font-weight: 650;
}

.login-wrap {
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px;
}

.login-card {
    width: min(100%, 640px);

    padding: clamp(38px, 5vw, 58px);

    border: 1px solid rgba(220, 227, 236, 0.9);
    border-radius: var(--radius);

    background: rgba(255, 255, 255, 0.97);

    box-shadow: var(--shadow);
}

.mobile-logo {
    display: none;
}

.login-header {
    margin-bottom: 37px;

    text-align: center;
}

.login-header h2 {
    margin: 0 0 8px;

    color: var(--navy);

    font-size: 2.25rem;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.login-header p {
    margin: 0;

    color: var(--muted);

    font-size: 1.05rem;
}

.alert {
    margin-bottom: 20px;
    padding: 13px 16px;

    border: 1px solid #efcccc;
    border-radius: 10px;

    background: var(--danger-bg);
    color: var(--danger);

    font-size: 0.91rem;
}

.login-form {
    display: grid;
    gap: 24px;
}

.field {
    display: grid;
    gap: 9px;
}

.field label {
    color: var(--text);

    font-size: 0.91rem;
    font-weight: 750;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    height: 57px;

    padding: 0 50px 0 48px;

    outline: none;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: #fff;

    color: var(--text);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.input-wrap input::placeholder {
    color: #9aa5b5;
}

.input-wrap input:focus {
    border-color: #6ba1de;

    box-shadow:
        0 0 0 4px rgba(22, 103, 199, 0.10);
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 17px;

    transform: translateY(-50%);

    color: #718096;

    pointer-events: none;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;

    transform: translateY(-50%);

    padding: 6px;

    border: 0;

    background: transparent;
    color: #718096;

    cursor: pointer;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin-top: -3px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: #526174;

    font-size: 0.9rem;
}

.remember input {
    width: 17px;
    height: 17px;

    accent-color: var(--navy);
}

.form-options a {
    color: var(--blue);

    font-size: 0.9rem;
    font-weight: 650;
}

.form-options a:hover,
.new-client a:hover {
    text-decoration: underline;
}

.login-button {
    width: 100%;
    min-height: 59px;

    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    margin-top: 5px;

    border: 0;
    border-radius: 9px;

    background:
        linear-gradient(
            110deg,
            var(--navy),
            var(--navy-soft)
        );

    color: var(--white);

    font-size: 1rem;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 8px 18px rgba(8, 40, 74, 0.18);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.login-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 12px 24px rgba(8, 40, 74, 0.22);
}

.new-client {
    margin-top: 36px;

    text-align: center;
}

.divider {
    display: flex;
    align-items: center;
    gap: 17px;

    margin-bottom: 21px;

    color: #7c8797;

    font-size: 0.88rem;
    font-weight: 650;
}

.divider::before,
.divider::after {
    content: "";

    flex: 1;
    height: 1px;

    background: var(--border);
}

.new-client p {
    margin: 0 0 8px;

    color: var(--muted);

    font-size: 0.9rem;
}

.new-client a {
    color: var(--blue);

    font-size: 0.92rem;
    font-weight: 700;
}

.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px 28px;

    padding: 0 38px 28px;

    color: #798596;

    font-size: 0.8rem;
}

.login-footer div {
    display: flex;
    align-items: center;
    gap: 7px;
}

.login-footer a:hover {
    color: var(--navy);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .login-page {
        grid-template-columns: minmax(365px, 0.8fr) 1fr;
    }

    .brand-content {
        padding-left: 38px;
        padding-right: 38px;
    }

    .brand-copy h1 {
        font-size: 2.55rem;
    }

    .brand-logo img {
        width: 88px;
        height: 63px;
    }

    .brand-name strong {
        font-size: 1.65rem;
    }

    .brand-name span {
        font-size: 1rem;
    }

}

@media (max-width: 850px) {

    .login-page {
        display: block;
    }

    .brand-panel {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
    }

    .secure-label {
        margin: 20px 22px 0;
    }

    .login-wrap {
        padding: 30px 20px;
    }

    .login-card {
        padding: 34px 25px;
    }

    .mobile-logo {
        display: block;
        margin-bottom: 30px;
        text-align: center;
    }

    .mobile-logo img {
        width: 140px;
        max-height: 94px;
        object-fit: contain;
        margin: 0 auto;
    }

    .login-footer {
        padding: 0 20px 24px;
    }

}

@media (max-width: 520px) {

    .secure-label {
        font-size: 0.82rem;
    }

    .login-wrap {
        align-items: flex-start;
        padding-top: 24px;
    }

    .login-card {
        border-radius: 14px;
    }

    .login-header h2 {
        font-size: 1.9rem;
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
    }

}
