/* Demande de prix : erreurs de champ, devis, refus. Toutes les valeurs viennent de jetons.css.
   Le formulaire lui-même est dans accueil.css. */

/* Erreur de champ : une phrase sous la cellule, couleur du texte, précédée de « Erreur : » dans le texte lui-même */
.erreur {
  margin-top: var(--e1);
  font-size: var(--t-13);
  line-height: 1.4;
  color: var(--texte);
}
.erreur[hidden] { display: none; }

/* Sur téléphone, la barre du bas disparaît tant que le formulaire est à l'écran (un seul « Voir le prix » par écran) */
.barre.cachee { display: none; }

/* Le bouton garde sa largeur pendant le calcul (le plus long des deux libellés, en français et en anglais) : la rangée ne bouge pas */
/* Entre 1101 et 1365 px la rangée de cinq cellules est trop étroite pour une date écrite en entier : on garde la disposition 2 × 2 de l'accueil */
@media (min-width: 1101px) and (max-width: 1365px) {
  form.demande { grid-template-columns: 1fr 1fr; }
  form.demande .champ:nth-child(2n) { border-right: 0; }
  form.demande .champ:nth-child(-n + 2) { border-bottom: 1px solid var(--filet); }
  form.demande .champ:nth-child(3) { border-right: 1px solid var(--filet); }
  form.demande .bouton { grid-column: 1 / -1; }
}

@media (min-width: 1366px) {
  /* Les cellules de date tiennent « ven. 12 mars 2027 » sur une ligne ; le bouton garde sa hauteur de repos quand une erreur allonge la rangée */
  form.demande { grid-template-columns: 1.7fr 1.7fr .8fr .8fr auto; }
  .demande .bouton { align-self: start; padding: 0 var(--e3); min-width: calc(var(--e6) * 3); }
}

/* Le prix : comme un devis, sur l'enduit, sans fond ni cadre */
#prix { margin-top: var(--e4); scroll-margin-top: var(--e4); }
/* La marge du bas ne sert que sous la barre du téléphone */
@media (max-width: 760px) { #prix { scroll-margin-bottom: var(--e7); } }
#prix[hidden] { display: none; }
.devis-sejour { font-size: var(--t-15); font-weight: 600; line-height: 1.4; }
.devis {
  width: 100%;
  margin-top: var(--e2);
  border-collapse: collapse;
  font-size: var(--t-15);
  font-variant-numeric: tabular-nums;
}
.devis th, .devis td { padding: var(--e2) 0; border-top: 1px solid var(--filet); vertical-align: baseline; }
.devis th { font-weight: 400; text-align: left; padding-right: var(--e3); }
.devis td { text-align: right; white-space: nowrap; }
.devis-suite { margin-top: var(--e4); margin-bottom: var(--e4); }
.devis-suite .bouton { width: 100%; min-height: calc(var(--e6) - var(--e2)); }
@media (min-width: 761px) { .devis-suite .bouton { width: auto; } }
.devis tbody tr:first-child th, .devis tbody tr:first-child td { border-top-color: var(--texte); }

/* Le total : filet couleur du texte, puis le montant en police de titre */
.devis .total th, .devis .total td {
  padding-top: var(--e3);
  border-top: 1px solid var(--texte);
  font-family: var(--police-titre);
  font-variation-settings: var(--titre-variations);
  font-size: var(--t-28);
  font-weight: 400;
  line-height: 1.2;
}

/* Un refus : une phrase, puis un lien souligné qui ramène aux dates. Ni rouge ni icône. */
.refus { font-size: var(--t-17); line-height: 1.5; }
.autres-dates {
  display: inline-block;
  min-height: var(--cible-tactile);
  margin-top: var(--e1);
  padding: 0;
  background: none;
  border: 0;
  color: var(--texte);
  font: 400 var(--t-15) / 1.6 var(--police-texte);
  text-decoration: underline;
  text-underline-offset: var(--e1);
  cursor: pointer;
}

/* Le champ de date, avec script : la cellule montre sa valeur, le champ natif reste la source */
.champ input.masque { display: none; }
.date-valeur {
  display: block;
  width: 100%;
  min-height: var(--e4);
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--texte);
  font: 500 var(--t-15) / 1.6 var(--police-texte);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.date-valeur.vide { font-weight: 400; color: var(--texte-secondaire); }
.date-valeur:focus { outline: 0; }

/* Texte lu par les lecteurs d'écran seulement */
.masque-visuel { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Le calendrier : dans la page, sous le formulaire et à sa largeur, sans ombre ni fenêtre */
.calendrier {
  margin-top: var(--e2);
  padding: var(--e4);
  background: var(--surface);
  border-radius: var(--rayon);
}
.calendrier[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .calendrier { animation: calendrier-apparition var(--apparition) both; }
}
@keyframes calendrier-apparition { from { opacity: 0; } }

.mois-rangee { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e5); }
.mois-tete { display: grid; grid-template-columns: var(--cible-tactile) 1fr var(--cible-tactile); align-items: center; }
.mois-titre {
  text-align: center;
  font-family: var(--police-titre);
  font-variation-settings: var(--titre-variations);
  font-size: var(--t-20);
  font-weight: 400;
  line-height: 1.2;
}
.fleche {
  width: var(--cible-tactile);
  height: var(--cible-tactile);
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--rayon);
  color: var(--texte);
  font: 400 var(--t-28) / 1 var(--police-texte);
  cursor: pointer;
}
.fleche:disabled { color: var(--texte-secondaire); cursor: default; opacity: .45; }
.fleche:hover:not(:disabled) { outline: 1px solid var(--texte); }
.fleche:focus-visible { outline: 2px solid var(--texte); outline-offset: 3px; }

