/* =========================================================
   Francisation de la page de connexion Homepage
   Compatible avec la page d’authentification Homepage v2.x
   ========================================================= */

/* « Login Required » → « Connexion requise » */
main:has(input[name="password"])
  .grid
  > section:first-child
  .inline-flex {
  font-size: 0 !important;
}

main:has(input[name="password"])
  .grid
  > section:first-child
  .inline-flex::after {
  content: "Connexion requise";
  font-size: 0.75rem;
  line-height: 1rem;
}

/* « Login to view your dashboard. » */
main:has(input[name="password"])
  .grid
  > section:first-child
  h1
  + p {
  font-size: 0 !important;
}

main:has(input[name="password"])
  .grid
  > section:first-child
  h1
  + p::after {
  content: "Connectez-vous pour accéder à votre tableau de bord.";
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* « Sign in » → « Se connecter » */
main:has(input[name="password"])
  .grid
  > section:nth-child(2)
  h2 {
  font-size: 0 !important;
}

main:has(input[name="password"])
  .grid
  > section:nth-child(2)
  h2::after {
  content: "Se connecter";
  font-size: 1.125rem;
  line-height: 1.75rem;
}

/* « Password » → « Mot de passe » */
main:has(input[name="password"]) form label {
  font-size: 0 !important;
}

main:has(input[name="password"]) form label::after {
  content: "Mot de passe";
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* Bouton « Sign in » → « Se connecter » */
main:has(input[name="password"])
  form
  button[type="submit"]
  span {
  font-size: 0 !important;
}

main:has(input[name="password"])
  form
  button[type="submit"]
  span::after {
  content: "Se connecter →";
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* Message affiché après un mot de passe incorrect */
main:has(input[name="password"])
  .grid
  > section:nth-child(2)
  h2
  ~ p {
  font-size: 0 !important;
}

main:has(input[name="password"])
  .grid
  > section:nth-child(2)
  h2
  ~ p::after {
  content: "Mot de passe incorrect. Veuillez réessayer.";
  font-size: 0.75rem;
  line-height: 1rem;
}