/* ═══════════════════════════════════════════════════════
   LOGIN WIREFRAME, écran produit, aux couleurs du site
   Chargé uniquement sur wp-login.php (voir inc/wf-login.php)

   Les tokens (--acc, --acc-tx, --bg, --card, --field, --tx,
   --mt, --line, --ring, --shadow) sont injectés en inline par
   PHP depuis Apparence > Personnaliser, en deux palettes
   [data-theme="light"] et [data-theme="dark"].

   Le cube (§6) est laissé strictement tel quel.
   ═══════════════════════════════════════════════════════ */

:root {
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;

  /* Échelle de rayons */
  --r-field: 8px;
  --r-card:  14px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─── 1. PAGE ───────────────────────────────────────────
   Aplat uni, avec un halo d'accent très dilué en haut.    */

body.login {
  display: flex;
  height: auto;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.login::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    120% 60% at 50% -10%,
    color-mix(in srgb, var(--acc) 9%, transparent) 0%,
    transparent 70%
  );
}

/* ─── 2. COLONNE CENTRALE ─────────────────────────────── */

#login {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 384px;
  padding: 0;
  margin: auto;
  background: none;
  animation: cardIn .34s cubic-bezier(.2, .7, .3, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Nom du site : traité comme un wordmark de produit */
#login h1 a {
  width: auto;
  height: auto;
  margin: 0 0 6px;
  padding: 0;
  display: block;
  background-image: none !important;
  background-size: auto !important;
  text-indent: 0;
  overflow: visible;
  color: var(--tx) !important;
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.02em;
  text-align: center;
  text-transform: none;
}

.wf-login-sub {
  margin: 0 0 24px;
  color: var(--mt);
  font-size: 13.5px;
  text-align: center;
}

/* ─── 3. CARTE ──────────────────────────────────────────
   Surface surélevée : hairline + ombre douce, pas de relief
   marqué.                                                 */

#loginform {
  padding: 28px 26px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

#loginform p { margin: 0; }

#loginform label {
  display: block;
  margin-bottom: 7px;
  color: var(--tx);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.005em;
}

/* Champs */
#user_login,
#user_pass,
#pass1,
#pass2 {
  width: 100% !important;
  height: 44px;
  padding: 0 13px !important;
  margin: 0 0 18px !important;
  background: var(--field) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-field) !important;
  color: var(--tx) !important;
  font-family: var(--sans);
  font-size: 14px !important;
  line-height: 44px !important;
  box-shadow: none !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#user_login:hover,
#user_pass:hover { border-color: var(--bd) !important; }

#user_login:focus,
#user_pass:focus,
#pass1:focus,
#pass2:focus {
  outline: none !important;
  border-color: var(--acc) !important;
  box-shadow: 0 0 0 3px var(--ring) !important;
}

#user_login::placeholder,
#user_pass::placeholder { color: var(--mt) !important; }

/* Le mot de passe partage la gouttière du champ précédent */
.login .user-pass-wrap { margin-bottom: 0; }

/* Œil « afficher le mot de passe » */
.login .button.wp-hide-pw {
  top: 1px;
  right: 1px;
  height: 42px;
  width: 42px;
  background: none !important;
  border: 0 !important;
  border-radius: 0 var(--r-field) var(--r-field) 0;
  color: var(--mt) !important;
  box-shadow: none !important;
  transition: color .15s;
}

.login .button.wp-hide-pw:hover  { color: var(--tx) !important; }
.login .button.wp-hide-pw:focus  { box-shadow: none !important; outline: none !important; }
.login .button.wp-hide-pw .dashicons { color: inherit; }

/* Se souvenir de moi */
.login .forgetmenot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  color: var(--mt);
  font-size: 13px;
}

.login .forgetmenot label {
  margin: 0;
  color: var(--mt);
  font-weight: 400;
  cursor: pointer;
}

.login .forgetmenot input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--acc);
  cursor: pointer;
}

/* Bouton principal */
#wp-submit {
  width: 100% !important;
  height: 44px;
  padding: 0 !important;
  background: var(--acc) !important;
  border: 1px solid var(--acc) !important;
  border-radius: var(--r-field) !important;
  color: var(--acc-tx) !important;
  font-family: var(--sans);
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: -.005em;
  text-transform: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: filter .15s ease, transform .1s ease;
}

