/* =========================================================
   Bildyx - Authentication stylesheet
   This file is only for:
   login.html, register.html, forgot-password.html,
   reset-password.html and verify-email.html.

   Global website styles stay in css/style.css.
   ========================================================= */

/* ---------- Auth design tokens ---------- */

:root {
    --bg: #ffffff;
    --s0: #f8f9fc;
    --s1: #f3f4f9;
    --s2: #ebedf4;

    --bd: #e4e7ed;
    --bd-hi: rgba(34, 68, 236, 0.25);

    --p: #2244ec;
    --p-dk: #1a35bb;
    --p-lt: #4d6ff0;
    --p-dim: rgba(34, 68, 236, 0.06);
    --p-mid: rgba(34, 68, 236, 0.15);

    --t1: #0f1729;
    --t2: #4a5578;
    --t3: #9aa5bc;

    --red: #dc2626;

    --font: "Plus Jakarta Sans", system-ui, sans-serif;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-2xl: 24px;

    --sh-lg: 0 4px 24px rgba(34, 68, 236, 0.08);
    --sh-xl: 0 8px 40px rgba(34, 68, 236, 0.12);

    --tr: 150ms ease;
}

/* ---------- Auth page reset ---------- */

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

body {
    min-height: 100vh;
    margin: 0;

    background: var(--s0);
    color: var(--t1);

    font-family: var(--font);
}

a {
    color: var(--p);
    text-decoration: none;
}

/* ---------- Main auth layout ---------- */

.auth-shell {
    width: min(1280px, calc(100% - 32px));
    min-height: 760px;

    margin: 40px auto;

    display: grid;
    grid-template-columns: 0.9fr 1.1fr;

    overflow: hidden;

    border: 1px solid var(--bd);
    border-radius: 24px;

    background: var(--bg);

    box-shadow: var(--sh-xl);
}

/* ---------- Left brand panel ---------- */

.brand-panel {
    position: relative;

    display: flex;
    flex-direction: column;

    min-height: 760px;
    padding: 40px 60px;

    overflow: hidden;

    background:
        linear-gradient(
            rgba(34, 68, 236, 0.93),
            rgba(34, 68, 236, 0.93)
        ),
        url("../images/Logo.png");

    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.brand-panel.job-seeker {
    background:
        linear-gradient(
            rgba(34, 68, 236, 0.88),
            rgba(34, 68, 236, 0.88)
        ),
        url("../images/Logo.png");

    background-size: cover;
    background-position: center;
}

/* Decorative soft pattern above the background image. */
.brand-panel::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        radial-gradient(circle at 10% 70%, rgba(255, 255, 255, 0.06), transparent 22%),
        radial-gradient(circle at 85% 65%, rgba(255, 255, 255, 0.08), transparent 24%);

    pointer-events: none;
}

.brand {
    position: relative;
    z-index: 1;

    display: inline-flex;
    align-items: center;
    gap: 12px;

    color: #ffffff;

    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-icon {
    width: 24px;
    height: 24px;

    object-fit: contain;
}

.brand-content {
    position: relative;
    z-index: 1;

    margin-top: 64px;
}

.brand-content h1 {
    margin: 0 0 54px;

    font-size: clamp(2.6rem, 4vw, 3.3rem);
    line-height: 1.08;
    letter-spacing: -1px;
}

.brand-features {
    display: grid;
    gap: 32px;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;

    max-width: 500px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;

    display: grid;
    place-items: center;

    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
}

.feature-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.feature-card h2 {
    margin: 2px 0 6px;

    font-size: 1rem;
    line-height: 1.3;
}

.feature-card p {
    margin: 0;

    color: rgba(255, 255, 255, 0.78);

    font-size: 1rem;
    line-height: 1.6;
}

.copyright {
    position: relative;
    z-index: 1;

    margin-top: auto;

    color: rgba(255, 255, 255, 0.62);

    font-size: 0.82rem;
}

/* ---------- Right form panel ---------- */

.form-panel {
    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 32px 60px 56px;
}

.auth-card {
    width: min(100%, 590px);

    padding: 0;

    border-radius: 24px;
}

/* ---------- Tabs ---------- */

.tabs {
    display: flex;
    gap: 28px;

    margin-bottom: 42px;

    border-bottom: 1px solid var(--bd);

    justify-content: flex-end;
    flex-direction: row-reverse;
}

.tab {
    padding: 0 0 14px;

    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--t2);

    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.tab.active {
    color: var(--p);
    border-bottom-color: var(--p);
}

/* ---------- Forms ---------- */

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.form-heading.center {
    text-align: center;
}

.form-heading h2 {
    margin: 0 0 4px;

    font-size: 1.85rem;
    line-height: 1.2;
    letter-spacing: -0.4px;
}

.form-heading p {
    margin: 0;

    color: var(--t2);

    font-size: 1rem;
}

/* ---------- Account cards ---------- */

.account-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;

    margin-bottom: 28px;
}

.account-option {
    min-height: 108px;

    display: grid;
    place-items: center;
    gap: 8px;

    cursor: pointer;

    border: 1px solid var(--bd);
    border-radius: var(--r-lg);
    background: var(--bg);
    color: var(--t2);

    font-weight: 800;

    transition: var(--tr);
}

.account-option input {
    display: none;
}

.account-option.active {
    border: 2px solid var(--p);
    background: var(--p-dim);
    color: var(--p);
}

.option-icon {
    width: 30px;
    height: 30px;

    object-fit: contain;
}

/* ---------- Fields ---------- */

.field {
    margin-bottom: 18px;
}

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

