/* HOMËA — formulaires de contact et de rendez-vous.
   Les couleurs et polices viennent du thème (variables CSS) ; les valeurs
   de repli gardent un rendu correct avec un autre thème. */

.homea-rdv, .homea-form {
  --h-brun: var(--brun, #5B4231);
  --h-brun-fonce: var(--brun-fonce, #4A3426);
  --h-titre: var(--titre, #46301F);
  --h-texte: var(--texte, #4A4038);
  --h-taupe: var(--taupe, #958574);
  --h-filet: var(--filet, #D7CCC2);
  --h-ivoire: var(--ivoire, #F5EDE1);
  --h-fond: var(--fond-clair, #F4EBE3);
  --h-erreur: #9C4A32;
  --h-sans: var(--sans, 'Jost', 'Helvetica Neue', Arial, sans-serif);
  --h-serif: var(--serif, 'Newsreader', Georgia, serif);
  --h-fleche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' fill='none' stroke='%23000' stroke-width='1.2'%3E%3Cpath d='M0 5h14.5M10.5 1l4 4-4 4'/%3E%3C/svg%3E");
  color: var(--h-texte);
  font-family: var(--h-serif);
}
.homea-rdv *, .homea-form * { box-sizing: border-box; }
:where(.homea-rdv, .homea-form) p { margin: 0; }

/* ---------- Bloc rendez-vous ---------- */

.homea-rdv {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  border: 1px solid var(--h-filet);
  background: #F8F2EC;
}
.homea-rdv-choix { padding: 40px clamp(22px, 3vw, 44px) 44px; min-width: 0; }
.homea-rdv-form {
  padding: 40px clamp(22px, 3vw, 44px) 44px;
  background: var(--h-fond);
  border-left: 1px solid var(--h-filet);
}
.homea-etape + .homea-etape { margin-top: 36px; }
.homea-etape-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.homea-etiquette {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--h-sans);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--h-titre);
}
.homea-num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--h-titre);
  border-radius: 50%;
  font-size: 12px;
  letter-spacing: 0;
}
.homea-info { font-size: 17px; color: var(--h-taupe); padding-block: 10px; }
.homea-note {
  margin-top: 30px !important;
  padding-top: 18px;
  border-top: 1px solid var(--h-filet);
  font-size: 15px;
  line-height: 1.5;
  color: var(--h-taupe);
}

.homea-defile { display: flex; gap: 6px; }
.homea-fleche {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--h-filet);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color .2s ease;
}
.homea-fleche::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 9px;
  background: var(--h-titre);
  -webkit-mask: var(--h-fleche) center / contain no-repeat;
  mask: var(--h-fleche) center / contain no-repeat;
}
.homea-prec::after { transform: scaleX(-1); }
.homea-fleche:hover { border-color: var(--h-titre); }

.homea-jours {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 5 * 8px) / 6);
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.homea-jours::-webkit-scrollbar { display: none; }
.homea-jours > .homea-info { grid-column: 1 / -1; }
.homea-jour {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 4px 13px;
  border: 1px solid var(--h-filet);
  background: transparent;
  color: var(--h-titre);
  cursor: pointer;
  scroll-snap-align: start;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.homea-jour-nom, .homea-jour-mois {
  font-family: var(--h-sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--h-taupe);
}
.homea-jour-num { font-family: var(--h-serif); font-size: 30px; line-height: 1.1; }
.homea-jour:hover { border-color: var(--h-titre); }
.homea-jour.est-actif { background: var(--h-brun); border-color: var(--h-brun); color: var(--h-ivoire); }
.homea-jour.est-actif span { color: var(--h-ivoire); }

.homea-heures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.homea-heures > .homea-info { grid-column: 1 / -1; }
.homea-heure {
  padding: 12px 6px 11px;
  border: 1px solid var(--h-filet);
  background: transparent;
  color: var(--h-titre);
  font-family: var(--h-sans);
  font-size: 15px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.homea-heure:hover { border-color: var(--h-titre); }
.homea-heure.est-actif { background: var(--h-brun); border-color: var(--h-brun); color: var(--h-ivoire); }

.homea-recap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--h-filet);
  border-bottom: 1px solid var(--h-filet);
}
.homea-recap-titre {
  font-family: var(--h-sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--h-taupe);
}
.homea-recap-valeur { font-size: 22px; line-height: 1.3; color: var(--h-titre); }
.homea-recap-valeur::first-letter { text-transform: uppercase; }

/* ---------- Champs ---------- */

.homea-champs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 26px;
  margin-top: 24px;
}
.homea-champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.homea-champ-large { grid-column: 1 / -1; }
.homea-champ > span {
  font-family: var(--h-sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--h-taupe);
}
.homea-champ input, .homea-champ select, .homea-champ textarea {
  display: block;
  width: 100%;
  padding: 8px 0 10px;
  border: 0;
  border-bottom: 1px solid #C9BBAE;
  border-radius: 0;
  background: transparent;
  color: var(--h-titre);
  font-family: var(--h-serif);
  font-size: 18px;
  line-height: 1.4;
  outline: none;
  transition: border-color .2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.homea-champ select {
  padding-right: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%2346301F' stroke-width='1.2'%3E%3Cpath d='m1 1 4 4 4-4'/%3E%3C/svg%3E") right 4px center / 10px 6px no-repeat;
  cursor: pointer;
}
.homea-champ textarea { resize: vertical; min-height: 0; }
.homea-champ input:focus, .homea-champ select:focus, .homea-champ textarea:focus { border-bottom-color: var(--h-brun); }
.homea-champ.est-invalide input, .homea-champ.est-invalide textarea { border-bottom-color: var(--h-erreur); }
.homea-champ.est-invalide > span { color: var(--h-erreur); }

.homea-piege { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.homea-accord {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--h-texte);
  cursor: pointer;
}
.homea-accord input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  border: 1px solid #B9A897;
  border-radius: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  display: grid;
  place-content: center;
}
.homea-accord input::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--h-brun);
  transform: scale(0);
  transition: transform .15s ease;
}
.homea-accord input:checked::after { transform: scale(1); }
.homea-accord.est-invalide input { border-color: var(--h-erreur); }
.homea-accord.est-invalide span { color: var(--h-erreur); }

