/* =============================================
   ZOHE Core - Login Page (Light Theme)
   Split layout + Three.js background + Glassmorphism
   Charte : Rouge #e6301b / Bleu foncé #273136
   Font : Century Gothic (Adobe Fonts)
   ============================================= */

* { box-sizing: border-box; }

/* Reset du border #c36 venant du thème */
body.login [type="button"],
body.login [type="submit"],
body.login button {
    border: none;
}

body.login {
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif !important;
    background: #f0f2f4 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    min-height: 100vh !important;
    overflow: hidden !important;
}

/* ===== THREE.JS CANVAS ===== */
#zohe-three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ===== PANNEAU GAUCHE - BRANDING ===== */
#zohe-login-branding {
    position: relative;
    width: 50%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

/* Formes geometriques flottantes */
.zohe-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    animation: zohe-float 20s infinite ease-in-out;
}

.zohe-shape-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #e6301b 0%, transparent 70%);
    top: -100px; left: -100px;
    animation-duration: 25s;
}

.zohe-shape-2 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #e6301b 0%, transparent 70%);
    bottom: -50px; right: -50px;
    animation-duration: 20s;
    animation-delay: -5s;
}

.zohe-shape-3 {
    width: 200px; height: 200px;
    background: radial-gradient(circle, #273136 0%, transparent 70%);
    top: 30%; left: 60%;
    animation-duration: 18s;
    animation-delay: -10s;
}

.zohe-shape-4 {
    width: 150px; height: 150px;
    border: 1px solid rgba(230, 48, 27, 0.12);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 15%; left: 20%;
    animation: zohe-morph 15s infinite ease-in-out;
}

.zohe-shape-5 {
    width: 100px; height: 100px;
    border: 1px solid rgba(39, 49, 54, 0.06);
    border-radius: 50%;
    bottom: 25%; left: 40%;
    animation: zohe-float 12s infinite ease-in-out;
    animation-delay: -3s;
}

@keyframes zohe-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(5deg); }
    66% { transform: translateY(10px) rotate(-3deg); }
}

@keyframes zohe-morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(0deg); }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: rotate(180deg); }
}

/* Contenu branding */
#zohe-branding-content {
    position: relative;
    z-index: 2;
    text-align: left;
    padding: 40px;
    max-width: 480px;
    width: 100%;
}

/* Titre panneau gauche */
#zohe-branding-title {
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif;
    color: #273136;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.2;
    text-align: left;
}

/* Description panneau gauche */
#zohe-branding-intro {
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif;
    color: rgba(39, 49, 54, 0.5);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 28px;
    letter-spacing: 0.2px;
}

/* Formulaire en flex column pour reordonner le logo en haut */
#loginform {
    display: flex !important;
    flex-direction: column !important;
}

/* Logo dans le formulaire de connexion (injecte via login_form, reordonne en premier) */
#zohe-form-logo-wrap {
    order: -1 !important;
    text-align: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

#zohe-form-logo {
    width: 120px;
    height: 60px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* ===== Grille vignettes apercu ===== */
.zohe-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: left;
}

.zohe-preview-card-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(39, 49, 54, 0.06);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.zohe-preview-card-item:hover {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(230, 48, 27, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.zohe-pci-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(39, 49, 54, 0.04);
    border-radius: 9px;
    color: rgba(39, 49, 54, 0.35);
}

.zohe-pci-icon-red {
    background: rgba(230, 48, 27, 0.06);
    color: rgba(230, 48, 27, 0.45);
}

.zohe-pci-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.zohe-pci-text strong {
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #273136;
}

.zohe-pci-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    margin-top: 2px;
}

.zohe-pci-lines span {
    display: block;
    height: 4px;
    background: rgba(39, 49, 54, 0.06);
    border-radius: 3px;
}

/* Ligne rouge verticale */
#zohe-branding-redline {
    position: absolute;
    right: 0;
    top: 15%;
    bottom: 15%;
    width: 3px;
    background: linear-gradient(to bottom, transparent, #e6301b 30%, #e6301b 70%, transparent);
    opacity: 0.4;
}


/* ===== PANNEAU DROIT - FORMULAIRE (GLASSMORPHISM LIGHT) ===== */
#zohe-login-formside {
    position: relative;
    width: 50%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 40px;
    overflow-y: auto;
}

/* WP Login container */
#login {
    width: 380px !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
}

/* Masquer le lien retour */
#login h1 { display: none !important; }

/* ===== FORMULAIRE GLASSMORPHISM LIGHT ===== */
#loginform,
#lostpasswordform,
#resetpassform {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(39, 49, 54, 0.08) !important;
    border-radius: 20px !important;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    padding: 40px 35px 30px !important;
    margin: 0 !important;
}

