/* Police moderne sans serif */
body {
  font-family: 'Poppins', 'Inter', Arial, sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding: 20px;
  font-size: 14px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background: #fffdf8;
  padding: 20px;
  border-radius: 16px;
  border: 2px solid #d4af37;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
h1 { text-align: center; color: #d4af37; font-size: 20px; }
legend { font-weight: bold; color: #d4af37; font-size: 15px; }

fieldset {
  margin-top: 16px; border: 2px solid #d4af37; border-radius: 12px; padding: 12px; background: #fff;
  position: relative;
}
.prenoms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prenoms input { width: 100%; box-sizing: border-box; }

/* Icônes des fieldset avec légende (placées devant le texte) */
.legend-icon {
  margin-right: 6px;
  color: #d4af37;
}

/* Icônes des fieldset sans légende (solo, centrées sur la barre gauche) */
.with-icon.solo { padding-top:2px; padding-bottom:2px; margin-top:6px; }
.with-icon.solo::before {
  content: attr(data-icon);
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  background: #fffdf8;
  padding: 0 2px;
  font-size: 16px;
  color: #d4af37;
}

/* Inputs classiques */
input[type="text"], input[type="tel"], input[type="email"] {
  width: 100%; padding: 8px; margin-top: 5px;
  border: 1px solid #ccc; border-radius: 8px; font-size: 14px; box-sizing: border-box;
}

/* Inputs plats pour tel/email */
.flat-input {
  border: none !important;
  outline: none;
  width: 100%;
  padding: 4px;
  font-size: 14px;
}

.date-display { text-align: center; margin: 6px 0; font-size: 16px; color: #333; }
#datepicker.datepicker-popup { display: block; margin-top: 8px; }
.datepicker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.datepicker-grid button {
  padding: 8px; border: 1px solid #ccc; border-radius: 6px;
  background: #fafafa; cursor: pointer;
}
.datepicker-grid button:hover { background: #d4af37; color: white; }

#submitBtn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  background: grey;
  cursor: not-allowed;
  z-index: 1000;
  padding: 10px 14px;
  border: none; border-radius: 8px; color: #fff; font-weight: 600;
}
#submitBtn.active { background: #d4af37; cursor: pointer; }


/* Style pour l'en-tête des jours de semaine */
.datepicker-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
  margin-bottom: 4px;
  color: #555;
}
.datepicker-grid.days {
  grid-template-columns: repeat(7, 1fr);
}
.datepicker-grid.days button, .datepicker-grid.days .empty {
  padding: 6px;
  text-align: center;
}
.empty { visibility: hidden; }


textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.success-alert {
  background: #fff8e1;
  border: 2px solid #d4af37;
  color: #333;
  padding: 20px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  border-radius: 12px;
  margin: 20px auto;
}
.success-alert button {
  margin-left: 20px;
  background: #d4af37;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
}


.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.popup {
  background: #fffdf8;
  border: 3px solid #d4af37;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}
.popup button {
  margin-top: 20px;
  background: #d4af37;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
}


.container {
  margin: 20px auto;   /* réduit de moitié */
  padding: 15px;       /* réduit */
  max-width: 600px;
}

.with-icon.legended {
  padding-top: 8px; /* moitié moins */
}
.with-icon.legended legend {
  margin-bottom: 4px; /* moitié moins */
}

form#mariageForm {
  margin-bottom: 80px; /* espace en bas pour éviter que Envoyer colle au bord */
}


/* Custom checkbox doré */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #d4af37;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
  margin-right: 6px;
  background-color: #fff;
}

input[type="checkbox"]:checked {
  background-color: #d4af37;
}

input[type="checkbox"]:checked::after {
  content: '✔';
  color: #fff;
  font-size: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
}


#dateDisplay span {
  font-weight: bold;
}


.container {
  margin: 10px auto 80px auto; /* top réduit, bottom ajouté */
  padding: 15px;
  max-width: 600px;
}

.datepicker-grid.days button {
  font-size: 12px;
  padding: 3px;
}


/* Supprimer l'espace sous le dernier fieldset (Commentaires) */
fieldset:last-of-type {
  margin-bottom: 0;
}

/* Boutons jours plus petits pour éviter débordement */
.datepicker-grid.days button {
  font-size: 11px;
  padding: 2px;
  min-width: 28px;
}


form#mariageForm {
  margin-bottom: 0; /* supprime le vide interne du cadre */
}

.datepicker-grid.days button {
  font-size: 10px;  /* réduit pour que tous les numéros tiennent */
  padding: 2px;
  min-width: 24px;
}