#wp-submit:hover  { filter: brightness(1.06); }
#wp-submit:active { transform: translateY(1px); filter: brightness(.95); }

#wp-submit:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px var(--ring) !important;
}

/* ─── 4. LIENS SECONDAIRES ────────────────────────────── */

#nav,
#backtoblog {
  margin: 0;
  padding: 0;
  text-align: center;
  border: 0;
}

#nav {
  margin-top: 18px;
  padding-top: 0;
}

#backtoblog { margin-top: 10px; }

#nav a,
#backtoblog a {
  display: inline-block;
  padding: 2px 0;
  color: var(--mt) !important;
  font-size: 13px;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: color .15s;
}

#nav a:hover,
#backtoblog a:hover {
  color: var(--tx) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-color: var(--acc) !important;
}

/* Messages WP (erreur d'identifiants, lien envoyé…) */
.login #login_error,
.login .message,
.login .success {
  margin: 0 0 18px;
  padding: 11px 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--acc);
  border-radius: var(--r-field);
  color: var(--tx);
  font-size: 13px;
  line-height: 1.45;
  box-shadow: var(--shadow);
}

.login #login_error { border-left-color: #e5484d; }

/* ─── 5. BASCULE CLAIR / SOMBRE ───────────────────────── */

.wf-mode-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.wf-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 999px;
  color: var(--mt);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.wf-mode-btn svg { width: 15px; height: 15px; }

.wf-mode-btn:hover { color: var(--tx); }

.wf-mode-btn.active {
  background: var(--acc);
  color: var(--acc-tx);
}

.wf-mode-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

/* ─── 6. CUBE 3D LUMINEUX ───────────────────────────────
   Inchangé, volontairement.                               */

.wf-cube-container {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 100;
  perspective: 1000px;
}

.wf-cube {
  width: 120px;
  height: 120px;
  position: relative;
  transform-style: preserve-3d;
  animation: cubeRotate 12s infinite linear;
}

.cube-face {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  background: color-mix(in srgb, var(--acc) 8%, transparent);
  border: 1.5px solid var(--acc);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  box-shadow:
    0 0 18px color-mix(in srgb, var(--acc) 45%, transparent),
    inset 0 0 18px color-mix(in srgb, var(--acc) 20%, transparent);
}

.cube-face[data-link] { cursor: pointer; }

.cube-face.front  { transform: rotateY(0deg)   translateZ(60px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(60px); }
.cube-face.right  { transform: rotateY(90deg)  translateZ(60px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(60px); }
.cube-face.top    { transform: rotateX(90deg)  translateZ(60px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(60px); }

.cube-text {
  padding: 0 6px;
  color: var(--acc);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--acc) 70%, transparent));
}

@keyframes cubeRotate {
  0%   { transform: rotateX(0deg)   rotateY(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* ─── 7. SIGNATURE ────────────────────────────────────── */

.wf-credit {
  margin-top: 1.5rem;
  color: var(--mt);
  font-size: 11.5px;
  line-height: 1.5;
}

.wf-credit a {
  color: var(--tx);
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
}

.wf-credit a:hover { color: var(--acc); }

.social-links {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.social-links a {
  padding: 4px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mt);
  font-size: 11.5px;
  transition: border-color .15s, color .15s;
}

.social-links a:hover {
  border-color: var(--acc);
  color: var(--tx);
}

/* ─── 8. RESPONSIVE ─────────────────────────────────────
   Sous 820px le cube passe sous le formulaire.            */

@media (max-width: 820px) {
  body.login { flex-direction: column; padding: 20px 16px 32px; }

  #login { margin: auto auto 0; }

  .wf-cube-container {
    position: static;
    margin: 40px auto 0;
    width: max-content;
    text-align: center;
  }

  .social-links { justify-content: center; }
}

/* ─── 9. NETTOYAGE WP ─────────────────────────────────── */

body.login .language-switcher { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .wf-cube { animation: none; }
  #login   { animation: none; }
}
