/**
 * Connexion SIMB-SN — carte centrée, drapeau en bandeau (plus collé à gauche)
 * Vert #00853F · Or #FCD116 · Rouge #E31C23
 */
:root {
  --sn-green: #00853F;
  --sn-green-deep: #006B32;
  --sn-forest: #0B2A1C;
  --sn-gold: #FCD116;
  --sn-red: #E31C23;
  --sn-cream: #F3F6F4;
  --sn-ink: #122018;
  --sn-muted: #5B6B64;
  --sn-line: #DDE6E0;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body.auth-sn {
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--sn-ink);
  background:
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(0, 133, 63, 0.16), transparent 58%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(227, 28, 35, 0.07), transparent 50%),
    radial-gradient(ellipse 45% 38% at 0% 85%, rgba(252, 209, 22, 0.14), transparent 52%),
    linear-gradient(180deg, #EEF4F0 0%, #F6F8F6 42%, #F3F6F4 100%);
}

.auth-sn__bg {
  position: fixed;
  inset: 5px 0 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.auth-sn__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(11, 42, 28, 0.04) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 15%, transparent 78%);
}

.auth-sn__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(52px);
  opacity: 0.42;
}

.auth-sn__orb--green {
  width: 300px;
  height: 300px;
  top: 6%;
  left: 4%;
  background: rgba(0, 133, 63, 0.32);
}

.auth-sn__orb--gold {
  width: 260px;
  height: 260px;
  top: 12%;
  right: 2%;
  background: rgba(252, 209, 22, 0.34);
}

.auth-sn__orb--red {
  width: 230px;
  height: 230px;
  bottom: 4%;
  left: 48%;
  background: rgba(227, 28, 35, 0.12);
}

.auth-sn__sky-star {
  position: absolute;
  background: #00853F;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: sn-star-twinkle 6.5s ease-in-out infinite;
}

.auth-sn__sky-star--1  { width: 78px; height: 78px; top: 9%;  left: 8%;  opacity: 0.16; animation-delay: 0s; }
.auth-sn__sky-star--2  { width: 36px; height: 36px; top: 18%; left: 22%; opacity: 0.12; background: #FCD116; animation-delay: .8s; }
.auth-sn__sky-star--3  { width: 54px; height: 54px; top: 28%; left: 5%;  opacity: 0.1;  animation-delay: 1.4s; }
.auth-sn__sky-star--4  { width: 92px; height: 92px; top: 62%; left: 7%;  opacity: 0.13; animation-delay: .4s; }
.auth-sn__sky-star--5  { width: 28px; height: 28px; top: 78%; left: 18%; opacity: 0.18; background: #FCD116; animation-delay: 2.1s; }
.auth-sn__sky-star--6  { width: 64px; height: 64px; top: 84%; left: 32%; opacity: 0.1;  animation-delay: 1.1s; }
.auth-sn__sky-star--7  { width: 110px; height: 110px; top: 8%; right: 8%; opacity: 0.11; animation-delay: .6s; }
.auth-sn__sky-star--8  { width: 32px; height: 32px; top: 22%; right: 22%; opacity: 0.2; background: #FCD116; animation-delay: 1.8s; }
.auth-sn__sky-star--9  { width: 48px; height: 48px; top: 38%; right: 6%; opacity: 0.14; animation-delay: 2.6s; }
.auth-sn__sky-star--10 { width: 72px; height: 72px; top: 68%; right: 9%; opacity: 0.12; animation-delay: .2s; }
.auth-sn__sky-star--11 { width: 24px; height: 24px; top: 82%; right: 24%; opacity: 0.22; background: #FCD116; animation-delay: 3s; }
.auth-sn__sky-star--12 { width: 40px; height: 40px; top: 48%; left: 14%; opacity: 0.09; animation-delay: 2.2s; }
.auth-sn__sky-star--13 { width: 30px; height: 30px; top: 52%; right: 16%; opacity: 0.16; background: #FCD116; animation-delay: 1.5s; }
.auth-sn__sky-star--14 { width: 20px; height: 20px; top: 12%; left: 46%; opacity: 0.14; animation-delay: 2.8s; }

@keyframes sn-star-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.12; }
  50% { transform: scale(1.08) rotate(8deg); opacity: 0.26; }
}

.auth-sn__stripe {
  position: relative;
  z-index: 2;
  display: flex;
  height: 5px;
}
.auth-sn__stripe span { flex: 1; }
.auth-sn__stripe span:nth-child(1) { background: var(--sn-green); }
.auth-sn__stripe span:nth-child(2) { background: var(--sn-gold); }
.auth-sn__stripe span:nth-child(3) { background: var(--sn-red); }

.auth-sn__stage {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.15rem 1.5rem;
}

.auth-sn__kicker {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sn-green);
}

.auth-sn__panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(11, 42, 28, 0.08);
  box-shadow:
    0 1px 2px rgba(11, 42, 28, 0.04),
    0 24px 56px rgba(11, 42, 28, 0.12);
}

.auth-sn__flag {
  position: relative;
  display: flex;
  height: 148px;
  overflow: hidden;
}

.auth-sn__band { flex: 1; }
.auth-sn__band--green { background: var(--sn-green); }
.auth-sn__band--gold { background: var(--sn-gold); }
.auth-sn__band--red { background: var(--sn-red); }

.auth-sn__star {
  position: absolute;
  inset: 0 auto auto 50%;
  top: 18px;
  width: 52px;
  height: 52px;
  margin-left: -26px;
  filter: drop-shadow(0 4px 10px rgba(11, 42, 28, 0.2));
}

.auth-sn__flag-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.35rem 1rem 0.85rem;
  background: linear-gradient(180deg, transparent, rgba(11, 42, 28, 0.55));
  color: #fff;
  text-align: center;
}

