/* ══════════════════════════════════════════════════════════════════════
   LA PAGE DE CONNEXION — SIMPLE (layouts/connexion.ejs)

   Connexion, mot de passe oublié, lien magique envoyé ou expiré.
   Chargée APRÈS wr.css, wr-pages.css et wr-app.css : elle ne réécrit que
   la carte et son cadre, les champs et les boutons restent ceux du site.
   Préfixe `wr-cx` : rien d'autre sur le site ne le porte.
   ══════════════════════════════════════════════════════════════════════ */

.wr-cx-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--wr-font);
  color: var(--wr-ink-2);
  /* Le violet pastel du header du site, en halo — rien de plus. */
  background:
    radial-gradient(1100px 420px at 50% -120px, var(--wr-violet-soft), transparent 70%),
    var(--wr-bg);
}

/* ── En-tête : le logo, « Retour au site », la langue ── */
.wr-cx-head__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wr-cx-head__right { display: flex; align-items: center; gap: 10px; }

.wr-cx-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--wr-r-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--wr-ink-2);
  text-decoration: none;
}
.wr-cx-back:hover { background: var(--wr-violet-softer); color: var(--wr-violet-dark); }
.wr-cx-back:focus-visible { outline: 2px solid var(--wr-violet); outline-offset: 2px; }

/* ── La carte ── */
.wr-cx-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* `.wr-auth` réservait la hauteur du header et du pied du site
   (calc(100vh - 220px)) : ici, c'est le <main> qui prend la place. */
.wr-cx-main .wr-auth {
  min-height: 0;
  padding: 24px 20px 48px;
}

.wr-cx-main .wr-auth__card {
  max-width: 440px;
  min-height: 0;
  padding: 36px 36px 28px;
  border-radius: var(--wr-r-3xl);
  box-shadow: 0 1px 2px rgba(30, 27, 46, .04), 0 18px 48px rgba(30, 27, 46, .07);
}

/* Le formulaire se lit de gauche à droite : wr-pages.css centre le texte
   des cartes du lien magique (`text-align: center`), ce qui centrait aussi
   les libellés « Adresse e-mail » au-dessus de champs pleine largeur. */
.wr-cx__card { text-align: left; }
.wr-cx__card .wr-auth__head { text-align: center; margin-bottom: 24px; }
.wr-cx__card .wr-auth__title { font-size: 26px; }
/* « Recevoir un lien de connexion » : centré, comme la ligne d'inscription
   en dessous ; son formulaire, une fois ouvert, repart à gauche. */
.wr-cx__card .wr-magic > summary { text-align: center; }

.wr-cx__alt {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--wr-line-2);
  text-align: center;
  font-size: 14px;
  color: var(--wr-muted);
}
.wr-cx__alt a {
  margin-left: 4px;
  font-weight: 700;
  color: var(--wr-violet);
  text-decoration: none;
}
.wr-cx__alt a:hover { color: var(--wr-violet-dark); text-decoration: underline; }

/* Mot de passe oublié : même lecture que la connexion — le libellé au-dessus
   de son champ, à gauche. Les pages du lien magique (icône, titre, texte)
   restent centrées : elles n'ont pas de champ à remplir. */
.wr-cx-main .wr-auth__card .wr-field { text-align: left; }

/* Les halos décoratifs de forgot.ejs (`wr-blob`) débordaient à droite et
   faisaient défiler la page en largeur : le fond de la page en tient lieu. */
.wr-cx-main .wr-blob { display: none; }
.wr-cx-body { overflow-x: hidden; }

/* ── Pied : le copyright et les mentions légales, sur une ligne ── */
.wr-cx-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 18px 24px 24px;
  font-size: 12.5px;
  color: var(--wr-muted);
}
.wr-cx-foot__legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.wr-cx-foot a { color: var(--wr-muted); text-decoration: none; }
.wr-cx-foot a:hover { color: var(--wr-ink); text-decoration: underline; }

/* ── Téléphone ── */
@media (max-width: 560px) {
  .wr-cx-head__inner { padding: 14px 16px; }
  /* Le mot disparaît, la flèche reste (avec son nom pour les lecteurs
     d'écran) : le logo et la langue tiennent sur la même ligne. */
  .wr-cx-back span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .wr-cx-back { padding: 9px; border: 1px solid var(--wr-line-2); background: var(--wr-card); }
  .wr-cx-main .wr-auth { padding: 8px 16px 32px; }
  .wr-cx-main .wr-auth__card { padding: 28px 20px 22px; border-radius: var(--wr-r-2xl); }
}