.homea-envoi { margin-top: 30px; }
.homea-bouton {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 19px 32px 18px;
  border: 1px solid var(--h-brun);
  background: var(--h-brun);
  color: var(--h-ivoire);
  font-family: var(--h-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .25s ease, opacity .2s ease;
}
.homea-bouton::after {
  content: '';
  width: 15px;
  height: 10px;
  background: currentColor;
  -webkit-mask: var(--h-fleche) center / contain no-repeat;
  mask: var(--h-fleche) center / contain no-repeat;
  transition: transform .25s ease;
}
.homea-bouton:hover { background: var(--h-brun-fonce); }
.homea-bouton:hover::after { transform: translateX(4px); }
.homea-bouton:disabled { opacity: .6; cursor: progress; }

.homea-retour { margin-top: 16px; font-size: 16px; line-height: 1.5; min-height: 1px; }
.homea-retour.est-erreur { color: var(--h-erreur); }
.homea-retour.est-ok { color: var(--h-titre); }

/* ---------- Confirmation ---------- */

.homea-confirmation {
  grid-column: 1 / -1;
  padding: 56px clamp(22px, 5vw, 72px) 60px;
  text-align: left;
}
.homea-confirmation[hidden] { display: none; }
.homea-confirmation-titre {
  margin-top: 18px !important;
  font-family: var(--h-serif);
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.1;
  color: var(--h-titre);
}
.homea-confirmation-texte { margin-top: 16px !important; font-size: 19px; line-height: 1.6; max-width: 36em; }
.homea-rdv.est-confirme .homea-rdv-choix,
.homea-rdv.est-confirme .homea-rdv-form { display: none; }

/* ---------- Adaptatif ---------- */

@media (max-width: 960px) {
  .homea-rdv { grid-template-columns: 1fr; }
  .homea-rdv-form { border-left: 0; border-top: 1px solid var(--h-filet); }
  .homea-jours { grid-auto-columns: calc((100% - 4 * 8px) / 5); }
}
@media (max-width: 560px) {
  .homea-champs { grid-template-columns: 1fr; }
  .homea-jours { grid-auto-columns: calc((100% - 3 * 8px) / 4); }
  .homea-heures { grid-template-columns: repeat(3, 1fr); }
  .homea-bouton { padding: 17px 22px 16px; font-size: 13px; letter-spacing: .12em; }
}