.auth-sn__flag-label strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.auth-sn__flag-label span {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(252, 209, 22, 0.95);
}

.auth-sn__card {
  padding: 1.45rem 1.45rem 1.35rem;
}

.auth-sn__title {
  margin: 0 0 0.2rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--sn-forest);
}

.auth-sn__sub {
  margin: 0 0 1.2rem;
  font-size: 0.86rem;
  color: var(--sn-muted);
}

.auth-sn__field { margin-bottom: 0.95rem; }

.auth-sn__field label {
  display: block;
  margin-bottom: 0.38rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sn-forest);
}

.auth-sn__control {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0 0.85rem;
  border: 1px solid var(--sn-line);
  border-radius: 12px;
  background: #FAFCFA;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-sn__control i {
  color: var(--sn-green);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.auth-sn__control input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--sn-ink);
  font-size: 0.94rem;
  padding: 0.7rem 0;
  outline: none;
}

.auth-sn__control input::placeholder { color: #8AA094; }

.auth-sn__control:focus-within {
  background: #fff;
  border-color: var(--sn-green);
  box-shadow: 0 0 0 3px rgba(0, 133, 63, 0.14);
}

.auth-sn__control.is-invalid {
  border-color: var(--sn-red);
  box-shadow: 0 0 0 3px rgba(227, 28, 35, 0.12);
}

.auth-sn__toggle {
  border: 0;
  background: transparent;
  color: #7A8C82;
  padding: 0.2rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.auth-sn__toggle:hover { color: var(--sn-green); }

.auth-sn__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.1rem 0 1.15rem;
}

.auth-sn__remember {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--sn-muted);
  cursor: pointer;
}

.auth-sn__remember input {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--sn-green);
}

.auth-sn__link {
  color: var(--sn-green);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-sn__link:hover {
  color: var(--sn-green-deep);
  text-decoration: underline;
}

.auth-sn__submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3rem;
  border: 0;
  border-radius: 12px;
  background: var(--sn-green);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.auth-sn__submit i { color: var(--sn-gold); font-size: 1.15rem; }

.auth-sn__submit:hover {
  background: var(--sn-green-deep);
  transform: translateY(-1px);
}

.auth-sn__alert {
  margin-bottom: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.auth-sn__alert p { margin: 0; }

.auth-sn__alert--error {
  background: rgba(227, 28, 35, 0.07);
  border: 1px solid rgba(227, 28, 35, 0.22);
  color: #9B1218;
}

.auth-sn__alert--info {
  background: rgba(0, 133, 63, 0.08);
  border: 1px solid rgba(0, 133, 63, 0.2);
  color: var(--sn-green-deep);
}

.auth-sn__invalid {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--sn-red);
}

.auth-sn__footer {
  margin: 1.15rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: #7A8C82;
}

@media (max-width: 480px) {
  .auth-sn__flag { height: 128px; }
  .auth-sn__card { padding: 1.2rem 1.1rem 1.15rem; }
  .auth-sn__orb--green,
  .auth-sn__orb--gold,
  .auth-sn__orb--red {
    width: 150px;
    height: 150px;
    opacity: 0.35;
  }
  .auth-sn__sky-star--1,
  .auth-sn__sky-star--4,
  .auth-sn__sky-star--7,
  .auth-sn__sky-star--10 { display: none; }
}
