/* ================================================
   PAGE CONNEXION
   ================================================ */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ---- Côté visuel (gauche) ---- */
.auth-visual {
    position: relative;
    overflow: hidden;
}

.auth-visual__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-visual__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 100%);
    z-index: 1;
}

.auth-visual__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
}

.auth-visual__logo .nav__logo-name { color: #fff; }

.auth-visual__quote {
    color: rgba(255,255,255,.9);
}

.auth-visual__quote p {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.5;
    font-style: italic;
}

/* ---- Côté formulaire (droite) ---- */
.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    background: var(--white);
    overflow-y: auto;
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
}

/* ---- Tabs ---- */
.auth-tabs {
    display: flex;
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 36px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all var(--ease);
}

.auth-tab.active {
    background: var(--white);
    color: var(--dark);
    box-shadow: var(--shadow-sm);
}

/* ---- Formulaire ---- */
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-form.hidden { display: none; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-2);
}

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

.form-forgot {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: opacity var(--ease);
}
.form-forgot:hover { opacity: .7; }

.form-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-wrap > svg {
    position: absolute;
    left: 14px;
    width: 15px;
    height: 15px;
    stroke: var(--gray);
    fill: none;
    flex-shrink: 0;
    pointer-events: none;
    transition: stroke var(--ease);
}

.form-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    color: var(--dark);
    background: var(--white);
    outline: none;
    transition: border-color var(--ease), box-shadow var(--ease);
}

.form-input::placeholder { color: #b0b0b5; }

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,59,48,.10);
}

.form-input:focus ~ svg,
.form-input-wrap:focus-within > svg { stroke: var(--primary); }

/* Bouton œil mot de passe */
.form-eye {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 4px;
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color var(--ease);
}
.form-eye:hover { color: var(--dark); }
.form-eye svg { width: 16px; height: 16px; stroke: currentColor; fill: none; display: block; }

/* ---- Checkbox ---- */
.check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--dark-2);
    user-select: none;
}

.check-input { display: none; }

.check-box {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ease);
    background: var(--white);
}

.check-input:checked + .check-box {
    background: var(--primary);
    border-color: var(--primary);
}

.check-input:checked + .check-box::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

/* ---- Force mot de passe ---- */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    opacity: 0;
    transition: opacity var(--ease);
}
.password-strength.visible { opacity: 1; }

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.strength-bar::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    border-radius: 4px;
    width: var(--w, 0%);
    background: var(--c, var(--primary));
    transition: width .4s var(--ease), background .3s;
}

.strength-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray);
    white-space: nowrap;
    min-width: 60px;
}

/* ---- Bouton submit ---- */
.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
    box-shadow: var(--shadow-red);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}
.btn-auth:hover  { background: #e0352b; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,59,48,.35); }
.btn-auth:active { transform: translateY(0); }
.btn-auth svg    { width: 16px; height: 16px; stroke: #fff; fill: none; flex-shrink: 0; display: block; }

.btn-auth.loading span { opacity: 0; }
.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Divider ---- */
.auth-divider {
    position: relative;
    text-align: center;
}
.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: var(--border);
}
.auth-divider span {
    position: relative;
    background: var(--white);
    padding: 0 12px;
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
}

/* ---- Bouton Google ---- */
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: var(--white);
    color: var(--dark);
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--ease);
    font-family: inherit;
}
.btn-social:hover { background: var(--bg); border-color: #b0b0b5; }

/* ---- Toast ---- */
.auth-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--dark);
    color: #fff;
    padding: 12px 22px;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all .35s var(--ease);
    white-space: nowrap;
    pointer-events: none;
}
.auth-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.auth-toast.error { background: var(--primary); }
.auth-toast.success { background: #34c759; }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 860px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-form-side { padding: 100px 24px 48px; }
}