.jours { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: var(--e2); }
.nom-jour {
  padding: var(--e1) 0;
  text-align: center;
  font-size: var(--t-13);
  color: var(--texte-secondaire);
}
.jour {
  height: var(--cible-tactile);
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--rayon);
  color: var(--texte);
  font: 400 var(--t-15) / 1 var(--police-texte);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.jour-libre:hover { outline: 1px solid var(--texte); }
.jour:focus-visible { outline: 2px solid var(--texte); outline-offset: 3px; }
/* Une nuit prise : barrée et en texte secondaire, jamais par la couleur seule */
.jour-pris { color: var(--texte-secondaire); text-decoration: line-through; cursor: not-allowed; }
.jour-passe, .jour-hors { color: var(--texte-secondaire); cursor: default; }
.jour-entre { background: var(--fond-secondaire); border-radius: 0; }
.jour-arrivee, .jour-depart { background: var(--accent); color: var(--texte-sur-accent); font-weight: 600; }
.jour-arrivee:hover, .jour-depart:hover { outline: 0; }
.jour-arrivee:focus-visible, .jour-depart:focus-visible { outline: 2px solid var(--texte-sur-accent); outline-offset: -3px; }

.legende { margin-top: var(--e3); font-size: var(--t-13); line-height: 1.4; color: var(--texte-secondaire); }
.calendrier .actions { display: flex; justify-content: flex-end; gap: var(--e4); margin-top: var(--e2); }
.calendrier .lien {
  min-height: var(--cible-tactile);
  padding: 0;
  background: none;
  border: 0;
  color: var(--texte);
  font: 400 var(--t-15) / 1.6 var(--police-texte);
  text-decoration: underline;
  text-underline-offset: var(--e1);
  cursor: pointer;
}
.calendrier .lien:focus-visible { outline: 2px solid var(--texte); outline-offset: 3px; }

/* Téléphone : un seul mois, les flèches de part et d'autre de son nom */
@media (max-width: 760px) {
  .calendrier { padding: var(--e3); }
  .mois-rangee { grid-template-columns: 1fr; }
}
