/* ============================================================
   LEV PASSWORD FORM – lev-password-form.css
   Styles du formulaire de mot de passe affiché à la place du
   formulaire natif WordPress sur les pages/articles protégés.

   Les `!important` sont posés sur les propriétés qui interagissent
   fréquemment avec les surcharges de thèmes (display, padding,
   margin, border, transform, line-height, etc.) — ces propriétés
   sont régulièrement réécrites par les CSS de thème WordPress et
   on a besoin que les nôtres tiennent.

   Plugin : LutryEnVie · https://lutryenvie.ch
   ============================================================ */

/* ── Carte ──────────────────────────────────────────────────── */
.levpf-wrap {
    max-width: 360px;
    margin: 40px auto;
    padding: 32px;
    background: linear-gradient(0deg, rgb(238,238,238) 0%, rgb(169,184,195) 50%, rgb(238,238,238) 100%);
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    font-family: sans-serif;
    box-sizing: border-box;
}
.levpf-head     { text-align: center; margin-bottom: 24px; }
.levpf-lock     { font-size: 40px; line-height: 1; }
.levpf-title    {
    margin: 8px 0 4px !important;
    font-size: 20px;
    color: #1f2937;
    font-weight: 700;
}
.levpf-subtitle {
    margin: 0 !important;
    color: #4b5260;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}
.levpf-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.levpf-form { margin: 0 !important; }

/* ── Champ + œil ───────────────────────────────────────────────
   On utilise une boîte flex (.levpf-field) qui contient l'input
   et le bouton œil côte à côte. La bordure est portée par la
   boîte (pas par l'input), ce qui permet à l'œil de partager
   exactement la même hauteur que l'input sans aucun calcul
   (top:50%, transform…) — robuste face aux surcharges de thème.
   ──────────────────────────────────────────────────────────────── */
.levpf-field {
    display: flex !important;
    align-items: stretch !important;
    margin-bottom: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.levpf-field:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.levpf-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px 14px !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    color: #1f2937 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
}
.levpf-toggle {
    flex: 0 0 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: pointer !important;
    color: #6b7280 !important;
}
.levpf-toggle:hover { color: #1f2937 !important; }

/*
  Pas de `display: block !important` ici : on doit laisser le JS
  basculer `style.display = 'none' / ''` sur chaque <svg> pour
  cacher/montrer l'œil ouvert ou barré. Forcer le display ici
  écraserait la bascule et ferait apparaître les deux yeux en
  même temps.
*/
.levpf-toggle .levpf-eye {
    margin: 0 !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
}

/* ── Bouton submit ────────────────────────────────────────────── */
.levpf-submit {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    background: #4f46e5 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transform: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    cursor: pointer !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
}
.levpf-submit:hover { background: #4338ca !important; }
