* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

body {
  background-color: #ffffff;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* CONTAINER */
.container {
  display: flex;
  flex-wrap: wrap;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  max-width: 1100px;
  width: 95%;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* FORMULAIRE */
.form-container {
  flex: 1;
  min-width: 300px;
  padding: 30px;
}

.form-container h2 {
  color: #ffc107;
  font-weight: 800;
  text-align: center;
  margin-bottom: 25px;
  font-size: 22px;
}

.input-group {
  display: flex;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
  flex: 1;
}

.field label {
  color: #ffc107;
  font-size: 14px;
  margin-bottom: 5px;
}

.field input {
  padding: 10px;
  border-radius: 5px;
  border: none;
  outline: none;
  font-size: 14px;
}

/* BUTTON */
button#achatBtn {
  background: #ffc107;
  color: #000;
  font-weight: 700;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
}

button#achatBtn:hover {
  background: #e0a800;
}

/* COUNTDOWN */
.countdown {
  text-align: center;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeSlideIn 1s ease forwards;
  animation-delay: 0.5s;
}

.countdown p {
  margin-bottom: 10px;
  color: #fff;
}

.time {
  display: flex;
  justify-content: space-between;
}

.time div {
  text-align: center;
  flex: 1;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

.time div:nth-child(1) { animation-delay: 0.8s; }
.time div:nth-child(2) { animation-delay: 1s; }
.time div:nth-child(3) { animation-delay: 1.2s; }
.time div:nth-child(4) { animation-delay: 1.4s; }

.time span {
  font-size: 24px;
  font-weight: 700;
  display: block;
  color: #fff;
  transition: transform 0.3s ease, color 0.3s ease;
}

.time span:hover {
  color: #ffc107;
  transform: scale(1.2);
}

.time small {
  color: #ccc;
  font-size: 12px;
}

/* COUNTDOWN ANIMATIONS */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* IMAGE */
.image-container {
  flex: 1;
  min-width: 300px;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* POPUP BACKGROUND */
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.65);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(3px);
}

/* POPUP BOX */
.custom-popup {
  position: relative;
  display: flex;
  background: #000;
  border: 2px solid #ffc107;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  overflow: hidden;
  transform: scale(0.7);
  opacity: 0;
  animation: showPopup .4s ease forwards;
}

