/* =========================================================
   AUTH PAGES — login.php & register-page.php
   ========================================================= */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #111827;
}

/* =========================================================
   WRAPPER
   ========================================================= */
.auth-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;   /* each panel scrolls on its own */
}

/* =========================================================
   LEFT BRANDING PANEL
   ========================================================= */
.auth-left {
    width: 42%;
    flex-shrink: 0;
    position: relative;
    background: #111827;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 48px;
    overflow-y: auto;
}

.auth-left-bg {
    position: absolute;
    inset: 0;
    background: url('../images/banniere.jpg') center / cover no-repeat;
    opacity: .12;
    pointer-events: none;
}

.auth-left-content {
    position: relative;
    z-index: 1;
}

.auth-panel-logo {
    display: block;
    width: 120px;
    height: auto;
    margin-bottom: 36px;
}

.auth-left h2 {
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    color: #fff;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 10px;
}

.auth-panel-sub {
    font-size: .875rem;
    color: rgba(255, 255, 255, .58);
    line-height: 1.65;
    margin: 0 0 36px;
}

/* Trust bullet list */
.auth-trust-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.auth-trust-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(247, 148, 29, .12);
    border: 1px solid rgba(247, 148, 29, .25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-trust-icon i {
    color: #f7941d;
    font-size: 1rem;
    line-height: 1;
}

.auth-trust-text strong {
    display: block;
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.auth-trust-text span {
    font-size: .77rem;
    color: rgba(255, 255, 255, .48);
    line-height: 1.4;
}

.auth-panel-quote {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .75rem;
    font-style: italic;
    color: rgba(255, 255, 255, .33);
    line-height: 1.5;
}

/* =========================================================
   RIGHT FORM PANEL
   Scrollable column; ::before/::after spacers center the
   card vertically when there is room, collapse when not.
   ========================================================= */
.auth-right {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
    background: #f5f5f7;
}

/* Vertical centering spacers */
.auth-right::before,
.auth-right::after {
    content: '';
    flex: 1;
    min-height: 16px;
}

/* =========================================================
   CARD
   ========================================================= */
.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 16px;
    padding: 36px 36px 28px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, .09);
}

/* ---- Card header ---- */
.auth-card-header {
    text-align: center;
    margin-bottom: 22px;
}

.auth-card-logo {
    display: none;          /* shown only on mobile */
    width: 100px;
    height: auto;
    margin: 0 auto 16px;
}

.auth-card-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 5px;
    line-height: 1.2;
}

.auth-card-subtitle {
    font-size: .82rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* =========================================================
   ALERTS
   ========================================================= */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: .82rem;
    line-height: 1.5;
    margin-bottom: 14px;
    border: 1px solid transparent;
}
.auth-alert i {
    font-size: .9rem;
    flex-shrink: 0;
    margin-top: 2px;
    line-height: 1;
}
.auth-alert a { font-weight: 600; text-decoration: underline; color: inherit; }

.auth-alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.auth-alert-danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.auth-alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.auth-alert-info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* =========================================================
   FORM FIELDS
   ========================================================= */
.auth-field {
    margin-bottom: 13px;
}

.auth-field label {
    display: block;
    font-size: .79rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.auth-field label span { color: #f7941d; }

/* Input wrapper — contains icon + input + eye-toggle */
.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: .82rem;
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}

.auth-input-wrap input {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 40px 0 34px;     /* right space for eye-toggle */
    font-family: 'Poppins', sans-serif;
    font-size: .875rem;
    color: #111827;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 9px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    -webkit-appearance: none;
    appearance: none;
}

/* Input without eye-toggle — less right padding */
.auth-input-wrap.no-toggle input { padding-right: 14px; }

.auth-input-wrap input:focus {
    border-color: #f7941d;
    box-shadow: 0 0 0 3px rgba(247, 148, 29, .13);
}

.auth-input-wrap input::placeholder {
    color: #d1d5db;
    font-weight: 400;
}

/* Eye-toggle button */
.auth-eye-toggle {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #9ca3af;
    font-size: .82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color .18s;
    z-index: 1;
}
.auth-eye-toggle:hover { color: #f7941d; }

/* Password match feedback */
.auth-pw-match {
    font-size: .74rem;
    margin-top: 4px;
    min-height: 14px;
    line-height: 1.3;
}
.auth-pw-match.match    { color: #16a34a; }
.auth-pw-match.no-match { color: #ef4444; }

/* Two-column grid for nom + prenom */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* =========================================================
   SUBMIT BUTTON
   ========================================================= */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    margin-top: 6px;
    background: #f7941d;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: .9rem;
    font-weight: 700;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    letter-spacing: .025em;
    box-shadow: 0 2px 10px rgba(247, 148, 29, .32);
    transition: background .18s, transform .15s, box-shadow .15s;
}
.auth-submit-btn:hover:not(:disabled) {
    background: #e07e0e;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(247, 148, 29, .38);
}
.auth-submit-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(247, 148, 29, .28);
}
.auth-submit-btn:disabled { opacity: .55; cursor: not-allowed; }

/* =========================================================
   FOOTER LINKS
   ========================================================= */
.auth-footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 18px;
    text-align: center;
}
.auth-footer-links p {
    margin: 0;
    font-size: .81rem;
    color: #6b7280;
}
.auth-footer-links a {
    color: #f7941d;
    font-weight: 600;
    text-decoration: none;
}
.auth-footer-links a:hover { text-decoration: underline; }

/* Divider "ou" */
.auth-sep {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    margin: 4px 0;
    color: #9ca3af;
    font-size: .73rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.auth-sep::before,
.auth-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet & small desktop (≤ 991px) — hide left panel */
@media (max-width: 991px) {
    .auth-wrapper { height: auto; overflow: visible; }

    .auth-left  { display: none; }

    .auth-right {
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
        padding: 36px 20px;
        background: #f5f5f7;
    }

    .auth-card-logo { display: block; }

    .auth-card {
        padding: 28px 26px 24px;
        box-shadow: 0 2px 18px rgba(0, 0, 0, .08);
    }
}

/* Mobile (≤ 600px) */
@media (max-width: 600px) {
    .auth-right { padding: 24px 14px; }

    .auth-card {
        padding: 22px 16px 18px;
        border-radius: 12px;
        box-shadow: none;
        max-width: 100%;
    }

    .auth-card-title  { font-size: 1.2rem; }
    .auth-card-subtitle { font-size: .78rem; }

    /* Stack two-column row */
    .auth-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-input-wrap input { height: 42px; font-size: .84rem; }
    .auth-submit-btn { padding: 11px 16px; font-size: .86rem; }
}
