/* =========================================================
   PAGE LOGIN — reprise du style de la connexion Flossie
========================================================= */

@font-face {
    font-family: "Moret-book";
    src: url("../fonts/Moret-Book.otf") format("opentype");
    font-display: swap;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Nunito Sans', sans-serif;
    background-color: var(--couleur-beige, #f6f0e9);
    color: var(--couleur-marron, #310c1a);
}

.me-1 {
    margin-right: 0.25rem;
}

.login-page {
    min-height: 100vh;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* main card */

.login-wrapper {
    width: 100%;
    max-width: 1120px;
    min-height: 680px;

    display: grid;
    grid-template-columns: 0.95fr 1.05fr;

    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 32px;

    overflow: hidden;

    box-shadow:
        0 30px 80px rgba(49, 12, 26, 0.10),
        0 10px 30px rgba(49, 12, 26, 0.04);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    position: relative;
    z-index: 2;
}

/* left side */

.login-visual {
    position: relative;
    padding: 54px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background-color: var(--couleur-bleu);
    color: var(--couleur-marron);
    overflow: hidden;
}

.visual-content {
    position: relative;
    z-index: 2;
}

.visual-logo-band {
    margin: -54px -54px 70px;
    padding: 40px 54px;
    background-color: var(--couleur-bleu);
}

/* Logo source en 191x59 : au-dela de ~270px il devient flou */
.visual-logo {
    display: block;
    width: 270px;
    max-width: 100%;
    height: auto;
}

.visual-title {
    font-size: clamp(2.5rem, 4vw, 4rem);
    line-height: 1.03;
    letter-spacing: -0.045em;
    font-weight: 800;
    margin: 0 0 24px;
    font-family: "Moret-book", serif;
    color: var(--couleur-marron);
}

.visual-description {
    max-width: 390px;
    color: var(--couleur-marron);
    font-size: 1.3rem;
    line-height: 1.2;
    margin: 0;
    font-family: "Moret-book", serif;
}

.visual-symbole {
    display: block;
    width: 250px;
    height: auto;

    /* Centré horizontalement + plus haut, puis décalé un peu vers la droite */
    margin: 34px auto 0;
    transform: translateX(100px);
}

/* right side */

.login-form-area {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 65px 80px;

    background: rgba(255, 255, 255, 0.66);
}

.login-form-container {
    width: 100%;
    max-width: 420px;
}

.form-header {
    margin-bottom: 34px;
}

.form-header h1 {
    color: var(--couleur-marron);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin: 0 0 9px;
    font-family: "Moret-book", serif;
}

.form-header p {
    color: #887b78;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* alert */

.login-alert {
    border: 0;
    border-radius: 14px;
    padding: 13px 16px;
    font-size: 0.82rem;
    margin-bottom: 22px;
}

.login-alert-danger {
    background: rgba(220, 53, 69, 0.08);
    color: #a82d3a;
}

.login-alert-success {
    background: rgba(var(--couleur-vert-rgb, 174, 206, 190), 0.45);
    color: #1f5a3c;
}

.login-alert-warning {
    background: rgba(248, 191, 155, 0.28);
    color: var(--couleur-marron);
}

.login-alert-info {
    background: rgba(var(--couleur-bleu-rgb, 175, 206, 238), 0.35);
    color: var(--couleur-marron);
    line-height: 1.55;
}

.form-hint.form-hint-center {
    margin: 20px 0 0;
    text-align: center;
}

/* contact form */

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.login-input.login-textarea {
    height: auto;
    min-height: 110px;
    padding: 14px 16px;
    line-height: 1.5;
    resize: vertical;
}

.login-input.is-invalid {
    border-color: #dc3545;
}

.field-error {
    margin-top: 6px;
    color: #a82d3a;
    font-size: 0.76rem;
}

/* champ piège anti-robots : hors écran plutôt que display:none (que certains robots détectent) */
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.masked-email {
    white-space: nowrap;
}

.form-hint {
    color: #887b78;
    font-size: 0.79rem;
    line-height: 1.6;
    margin: -6px 0 22px;
}

.form-hint a {
    color: var(--couleur-orange);
    font-weight: 700;
}

/* connection form */

.field-group {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    color: var(--couleur-marron);
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.field-wrapper {
    position: relative;
}

.field-icon {
    position: absolute;
    z-index: 3;

    left: 18px;
    top: 50%;
    transform: translateY(-50%);

    color: #a29793;
    font-size: 0.95rem;

    pointer-events: none;
    transition: color 0.2s ease;
}

.login-input {
    width: 100%;
    height: 58px;

    padding: 0 48px;

    border-radius: 15px;
    border: 1px solid rgba(49, 12, 26, 0.10);

    background: #fff;

    color: var(--couleur-marron);
    font-family: inherit;
    font-size: 0.9rem;

    outline: none;

    box-shadow: 0 2px 6px rgba(49, 12, 26, 0.02);

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

.login-input::placeholder {
    color: #b0a6a2;
}

.login-input:hover {
    border-color: rgba(49, 12, 26, 0.18);
}

.login-input:focus {
    border-color: var(--couleur-orange);

    box-shadow:
        0 0 0 4px rgba(232, 76, 31, 0.10),
        0 8px 20px rgba(49, 12, 26, 0.05);
}

.field-wrapper:focus-within .field-icon {
    color: var(--couleur-orange);
}

.password-toggle {
    position: absolute;
    z-index: 4;

    right: 8px;
    top: 50%;
    transform: translateY(-50%);

    width: 42px;
    height: 42px;

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

    border: 0;
    border-radius: 11px;

    background: transparent;
    color: #9c918e;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.password-toggle:hover {
    background: rgba(232, 76, 31, 0.08);
    color: var(--couleur-orange);
}

/* options */

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 8px 0 20px;
}

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

.remember-wrapper input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--couleur-orange);
    cursor: pointer;
}

.remember-wrapper label {
    color: #766a67;
    font-size: 0.79rem;
    cursor: pointer;
}

.forgot-password {
    color: var(--couleur-orange);
    text-decoration: none;
    font-size: 0.79rem;
    font-weight: 800;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #c43d15;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;

    color: #766a67;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--couleur-orange);
}

/* button */

.login-button {
    width: 100%;
    height: 58px;
    margin-top: 8px;
    text-decoration: none;

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

    border: 0;
    border-radius: 15px;

    background: linear-gradient(135deg, var(--couleur-orange), #ef6a35);

    color: #fff;

    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 10px 24px rgba(232, 76, 31, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.login-button i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

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

    background: linear-gradient(135deg, var(--couleur-orange), #df5927);

    box-shadow:
        0 14px 30px rgba(232, 76, 31, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.login-button:hover i {
    transform: translateX(4px);
}

.login-button:active {
    transform: translateY(0);
}

/* footer */

.form-footer {
    margin-top: 28px;
    padding-top: 22px;

    border-top: 1px solid rgba(49, 12, 26, 0.07);

    text-align: center;

    color: #aaa09c;
    font-size: 0.72rem;
}

.form-footer-links {
    margin-top: 8px;
}

.form-footer-links a {
    color: #aaa09c;
    text-decoration: none;
}

.form-footer-links a:hover {
    color: var(--couleur-orange);
    text-decoration: underline;
}

.form-footer strong {
    color: var(--couleur-marron);
    font-weight: 700;
}

/* mobile */

@media (max-width: 991px) {
    .login-page {
        padding: 20px;
    }

    .login-wrapper {
        max-width: 620px;
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }

    .login-form-area {
        padding: 55px 50px;
    }
}

@media (max-width: 575px) {
    .login-page {
        padding: 12px;
        align-items: flex-start;
    }

    .login-wrapper {
        margin-top: 10px;
        border-radius: 24px;
    }

    .login-form-area {
        padding: 40px 24px 32px;
    }

    .form-header {
        margin-bottom: 28px;
    }

    .form-header h1 {
        font-size: 1.75rem;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .login-input,
    .login-button {
        height: 56px;
    }

    .form-footer {
        margin-top: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
