/* =====================================================================
   COMMANDE — calendrier, créneaux, adresse, récap livraison
   Fichier séparé : ne touche pas à style.css. Mêmes couleurs que le site :
   marine #1b394b · doré #c8a96a · fond #f8f7f4 · bordures #eee
   ===================================================================== */

.hidden { display: none !important; }

/* Titres de blocs du formulaire */
.titre-bloc {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1b394b;
  margin-top: 0.8rem;
}

/* Prénom / nom côte à côte */
.ligne-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.ligne-2 input { min-width: 0; }
@media (max-width: 480px) {
  .ligne-2 { grid-template-columns: 1fr; }
}

/* Champ piège anti-robots (invisible pour les humains) */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------- Calendrier ---------- */
.calendrier {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 0.8rem;
  max-width: 360px;
  width: 100%;
}
.cal-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.cal-mois {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: capitalize;
}
.cal-nav {
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  line-height: 1;
  color: #1b394b;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.cal-nav:hover:not(:disabled) { border-color: #c8a96a; background: #faf6ec; }
.cal-nav:disabled { opacity: 0.3; cursor: default; }

.cal-grille {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-jour-nom {
  text-align: center;
  font-size: 0.72rem;
  color: #888;
  padding: 2px 0 4px;
}
.cal-vide { min-height: 38px; }
.cal-jour {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  color: #c4c4c4;
  cursor: default;
}
.cal-jour:not(:disabled) {
  color: #1b394b;
  font-weight: 600;
  background: #faf6ec;
  border-color: #eadcb8;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}
.cal-jour:not(:disabled):hover { border-color: #c8a96a; transform: translateY(-1px); }
.cal-jour.choisi,
.cal-jour.choisi:hover {
  background: #c8a96a;
  border-color: #b48f54;
  color: #fff;
}
.cal-jour:focus-visible, .cal-nav:focus-visible { outline: 2px solid #1b394b; outline-offset: 2px; }

.date-choisie { margin-top: -0.2rem; }
.date-choisie.ok { color: #1b394b; font-weight: 600; }

/* ---------- Créneaux ---------- */
.creneaux {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  max-width: 360px;
}
.creneau {
  position: relative;
  display: block;
  cursor: pointer;
}
.creneau input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.creneau span {
  display: block;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
  color: #1b394b;
  transition: border-color .2s, background .2s, color .2s;
}
.creneau:hover span { border-color: #c8a96a; }
.creneau input:checked + span { background: #c8a96a; border-color: #b48f54; color: #fff; }
.creneau input:focus-visible + span { outline: 2px solid #1b394b; outline-offset: 2px; }

/* ---------- Adresse ---------- */
.champ-adresse { position: relative; }
.champ-adresse input { width: 100%; }
.suggestions { max-width: none; }
.suggestions:empty { display: none; }

.lien-discret {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  margin-top: -0.4rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: #6b6b6b;
  text-decoration: underline;
  cursor: pointer;
}
.lien-discret:hover { color: #1b394b; }
.adresse-manuelle {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.8rem;
}
.adresse-manuelle input { min-width: 0; }

input.invalide, textarea.invalide { border-color: #b22222; }

/* ---------- Prix de la livraison ---------- */
.livraison-recap {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
}
.livraison-recap a {
  color: #c8a96a;
  font-weight: 600;
  text-decoration: underline;
}
.recap-ligne {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0;
}
.recap-ligne.total {
  border-top: 1px solid #eee;
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
}
.recap-offerte { color: #228b22; font-weight: 600; }
.recap-manque {
  margin-top: 0.6rem;
  padding: 0.55rem 0.8rem;
  background: #faf6ec;
  border: 1px solid #eadcb8;
  border-radius: 8px;
  color: #1b394b;
}
.recap-alerte {
  color: #b22222;
  font-weight: 500;
}
.recap-neutre { color: #555; }

/* ---------- Pop-up de chargement / confirmation ---------- */
.loading-box { max-width: 340px; }
.loading-detail {
  font-size: 0.88rem;
  color: #555;
}
.loading-box .btn-livraison { margin-top: 1rem; }
.loading-box .check {
  font-size: 2rem;
  line-height: 1;
  color: #228b22;
}

#btn-commander:disabled { opacity: 0.6; cursor: default; }