.field label,
.label-row label {
    display: block;

    margin-bottom: 8px;

    font-weight: 700;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.input-wrap {
    height: 50px;
    padding: 0 14px;

    display: flex;
    align-items: center;
    gap: 12px;

    border: 1px solid var(--bd);
    border-radius: var(--r-sm);
    background: #ffffff;

    transition: var(--tr);
}

.input-wrap:focus-within {
    border-color: var(--p);
    box-shadow: 0 0 0 3px var(--p-dim);
}

.input-wrap.invalid {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.input-icon {
    width: 20px;
    height: 20px;

    object-fit: contain;
}

.input-wrap input {
    width: 100%;

    border: 0;
    outline: 0;
    background: transparent;
    color: var(--t1);

    font: inherit;
}

.input-wrap input::placeholder {
    color: #6d778f;
}

.icon-btn,
.captcha-refresh {
    border: 0;
    background: transparent;
    color: var(--t2);

    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 800;
}

.eye-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.error {
    display: block;

    min-height: 17px;
    margin-top: 6px;

    color: var(--red);

    font-size: 0.78rem;
}

.hint {
    display: block;

    margin-top: 6px;

    color: var(--t3);

    font-size: 0.76rem;
}

.hidden {
    display: none !important;
}

.password-meter {
    width: 100%;
    height: 7px;
    margin-top: 8px;
}

/* ---------- Captcha ---------- */

.captcha-box {
    display: grid;
    grid-template-columns: 1fr auto 96px;
    gap: 12px;
    align-items: center;

    margin: 8px 0 4px;
    padding: 14px;

    border: 1px dashed var(--bd-hi);
    border-radius: var(--r-md);
    background: var(--p-dim);
}

.captcha-box p {
    margin: 0;

    color: var(--t2);

    font-size: 0.84rem;
}

.captcha-answer {
    height: 40px;
    padding: 0 10px;

    border: 1px solid var(--bd);
    border-radius: 8px;
    background: #ffffff;
}

/* ---------- Checkboxes ---------- */

.check-line {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    margin: 14px 0;

    line-height: 1.55;
}

.check-line input {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;

    accent-color: var(--p);
}

.check-line.muted {
    color: var(--t2);
}

/* ---------- Buttons ---------- */

.submit-btn {
    width: 100%;
    height: 56px;
    margin-top: 16px;

    border: 0;
    border-radius: var(--r-sm);
    background: var(--p);
    color: #ffffff;

    cursor: pointer;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 800;

    transition: var(--tr);
}

.submit-btn:hover {
    background: var(--p-dk);
    transform: translateY(-1px);
}

.divider {
    display: flex;
    align-items: center;
    gap: 18px;

    margin: 34px 0 22px;

    color: var(--t2);

    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    content: "";

    height: 1px;
    flex: 1;

    background: var(--bd);
}

.social-row-single {
    display: flex;
    justify-content: center;
}

.google-btn {
    width: 100%;
    max-width: 380px;
    height: 56px;

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

    border: 1px solid var(--bd);
    border-radius: var(--r-sm);
    background: #ffffff;

    font: inherit;
    font-weight: 700;
    font-size: 1rem;

    cursor: pointer;
    transition: all 0.2s ease;
}

.google-btn img {
    width: 22px;
    height: 22px;
}

.google-btn:hover {
    border-color: var(--p);
    background: var(--p-dim);
    color: var(--t1); /* ou #000 */
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(34, 68, 236, 0.12);
}

.switch-text {
    margin-top: 26px;

    color: var(--t2);

    text-align: center;
}

.link-btn {
    border: 0;
    background: transparent;
    color: var(--p);

    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

/* ---------- Toast ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;

    padding: 12px 18px;

    opacity: 0;
    pointer-events: none;

    border-radius: 999px;
    background: var(--t1);
    color: #ffffff;
    box-shadow: var(--sh-lg);

    transform: translateX(-50%) translateY(20px);
    transition: var(--tr);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .auth-shell {
        width: 100%;
        margin: 0;

        grid-template-columns: 1fr;

        border-radius: 0;
    }

    .brand-panel {
        min-height: auto;
        padding: 34px;
    }

    .brand-content {
        margin-top: 42px;
    }

    .brand-content h1 {
        font-size: 2.2rem;
        margin-bottom: 32px;
    }

    .form-panel {
        padding: 32px 18px;
    }

    .account-switch,
    .social-row,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .captcha-box {
        grid-template-columns: 1fr;
    }

    .captcha-answer {
        width: 100%;
    }
}

.check-line a,
#forgotPassword,
.link-btn,
.captcha-refresh {
    position: relative;
}

.check-line a::after,
#forgotPassword::after,
.link-btn::after,
.captcha-refresh::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -2px;

    width: 0;
    height: 2px;

    background-color: var(--primary-color);

    transition: width 0.25s ease;
}

.check-line a:hover::after,
#forgotPassword:hover::after,
.link-btn:hover::after,
.captcha-refresh:hover::after {
    width: 100%;
}

/* ---------- Auth Buttons ---------- */

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

.auth-buttons a {
  text-decoration: none;
  padding: 10px 22px; /* moins haut */
  border-radius: 12px; /* moins arrondi */
  font-weight: 600;
  transition: all 0.2s ease;
}

/* Etat par défaut */
.login-btn,
.signup-btn {
  background: white;
  color: #2f49f5;
  border: 2px solid white;
}

/* Hover */
.login-btn:hover,
.signup-btn:hover {
  background: #2f49f5;
  color: white;
  border-color: #2f49f5;
  transform: translateY(-1px);
}