/* =========================================================
   Predator Eleven — Créer un compte (parcours d'entrée)
   Continuité visuelle avec /login, composition propre aux 5 champs
   4 formats : phone/tablet × portrait/landscape
   ========================================================= */

body.m-signup {
  --signup-ink: #f4f7fb;
  --signup-muted: rgba(226, 232, 240, 0.78);
  --signup-gold: #facc15;
  --signup-gold-soft: rgba(250, 204, 21, 0.22);
  --signup-panel: rgba(8, 12, 22, 0.58);
  --signup-field: rgba(2, 6, 23, 0.42);
  --signup-safe-top: env(safe-area-inset-top, 0px);
  --signup-safe-right: env(safe-area-inset-right, 0px);
  --signup-safe-bottom: env(safe-area-inset-bottom, 0px);
  --signup-safe-left: env(safe-area-inset-left, 0px);

  position: relative;
  margin: 0;
  min-height: 100dvh;
  min-height: 100svh;
  padding: 0 !important;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  background: #07080c;
  color: var(--signup-ink);
  -webkit-overflow-scrolling: touch;
}

.m-signup-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.m-signup-visual {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.m-signup-bg {
  position: absolute;
  inset: 0;
  background: url("/images/login-bg-mobile.jpg") center top / cover no-repeat;
  transform: scale(1.02);
}

.m-signup-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(7, 8, 12, 0.22) 0%,
      rgba(7, 8, 12, 0.12) 22%,
      rgba(7, 8, 12, 0.48) 48%,
      rgba(7, 8, 12, 0.88) 78%,
      rgba(7, 8, 12, 0.95) 100%
    );
}

.m-signup-visual-frame {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.35);
  background:
    radial-gradient(120% 70% at 50% 100%, rgba(180, 83, 9, 0.14), transparent 55%);
}

.m-signup-main {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding:
    calc(10px + var(--signup-safe-top))
    calc(14px + var(--signup-safe-right))
    calc(14px + var(--signup-safe-bottom))
    calc(14px + var(--signup-safe-left));
  animation: m-signup-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.m-signup-panel {
  position: relative;
  padding: 16px 15px 14px;
  border-radius: 22px;
  border: 1px solid var(--signup-gold-soft);
  background: var(--signup-panel);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.m-signup-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(250, 204, 21, 0.75),
    transparent
  );
  opacity: 0.85;
}

.m-signup-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.m-signup-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 10px 24px rgba(0, 0, 0, 0.4);
}

.m-signup-brand-copy {
  min-width: 0;
}

.m-signup-kicker {
  margin: 0 0 2px;
  font-family: var(--m-display, "Sora", sans-serif);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(250, 204, 21, 0.88);
}

.m-signup-heading {
  margin: 0;
  font-family: var(--m-display, "Sora", sans-serif);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--signup-ink);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  line-height: 1.1;
}

.m-signup-lead {
  margin: 0 0 12px;
  color: var(--signup-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.m-signup-error {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  font-size: 0.88rem;
  font-weight: 600;
}

.m-signup-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.m-signup-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m-signup-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.m-signup-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250, 204, 21, 0.78);
}

.m-signup-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.m-signup-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: rgba(250, 204, 21, 0.72);
  pointer-events: none;
  z-index: 1;
}

.m-signup-input-wrap .m-input {
  width: 100%;
  margin: 0;
  min-height: 46px;
  padding: 11px 14px 11px 42px;
  background: var(--signup-field);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #f8fafc;
  border-radius: 13px;
}

.m-signup-input-wrap .m-input::placeholder {
  color: rgba(148, 163, 184, 0.65);
}

.m-signup-input-wrap .m-input:focus {
  outline: none;
  border-color: rgba(250, 204, 21, 0.55);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.14);
  background: rgba(2, 6, 23, 0.55);
}

.m-signup-field--invite .m-signup-input-wrap .m-input {
  border-color: rgba(250, 204, 21, 0.34);
  background: rgba(250, 204, 21, 0.05);
}

.m-signup-field--invite .m-signup-input-wrap .m-input:focus {
  border-color: rgba(250, 204, 21, 0.65);
  background: rgba(2, 6, 23, 0.55);
}

.m-signup-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  padding: 0 16px;
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 14px;
  background: linear-gradient(180deg, #f5d76e 0%, #d4a017 55%, #b45309 100%);
  color: #1c1204;
  font-family: var(--m-display, "Sora", sans-serif);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 12px 30px rgba(180, 83, 9, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.m-signup-submit:active {
  transform: scale(0.98);
}

.m-signup-submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

.m-signup-footer {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.86rem;
  color: rgba(148, 163, 184, 0.9);
}

.m-signup-footer a {
  color: rgba(250, 204, 21, 0.94);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 204, 21, 0.28);
  padding-bottom: 1px;
}

.m-signup-footer a:active {
  opacity: 0.85;
}

@keyframes m-signup-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes m-signup-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .m-signup-main {
    animation: none !important;
  }
}

