/* ------------------------------------------------------------
   connexion.css : le style de la page de connexion.
   ------------------------------------------------------------ */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

/* ===================== VITRINE (gauche) ===================== */

.vitrine {
  position: relative;
  overflow: hidden;
  background: #121117;
  color: #f3f1f8;
  padding: 36px 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  isolation: isolate;
}

/* Quadrillage discret qui s'efface vers les bords */
.vitrine-grille {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 60% 60%, #000 20%, transparent 75%);
}

/* Lueur citron */
.vitrine-halo {
  position: absolute;
  z-index: -1;
  width: 620px;
  height: 620px;
  right: -180px;
  bottom: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 242, 74, 0.28), rgba(200, 242, 74, 0) 65%);
  filter: blur(10px);
}

.vitrine .logo {
  color: #f3f1f8;
}

.vitrine-texte {
  max-width: 520px;
  margin-top: auto;
}

.surtitre {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c9c5d4;
  background: rgba(255, 255, 255, 0.04);
}

.vitrine h1 {
  margin: 0;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.14;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.surligne {
  display: inline-block;
  color: #121117;
  background: var(--citron);
  padding: 0 0.16em 0.04em;
  margin-top: 0.08em;
  border-radius: 0.2em;
  line-height: 1.02;
  transform: rotate(-1.5deg);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.accroche {
  margin: 20px 0 0;
  font-size: 17px;
  color: #aba7b8;
  max-width: 420px;
}

/* ----- Cartes flottantes ----- */

.apercu {
  position: relative;
  height: 250px;
  max-width: 520px;
  margin-bottom: auto;
}

.carte-flottante {
  position: absolute;
  background: rgba(32, 31, 40, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  animation: flotter 7s ease-in-out infinite;
}

.carte-produit {
  top: 20px;
  left: 0;
  width: 330px;
  padding: 18px;
}

.cf-entete {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.cf-vignette {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 60%, #ffd27a 0 22%, transparent 23%),
    linear-gradient(160deg, #ff7a59, #b53d8f);
}
.cf-nom {
  font-weight: 700;
  font-size: 14px;
}
.cf-sous {
  font-size: 12px;
  color: #8d899a;
}

.barre {
  display: flex;
  gap: 3px;
  height: 10px;
}
.barre span {
  border-radius: 99px;
}

.cf-pied {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  font-size: 13px;
  color: #8d899a;
}
.cf-pied strong {
  font-size: 20px;
  color: var(--citron);
  letter-spacing: -0.02em;
}

.carte-stat {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cs-label {
  font-size: 12px;
  color: #8d899a;
}
.carte-stat strong {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.carte-roas {
  top: 0;
  left: 360px;
  animation-delay: -2.5s;
}

.carte-marge {
  top: 118px;
  left: 360px;
  animation-delay: -4.5s;
}
.sparkline {
  width: 80px;
  height: 24px;
  margin-top: 6px;
  color: var(--citron);
}

@keyframes flotter {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.vitrine-pied {
  margin: 0;
  font-size: 13px;
  color: #6d6979;
}

/* ===================== FORMULAIRE (droite) ===================== */

.zone-formulaire {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--surface);
}

.boite {
  width: 100%;
  max-width: 380px;
  animation: apparaitre 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes apparaitre {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.logo-mobile {
  display: none;
  margin-bottom: 36px;
}

.boite h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.sous-titre {
  margin: 8px 0 32px;
  color: var(--encre-2);
}

.champ {
  margin-bottom: 18px;
}
.champ label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.saisie {
  position: relative;
  display: flex;
  align-items: center;
}
.saisie > svg {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 18px;
  color: var(--encre-3);
  pointer-events: none;
  transition: color 0.2s;
}
.saisie input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 44px;
  border-radius: 14px;
  border: 1.5px solid var(--trait);
  background: var(--surface-2);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.saisie input:hover {
  border-color: var(--encre-3);
}
.saisie input:focus {
  border-color: var(--encre);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(200, 242, 74, 0.45);
}
.saisie:focus-within > svg {
  color: var(--encre);
}

.voir-mdp {
  position: absolute;
  right: 8px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--encre-3);
  cursor: pointer;
}
.voir-mdp:hover {
  color: var(--encre);
  background: var(--trait);
}
.voir-mdp svg {
  width: 18px;
  height: 18px;
}

.message-erreur {
  min-height: 22px;
  margin: 4px 0 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--rouge);
}

.formulaire-secoue {
  animation: secouer 0.4s;
}
@keyframes secouer {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

.bouton-principal {
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 22px;
  border: 0;
  border-radius: 14px;
  background: #121117;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.bouton-principal:hover {
  box-shadow: 0 12px 28px -12px rgba(18, 17, 23, 0.7);
  transform: translateY(-1px);
}
.bouton-principal:active {
  transform: translateY(0);
}
.bouton-principal:disabled {
  cursor: wait;
  opacity: 0.85;
}

.bouton-principal .bouton-icone {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  color: var(--citron);
}
.bouton-principal .bouton-icone svg {
  width: 24px;
  height: 24px;
}
.bouton-principal .bouton-texte {
  flex: 1;
  display: flex;
  justify-content: flex-start;
}
.bouton-principal:has(.bouton-icone) {
  padding-left: 16px;
}

.bouton-fleche {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--citron);
  color: #121117;
  transition: transform 0.2s;
}
.bouton-principal:hover .bouton-fleche {
  transform: translateX(3px);
}
.bouton-fleche svg {
  width: 18px;
  height: 18px;
}

@media (prefers-color-scheme: dark) {
  .bouton-principal {
    background: var(--citron);
    color: #121117;
  }
  .bouton-fleche {
    background: #121117;
    color: var(--citron);
  }
  .bouton-principal .bouton-icone {
    color: #121117;
  }
  .zone-formulaire {
    background: var(--fond);
  }
  .saisie input:focus {
    box-shadow: 0 0 0 4px rgba(200, 242, 74, 0.2);
    border-color: var(--citron);
  }
}

/* ----- Éléments ajoutés pour les passkeys et les invitations ----- */

#erreur-passkey,
#erreur-invitation {
  margin: 10px 0 0;
}
#erreur-passkey:empty,
#erreur-invitation:empty {
  min-height: 0;
  margin: 0;
}
#formulaire-invitation .bouton-principal {
  margin-top: 6px;
}

.aide-premiere-fois {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--vert-doux);
  border: 1px solid color-mix(in srgb, var(--c-benefice) 50%, transparent);
  font-size: 13px;
  line-height: 1.5;
  color: var(--encre-2);
}
.aide-premiere-fois strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  color: var(--encre);
}
.aide-premiere-fois ol {
  margin: 6px 0 0;
  padding-left: 20px;
}

.separateur {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--encre-3);
}
.separateur::before,
.separateur::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--trait);
}

