/* ==========================================================================
   eHadj - Page de connexion (refonte premium)
   ========================================================================== */

:root {
    --navy-950: #05070a;
    --navy-900: #0a0e15;
    --navy-800: #121826;
    --gold-300: #e4c877;
    --gold-400: #d9b668;
    --gold-500: #c9a04c;
    --gold-600: #a9823a;

    --cream-bg: #fefdfb;
    --ink-900: #14171c;
    --ink-700: #3a4149;
    --ink-600: #5b6472;
    --ink-500: #828b96;
    --border-light: #e8e3d8;
    --input-bg: #fbfaf6;
}

html, body {
    height: 100%;
}

body.auth-body {
    margin: 0;
    background: var(--cream-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink-900);
}

.auth-serif {
    font-family: 'Playfair Display', Georgia, serif;
}

.auth-page {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ==========================================================================
   Panneau visuel (gauche, sombre)
   ========================================================================== */
.auth-visual {
    position: relative;
    flex: 1 1 54%;
    min-height: 100vh;
    background: var(--navy-950);
    overflow: hidden;
}

.auth-visual-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../assets/images/login-design.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 35%;
    filter: brightness(0.78) saturate(1.05) contrast(1.05);
}

.auth-visual::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(165deg,
        rgba(5, 7, 10, 0.40) 0%,
        rgba(5, 7, 10, 0.62) 45%,
        rgba(5, 7, 10, 0.90) 100%);
}

.auth-visual-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 100vh;
    padding: 36px 48px 32px;
    color: #fff;
}

/* ---- Top bar ---- */
.auth-visual-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.auth-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand-badge {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 11px;
    border: 1px solid rgba(201, 160, 76, 0.45);
    background: linear-gradient(160deg, #161c27 0%, #0a0e15 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 17px;
    color: #fff;
}

.auth-brand-badge .dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold-400);
    border: 2px solid var(--navy-950);
}

.auth-brand-name-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.auth-brand-name-row .name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #fff;
}

.auth-pro-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid rgba(201, 160, 76, 0.5);
    background: rgba(201, 160, 76, 0.1);
    color: var(--gold-300);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.auth-brand-sub {
    margin-top: 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.01em;
}

.auth-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
}

.auth-status-pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #35d07f;
    box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.18);
}

/* ---- Middle content ---- */
.auth-visual-middle {
    max-width: 490px;
    margin: 48px 0;
}

.auth-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(201, 160, 76, 0.45);
    background: rgba(201, 160, 76, 0.08);
    color: var(--gold-300);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 26px;
}

.auth-pill-badge svg {
    width: 12px;
    height: 12px;
}

.auth-visual-middle h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.28;
    margin-bottom: 18px;
    color: #fff;
}

.auth-visual-middle h1 .gold {
    color: var(--gold-400);
    font-style: italic;
}

.auth-visual-middle p {
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.58);
    margin-bottom: 26px;
    max-width: 420px;
}

.auth-divider-line {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin-bottom: 22px;
}

.auth-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.auth-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.68);
}

.auth-trust-item svg {
    width: 15px;
    height: 15px;
    color: var(--gold-400);
    flex: 0 0 auto;
}

/* ---- Bottom bar ---- */
.auth-visual-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.38);
}

/* ==========================================================================
   Panneau formulaire (droite, clair)
   ========================================================================== */
.auth-form-panel {
    flex: 0 0 46%;
    max-width: 640px;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 30px 64px 28px;
    background: var(--cream-bg);
}

.auth-form-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}

.auth-lang-switcher .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border-light);
    background: #fff;
    color: var(--ink-700);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 500;
}

.auth-lang-switcher .btn svg {
    width: 14px;
    height: 14px;
    color: var(--ink-500);
}

.auth-lang-switcher .btn:hover,
.auth-lang-switcher .btn:focus {
    background: var(--input-bg);
}

.auth-help-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-600);
    text-decoration: none;
    cursor: default;
}

.auth-help-link svg {
    width: 15px;
    height: 15px;
}

.auth-help-link:hover {
    color: var(--ink-700);
    text-decoration: none;
}

.auth-form-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.auth-brand-word {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 26px;
    color: var(--gold-600);
    margin-bottom: 26px;
}

.auth-form-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 29px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ink-900);
}

.auth-form-header p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-600);
    margin-bottom: 28px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form label.field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-600);
    margin-bottom: 8px;
}

.auth-input-group {
    position: relative;
}

.auth-input-group .field-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--ink-500);
    display: flex;
    pointer-events: none;
}

.auth-input-group .field-icon svg {
    width: 17px;
    height: 17px;
}

.auth-input-group .field-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--ink-500);
    background: none;
    border: none;
    padding: 4px;
    display: flex;
    cursor: pointer;
}

.auth-input-group .field-toggle svg {
    width: 17px;
    height: 17px;
}

.auth-input-group .field-toggle:hover {
    color: var(--ink-700);
}

.auth-input-group .form-control {
    height: 48px;
    padding-left: 44px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--input-bg);
    font-size: 14.5px;
    color: var(--ink-900);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-input-group .form-control.has-toggle {
    padding-right: 42px;
}

.auth-input-group .form-control:focus {
    background: #fff;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(201, 160, 76, 0.16);
    outline: none;
}

.auth-input-group .form-control::placeholder {
    color: #aab0b8;
}

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 13.5px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-600);
}

.auth-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--gold-600);
    cursor: default;
}

.auth-forgot-link {
    color: var(--gold-600);
    font-weight: 600;
    text-decoration: none;
    cursor: default;
}

.auth-forgot-link:hover {
    color: var(--gold-600);
    text-decoration: underline;
}

.auth-submit-btn {
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(100deg, var(--navy-900) 0%, var(--navy-800) 42%, var(--gold-600) 135%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.15px;
    box-shadow: 0 10px 24px -10px rgba(10, 14, 21, 0.45);
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.auth-submit-btn svg {
    width: 16px;
    height: 16px;
}

.auth-submit-btn:hover {
    opacity: 0.93;
    color: #fff;
}

.auth-submit-btn:active {
    transform: translateY(1px);
}

.auth-divider-text {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-500);
}

.auth-divider-text::before,
.auth-divider-text::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.auth-outline-btn {
    width: 100%;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: #fff;
    color: var(--ink-700);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: default;
}

.auth-outline-btn svg {
    width: 16px;
    height: 16px;
    color: var(--ink-600);
}

.auth-outline-btn:hover {
    background: var(--input-bg);
    color: var(--ink-700);
    text-decoration: none;
}

.auth-form .alert {
    border: none;
    border-radius: 10px;
    font-size: 13px;
    padding: 11px 15px;
    margin-bottom: 18px;
}

.auth-form-bottombar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-top: 22px;
    font-size: 11.5px;
    color: var(--ink-500);
}

.auth-form-bottombar .dev-credit a {
    color: var(--ink-800, #22262c);
    font-weight: 700;
    text-decoration: none;
}

.auth-form-bottombar .dev-credit svg {
    width: 12px;
    height: 12px;
    color: #c0392b;
    vertical-align: -1px;
}

.auth-form-bottombar .ssl-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-form-bottombar .ssl-note svg {
    width: 12px;
    height: 12px;
    color: #35a567;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
    .auth-visual {
        display: none;
    }

    .auth-form-panel {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 28px 24px 24px;
    }

    .auth-form-topbar {
        justify-content: space-between;
    }
}

@media (max-width: 420px) {
    .auth-form-panel {
        padding: 22px 16px 20px;
    }
}
