/* Calendrier de réservation maison (version d'essai, 18/10/2026) — jetons de site/assets/css/main.css. */
.cal-page { padding-top: 46px; padding-bottom: 70px; }
.cal-intro { max-width: 760px; margin: 0 auto 22px; text-align: center; }
.cal-essai { max-width: 760px; margin: 0 auto 28px; }

.cal-encart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
}
@media (max-width: 899px) { .cal-encart { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

.cal-carte, .cal-panneau {
  background: #fff;
  border: 1px solid var(--pale);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(25, 36, 40, .06), 0 8px 28px rgba(25, 36, 40, .07);
}
.cal-carte { padding: 22px 22px 16px; min-width: 0; }
.cal-panneau { padding: 22px; position: sticky; top: 96px; }
@media (max-width: 899px) { .cal-panneau { position: static; } .cal-carte { padding: 16px 12px 12px; } }

/* ---------- tête : navigation entre les mois ---------- */
.cal-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.cal-tete h2 { margin: 0; font-size: 26px; line-height: 1.2; }
.cal-nav { display: flex; gap: 8px; }
.cal-nav button {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--pale); background: #fff; color: var(--primary);
  font-size: 20px; line-height: 1; cursor: pointer;
  transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out);
}
.cal-nav button:hover:not(:disabled) { background: var(--bg-section); border-color: var(--pale-hover); }
.cal-nav button:disabled { opacity: .35; cursor: default; }