/* Titre du formulaire - masque, remplace par le logo */
#loginform::before {
    display: none;
}

#loginform::after {
    display: none;
}

#lostpasswordform::before {
    content: 'Mot de passe oublié';
    display: block;
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif;
    color: #273136;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
}

/* Labels */
#loginform label,
#lostpasswordform label,
#resetpassform label {
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif !important;
    color: #666 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
}

/* Champs de saisie */
#loginform input[type="text"],
#loginform input[type="password"],
#lostpasswordform input[type="text"],
#resetpassform input[type="password"],
input#user_login,
input#user_pass {
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif !important;
    background: rgba(39, 49, 54, 0.03) !important;
    border: 1px solid rgba(39, 49, 54, 0.12) !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    color: #273136 !important;
    transition: all 0.25s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 6px !important;
}

#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus,
#lostpasswordform input[type="text"]:focus,
#resetpassform input[type="password"]:focus,
input#user_login:focus,
input#user_pass:focus {
    background: #ffffff !important;
    border-color: rgba(230, 48, 27, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(230, 48, 27, 0.1) !important;
    outline: none !important;
    color: #273136 !important;
}

input::placeholder {
    color: rgba(39, 49, 54, 0.3) !important;
}

/* Bouton de connexion */
#wp-submit,
.wp-core-ui .button-primary {
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif !important;
    background: #e6301b !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    width: 100% !important;
    text-shadow: none !important;
    margin-top: 15px !important;
    height: auto !important;
    line-height: 1.4 !important;
}

#wp-submit:hover,
.wp-core-ui .button-primary:hover {
    background: #ff3d24 !important;
}

#wp-submit:active,
.wp-core-ui .button-primary:active {
    background: #c8271a !important;
}

/* Masquer l'oeil de visibilite du mot de passe */
.wp-hide-pw,
.wp-pwd button.button.wp-hide-pw {
    display: none !important;
}

/* Remember me */
.forgetmenot {
    margin-bottom: 15px !important;
}

.forgetmenot label {
    font-size: 13px !important;
    color: rgba(39, 49, 54, 0.5) !important;
    font-weight: 400 !important;
    text-transform: none !important;
}

.forgetmenot input[type="checkbox"] {
    accent-color: #e6301b;
}

/* Liens en bas */
#login #nav,
#login #backtoblog {
    text-align: center !important;
    padding: 0 !important;
    margin: 20px 0 0 !important;
}

#login #nav a,
#login #backtoblog a {
    color: rgba(39, 49, 54, 0.45) !important;
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif !important;
    font-size: 13px !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

#login #nav a:hover,
#login #backtoblog a:hover {
    color: #e6301b !important;
}

#backtoblog {
    display: none !important;
}

/* Messages */
#login .message,
#login .success {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(39, 49, 54, 0.08) !important;
    border-left: 4px solid #e6301b !important;
    border-radius: 12px !important;
    color: #273136 !important;
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif !important;
    margin: 0 0 20px !important;
    padding: 12px 16px !important;
}

#login_error {
    background: rgba(230, 48, 27, 0.06) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(230, 48, 27, 0.15) !important;
    border-left: 4px solid #e6301b !important;
    border-radius: 12px !important;
    color: #273136 !important;
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif !important;
    margin: 0 0 20px !important;
    padding: 12px 16px !important;
}

#login_error a {
    color: #e6301b !important;
}

/* Password strength meter */
.pw-weak, .indicator-hint {
    font-family: 'century-gothic', 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif !important;
    color: #666 !important;
}

#pass-strength-result {
    border-radius: 8px !important;
    margin-top: 8px !important;
}

/* Privacy policy */
.login .privacy-policy-page-link {
    text-align: center;
}

.login .privacy-policy-page-link a {
    color: rgba(39, 49, 54, 0.3) !important;
    font-size: 12px !important;
}

/* Language switcher - masque */
.language-switcher {
    display: none !important;
}


/* ===== RESPONSIVE ===== */
@media screen and (max-width: 960px) {
    body.login {
        flex-direction: column !important;
        overflow: auto !important;
    }

    #zohe-login-branding {
        width: 100%;
        min-height: auto;
        padding: 40px 20px;
    }

    .zohe-preview-grid { display: none; }
    #zohe-branding-title { font-size: 22px; }
    #zohe-branding-intro { margin-bottom: 0; }
    #zohe-branding-content { text-align: center; }
    #zohe-branding-redline { display: none; }

    #zohe-login-formside {
        width: 100%;
        min-height: auto;
        padding: 20px;
    }

    #login {
        width: 100% !important;
        max-width: 400px;
    }
}

@media screen and (max-width: 480px) {
    #loginform,
    #lostpasswordform,
    #resetpassform {
        padding: 30px 22px 25px !important;
    }
}
