:root {
  --glass: rgba(255, 255, 255, 0.1);
  --glass2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.18);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --radius2: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background: #0b0f17;
}

/* =========================
   Background flou
   ========================= */
.bg {
  position: fixed;
  inset: 0;
  background-image: url("images/bg.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
  z-index: -2;
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      1200px 600px at 20% 10%,
      rgba(255, 255, 255, 0.08),
      transparent 55%
    ),
    radial-gradient(
      1000px 700px at 80% 20%,
      rgba(255, 255, 255, 0.06),
      transparent 55%
    ),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55));
}

/* =========================
   Layout global
   ========================= */
.page {
  /* Fallback pour éviter les warnings VS Code sur min() */
  width: calc(100% - 32px);
  max-width: 1120px;

  margin: 26px auto 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* =========================
   HERO slider
   ========================= */
.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.carousel {
  position: relative;
  height: 160px;
  background: rgba(0, 0, 0, 0.25);
}

.track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 520ms cubic-bezier(0.22, 0.7, 0.2, 1);
}

.slide {
  flex: 0 0 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  filter: contrast(1.05) saturate(1.05);
}

.heroShade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.1) 55%,
    rgba(0, 0, 0, 0.4)
  );
  pointer-events: none;
}

.heroText {
  position: absolute;
  left: 18px;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Fallback pour éviter warning fit-content */
.badge {
  display: inline-block;
  width: auto;

  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 12px;
  letter-spacing: 0.2px;
}

.hero h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Navigation carousel */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 26px;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.nav:hover {
  background: rgba(0, 0, 0, 0.48);
}

.nav.prev {
  left: 10px;
}

.nav.next {
  right: 10px;
}

.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.dotBtn {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.dotBtn.active {
  background: rgba(255, 255, 255, 0.85);
}

/* =========================
   Panel 2 colonnes
   ========================= */
.panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

/* Gauche */
.left {
  padding: 22px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.06)
  );
  backdrop-filter: blur(10px);
}

.leftInner {
  max-width: 520px;
}

.cardTitle h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.cardTitle p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13.5px;
}

.strong-color {
  color: red;
}

/* Providers */
.providers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.provider {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  cursor: pointer;
}

.provider:hover {
  background: rgba(0, 0, 0, 0.28);
}

.logo {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

/* Variante "Autre" */
.provider.other {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.04);
}

.provider.other:hover {
  background: rgba(255, 255, 255, 0.1);
}

.provider.other .logo {
  font-size: 15px;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  outline: none;
}

.field input:focus {
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.passwordWrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.passwordWrap input {
  flex: 1;
}

.ghost {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.check input {
  transform: translateY(1px);
}

.link {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 13px;
}

.link:hover {
  text-decoration: underline;
}

.cta {
  margin-top: 2px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.cta:hover {
  background: rgba(255, 255, 255, 0.18);
}

.tiny {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
}

/* Droite */
.right {
  position: relative;
  padding: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.preview {
  height: 100%;
  min-height: 360px;
  border-radius: var(--radius2);
  overflow: hidden;
  background-position: center;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  position: relative;
}

.preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.12));
}

.previewOverlay {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.previewOverlay h3 {
  margin: 0;
  font-size: 18px;
}

.previewOverlay p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.lockRow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.lock {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.muted {
  color: var(--muted);
}

/* Footer */
.footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
}

.footer .dot {
  opacity: 0.6;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 880px) {
  .panel {
    grid-template-columns: 1fr;
  }
  .right {
    padding-top: 0;
  }
  .preview {
    min-height: 260px;
  }
  .carousel {
    height: 150px;
  }
}

@media (max-width: 520px) {
  .page {
    width: calc(100% - 20px);
    margin: 16px auto 28px;
    gap: 14px;
  }

  .carousel {
    height: 135px;
  }

  .heroText h1 {
    font-size: 18px;
  }

  .heroText p {
    font-size: 12.5px;
  }

  .left {
    padding: 16px;
  }

  .cardTitle p {
    font-size: 13px;
  }

  /* Providers en 2 colonnes */
  .providers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .provider {
    justify-content: center;
    padding: 12px 10px;
  }

  .field input {
    padding: 14px 12px;
    font-size: 16px; /* évite le zoom auto iPhone */
  }

  .ghost {
    padding: 12px 12px;
  }

  .cta {
    padding: 14px 14px;
    font-size: 15px;
  }

  .preview {
    min-height: 220px;
  }

  .footer {
    flex-direction: column;
    gap: 6px;
  }

  .footer .dot {
    display: none;
  }
}

@media (max-width: 420px) {
  .nav {
    display: none;
  }
  .heroText {
    top: 14px;
  }
}

/* =========================
   SweetAlert2 style "glass"
   ========================= */
.swal2-popup.swal-glass {
  border-radius: 22px !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background: rgba(15, 18, 28, 0.78) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.swal2-title.swal-title {
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 18px !important;
}

.swal2-html-container.swal-text {
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 13.5px !important;
  line-height: 1.45 !important;
}

.swal-text .swal-sub {
  display: inline-block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12.5px;
}

.swal2-confirm.swal-btn {
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  padding: 10px 14px !important;
  border-radius: 16px !important;
  font-weight: 700 !important;
}

.swal2-confirm.swal-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}
