/* =========================================================
   Page Connexion — modèle Congo BD, couleurs CFAV
   ========================================================= */

body.page-connexion {
    background: #0a2f4a;
    padding-top: 0 !important;
    position: relative;
    min-height: 100dvh;
}

body.page-connexion::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(145deg, rgba(8, 36, 56, 0.72) 0%, rgba(10, 47, 74, 0.78) 45%, rgba(8, 36, 56, 0.82) 100%),
        url('../img/connexion-bg.jpg') center center / cover no-repeat;
    pointer-events: none;
}

/* Créer un compte — photo formation (salle de cours) */
body.page-register::before {
    background:
        linear-gradient(120deg, rgba(8, 36, 56, 0.78) 0%, rgba(10, 47, 74, 0.62) 42%, rgba(8, 36, 56, 0.55) 100%),
        url('../img/register-bg.jpg') center 28% / cover no-repeat;
}

/* Pas de menu / barre info sur la page connexion */
body.page-connexion .site-chrome {
    display: none !important;
}

body.page-connexion .page-content,
body.page-connexion .auth-main {
    background: transparent;
    position: relative;
    z-index: 1;
}

.auth-main {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 2.5rem;
}

.auth-wrap {
    width: 100%;
    max-width: 26.5rem;
}

.auth-back-site {
    display: inline-flex;
    align-items: center;
    margin: 0 0 0.85rem 0.15rem;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-back-site:hover {
    color: var(--accent-color, #d4af37);
}

.auth-card {
    position: relative;
    background: rgba(15, 61, 92, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color, #d4af37), #f0d78c, var(--accent-color, #d4af37));
}

.auth-card-top {
    margin-bottom: 1.35rem;
}

.auth-home-logo {
    display: inline-flex;
    margin-bottom: 0.85rem;
}

.auth-home-logo img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: #fff;
}

.auth-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-color, #d4af37);
    border: 1px solid rgba(212, 175, 55, 0.35);
    margin-bottom: 0.85rem;
}

.auth-brand {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-color, #d4af37);
}

.auth-title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.55rem, 3vw, 1.85rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
}

.auth-lede {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
    line-height: 1.5;
}

.auth-error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.45);
    color: #ffb3bb;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.auth-label-row label {
    margin-bottom: 0;
}

.auth-forgot {
    color: var(--accent-color, #d4af37);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.auth-forgot:hover {
    color: #f0d78c;
    text-decoration: underline;
}

.auth-field input {
    width: 100%;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    border-radius: 8px;
    padding: 0.85rem 0.95rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-field input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.auth-field input:focus {
    outline: none;
    border-color: var(--accent-color, #d4af37);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    background: rgba(0, 0, 0, 0.35);
}

.auth-submit {
    margin-top: 0.35rem;
    width: 100%;
    border: 0;
    cursor: pointer;
    background: var(--accent-color, #d4af37);
    color: #0d3a5c;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 8px;
    padding: 0.95rem 1rem;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.28);
}

.auth-submit:hover {
    background: #e4c65a;
    transform: translateY(-1px);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-switch {
    margin: 1.25rem 0 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.92rem;
}

.auth-switch a {
    color: var(--accent-color, #d4af37);
    font-weight: 700;
    text-decoration: none;
}

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

.auth-alt {
    margin: 0.75rem 0 0;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}

.auth-alt a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.auth-alt a:hover {
    color: #fff;
}

body.page-connexion footer {
    display: none !important;
}

@media (max-width: 480px) {
    .auth-main {
        padding: 1.5rem 0.85rem 2.5rem;
    }

    .auth-card {
        padding: 1.45rem 1.15rem 1.25rem;
    }

    .auth-label-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
