/* ==========================================================================
   Page de connexion — resources/views/auth/login.blade.php
   ========================================================================== */

@font-face {
    font-family: 'CNDJ Serif';
    font-weight: 700;
    font-display: swap;
    src: url(../fonts/NotoSerifBold.ttf) format('truetype');
}

:root {
    --lg-accent: #EAA451;
    --lg-accent-strong: #e58c23;
    --lg-accent-deep: #b9650d;
    --lg-ink: #1f1a16;
    --lg-muted: #7b7067;
    --lg-line: #e9e1d8;
    --lg-field: #fbf8f4;
    --lg-bg: #f6f1ea;
    --lg-dark-1: #1d1612;
    --lg-dark-2: #33261e;
    --lg-ease: cubic-bezier(.22, 1, .36, 1);
    --lg-radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.lg {
    font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--lg-ink);
    background: var(--lg-bg);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font-family: inherit; }

.lg__shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr);
}

/* ── Visuel ────────────────────────────────────────────────────────────── */
.lg__visual {
    position: relative;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
    background: var(--lg-dark-1);
}
.lg__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--lg-photo-pos, 72% 40%);
    z-index: -2;
    transform: scale(1.06);
    animation: lg-zoom 18s var(--lg-ease) forwards;
    filter: saturate(.9) contrast(1.02);
}
@keyframes lg-zoom { to { transform: scale(1); } }
.lg__veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(90% 70% at 0% 100%, rgba(29, 22, 18, .96) 0%, rgba(29, 22, 18, .72) 45%, rgba(29, 22, 18, 0) 80%),
        linear-gradient(100deg, rgba(29, 22, 18, .92) 0%, rgba(51, 38, 30, .7) 38%, rgba(106, 66, 32, .18) 70%, rgba(234, 164, 81, .12) 100%);
}
.lg__veil::after { /* trame fine */
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 16px);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 60%);
    mask-image: linear-gradient(90deg, #000 0%, transparent 60%);
}
.lg__visual-inner {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 4vw, 56px);
}

.lg__brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; }
.lg__brand-logo {
    display: grid; place-items: center;
    width: 54px; height: 54px; border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6);
}
.lg__brand-logo img { width: 42px; }
.lg__brand-text { display: flex; flex-direction: column; font-weight: 700; font-size: 15px; line-height: 1.2; }
.lg__brand-text small { font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }

