/* ============================================================
   🎨 STYLES OFFICIELS — simulateur_tarif.css
   ============================================================
   Auteur : Olivier / Intuici & Au Jardin des Clefs
   Dernière révision : 24/10/2025
   Description :
     - Structure & conteneurs
     - Textes & boutons
     - Messages & états
     - Calendrier Flatpickr
     - Responsive
   ============================================================ */

/* ========== 1. STRUCTURE GLOBALE ========== */

<style>

/* =========================================================
 🧱 STRUCTURE GLOBALE DU DOCUMENT
========================================================= */
html, body {
  background: transparent !important;
  margin: 0;
  padding: 0;
  overflow-y: hidden !important;
  overflow-x: hidden;
}

.outer-wrapper {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.form-container {
  background: linear-gradient(to bottom, #BFB74BD1, #A79A2899);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 25px;
  padding: 35px;
  max-width: 600px;
  width: 100%;
  color: white;
  box-shadow: 0 4px 25px rgba(0,0,0,0.25);
}

/* =========================================================
 🎨 TITRES & TEXTES
========================================================= */
h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 36px;
  text-align: center;
  margin-bottom: 30px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
  color: white;
  font-weight: 500;
}

/* =========================================================
 ✏️ FORMULAIRES (Champs, boutons, placeholders)
========================================================= */
input, select {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.5);
  font-family: 'Scheherazade New', serif;
  font-size: 16px;
  color: white;
}

input::placeholder { color: rgba(255,255,255,0.8); }

/* -------------------
 🔘 Boutons
------------------- */
button {
  width: 100%;
  background-color: #e44765;
  color: white;
  font-weight: bold;
  padding: 12px;
  border: 1px solid white;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
button:hover { background-color: #c63e55; }

#stripe-button {
  background-color: #28a745;
  display: none;
  margin: 20px 0 30px;
}

/* =========================================================
 📅 FLATPICKR - STYLES DU CALENDRIER
========================================================= */

/* --- Jours désactivés, aujourd’hui, sélectionnés --- */
.flatpickr-day.disabled,
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  background-color: #BEC783 !important;
  color: white !important;
  border-radius: 8px !important;
  opacity: 1 !important;
  pointer-events: none !important;
}
.flatpickr-day.today { border: 2px solid #fff !important; }
.flatpickr-day.selected {
  background: transparent !important;
  border: 2px solid rgba(0, 102, 255, 0.5) !important;
  color: #000 !important;
}

/* ✅ Flatpickr : apparence par défaut sur desktop */
.flatpickr-calendar {
  border-radius: 15px;
  font-family: 'Scheherazade New', serif !important;
  box-sizing: border-box !important;
  z-index: 9999 !important;
}

/* 📱 Flatpickr : centrage et largeur étendue uniquement sur mobile */
@media (max-width: 768px) {
  .flatpickr-calendar {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 95vw !important;
    max-width: 420px !important;
    right: auto !important;
    font-size: 16px !important;
  }
}


/* --- Bandeau supérieur (mois + année) --- */
.flatpickr-annee {
  font-weight: 500;
  color: #555 !important;
  margin-left: 6px;
  display: inline-block;
  vertical-align: baseline;
  font-size: 17px !important;
}

.flatpickr-months {
  background: #fff !important;
  border-bottom: 1px solid #ccc !important;
  border-radius: 10px 10px 0 0 !important;
  padding: 0 !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Scheherazade New', serif !important;
  color: #000 !important;
}

.flatpickr-current-month {
  line-height: 1 !important;
  margin-top: -2px !important;
  font-size: 17px !important;
  font-weight: bold !important;
  color: #000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  text-transform: capitalize;
}

/* --- Flèches navigation calendrier --- */
.flatpickr-prev-month, .flatpickr-next-month {
  color: #000 !important;
  fill: #000 !important;
  position: absolute;
  top: 10px !important;
  font-size: 18px !important;
  cursor: pointer;
}
.flatpickr-prev-month:hover, .flatpickr-next-month:hover {
  color: #e44765 !important;
  fill: #e44765 !important;
}

/* --- Correction visuelle du mois --- */
.flatpickr-current-month .numInputWrapper {
  display: none !important;
}
.flatpickr-current-month {
  justify-content: center !important;
  text-align: center !important;
}
.flatpickr-months {
  height: auto !important;
  padding: 6px 0 !important;
}

/* =========================================================
 🟩 LÉGENDE (Libre / Réservé)
========================================================= */
.legend {
  font-size: 15px;
  margin-top: 5px;
  color: white;
}
.legend span {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  margin-right: 5px;
}
.reserved { background: #BEC783; border: 1px solid #999; }
.available { background: white; border: 1px solid #ccc; }

/* =========================================================
 💬 MESSAGES (prix, erreurs, réservations)
========================================================= */
#availability-msg,
#price-msg,
.msg-erreur {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
  font-style: italic;
  font-size: 16px;
  font-weight: 400;
  padding: 15px 20px;
  border-radius: 10px;
  margin: 20px auto 0 auto;
  text-align: center;
  line-height: 1.4;
  max-width: 90%;
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.25);
  transition: all 0.3s;
}

/* style emoji et span premier caractère */
#availability-msg::first-letter,
#price-msg::first-letter,
.msg-erreur::first-letter {
  font-style: normal !important;
}
#availability-msg span:first-child,
#price-msg span:first-child,
.msg-erreur span:first-child {
  font-style: normal !important;
}
.msg-erreur span { font-size: 22px; display:inline-block; margin-bottom:8px; }
.msg-reservation { line-height: 1.3; }

/* Cache les blocs vides */
#availability-msg, #price-msg { display: none; }
#availability-msg:empty, #price-msg:empty {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* =========================================================
 🌿 ANIMATIONS & APPARITIONS
========================================================= */
.modal-box, .form-container {
  opacity: 0;
  transform: translateY(25px);
  animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(25px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* =========================================================
 📱 RESPONSIVE GÉNÉRAL
========================================================= */
@media (max-width: 768px) {
  .form-container {
    padding: 25px 20px;
    border-radius: 20px;
  }
  h1 { font-size: 28px; }
}

/* =========================================================
 🧩 NORMALISATION DES CHAMPS FORMULAIRES
========================================================= */
.form-container, .form-container * { box-sizing: border-box; }

input, select, textarea {
  -webkit-appearance: none;
  appearance: none;
  background-color: rgba(255,255,255,0.25) !important;
  border: 1px solid rgba(255,255,255,0.65) !important;
  color: #fff !important;
  box-shadow: none !important;
  outline: 0;
  backdrop-filter: blur(2px);
}

input:focus, select:focus, textarea:focus {
  background-color: rgba(255,255,255,0.22) !important;
  border-color: #fff !important;
}

/* placeholders et auto-fill */
::placeholder { color: rgba(255,255,255,0.85); opacity: 1; }
input:-webkit-autofill, select:-webkit-autofill, textarea:-webkit-autofill {
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,0.14) inset !important;
  caret-color: #fff;
}

/* suppression flèches input[type=number] */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

/* Select - petite flèche blanche personnalisée */
select {
  background-image:
    linear-gradient(45deg, transparent 50%, #fff 50%),
    linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 2px),
    calc(100% - 13px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

label, .legend { 
  color: #fff !important; 
}  
</style>