/* ==========================================================
   MON DJASSA — Pages d'authentification (mobile first)
   ========================================================== */

.auth-page {
    background:
        radial-gradient(circle at top right, rgba(255, 127, 0, 0.12), transparent 50%),
        var(--light);
}

.auth-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 24px var(--container-padding);
}

/* ---------- Marque ---------- */
.auth-brand {
    margin-bottom: 20px;
    text-align: center;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: var(--touch-target);
    color: var(--text);
    text-decoration: none;
}

.auth-logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

@media (min-width: 768px) {
    .auth-logo-img { width: 140px; height: 140px; }
}

.auth-tagline {
    margin: 6px 0 0;
    font-size: 0.95rem;
    color: var(--text-soft);
}

/* ---------- Carte ---------- */
.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 24px 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.auth-title {
    margin-bottom: 4px;
    font-size: clamp(1.5rem, 3vw + 0.75rem, 2rem);
}

.auth-subtitle {
    margin-bottom: 22px;
    color: var(--text-soft);
}

.auth-switch {
    margin: 20px 0 0;
    text-align: center;
}

.auth-switch a {
    display: inline-block;
    min-height: var(--touch-target);
    line-height: var(--touch-target);
    font-weight: 600;
}

.auth-resend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
    color: var(--text-soft);
}

.auth-footer {
    margin-top: auto;
    padding-top: 24px;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-soft);
}

/* Champ du code à 6 chiffres */
.form-control-code {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ---------- Petit mobile ---------- */
@media (min-width: 480px) {
    .auth-card {
        padding: 28px 24px;
    }
}

/* ---------- Tablette ---------- */
@media (min-width: 768px) {
    .auth-shell {
        justify-content: center;
        padding-block: 40px;
    }

    .auth-card {
        padding: 36px 32px;
    }

    .auth-footer {
        margin-top: 24px;
    }
}

/* ---------- Grands écrans / TV ---------- */
@media (min-width: 1920px) {
    .auth-card {
        max-width: 520px;
    }
}

@media (min-width: 3840px) {
    .auth-card {
        max-width: 760px;
        padding: 56px 48px;
    }
}

.auth-footer-links {
    margin-bottom: 6px;
}

.auth-footer-links a {
    display: inline-block;
    min-height: 32px;
    padding: 4px 2px;
}

/* ---------- Habillage plus vivant (parcours d'inscription) ---------- */
.auth-page {
    background:
        radial-gradient(circle at 10% -10%, rgba(255, 127, 0, 0.22), transparent 45%),
        radial-gradient(circle at 110% 20%, rgba(204, 102, 0, 0.14), transparent 45%),
        linear-gradient(180deg, #FFF7EE 0%, var(--light) 60%);
}

.auth-card {
    position: relative;
    overflow: hidden;
    border: 0;
    box-shadow: 0 18px 40px rgba(30, 43, 60, 0.12);
    animation: auth-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary-dark));
}

.auth-logo-img { animation: auth-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

.auth-card .btn-primary {
    min-height: 50px;
    font-size: 1.05rem;
    background: linear-gradient(120deg, var(--primary), var(--primary-dark));
    border-color: var(--primary-dark);
    box-shadow: 0 6px 16px rgba(204, 102, 0, 0.3);
    transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.auth-card .btn-primary:active { transform: scale(0.98); }

.auth-card .form-control {
    min-height: 48px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 127, 0, 0.16);
}

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes auth-pop {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .auth-logo-img { animation: none; }
}