/* ═══════════════════════════════════════════════════
   BAID — Page de connexion personnalisée
   Brand : violet #8b5cf6 → rose #ec4899
═══════════════════════════════════════════════════ */

:root {
    --baid-primary:   #8b5cf6;
    --baid-secondary: #ec4899;
    --baid-gradient:  linear-gradient(135deg, #8b5cf6, #ec4899);
    --baid-dark:      #0f172a;
    --baid-text:      #1e293b;
    --baid-muted:     #64748b;
    --baid-bg:        #f8fafc;
    --baid-border:    #e2e8f0;
}

/* Reset & layout split-screen */
html, body.login {
    margin: 0;
    padding: 0;
    background: var(--baid-bg);
}

body.login {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Panneau gauche (branding) ─────────────────── */
.baid-login-left {
    flex: 1;
    background: linear-gradient(150deg, #1e1b4b 0%, #4c1d95 55%, #831843 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 64px 56px;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.baid-login-left::before {
    content: '';
    position: absolute;
    top: -120px; right: -80px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(139,92,246,.35) 0%, transparent 70%);
    pointer-events: none;
}
.baid-login-left::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -80px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(236,72,153,.28) 0%, transparent 70%);
    pointer-events: none;
}

.baid-login-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 56px;
    position: relative;
    z-index: 1;
}
.baid-login-logo-img {
    width: 44px;
    height: 44px;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.25));
}
.baid-login-logo-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: #fff;
}

.baid-login-tagline {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 16px;
    max-width: 380px;
    position: relative;
    z-index: 1;
}

.baid-login-sub {
    font-size: 15px;
    color: rgba(255,255,255,.78);
    margin-bottom: 48px;
    max-width: 340px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.baid-login-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}
.baid-login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255,255,255,.88);
}
.baid-login-feature-dot {
    width: 30px; height: 30px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* ── Panneau droit (formulaire) ────────────────── */
#login {
    width: 480px;
    min-width: 320px;
    max-width: 100%;
    background: #fff;
    padding: 64px 56px;
    box-shadow: -8px 0 48px rgba(15,23,42,.08);
    margin: 0 !important;
    position: relative;
    box-sizing: border-box;
    max-height: 100vh;
    overflow-y: auto;
}

/* Header login form */
.baid-login-form-header {
    margin-bottom: 36px;
}
.baid-login-form-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.baid-login-form-logo-img {
    width: 36px;
    height: 36px;
    display: block;
}
.baid-login-form-logo-name {
    font-size: 18px;
    font-weight: 800;
    background: var(--baid-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -.3px;
}
.baid-login-form-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--baid-dark);
    margin-bottom: 6px;
    letter-spacing: -.2px;
}
.baid-login-form-subtitle {
    font-size: 14px;
    color: var(--baid-muted);
    line-height: 1.5;
}

/* Masquer le logo WP par défaut */
#login h1 { display: none; }

/* Inputs */
.login label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--baid-border);
    border-radius: 10px;
    font-size: 15px;
    color: var(--baid-dark);
    background: var(--baid-bg);
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    box-sizing: border-box;
    margin: 0 0 16px;
    font-family: inherit;
    min-height: 44px;
}
.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    border-color: var(--baid-primary);
    box-shadow: 0 0 0 3px rgba(139,92,246,.15);
    background: #fff;
    outline: none;
}

/* Bouton connexion — gradient brand */
.login .button-primary,
#wp-submit {
    width: 100%;
    min-height: 44px;
    padding: 12px 20px;
    background: var(--baid-gradient) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(139,92,246,.3) !important;
    transition: opacity .15s, transform .1s, box-shadow .15s;
    letter-spacing: .01em;
    height: auto !important;
    margin-top: 4px;
    text-shadow: none;
}
.login .button-primary:hover,
#wp-submit:hover {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(236,72,153,.32) !important;
}
.login .button-primary:focus,
#wp-submit:focus {
    box-shadow: 0 4px 14px rgba(139,92,246,.3), 0 0 0 3px rgba(139,92,246,.25) !important;
}

/* Remember me */
.login .forgetmenot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.login .forgetmenot label {
    font-size: 13px;
    color: var(--baid-muted);
    font-weight: 500;
    margin: 0;
}
.login input[type="checkbox"] {
    accent-color: var(--baid-primary);
}

/* Liens (mot de passe oublié, retour) */
#nav, #backtoblog {
    text-align: center;
    margin-top: 20px;
    padding: 0;
}
#nav a, #backtoblog a {
    color: var(--baid-muted);
    font-size: 13px;
    text-decoration: none;
    transition: color .15s;
}
#nav a:hover, #backtoblog a:hover {
    color: var(--baid-primary);
    text-decoration: underline;
}

/* Messages */
#login_error, .message, .success {
    border-left: 3px solid var(--baid-primary);
    border-radius: 8px;
    background: #f5f3ff;
    color: var(--baid-dark);
    font-size: 13px;
    padding: 12px 14px;
    margin-bottom: 20px;
    box-shadow: none;
}
#login_error {
    border-left-color: #ef4444;
    background: #fef2f2;
    color: #dc2626;
}

/* Masquer langue (sécurité CSS au cas où le filtre PHP ne suffit pas) */
.language-switcher,
#language-switcher {
    display: none !important;
}

/* Copyright */
.baid-login-footer-copy {
    margin-top: 40px;
    font-size: 12px;
    color: rgba(255,255,255,.6);
    text-align: center;
    position: relative;
    z-index: 1;
}

/* ── Responsive ─────────────────────────────────── */

/* Tablette : panneau gauche réduit */
@media (max-width: 1024px) {
    .baid-login-left {
        padding: 48px 36px;
    }
    .baid-login-tagline {
        font-size: 26px;
    }
    #login {
        width: 420px;
        padding: 56px 40px;
    }
}

/* Mobile : single column, panneau gauche masqué */
@media (max-width: 768px) {
    body.login {
        flex-direction: column;
        background: #fff;
    }
    .baid-login-left {
        display: none;
    }
    #login {
        width: 100%;
        max-width: 480px;
        margin: 0 auto !important;
        padding: 48px 28px 40px;
        box-shadow: none;
        max-height: none;
        overflow-y: visible;
    }
    .baid-login-form-header {
        margin-bottom: 28px;
    }
    .baid-login-form-title {
        font-size: 22px;
    }
}

/* Très petit mobile */
@media (max-width: 380px) {
    #login {
        padding: 36px 18px 32px;
    }
    .baid-login-form-title {
        font-size: 20px;
    }
    .baid-login-form-subtitle {
        font-size: 13px;
    }
    .baid-login-form-logo-name {
        font-size: 16px;
    }
    .login input[type="text"],
    .login input[type="password"],
    .login input[type="email"] {
        font-size: 16px; /* évite zoom auto iOS */
    }
}