.cal-mois-zone { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.cal-mois-nom {
  font-family: var(--title-font); font-size: 21px; font-weight: 600; text-transform: capitalize;
  text-align: center; margin: 6px 0 10px; color: var(--primary);
}
.cal-grille { display: grid; gap: 3px; }
.cal-ligne { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-jours-semaine span {
  text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .5px;
  color: var(--primary-light); padding: 4px 0;
}

/* ---------- une case ---------- */
.cal-jour {
  width: 100%; aspect-ratio: 1 / 1.02; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--text);
  font: inherit; cursor: pointer; padding: 2px 0;
  transition: background-color .12s var(--ease-out), color .12s var(--ease-out), border-color .12s var(--ease-out);
}
.cal-num { font-size: 15px; font-weight: 600; line-height: 1.1; }
.cal-p { font-size: 10.5px; line-height: 1.1; color: var(--primary-light); font-variant-numeric: tabular-nums; min-height: 1.1em; }
.cal-jour.est-ouverte { background: var(--bg-soft); border-color: #dbe5e8; }
.cal-jour.est-ouverte:hover { background: var(--bg-card); border-color: var(--pale-hover); }
.cal-jour.est-aujourdhui .cal-num { text-decoration: underline; text-underline-offset: 3px; }
.cal-jour.est-fermee, .cal-jour.est-passe { cursor: default; color: #9aa6aa; }
.cal-jour.est-fermee .cal-num { text-decoration: line-through; text-decoration-color: #b9c3c6; }
.cal-jour.est-passe { opacity: .55; }

/* Arrivée choisie : seuls les départs possibles restent mis en avant. */
.cal-jour.est-hors-sejour { background: transparent; border-color: #e6ecee; }
.cal-jour.est-hors-sejour .cal-p { opacity: .55; }
.cal-jour.est-depart-possible { background: #fff; border-color: var(--accent-soft); }
.cal-jour.est-depart-possible:hover { background: #f8ece6; border-color: var(--accent); }

.cal-jour.est-plage { background: #d3e1e6; border-color: #d3e1e6; border-radius: 4px; }
.cal-jour.est-plage .cal-p { color: var(--primary); }
.cal-jour.est-arrivee, .cal-jour.est-depart {
  background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fbfcfc);
}
.cal-jour.est-arrivee .cal-p, .cal-jour.est-depart .cal-p { color: var(--pale); }
.cal-jour.est-apercu { background: var(--primary-light); border-color: var(--primary-light); color: #fff; }
.cal-jour.est-apercu .cal-p { color: var(--pale); }
.cal-jour:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }

.cal-legende {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 2px 2px; padding: 0; list-style: none;
  font-size: 13px; color: var(--primary-light);
}
.cal-legende li { display: flex; align-items: center; gap: 7px; }
.cal-legende i { display: inline-block; width: 16px; height: 16px; border-radius: 5px; border: 1px solid #dbe5e8; }
.cal-legende .l-ouverte { background: var(--bg-soft); }
.cal-legende .l-choisie { background: var(--primary); border-color: var(--primary); }
.cal-legende .l-fermee { background: #fff; position: relative; overflow: hidden; }
.cal-legende .l-fermee::after { content: ''; position: absolute; left: -2px; right: -2px; top: 7px; height: 1px; background: #9aa6aa; transform: rotate(-35deg); }

/* ---------- panneau du séjour ---------- */
.cal-panneau h2 { font-size: 24px; margin: 0 0 14px; }
.cal-dates { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--pale); border-radius: 10px; overflow: hidden; }
.cal-dates div { padding: 10px 12px; }
.cal-dates div + div { border-left: 1px solid var(--pale); }
.cal-dates dt { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--primary-light); }
.cal-dates dd { margin: 3px 0 0; font-weight: 600; color: var(--primary); }
.cal-dates dd::first-letter { text-transform: uppercase; }
.cal-effacer {
  margin: 8px 0 0; padding: 4px 0; border: 0; background: none; color: var(--primary-light);
  font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer;
}
.cal-effacer:hover { color: var(--accent); }

.cal-voyageurs { margin: 18px 0 4px; display: grid; gap: 10px; }
.cal-compteur { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-compteur span { font-weight: 600; color: var(--primary); }
.cal-compteur small { display: block; font-weight: 400; font-size: 12px; color: var(--primary-light); }
.cal-pas { display: flex; align-items: center; gap: 10px; }
.cal-pas button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--pale); background: #fff;
  color: var(--primary); font-size: 20px; line-height: 1; cursor: pointer;
}
.cal-pas button:hover:not(:disabled) { border-color: var(--primary); }
.cal-pas button:disabled { opacity: .3; cursor: default; }
.cal-pas output { min-width: 1.6em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-note-bebe { font-size: 12px; color: var(--primary-light); margin: 2px 0 0; }

.cal-prix { margin: 18px 0 16px; padding-top: 16px; border-top: 1px solid var(--pale); min-height: 64px; }
.cal-aide { margin: 0; color: var(--primary-light); font-size: 15px; }
.cal-erreur { margin: 0; color: #8a3a22; font-size: 15px; }
.cal-detail { margin: 0; display: grid; gap: 7px; }
.cal-detail div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.cal-detail dt { color: var(--text); }
.cal-detail dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cal-detail s { color: #8b979b; margin-right: 4px; }
.cal-remise dd, .cal-remise dt { color: #2f6b45; }
.cal-total { padding-top: 9px; margin-top: 3px; border-top: 1px solid var(--pale); font-weight: 700; color: var(--primary); }
.cal-total dd { font-size: 18px; }
.cal-conditions { margin: 14px 0 0; padding-left: 18px; font-size: 13px; color: var(--primary-light); display: grid; gap: 5px; }

.cal-reserver {
  width: 100%; min-height: 52px; border: 0; border-radius: 30px;
  background: var(--accent); color: #fff;
  font-family: var(--title-font); font-size: 17px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; transition: background-color .15s var(--ease-out);
}
.cal-reserver:hover:not(:disabled) { background: var(--accent-hover); }
.cal-reserver:disabled { background: #c9d1d3; color: #5d6a6f; cursor: default; }
.cal-reserver:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.cal-apres { font-size: 12.5px; color: var(--primary-light); margin: 10px 0 0; text-align: center; }

.cal-chargement { padding: 60px 10px; text-align: center; color: var(--primary-light); }
.cal-secours { padding: 8px 4px; }
.cal-secours p { margin: 0 0 14px; }
.est-en-secours .cal-panneau { display: none; }
.est-en-secours { grid-template-columns: minmax(0, 1fr); }
.cal-statut { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cal-autres { max-width: 1120px; margin: 34px auto 0; text-align: center; font-size: 14px; }
.cal-autres a { margin: 0 6px; }

@media (prefers-reduced-motion: reduce) { .cal-jour, .cal-nav button, .cal-reserver { transition: none; } }

/* ---------- choix du gîte : une page par gîte, le gîte courant marqué ---------- */
.cal-gites { max-width: 1120px; margin: 0 auto 22px; text-align: center; }
.cal-gites-titre { margin: 0 0 10px; font-family: var(--title-font); font-size: 20px; font-weight: 600; color: var(--primary); }
.cal-gites-liste { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cal-gite {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 48px; padding: 6px 16px; border: 1px solid var(--pale); border-radius: 26px;
  background: #fff; color: var(--primary); font-weight: 600; text-decoration: none; line-height: 1.2;
  transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out);
}
.cal-gite small { font-weight: 400; font-size: 12px; color: var(--primary-light); }
.cal-gite:hover { border-color: var(--primary); background: var(--bg-soft); }
.cal-gite[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.cal-gite[aria-current="page"] small { color: var(--pale); }
@media (max-width: 650px) {
  .cal-gites-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
