/* =====================================================================
   theme-auth.css — Écrans autonomes (connexion, inscription, mot de passe).
   Ces pages ne passent pas par templates/header : elles lient tokens.css
   + ce fichier uniquement.
   ===================================================================== */

body.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--body-bg);
    font-family: var(--font-family-base);
    color: var(--dark-color);
}

.auth-shell {
    width: 100%;
    max-width: 440px;
}

.auth-shell-wide {
    max-width: 620px;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
}

.auth-brand i {
    font-size: 1.4rem;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.08);
    overflow: hidden;
}

.auth-card-head {
    padding: 1.75rem 1.75rem 1.25rem;
    text-align: center;
    background: var(--gradient-card-header);
    border-bottom: 1px solid var(--border-color);
}

.auth-card-head h1 {
    margin: 0 0 0.25rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.auth-card-head p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray);
}

.auth-card-body {
    padding: 1.75rem;
}

.auth-card-body .form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark-color);
}

.auth-card-body .form-control,
.auth-card-body .form-select {
    border-color: var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
}

.auth-card-body .form-control:focus,
.auth-card-body .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.auth-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.auth-submit:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(30, 64, 175, 0.28);
}

.auth-alt {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
}

.auth-alt a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.auth-alt a:hover {
    text-decoration: underline;
}

.auth-foot {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray);
}

.auth-foot a {
    color: var(--gray);
    text-decoration: none;
}

.auth-foot a:hover {
    color: var(--primary-color);
}

.auth-lang {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.4rem;
}

.auth-lang a {
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray);
    text-decoration: none;
}

.auth-lang a.active,
.auth-lang a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

@media (max-width: 576px) {
    body.auth-screen {
        padding: 1rem 0.75rem;
    }

    .auth-card-body,
    .auth-card-head {
        padding-left: 1.15rem;
        padding-right: 1.15rem;
    }
}

/* =====================================================================
   Écrans de connexion : mise en page avec présentation des modules
   ===================================================================== */

.auth-layout {
    width: 100%;
    max-width: 1060px;
    margin: auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.auth-layout-split {
    justify-content: space-between;
}

.auth-layout-split .auth-shell {
    flex: 0 0 430px;
    max-width: 430px;
}

/* Formulaire à gauche, présentation des modules à droite */
.auth-layout-split .auth-shell {
    order: 1;
}

.auth-layout-split .auth-side {
    order: 2;
}

/* ----- Colonne de présentation ----- */
.auth-side {
    flex: 1 1 440px;
    max-width: 480px;
}

.auth-side-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.auth-side-logo {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: var(--gradient-hero);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 10px 22px rgba(30, 64, 175, 0.25);
}

.auth-side-name strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.3;
    color: var(--dark-color);
    letter-spacing: 0.01em;
}

.auth-side-name small {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gray);
}

.auth-side-intro {
    margin: 0 0 1.2rem;
    max-width: 42ch;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #475569;
}

.auth-modules {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.auth-module {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.65rem 0.85rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.auth-module-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(30, 64, 175, 0.08);
    color: var(--primary-color);
    font-size: 0.9rem;
}

.auth-module-text strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark-color);
    line-height: 1.3;
}

.auth-module-text small {
    display: block;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--gray);
}

.auth-side-foot {
    margin: 1rem 0 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: var(--gray);
}

.auth-side-foot i {
    color: var(--success-color);
}

/* ----- Adaptation tablette et mobile ----- */
@media (max-width: 991.98px) {
    .auth-layout {
        flex-direction: column;
        gap: 1.5rem;
        max-width: 520px;
    }

    .auth-layout-split .auth-shell {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }

    .auth-side {
        order: 2;
        width: 100%;
        max-width: 100%;
    }

    .auth-modules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .auth-module {
        align-items: center;
        padding: 0.55rem 0.65rem;
    }

    .auth-module-text small {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .auth-modules {
        grid-template-columns: 1fr;
    }

    .auth-side-brand,
    .auth-side-intro {
        display: none;
    }

    .auth-side-foot {
        justify-content: center;
        margin-top: 0.75rem;
    }
}

/* Accès rapides vers la vitrine depuis la connexion */
.auth-public-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem 1.1rem;
    margin-bottom: 1rem;
    font-size: .82rem;
}

.auth-public-nav a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    padding: .3rem .55rem;
    border-radius: 6px;
}

.auth-public-nav a:hover {
    color: #0d6efd;
    background: #eff6ff;
}

.auth-public-actions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    display: grid;
    gap: .55rem;
    font-size: .84rem;
}

.auth-public-actions div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.auth-public-actions span { color: #64748b; }

.auth-public-actions a {
    color: #0d6efd;
    font-weight: 700;
    text-decoration: none;
}

.auth-public-actions a:hover { text-decoration: underline; }

@media (max-width: 575.98px) {
    .auth-public-nav { gap: .25rem .5rem; }
    .auth-public-nav a { font-size: .76rem; padding: .3rem .4rem; }
    .auth-public-actions div { justify-content: flex-start; }
}
