:root {
    --navy: #004b97;
    --navy-2: #1f2e52;
    --gold: #f6f547;
    --gold-dark: #e6a211;
    --ivory: #f7f3e9;
    --ink: #232220;
    --slate: #6b7280;
    --line: #e4dfd1;
}
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    color: var(--ink);
}

.font-display {
    font-family: "Fraunces", serif;
}
.font-mono {
    font-family: "IBM Plex Mono", monospace;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    background: var(--ivory);
}

/* ---------- Panneau de marque (gauche) ---------- */
.brand-panel {
    flex: 0 0 42%;
    background: var(--navy);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
}
.brand-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    z-index: 0;
}
.brand-panel::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(20, 33, 61, 0.55) 0%,
        rgba(20, 33, 61, 0.35) 45%,
        rgba(15, 23, 42, 0.92) 100%
    );
}
.brand-panel::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    background-image: radial-gradient(
        circle,
        rgba(201, 162, 75, 0.16) 1px,
        transparent 1px
    );
    background-size: 28px 28px;
    opacity: 0.5;
}
.logo-wrap {
    position: relative;
    z-index: 3;
    text-align: center;
}
.logo-wrap img {
    width: 110px;
    height: auto;
    display: inline-block;
}

.seal {
    position: relative;
    z-index: 3;
    width: 108px;
    height: 108px;
    border-radius: 999px;
    border: 1.5px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
}
.seal::before {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    bottom: 8px;
    left: 8px;
    border-radius: 999px;
    border: 1px solid rgba(201, 162, 75, 0.45);
}
.seal span {
    font-family: "Fraunces", serif;
    font-weight: 600;
    font-size: 28px;
    letter-spacing: 0.02em;
    color: var(--gold);
}
.brand-quote {
    position: relative;
    z-index: 3;
    color: #efe9d8;
}
.brand-quote .kicker {
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
}
.brand-quote h1 {
    font-family: "Fraunces", serif;
    font-size: 30px;
    line-height: 1.3;
    margin: 14px 0 0;
    font-weight: 500;
}
.brand-footer {
    position: relative;
    z-index: 3;
    display: flex;
    gap: 28px;
}
.brand-footer .item {
    border-left: 1px solid rgba(201, 162, 75, 0.4);
    padding-left: 12px;
}
.brand-footer .item .label {
    color: rgba(239, 233, 216, 0.55);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.brand-footer .item .value {
    color: #efe9d8;
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
}

/* ---------- Panneau formulaire (droite) ---------- */
.form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
}
.form-wrap {
    width: 100%;
    max-width: 380px;
}
.eyebrow {
    color: var(--gold-dark);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
}
.form-wrap h2 {
    font-family: "Fraunces", serif;
    font-weight: 600;
    font-size: 26px;
    color: var(--navy);
    margin: 8px 0 0;
}
.form-wrap .sub {
    color: var(--slate);
    font-size: 14px;
    margin: 6px 0 0;
}

.field {
    margin-top: 20px;
}
.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
}
.field input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px 14px;
    font-size: 15px;
    background: #fff;
    font-family: inherit;
}
.field input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(20, 33, 61, 0.12);
}
.input-with-icon {
    position: relative;
}
.input-with-icon input {
    padding-right: 44px;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    cursor: pointer;
}
.password-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}
.field .error {
    color: #a3372f;
    font-size: 13px;
    margin-top: 6px;
}
.field .hint {
    color: var(--slate);
    font-size: 12px;
    margin-top: 6px;
}
.flash-message {
    background: #eaf3de;
    border: 1px solid #c0dd97;
    color: #27500a;
    font-size: 14px;
    padding: 14px 16px;
    border-radius: 8px;
    margin: 20px 0;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.flash-message--error {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}

.btn-primary {
    width: 100%;
    background: var(--navy);
    color: #f7f3e9;
    border: none;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 24px;
    font-family: inherit;
}
.btn-primary:hover {
    background: var(--navy-2);
}
.btn-primary:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.btn-ghost {
    width: 100%;
    background: transparent;
    color: var(--navy);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-family: inherit;
}
.btn-ghost:hover {
    border-color: var(--navy);
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 13px;
}
.link-gold {
    color: var(--gold-dark);
    text-decoration: none;
    font-weight: 500;
}
.link-gold:hover {
    text-decoration: underline;
}
.muted-link {
    color: var(--slate);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}
.muted-link:hover {
    color: var(--ink);
}

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0;
}
.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}
.divider span {
    color: var(--slate);
    font-size: 12px;
}

.status-banner {
    background: #eaf3de;
    border: 1px solid #c0dd97;
    color: #27500a;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.qr-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}
.qr-placeholder {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    background: repeating-conic-gradient(#14213d 0% 25%, #fff 0% 50%) 50% / 20px
        20px;
    border: 1px solid var(--line);
}

@media (max-width: 860px) {
    .auth-shell {
        flex-direction: column;
    }
    .brand-panel {
        flex: none;
        padding: 2rem;
    }
    .brand-quote h1 {
        font-size: 22px;
    }
    .brand-footer {
        display: none;
    }
    .form-panel {
        padding: 2rem 1.5rem;
    }
}