.lg__pitch { max-width: 560px; animation: lg-rise .9s var(--lg-ease) .1s both; }
.lg__eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px;
    background: rgba(234, 164, 81, .16); border: 1px solid rgba(234, 164, 81, .35);
    color: #ffd8a8; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.lg__pitch h1 {
    margin: 18px 0 14px;
    font-family: 'CNDJ Serif', Georgia, serif;
    font-size: clamp(36px, 4.4vw, 60px);
    line-height: 1.05;
    letter-spacing: -.01em;
}
.lg__pitch h1 em {
    font-style: normal;
    background: linear-gradient(90deg, #ffd29a 0%, var(--lg-accent) 50%, #f7b45a 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lg__pitch p { margin: 0; max-width: 460px; font-size: 16.5px; line-height: 1.6; color: rgba(255, 255, 255, .8); }

/* Cartes flottantes */
.lg__float {
    position: absolute;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px 12px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55);
    color: #fff;
    animation: lg-float 7s ease-in-out infinite, lg-fade 1s var(--lg-ease) both;
}
.lg__float i {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
    background: linear-gradient(135deg, #f3b766, var(--lg-accent-strong)); color: #2a1a08; font-size: 16px;
}
.lg__float span { display: flex; flex-direction: column; line-height: 1.25; }
.lg__float b { font-size: 14px; }
.lg__float small { font-size: 12px; opacity: .78; }
.lg__float--a { top: 14%; right: 5%; animation-delay: 0s, .5s; }
.lg__float--c { top: 44%; right: 4%; animation-delay: -3.4s, .8s; }
@keyframes lg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes lg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lg-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ── Panneau du formulaire ─────────────────────────────────────────────── */
.lg__panel {
    position: relative;
    display: grid;
    place-items: center;
    padding: 40px clamp(20px, 4vw, 56px);
    background:
        radial-gradient(circle at 1px 1px, rgba(185, 101, 13, .13) 1px, transparent 0) 0 0 / 22px 22px,
        radial-gradient(70% 50% at 100% 0%, rgba(234, 164, 81, .18), transparent 70%),
        var(--lg-bg);
}
.lg__card {
    width: 100%;
    max-width: 440px;
    animation: lg-rise .8s var(--lg-ease) both;
}
.lg__back {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 26px;
    color: var(--lg-muted); font-size: 14px; font-weight: 600; text-decoration: none;
    transition: color .2s, gap .2s var(--lg-ease);
}
.lg__back:hover { color: var(--lg-accent-deep); gap: 12px; }

.lg__head { margin-bottom: 24px; }
.lg__head h2 {
    margin: 0 0 8px;
    font-family: 'CNDJ Serif', Georgia, serif;
    font-size: clamp(28px, 2.6vw, 34px);
    line-height: 1.15;
}
.lg__head p { margin: 0; color: var(--lg-muted); font-size: 15.5px; }

/* Alertes */
.lg__alert {
    display: flex; gap: 10px; align-items: flex-start;
    margin-bottom: 18px; padding: 12px 14px;
    border-radius: 14px; font-size: 14px; line-height: 1.45;
}
.lg__alert i { margin-top: 2px; }
.lg__alert--warn { background: #fff4e5; border: 1px solid #f6d3a6; color: #8a4b05; }
.lg__alert--ok { background: #ecfbf2; border: 1px solid #bce8cf; color: #146c3c; }
.lg__alert--err { background: #fff1f0; border: 1px solid #f7c6c2; color: #a52418; }

/* Champs à étiquette flottante */
.lg__form { display: flex; flex-direction: column; gap: 14px; }
.lg__field { position: relative; }
.lg__field input {
    width: 100%;
    height: 60px;
    padding: 22px 48px 6px 48px;
    border: 1.5px solid var(--lg-line);
    border-radius: var(--lg-radius);
    background: var(--lg-field);
    color: var(--lg-ink);
    font-size: 16px; /* iOS : pas de zoom */
    font-weight: 600;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.lg__field input:hover { border-color: #ddd1c4; }
.lg__field input:focus {
    outline: none; background: #fff;
    border-color: var(--lg-accent);
    box-shadow: 0 0 0 4px rgba(234, 164, 81, .2);
}
.lg__field label {
    position: absolute; left: 48px; top: 50%;
    transform: translateY(-50%);
    color: #998c81; font-size: 15.5px; font-weight: 500;
    pointer-events: none;
    transform-origin: left center;
    transition: transform .22s var(--lg-ease), color .2s, top .22s var(--lg-ease);
}
.lg__field input:focus + label,
.lg__field input:not(:placeholder-shown) + label {
    top: 17px;
    transform: translateY(-50%) scale(.78);
    color: var(--lg-accent-deep);
    font-weight: 700;
}
.lg__field-icon {
    position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
    color: #b0a397; font-size: 16px; transition: color .2s;
}
.lg__field:focus-within .lg__field-icon { color: var(--lg-accent-strong); }
.lg__eye {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 42px; height: 42px; border: 0; border-radius: 12px;
    background: transparent; color: #a3968b; cursor: pointer;
    transition: background-color .2s, color .2s;
}
.lg__eye:hover { background: #f3ece4; color: var(--lg-ink); }
.lg__field.has-error input { border-color: #e5847a; background: #fffafa; }
.lg__field.has-error .lg__field-icon { color: #d4574b; }
.lg__error, .lg__caps { margin: -6px 0 0 4px; font-size: 13px; font-weight: 600; color: #b42318; }
.lg__caps { color: #a35a06; }
.lg__field.shake { animation: lg-shake .4s; }
@keyframes lg-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.lg__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 4px; flex-wrap: wrap; }
.lg__link { color: var(--lg-accent-deep); font-size: 14px; font-weight: 700; text-decoration: none; }
.lg__link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Interrupteur « Rester connecté » */
.lg__switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; color: #4a3f37; user-select: none; }
.lg__switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lg__switch-track {
    position: relative; width: 42px; height: 24px; border-radius: 999px;
    background: #e3d9ce; transition: background-color .25s;
}
.lg__switch-track span {
    position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .25s var(--lg-ease);
}
.lg__switch input:checked + .lg__switch-track { background: var(--lg-accent-strong); }
.lg__switch input:checked + .lg__switch-track span { transform: translateX(18px); }
.lg__switch input:focus-visible + .lg__switch-track { box-shadow: 0 0 0 4px rgba(234, 164, 81, .3); }

/* Bouton principal */
.lg__submit {
    position: relative;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    height: 58px; margin-top: 6px;
    border: 0; border-radius: var(--lg-radius);
    background: linear-gradient(135deg, #f4bb6c 0%, var(--lg-accent) 40%, var(--lg-accent-strong) 100%);
    background-size: 160% 100%;
    color: #2a1a08; font-size: 16.5px; font-weight: 800; letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 14px 28px -14px rgba(229, 140, 35, .95), inset 0 1px 0 rgba(255, 255, 255, .5);
    transition: background-position .4s var(--lg-ease), transform .15s, box-shadow .25s;
}
.lg__submit:hover { background-position: 100% 0; box-shadow: 0 18px 34px -14px rgba(229, 140, 35, 1), inset 0 1px 0 rgba(255, 255, 255, .5); }
.lg__submit:active { transform: scale(.985); }
.lg__submit:focus-visible { outline: 3px solid rgba(185, 101, 13, .5); outline-offset: 3px; }
.lg__submit-arrow { transition: transform .25s var(--lg-ease); }
.lg__submit:hover .lg__submit-arrow { transform: translateX(4px); }
.lg__spinner {
    display: none; width: 20px; height: 20px; border-radius: 50%;
    border: 2.5px solid rgba(42, 26, 8, .25); border-top-color: #2a1a08;
    animation: lg-spin .7s linear infinite;
}
@keyframes lg-spin { to { transform: rotate(360deg); } }
.lg__form.is-loading .lg__submit { cursor: wait; }
.lg__form.is-loading .lg__submit-label::after { content: "…"; }
.lg__form.is-loading .lg__submit-arrow { display: none; }
.lg__form.is-loading .lg__spinner { display: block; }

/* Séparateur et lien secondaire */
.lg__divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 14px; color: var(--lg-muted); font-size: 13px; font-weight: 600; }
.lg__divider::before, .lg__divider::after { content: ""; flex: 1; height: 1px; background: var(--lg-line); }
.lg__secondary {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: var(--lg-radius);
    border: 1.5px solid var(--lg-line); background: #fff;
    text-decoration: none; color: var(--lg-ink);
    transition: border-color .2s, transform .2s var(--lg-ease), box-shadow .2s;
}
.lg__secondary:hover { border-color: var(--lg-accent); transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(185, 101, 13, .6); }
.lg__secondary-icon {
    display: grid; place-items: center; width: 42px; height: 42px; flex: none;
    border-radius: 13px; background: #fdf1e2; color: var(--lg-accent-strong);
}
.lg__secondary > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.lg__secondary b { font-size: 15px; }
.lg__secondary small { color: var(--lg-muted); font-size: 13px; }
.lg__secondary > i { color: #c0b3a7; transition: transform .2s var(--lg-ease), color .2s; }
.lg__secondary:hover > i { transform: translateX(3px); color: var(--lg-accent-strong); }

.lg__foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 28px; color: #9a8e84; font-size: 12.5px; }
.lg__foot a { color: inherit; text-decoration: none; }
.lg__foot a:hover { color: var(--lg-accent-deep); }

/* ── Tablette et mobile : bandeau visuel en haut, carte qui le chevauche ── */
@media (max-width: 960px) {
    .lg__shell { grid-template-columns: 1fr; }
    .lg__visual { min-height: 300px; }
    .lg__photo { object-position: var(--lg-photo-pos-sm, 70% 30%); }
    .lg__visual-inner { padding: calc(20px + env(safe-area-inset-top)) 22px 76px; justify-content: flex-start; gap: 22px; }
    .lg__float { display: none; }
    .lg__pitch h1 { font-size: clamp(30px, 8vw, 40px); margin: 14px 0 8px; }
    .lg__pitch p { font-size: 14.5px; }
    .lg__brand-logo { width: 46px; height: 46px; border-radius: 14px; }
    .lg__brand-logo img { width: 36px; }
    .lg__panel { place-items: start center; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); background: var(--lg-bg); }
    .lg__card {
        max-width: 520px;
        margin-top: -52px;
        padding: 26px 22px 22px;
        border-radius: 26px;
        background: #fff;
        box-shadow: 0 24px 50px -28px rgba(40, 22, 6, .45);
    }
    .lg__back { display: none; }
    .lg__head h2 { font-size: 27px; }
    .lg__row { gap: 8px; }
    .lg__link, .lg__switch { font-size: 13.5px; }
}
@media (max-width: 380px) {
    .lg__row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .lg__photo, .lg__float, .lg__pitch, .lg__card { animation: none !important; transform: none; }
}

/* ==========================================================================
   Mot de passe oublié / réinitialisation (auth/passwords/*.blade.php)
   ========================================================================== */
.lg__head-icon {
    display: grid; place-items: center;
    width: 54px; height: 54px; margin-bottom: 16px;
    border-radius: 17px;
    background: linear-gradient(135deg, #fbe2bf, #f6c886);
    color: var(--lg-accent-deep); font-size: 22px;
    box-shadow: 0 12px 24px -14px rgba(185, 101, 13, .7), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.lg__alert-link { display: inline-block; margin-top: 4px; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Écran « Vérifiez votre boîte e-mail » */
.lg__sent { text-align: center; animation: lg-rise .7s var(--lg-ease) both; }
.lg__sent-icon {
    position: relative;
    display: grid; place-items: center;
    width: 92px; height: 92px; margin: 4px auto 20px;
    border-radius: 28px;
    background: linear-gradient(145deg, #fff3e2, #fbdcb2);
    color: var(--lg-accent-strong); font-size: 38px;
    box-shadow: 0 18px 36px -18px rgba(185, 101, 13, .7);
    animation: lg-pop .6s var(--lg-ease) both;
}
.lg__sent-icon::after { /* onde */
    content: ""; position: absolute; inset: -8px; border-radius: 34px;
    border: 2px solid rgba(234, 164, 81, .45);
    animation: lg-wave 2.4s ease-out infinite;
}
.lg__sent-badge {
    position: absolute; right: -8px; bottom: -8px;
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: #22a06b; color: #fff; font-size: 15px;
    border: 3px solid var(--lg-bg);
    animation: lg-pop .5s var(--lg-ease) .35s both;
}
@keyframes lg-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes lg-wave { 0% { opacity: .9; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.25); } }
.lg__sent h2 { margin: 0 0 10px; font-family: 'CNDJ Serif', Georgia, serif; font-size: clamp(26px, 2.4vw, 31px); }
.lg__sent > p { margin: 0 auto 20px; max-width: 380px; color: var(--lg-muted); font-size: 15.5px; line-height: 1.55; }
.lg__sent > p strong { color: var(--lg-ink); }
.lg__tips {
    list-style: none; margin: 0 0 22px; padding: 14px 16px;
    border-radius: var(--lg-radius); background: #fff; border: 1.5px solid var(--lg-line);
    text-align: left; display: flex; flex-direction: column; gap: 10px;
}
.lg__tips li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; color: #4f443b; line-height: 1.45; }
.lg__tips i { color: var(--lg-accent-strong); width: 16px; text-align: center; flex: none; }
.lg__submit--link { text-decoration: none; }
.lg__resend { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 16px; font-size: 14px; color: var(--lg-muted); }
.lg__link-btn {
    border: 0; background: none; padding: 4px 2px; cursor: pointer;
    color: var(--lg-accent-deep); font-weight: 700; font-size: 14px;
}
.lg__link-btn:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.lg__link-btn:disabled { color: #b4a89d; cursor: default; }
.lg__countdown { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Solidité du mot de passe */
.lg__strength { display: flex; align-items: center; gap: 12px; margin: -2px 2px 0; }
.lg__meter { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.lg__meter span { height: 6px; border-radius: 99px; background: #ebe3da; transition: background-color .3s; }
.lg__strength-label { min-width: 132px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--lg-muted); }
.lg__strength[data-score="0"] .lg__meter span:nth-child(-n+1),
.lg__strength[data-score="1"] .lg__meter span:nth-child(-n+1) { background: #e5484d; }
.lg__strength[data-score="2"] .lg__meter span:nth-child(-n+2) { background: #f0a020; }
.lg__strength[data-score="3"] .lg__meter span:nth-child(-n+3) { background: #7cb342; }
.lg__strength[data-score="4"] .lg__meter span:nth-child(-n+4) { background: #22a06b; }
.lg__strength[data-score="0"] .lg__strength-label, .lg__strength[data-score="1"] .lg__strength-label { color: #c2362f; }
.lg__strength[data-score="2"] .lg__strength-label { color: #b06e00; }
.lg__strength[data-score="3"] .lg__strength-label { color: #4f7f1d; }
.lg__strength[data-score="4"] .lg__strength-label { color: #17794f; }
.lg__rules { list-style: none; margin: 0 0 2px; padding: 0 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.lg__rules li { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #8d8177; transition: color .2s; }
.lg__rules li i { color: #d8cdc2; transition: color .2s, transform .25s var(--lg-ease); }
.lg__rules li em { font-style: normal; color: #b0a397; font-size: 12px; }
.lg__rules li.is-ok { color: #2f5f45; }
.lg__rules li.is-ok i { color: #22a06b; transform: scale(1.12); }
.lg__match { margin: -6px 0 0 4px; min-height: 18px; font-size: 13px; font-weight: 600; }
.lg__match.is-ok { color: #17794f; }
.lg__match.is-ko { color: #b42318; }
.lg__match i { margin-right: 4px; }
@media (max-width: 420px) { .lg__rules { grid-template-columns: 1fr; } .lg__strength-label { min-width: 0; } }
@media (prefers-reduced-motion: reduce) { .lg__sent-icon::after { animation: none; } }