.lien-discret {
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--encre-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lien-discret:hover {
  background: var(--surface-2);
  color: var(--encre);
}

.formulaire-secours {
  margin-top: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--trait);
  background: var(--surface-2);
  animation: apparaitre 0.35s ease both;
}
.formulaire-secours .saisie input {
  background: var(--surface);
}

.bouton-secondaire {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--encre);
  border-radius: 12px;
  background: transparent;
  color: var(--encre);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.bouton-secondaire:hover {
  background: var(--encre);
  color: var(--surface);
}
.bouton-secondaire:disabled {
  opacity: 0.7;
  cursor: wait;
}

.note {
  margin: 22px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--encre-3);
  text-align: center;
}

.etiquette {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px 11px 5px 9px;
  border-radius: 99px;
  background: var(--vert-doux);
  color: var(--citron-fonce);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.etiquette svg {
  width: 15px;
  height: 15px;
}

.panneau-centre {
  text-align: center;
}
.grande-icone {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--trait);
  color: var(--encre-2);
}
.grande-icone svg {
  width: 30px;
  height: 30px;
}

.securite {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 0;
  font-size: 13px;
  color: var(--encre-3);
}
.securite svg {
  width: 16px;
  height: 16px;
}

/* ===================== TÉLÉPHONE / TABLETTE ===================== */

@media (max-width: 1100px) {
  .carte-roas {
    left: 200px;
    top: -20px;
  }
  .carte-marge {
    left: 150px;
    top: 170px;
  }
}

@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
  }
  .vitrine {
    display: none;
  }
  .logo-mobile {
    display: inline-flex;
  }
  .zone-formulaire {
    align-items: start;
    padding-top: 12vh;
    background:
      radial-gradient(120% 50% at 100% 0%, rgba(200, 242, 74, 0.22), transparent 60%),
      var(--surface);
  }
}
