/* ===========================================================================
   PAGE DE CONNEXION WORDPRESS — charte RSJ Services
   Fichier CSS autonome (hors pipeline SCSS de style.scss) : chargé uniquement
   sur wp-login.php via functions/login.php. Modifs live, sans recompilation.
   Fond : dégradé noir / orange — logo : Réglages du site (functions/login.php).
   =========================================================================== */

/* --- Polices auto-hébergées (RGPD) : mêmes fichiers que le front ----------- */
@font-face { font-family: 'Barlow'; src: url('../font/Barlow/Barlow-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../font/Barlow/Barlow-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../font/Barlow/Barlow-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('../font/BarlowCondensed/BarlowCondensed-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* --- Fond plein écran : halo orange (haut) -> noir (bas) ------------------- */
body.login {
    /* Centrage vertical de tout le bloc (logo + carte + liens + pied). */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 0;
    box-sizing: border-box;
    background-color: #0c0c0e;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(255, 122, 15, .28) 0%, rgba(255, 122, 15, 0) 60%),
        linear-gradient(180deg, #141416 0%, #0c0c0e 100%);
    background-repeat: no-repeat;
    background-position: center, center;
    background-size: cover, cover;
    background-attachment: fixed;
    font-family: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Filet orange en tête de page (bord supérieur). */
body.login::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 4px;
    background: #FF7A0F;
    z-index: 10;
}

/* --- Conteneur + logo ------------------------------------------------------ */
#login {
    width: 372px;
    max-width: 92vw;
    padding: 0;
}

.login h1 {
    margin: 0;
}

.login h1 a {
    width: 300px;
    height: 96px;
    margin: 0 auto 26px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .55));
}

/* --- Carte formulaire (glassmorphism sombre) -------------------------------
   Ciblage explicite des formulaires d'authentification : NE PAS englober
   .language-switcher (autre <form> WP), sinon il hérite du flou en bande. */
.login #loginform,
.login #lostpasswordform,
.login #registerform,
.login #resetpassform {
    margin-top: 0;
    padding: 28px 30px 30px;
    background: rgba(23, 23, 27, .55);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 16px;
    box-shadow: 0 30px 70px -22px rgba(0, 0, 0, .8);
    overflow: visible;
}

/* Titre « Connexion » injecté (pas d'équivalent natif dans le formulaire). */
.login form#loginform::before {
    content: "Connexion";
    display: block;
    margin: 0 0 22px;
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
    font-weight: 700;
    font-size: 30px;
    line-height: 1;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #fff;
}

/* --- Libellés + champs ----------------------------------------------------- */
.login label {
    color: rgba(255, 255, 255, .90);
    font-size: 13px;
    font-weight: 600;
}

.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    box-sizing: border-box;
    width: 100%;
    margin: 6px 0 18px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    border-color: #FF7A0F;
    background: rgba(255, 255, 255, .10);
    box-shadow: 0 0 0 3px rgba(255, 122, 15, .30);
    outline: none;
}

.login input::placeholder { color: rgba(255, 255, 255, .45); }

/* Bouton « afficher le mot de passe » dans le champ. */
.login .wp-pwd { position: relative; }
.login .wp-pwd .button.wp-hide-pw {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, .6);
}
.login .wp-pwd .button.wp-hide-pw:hover { color: #fff; }

/* --- « Se souvenir de moi » ------------------------------------------------ */
.login .forgetmenot { margin-bottom: 4px; }
.login .forgetmenot label {
    color: rgba(255, 255, 255, .82);
    font-weight: 500;
    font-size: 13px;
}
.login input[type="checkbox"] {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 4px;
    accent-color: #FF7A0F;
}
.login input[type="checkbox"]:checked {
    background: #FF7A0F;
    border-color: #FF7A0F;
}
.login input[type="checkbox"]:checked::before {
    content: "\f147";
    color: #0E0F10;
    margin: -3px 0 0 -4px;
}

/* --- Bouton « Se connecter » ----------------------------------------------- */
.login .submit { text-align: center; }
.wp-core-ui .button-primary {
    display: block;
    float: none;
    width: 100%;
    margin-top: 6px;
    padding: 11px 16px;
    height: auto;
    background: #FF7A0F;
    border: 1px solid #FF7A0F;
    border-radius: 10px;
    color: #0E0F10;
    font-size: 15px;
    font-weight: 700;
    text-transform: none;
    text-shadow: none;
    box-shadow: 0 10px 24px -8px rgba(255, 122, 15, .65);
    transition: background .18s ease, border-color .18s ease, transform .05s ease;
}
.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus {
    background: #E05A00;
    border-color: #E05A00;
    color: #0E0F10;
    box-shadow: 0 10px 24px -8px rgba(255, 122, 15, .75);
}
.wp-core-ui .button-primary:active { transform: translateY(1px); }

/* --- Liens (mot de passe oublié / retour au site) -------------------------- */
.login #nav,
.login #backtoblog {
    text-align: center;
    padding: 0;
    margin: 16px 0 0;
    text-shadow: none;
}
.login #nav { margin-top: 22px; }
.login #nav a,
.login #backtoblog a {
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
}
.login #nav a:hover,
.login #backtoblog a:hover { color: #fff; }

/* --- Sélecteur de langue --------------------------------------------------- */
.login .language-switcher { margin-top: 18px; }
.login .language-switcher label { color: rgba(255, 255, 255, .6); }
.login .language-switcher select {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    color: #fff;
}
.login .language-switcher #language-switcher-submit {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    color: #fff;
    text-shadow: none;
}
.login .language-switcher #language-switcher-submit:hover {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

/* --- Bandeau de contact (injecté par login_footer) ------------------------- */
.rsj-login-foot {
    margin: 26px auto 0;
    max-width: 372px;
    text-align: center;
    color: rgba(255, 255, 255, .5);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.rsj-login-foot a {
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
    font-weight: 600;
}
.rsj-login-foot a:hover { color: #fff; }

/* --- Messages d'erreur / d'info ------------------------------------------- */
.login .message,
.login .success,
.login #login_error {
    background: rgba(23, 23, 27, .7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-left: 4px solid #FF7A0F;
    border-radius: 8px;
    color: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 30px -16px rgba(0, 0, 0, .7);
}
.login .message { border-left-color: #fff; }
.login #login_error a,
.login .message a { color: #fff; }
