:root {
  --vert: #1f4d3a;
  --vert-clair: #e6efe9;
  --rouge: #b8322a;
  --creme: #fbf7f0;
  --encre: #2a2723;
  --gris: #6f685f;
  --ligne: #e8e1d5;
  --or: #c9a14a;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font: 15px/1.45 Inter, system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* ── En-tête ── */
.hero {
  background: var(--vert);
  color: #fff;
  padding: 32px 20px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "✦ · ✧ · ✦ · ✧ · ✦ · ✧ · ✦ · ✧ · ✦ · ✧ · ✦";
  position: absolute; top: 10px; left: 0; right: 0;
  color: var(--or); opacity: .5; font-size: 11px; letter-spacing: 4px; white-space: nowrap;
}
.annee { font-weight: 600; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--or); }
.hero h1 { font: 700 26px/1.15 Fraunces, Georgia, serif; margin: 6px 0; }
.hero p { margin: 0; opacity: .85; font-size: 14px; }
[hidden] { display: none !important; }

/* ── Onglets ── */
.tabs {
  position: sticky; top: 0; z-index: 2;
  display: flex; gap: 6px; justify-content: center;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--creme) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ligne);
}
.tab {
  border: 1px solid var(--ligne); background: #fff; color: var(--encre);
  border-radius: 999px; padding: 7px 14px; font: 500 13px Inter, sans-serif;
  text-decoration: none; white-space: nowrap;
}
.tab.on { background: var(--vert); color: #fff; border-color: var(--vert); }
.tab small { opacity: .7; margin-left: 4px; }

/* ── Sections enfants ── */
main { max-width: 1080px; margin: 0 auto; }
.chargement { text-align: center; color: var(--gris); padding: 40px 16px; }
.enfant { padding: 18px 16px 6px; scroll-margin-top: 56px; }
.enfant-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.enfant h2 { font: 700 20px Fraunces, Georgia, serif; margin: 0; }
.enfant h2 em { font-style: normal; color: var(--rouge); }
.compteur { font-size: 12px; color: var(--gris); white-space: nowrap; }

.grille { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ── Cartes ── */
.carte {
  background: #fff; border: 1px solid var(--ligne); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: row;
}
.visuel {
  flex: 0 0 92px; display: grid; place-items: center;
  font-size: 38px; background: var(--vert-clair);
}
.visuel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.corps { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.corps h3 { font: 600 15px/1.3 Inter, sans-serif; margin: 0; overflow-wrap: anywhere; }
.note { font-size: 12px; color: var(--gris); margin: 0; }
.meta { font-size: 12px; color: var(--gris); display: flex; gap: 4px 10px; flex-wrap: wrap; }
.meta a { color: var(--vert); text-decoration: underline; text-underline-offset: 2px; }
.prio { color: var(--rouge); font-weight: 600; }
.actions { margin-top: auto; padding-top: 6px; }

.btn {
  appearance: none; border: 0; border-radius: 10px;
  background: var(--rouge); color: #fff;
  font: 600 14px Inter, sans-serif; padding: 10px 12px; min-height: 40px;
  cursor: pointer; width: 100%;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.neutre { background: #fff; color: var(--encre); border: 1px solid var(--ligne); }

.pris {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--vert-clair); color: var(--vert);
  border-radius: 10px; padding: 8px 10px; min-height: 40px;
  font: 600 13px Inter, sans-serif;
}
.pris span { overflow-wrap: anywhere; }
.pris button {
  all: unset; cursor: pointer; flex: none;
  font: 500 12px Inter, sans-serif; color: var(--gris); text-decoration: underline;
  padding: 4px 0;
}
.carte.est-pris .visuel { filter: grayscale(.7); opacity: .6; }
.carte.est-pris h3 { color: var(--gris); }

.pied { text-align: center; color: var(--gris); font-size: 12px; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }

/* ── Fenêtre de réservation ── */
.voile {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(20, 30, 25, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.voile[hidden] { display: none; }
.fenetre {
  background: #fff; width: 100%;
  border-radius: 20px 20px 0 0;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .15);
}
.fenetre .petit { font-size: 12px; color: var(--gris); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.fenetre h2 { font: 700 19px/1.25 Fraunces, Georgia, serif; margin: 4px 0 14px; }
.fenetre label { font: 600 13px Inter, sans-serif; display: block; margin-bottom: 6px; }
.fenetre input {
  width: 100%; border: 1px solid var(--ligne); border-radius: 10px;
  padding: 11px 12px; font: 16px Inter, sans-serif; /* 16px : évite le zoom iOS */
  background: var(--creme); color: var(--encre);
}
.fenetre input:focus { outline: 2px solid var(--vert); outline-offset: 1px; }
.fenetre .aide { font-size: 12px; color: var(--gris); margin: 6px 0 14px; }
.fenetre .erreur { font-size: 13px; color: var(--rouge); margin: -6px 0 12px; font-weight: 500; }
.duo { display: flex; gap: 8px; }
.duo .btn { flex: 1; }

/* ── Notification ── */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 20; max-width: calc(100% - 32px);
  background: var(--encre); color: #fff; padding: 10px 16px; border-radius: 12px;
  font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}

/* ── Tablette ── */
@media (min-width: 600px) {
  .hero { padding: 44px 24px 32px; }
  .hero h1 { font-size: 34px; }
  .enfant { padding: 24px 22px 6px; }
  .grille { grid-template-columns: repeat(2, 1fr); }
  .voile { align-items: center; padding: 16px; }
  .fenetre { max-width: 420px; border-radius: 18px; padding-bottom: 22px; }
}

/* ── Ordinateur ── */
@media (min-width: 900px) {
  .hero h1 { font-size: 40px; }
  .grille { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .carte { flex-direction: column; }
  .visuel { flex: 0 0 auto; height: 130px; font-size: 52px; }
  .corps { padding: 12px 14px 14px; }
}