/* POPUP ANIMATION */
@keyframes showPopup {
  from { opacity: 0; transform: scale(0.6) translateY(30px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* POPUP LEFT */
.popup-left {
  padding: 25px;
  width: 55%;
  color: white;
}

.popup-left h3 {
  color: #ffc107;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.numbers p {
  font-size: 22px;
  color: #fff;
  font-weight: 700;
  margin: 4px 0;
}

.instruction {
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.4;
  opacity: .9;
}

/* WHATSAPP BUTTON */
.btn-whatsapp {
  display: inline-block;
  background: #ffc107;
  color: #000;
  padding: 12px;
  border-radius: 30px;
  font-weight: bold;
  margin-top: 10px;
  text-decoration: none;
  transition: .3s;
}

.btn-whatsapp:hover {
  background: #e0a800;
}

/* POPUP RIGHT */
.popup-right {
  width: 45%;
}

.popup-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CLOSE BUTTON */
.close-popup {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 24px;
  cursor: pointer;
  color: #ff0000;
  font-weight: bold;
  z-index: 100;
  transition: 0.2s ease;
}

.close-popup:hover {
  transform: scale(1.2);
  color: white;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
  }
  .image-container img {
    height: 420px;
  }
}

@media (max-width: 700px) {
  .custom-popup {
    flex-direction: column;
    max-width: 95%;
  }
  .popup-left, .popup-right {
    width: 100%;
  }
  .popup-right img {
    height: 350px;
  }
  .numbers p {
    font-size: 18px;
  }
}
/* Overlay */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(3px);
  display: none;                /* affiché via JS */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Boîte popup : style identique à la maquette */
.custom-popup {
  position: relative;
  display: flex;
  gap: 0;
  width: 92%;
  max-width: 680px;             /* taille réduite */
  background: #0a0a0a;
  border: 2px solid #D4AF37;    /* doré premium */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  animation: popupIn .4s ease forwards;
}

@keyframes popupIn {
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Bouton fermer (croix) */
.close-popup {
  position: absolute;
  top: 8px; right: 10px;
  background: transparent;
  border: none;
  color: #9ea3aa;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  transition: transform .18s ease, color .18s ease;
  z-index: 2;
}
.close-popup:hover { color: #fff; transform: scale(1.15); }

/* Colonne gauche (texte) */
.popup-left {
  width: 52%;
  padding: 26px 22px 22px 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.pp-title {
  color: #D4AF37;               /* doré premium */
  font-weight: 900;
  font-size: 24px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .2px;
  margin-bottom: 10px;
}

.pp-sub {
  color: #cfcfcf;
  font-size: 15px;
  margin-bottom: 12px;
}

.numbers p {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: .3px;
  margin: 4px 0;
}

.pp-note {
  display: block;
  color: #D4AF37;
  font-size: 12px;
  margin: 6px 0 12px;
}

.instruction {
  color: #e5e5e5;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 16px;
}

/* Bouton rond jaune */
.btn-whatsapp {
  display: inline-block;
  align-self: flex-start;
  background: #FFC107;          /* jaune bouton */
  color: #000;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .3px;
  text-decoration: none;
  box-shadow: 0 4px 0 #C99607;  /* relief */
  transition: transform .12s ease, box-shadow .12s ease, filter .2s ease;
}
.btn-whatsapp:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #C99607;
}
.btn-whatsapp:hover {
  filter: brightness(0.95);
}

/* Colonne droite (image) */
.popup-right { width: 48%; background: #000; }
.popup-right img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsivité fidèle à la maquette */
@media (max-width: 760px) {
  .custom-popup { flex-direction: column; max-width: 94%; }
  .popup-left, .popup-right { width: 100%; }
  .popup-right img { height: 360px; }
  .pp-title { font-size: 22px; }
  .numbers p { font-size: 20px; }
  .btn-whatsapp { width: 100%; text-align: center; }
}

@media (max-width: 420px) {
  .popup-right img { height: 320px; }
  .pp-title { font-size: 20px; }
  .numbers p { font-size: 18px; }
}
/* ===== FIX POPUP MOBILE ===== */
@media (max-width: 768px) {
  .custom-popup {
    flex-direction: column;
    max-height: 90vh;        /* limite hauteur */
    overflow-y: auto;        /* scroll interne */
    width: 95%;
    transform: scale(0.95);  /* légèrement réduit */
  }

  .popup-left {
    padding: 20px;
  }

  .popup-right img {
    height: 300px;           /* réduit image */
    object-fit: cover;
  }

  .btn-whatsapp {
    width: 100%;             /* bouton full width */
    text-align: center;
  }
}

/* ===== Très petits smartphones (iPhone SE, Android petits) ===== */
@media (max-height: 600px) {
  .custom-popup {
    max-height: 85vh;
    overflow-y: scroll;
    transform: scale(0.9);
  }

  .popup-right img {
    height: 250px;
  }
}

/* Empêche le fond de bouger quand le popup est ouvert */
body.popup-open {
  overflow: hidden;
}
select {
  padding: 10px;
  border-radius: 5px;
  border: none;
  outline: none;
  font-size: 14px;
}
/* ✅ Style erreurs modernes */
.field { position: relative; margin-bottom: 18px; }

input.error, select.error {
  border: 2px solid #ff4d4d !important;
  background: #ffecec;
}

.error-msg {
  font-size: 13px;
  color: #ff4d4d;
  margin-top: 4px;
  display: none;
}
/* ✅ Fix full width mobile */
body, html {
  width: 100%;
  overflow-x: hidden;
}

/* ✅ Ensure container fits screen */
.container {
  width: 100%;
  max-width: 100% !important;
  margin: 0;
  padding: 0;
}
.image-container {
  width: 100%;
}

.image-container img {
  width: 100%;
  display: block;
}
/* ✅ Fix overflow & zoom mobile */
html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: #000; /* pour éviter le beige */
}

/* ✅ Force conteneur à prendre toute la largeur sur mobile */
@media (max-width: 768px) {
  .container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .form-container {
    padding: 20px !important;
  }

  .image-container img {
    width: 100% !important;
    height: auto !important;
  }
}

input, select, button {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.name-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.name-group div {
  flex: 1 1 100%; /* Sur mobile prend toute la largeur */
}

@media (min-width: 768px) {
  .name-group div {
    flex: 1; /* Sur PC 50% */
  }
}
