/* Pages d'accès (connexion /login, récupération d'un site /recuperer) : le même fond étoilé,
   la même carte, les mêmes champs et boutons. Le fond animé est dans auth-fond.js. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  background: #0d0a1a;
  color: #1a1520;
  min-height: 100vh;
  /* Sur un écran tactile, 100vh compte la barre d'adresse même quand elle est
     affichée : la carte se retrouvait plus haute que l'espace réellement visible. */
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 20px;
  /* `overflow: hidden` servait à masquer les orbes qui débordent sur les côtés,
     mais il coupait AUSSI le défilement vertical : écran tactile, fenêtre basse ou
     page zoomée, le bas de la carte — donc le bouton — devenait inatteignable.
     On ne rogne plus que l'horizontale. */
  overflow-x: hidden;
  overflow-y: auto;
}

/* ── Orbes flottants ── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  will-change: transform;
}
.orb-1 {
  width: 420px; height: 420px;
  top: -100px; left: -120px;
  opacity: 0.7;
  background: radial-gradient(circle, #824dfc, #5b21b6);
  animation: float1 10s ease-in-out infinite;
}
.orb-2 {
  width: 360px; height: 360px;
  bottom: -80px; right: -100px;
  opacity: 0.6;
  background: radial-gradient(circle, #c084fc, #7c3aed);
  animation: float2 13s ease-in-out infinite;
}
.orb-3 {
  width: 260px; height: 260px;
  top: 50%; left: 58%;
  opacity: 0.45;
  background: radial-gradient(circle, #a78bfa, #6d28d9);
  animation: float3 11s ease-in-out infinite;
}

@keyframes float1 {
  0%,100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(90px, 70px) scale(1.08); }
  66%      { transform: translate(-40px, 100px) scale(0.94); }
}
@keyframes float2 {
  0%,100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(-100px, -80px) scale(1.1); }
  70%      { transform: translate(60px, -40px) scale(0.92); }
}
@keyframes float3 {
  0%,100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.2) rotate(35deg); }
}

/* Noise texture subtile */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}
.card {
  /* Centrage par marges automatiques plutôt que par `align-items: center`.
     Centrer un élément plus haut que son conteneur en pousse le HAUT au-dessus
     du bord : la partie qui dépasse est alors hors d'atteinte, même en faisant
     défiler. Une marge automatique, elle, s'annule dès qu'il n'y a plus de place. */
  margin: auto;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 60px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.18);
  position: relative; z-index: 1;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 700; color: #fff;
  margin-bottom: 32px; justify-content: center;
}
.logo span { color: #fff; }
.tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px; padding: 4px;
  margin-bottom: 28px;
}
.tab {
  flex: 1; padding: 8px; border: none; background: none;
  color: rgba(255,255,255,0.55); font-size: 14px; font-weight: 500;
  border-radius: 7px; cursor: pointer; transition: all .2s;
  font-family: 'Inter', sans-serif;
}
.tab.active {
  background: #824dfc;
  color: #fff;
  box-shadow: 0 0 16px rgba(130,77,252,0.5);
}
.form-group { margin-bottom: 16px; }
label {
  display: block; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.65); margin-bottom: 6px;
}
input {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; color: #fff;
  font-size: 14px; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: #824dfc; box-shadow: 0 0 0 3px rgba(130,77,252,.25); }
input::placeholder { color: rgba(255,255,255,0.3); }
input:-webkit-autofill,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(30,20,50,0.95) inset !important;
  -webkit-text-fill-color: #fff !important;
  border-color: rgba(255,255,255,0.12) !important;
  transition: background-color 9999s;
}
.btn-submit {
  width: 100%; padding: 12px;
  background: #824dfc;
  border: none; border-radius: 10px; color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif; margin-top: 8px;
  transition: opacity .2s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-submit:hover { opacity: .88; }
.btn-submit:active { transform: scale(.98); }
.btn-submit:disabled { opacity: .5; cursor: not-allowed; }
.error-msg {
  background: rgba(220,38,38,.08);
  border: 1px solid rgba(220,38,38,.25);
  border-radius: 8px; padding: 10px 14px;
  font-size: 13px; color: #dc2626;
  margin-bottom: 16px; display: none;
}
.success-msg {
  background: rgba(22,163,74,.08);
  border: 1px solid rgba(22,163,74,.25);
  border-radius: 8px; padding: 10px 14px;
  font-size: 13px; color: #16a34a;
  margin-bottom: 16px; display: none;
}
.divider {
  text-align: center; margin: 20px 0 4px;
  font-size: 12px; color: rgba(255,255,255,0.4);
  transition: opacity .2s;
}
.divider.hidden { visibility: hidden; opacity: 0; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .6s linear infinite; display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
#starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.orb { z-index: 1; }
.card { z-index: 10; }