/* ---------------------------------------------------------
   TÉLÉPHONE PORTRAIT — tall : plus d'air sous le panneau
   --------------------------------------------------------- */
@media (orientation: portrait) and (min-height: 780px) {
  .m-signup-main {
    padding-bottom: calc(26px + var(--signup-safe-bottom));
    margin-bottom: 3vh;
  }

  .m-signup-panel {
    padding: 18px 17px 16px;
  }

  .m-signup-logo {
    width: 52px;
    height: 52px;
  }

  .m-signup-heading {
    font-size: 1.4rem;
  }
}

/* ---------------------------------------------------------
   TÉLÉPHONE PAYSAGE — split + densification + paires mdp
   --------------------------------------------------------- */
@media (orientation: landscape) and (max-width: 899px) {
  body.m-signup {
    overflow: hidden;
  }

  .m-signup-stage {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(300px, 1.08fr);
    align-items: stretch;
    min-height: 100dvh;
    max-height: 100dvh;
  }

  .m-signup-visual {
    position: relative;
    inset: auto;
    min-height: 100%;
  }

  .m-signup-bg {
    background-image: url("/images/login-bg-classic.jpg");
    background-position: center center;
    transform: none;
  }

  .m-signup-scrim {
    background:
      linear-gradient(
        90deg,
        rgba(7, 8, 12, 0.12) 0%,
        rgba(7, 8, 12, 0.32) 50%,
        rgba(7, 8, 12, 0.78) 100%
      ),
      linear-gradient(
        180deg,
        rgba(7, 8, 12, 0.28) 0%,
        transparent 42%,
        rgba(7, 8, 12, 0.35) 100%
      );
  }

  .m-signup-visual-frame {
    background:
      radial-gradient(80% 90% at 20% 50%, rgba(250, 204, 21, 0.08), transparent 60%);
    box-shadow: inset -24px 0 48px rgba(0, 0, 0, 0.35);
  }

  .m-signup-main {
    display: flex;
    align-items: stretch;
    justify-content: center;
    max-width: none;
    width: 100%;
    min-height: 100%;
    max-height: 100dvh;
    margin: 0;
    padding:
      calc(8px + var(--signup-safe-top))
      calc(12px + var(--signup-safe-right))
      calc(8px + var(--signup-safe-bottom))
      10px;
    background:
      linear-gradient(180deg, rgba(11, 18, 32, 0.97) 0%, rgba(7, 8, 12, 0.99) 100%);
    border-left: 1px solid rgba(250, 204, 21, 0.14);
    animation: m-signup-fade 0.4s ease both;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .m-signup-panel {
    width: 100%;
    max-width: 520px;
    margin: auto 0;
    padding: 12px 12px 10px;
    border-radius: 18px;
    background: rgba(8, 12, 22, 0.82);
  }

  .m-signup-panel::before {
    left: 12px;
    right: 12px;
  }

  .m-signup-brand {
    gap: 10px;
    margin-bottom: 4px;
  }

  .m-signup-logo {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .m-signup-kicker {
    font-size: 0.56rem;
    letter-spacing: 0.14em;
  }

  .m-signup-heading {
    font-size: 1.1rem;
  }

  .m-signup-lead {
    margin-bottom: 8px;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .m-signup-error {
    margin-bottom: 8px;
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .m-signup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 10px;
  }

  .m-signup-field--invite {
    grid-column: 1 / -1;
  }

  .m-signup-label {
    font-size: 0.58rem;
  }

  .m-signup-input-wrap .m-input {
    min-height: 40px;
    padding: 8px 10px 8px 36px;
    border-radius: 11px;
    font-size: 0.9rem;
  }

  .m-signup-icon {
    left: 10px;
    width: 16px;
    height: 16px;
  }

  .m-signup-submit {
    min-height: 42px;
    margin-top: 8px;
    font-size: 0.92rem;
    border-radius: 12px;
  }

  .m-signup-footer {
    margin-top: 8px;
    font-size: 0.78rem;
  }
}

/* ---------------------------------------------------------
   TABLETTE PORTRAIT — panneau aéré, art visible, 1 colonne
   --------------------------------------------------------- */
@media (orientation: portrait) and (min-width: 700px) {
  .m-signup-bg {
    background-position: center 16%;
  }

  .m-signup-scrim {
    background:
      linear-gradient(
        180deg,
        rgba(7, 8, 12, 0.14) 0%,
        rgba(7, 8, 12, 0.06) 28%,
        rgba(7, 8, 12, 0.42) 56%,
        rgba(7, 8, 12, 0.9) 82%,
        rgba(7, 8, 12, 0.96) 100%
      );
  }

  .m-signup-main {
    max-width: 520px;
    padding:
      calc(18px + var(--signup-safe-top))
      28px
      calc(32px + var(--signup-safe-bottom));
    margin-bottom: 2vh;
  }

  .m-signup-panel {
    padding: 24px 26px 22px;
    border-radius: 24px;
    background: rgba(8, 12, 22, 0.64);
  }

  .m-signup-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
  }

  .m-signup-kicker {
    font-size: 0.72rem;
  }

  .m-signup-heading {
    font-size: 1.7rem;
  }

  .m-signup-lead {
    font-size: 0.96rem;
    margin-bottom: 16px;
    max-width: 42ch;
  }

  .m-signup-grid {
    gap: 12px;
  }

  .m-signup-input-wrap .m-input {
    min-height: 52px;
  }

  .m-signup-submit {
    min-height: 54px;
    margin-top: 16px;
  }
}

/* ---------------------------------------------------------
   TABLETTE PAYSAGE — cockpit asymétrique + paires logiques
   --------------------------------------------------------- */
@media (orientation: landscape) and (min-width: 900px) {
  body.m-signup {
    overflow: hidden;
  }

  .m-signup-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(420px, 0.8fr);
    min-height: 100dvh;
    max-height: 100dvh;
  }

  .m-signup-visual {
    position: relative;
    inset: auto;
    min-height: 100%;
  }

  .m-signup-bg {
    background-image: url("/images/login-bg-classic.jpg");
    background-position: center center;
    transform: scale(1.01);
  }

  .m-signup-scrim {
    background:
      linear-gradient(
        105deg,
        rgba(7, 8, 12, 0.08) 0%,
        rgba(7, 8, 12, 0.22) 48%,
        rgba(7, 8, 12, 0.8) 100%
      ),
      linear-gradient(
        180deg,
        rgba(7, 8, 12, 0.22) 0%,
        transparent 42%,
        rgba(7, 8, 12, 0.28) 100%
      );
  }

  .m-signup-visual-frame {
    background:
      radial-gradient(70% 80% at 30% 40%, rgba(250, 204, 21, 0.1), transparent 58%),
      radial-gradient(50% 60% at 80% 90%, rgba(59, 130, 246, 0.12), transparent 55%);
    box-shadow: inset -40px 0 70px rgba(0, 0, 0, 0.4);
  }

  .m-signup-main {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: none;
    width: 100%;
    min-height: 100%;
    max-height: 100dvh;
    margin: 0;
    padding:
      calc(24px + var(--signup-safe-top))
      calc(32px + var(--signup-safe-right))
      calc(24px + var(--signup-safe-bottom))
      24px;
    background:
      radial-gradient(520px 360px at 100% 0%, rgba(59, 130, 246, 0.14), transparent 55%),
      radial-gradient(420px 280px at 0% 100%, rgba(180, 83, 9, 0.1), transparent 50%),
      linear-gradient(180deg, #0c1424 0%, #07080c 100%);
    border-left: 1px solid rgba(250, 204, 21, 0.16);
    animation: m-signup-fade 0.45s ease both;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .m-signup-panel {
    width: 100%;
    max-width: 520px;
    padding: 26px 26px 22px;
    border-radius: 24px;
    background: rgba(8, 12, 22, 0.8);
    box-shadow:
      0 30px 70px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .m-signup-brand {
    gap: 14px;
    margin-bottom: 10px;
  }

  .m-signup-logo {
    width: 64px;
    height: 64px;
    border-radius: 17px;
  }

  .m-signup-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
  }

  .m-signup-heading {
    font-size: 1.7rem;
  }

  .m-signup-lead {
    margin-bottom: 16px;
    font-size: 0.95rem;
    max-width: 40ch;
  }

  .m-signup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
  }

  .m-signup-field--invite {
    grid-column: 1 / -1;
  }

  .m-signup-input-wrap .m-input {
    min-height: 50px;
  }

  .m-signup-submit {
    min-height: 54px;
    margin-top: 16px;
    font-size: 1.04rem;
  }

  .m-signup-footer {
    margin-top: 16px;
  }
}

@media (orientation: landscape) and (min-width: 1200px) {
  .m-signup-stage {
    grid-template-columns: minmax(0, 1.3fr) minmax(460px, 0.7fr);
  }

  .m-signup-main {
    padding-left: 36px;
    padding-right: calc(44px + var(--signup-safe-right));
  }
}
