/* =========================================================
   PAGE CONNEXION — Instant by Mel
   Design épuré & moderne (split-screen spa)
   ========================================================= */

:root {
    --green:       #1a3a2a;
    --green-mid:   #2d5a42;
    --green-light: #3d7a5a;
    --beige:       #c8a97a;
    --beige-light: #e2d0b0;
    --beige-pale:  #f5efe4;
    --white:       #ffffff;
    --text:        #1a2e20;
    --text-muted:  #8a9389;
    --border:      #e7e1d4;
}

/* ---------- Layout ---------- */
.auth {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: calc(100vh - 86px);
    background: var(--white);
}

/* ---------- Colonne formulaire ---------- */
.auth__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 40px;
    background:
        radial-gradient(1200px 500px at -10% -10%, rgba(200,169,122,0.10), transparent 60%),
        var(--white);
}

.auth__form {
    width: 100%;
    max-width: 400px;
    animation: authIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Lien retour */
.auth__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.25s, gap 0.25s;
}
.auth__back svg { transition: transform 0.25s; }
.auth__back:hover { color: var(--green-mid); }
.auth__back:hover svg { transform: translateX(-3px); }

/* Brand */
.auth__brand { margin-bottom: 20px; }
.auth__pre {
    display: block;
    font-size: 11px;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--beige);
    font-weight: 400;
    margin-bottom: 10px;
}
.auth__name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 1.85rem;
    line-height: 1.1;
    color: var(--green);
    letter-spacing: 0.04em;
}
.auth__name em { font-style: italic; color: var(--beige); font-weight: 300; }

/* En-tête formulaire */
.auth__head { margin-bottom: 30px; }
.auth__title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 2rem;
    line-height: 1.15;
    color: var(--green);
    letter-spacing: 0.01em;
    margin-bottom: 8px;
}
.auth__subtitle {
    font-size: 13.5px;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    line-height: 1.6;
}

/* Alerte erreur */
.auth__alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid #e8cdcd;
    background: #fcf4f4;
    border-radius: 12px;
    padding: 13px 15px;
    margin-bottom: 24px;
    color: #a8403c;
}
.auth__alert svg { flex-shrink: 0; margin-top: 1px; }
.auth__alert p { font-size: 12.5px; font-weight: 300; line-height: 1.55; }
.auth__alert p + p { margin-top: 4px; }

/* ---------- Champs ---------- */
.auth__fields { width: 100%; }

.field { margin-bottom: 18px; }
.field label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--green-mid);
    font-weight: 500;
    margin-bottom: 9px;
}

.field__control {
    position: relative;
    display: flex;
    align-items: center;
}
.field__icon {
    position: absolute;
    left: 16px;
    color: var(--beige);
    pointer-events: none;
    transition: color 0.25s;
}
.field__control input {
    width: 100%;
    background: #faf8f3;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    font-weight: 300;
    padding: 15px 16px 15px 46px;
    outline: none;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.field__control input::placeholder { color: #bdb7a9; }
.field__control input:hover { border-color: var(--beige-light); }
.field__control input:focus {
    border-color: var(--green-light);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(61,122,90,0.08);
}
.field__control:focus-within .field__icon { color: var(--green-light); }

/* Champ mot de passe : place pour le bouton œil */
#password { padding-right: 48px; }
.field__toggle {
    position: absolute;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #bdb7a9;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.field__toggle:hover { color: var(--green-mid); background: rgba(200,169,122,0.12); }
.field__toggle.is-active { color: var(--green-light); }

/* ---------- Bouton submit ---------- */
.auth__submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-family: 'Jost', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 16px;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.3s, transform 0.18s, box-shadow 0.3s;
}
.auth__submit svg { transition: transform 0.25s; }
.auth__submit:hover {
    background: var(--green-mid);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -14px rgba(26,58,42,0.55);
}
.auth__submit:hover svg { transform: translateX(4px); }
.auth__submit:active { transform: translateY(0); }

/* ---------- Lien register ---------- */
.auth__alt {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    font-weight: 300;
    color: var(--text-muted);
}
.auth__alt a {
    color: var(--green-mid);
    font-weight: 400;
    text-decoration: none;
    border-bottom: 1px solid rgba(45,90,66,0.25);
    transition: color 0.2s, border-color 0.2s;
}
.auth__alt a:hover { color: var(--beige); border-color: var(--beige); }

/* ---------- Colonne visuel ---------- */
.auth__visual {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.auth__visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    animation: authZoom 24s ease-in-out infinite alternate;
}
@keyframes authZoom {
    from { transform: scale(1); }
    to   { transform: scale(1.08); }
}
.auth__visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(16,36,24,0.86) 0%,
        rgba(16,36,24,0.30) 48%,
        rgba(16,36,24,0.05) 100%);
    z-index: 1;
}

.auth__visual-inner {
    position: relative;
    z-index: 2;
    padding: 56px;
    max-width: 480px;
    animation: authIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.auth__visual-tag {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--beige-light);
    font-weight: 400;
    margin-bottom: 18px;
}
.auth__visual-tag::before {
    content: '';
    width: 26px;
    height: 1px;
    background: var(--beige-light);
    opacity: 0.6;
}
.auth__visual-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.2rem, 3.4vw, 3rem);
    color: var(--white);
    letter-spacing: 0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
}
.auth__visual-title em { font-style: italic; color: var(--beige-light); }
.auth__visual-sub {
    font-size: 13.5px;
    font-weight: 300;
    color: rgba(255,255,255,0.72);
    letter-spacing: 0.01em;
    line-height: 1.75;
    max-width: 360px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .auth { grid-template-columns: 1fr; }
    .auth__visual { display: none; }
    .auth__panel { min-height: calc(100vh - 86px); padding: 48px 28px; align-items: flex-start; padding-top: 56px; }
}

@media (max-width: 440px) {
    .auth__panel { padding: 36px 20px; }
    .auth__back { margin-bottom: 30px; }
    .auth__title { font-size: 1.75rem; }
}
