/* Charlotte Bard — « Demander une date » : carnet en 3 étapes, calendrier, carton de confirmation.
   Toutes les règles sont limitées à #date, .carnet, .resa-*, .cal-*, .carton* et body.page-merci.
   La mise en page « étapes » dépend seulement de .carnet[data-mode="etapes"], posé par reservation.js :
   sans ce script, le formulaire complet reste lisible sur une page.
   Les mouvements sont écrits sous .anim ET prefers-reduced-motion: no-preference ;
   seuls transform, opacity et clip-path sont animés.
   Couleurs (15/10/2026) : les codes de la carte de visite (jetons de styles.css). La section est sur le papier
   de la carte avec deux taches d'aquarelle discrètes, le carnet est une carte blanche ; champs blancs à bord
   gris chaud, une seule couleur d'action (--action, le rose-rouge du nom), focus au gris de BARD. */

/* Un élément [hidden] reste caché, même si une règle lui donne un display */
#date [hidden],
.carnet [hidden],
.carton[hidden],
body.page-merci [hidden] { display: none !important; }

/* ---------- Section ---------- */
/* Papier de la carte, deux taches d'aquarelle discrètes, toujours derrière le carnet ou dans les marges :
   coin bas droit (contre le filet du pied de page) et, à partir de 900 px, coin haut droit (contre le rose
   poudré des Questions). Jamais sous le texte d'introduction, collant sur grand écran : contrôlé au pixel. */
#date {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--papier, #FFFCF8);
}
#date::before,
#date::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
#date::after {
  right: 0;
  bottom: 0;
  width: clamp(220px, 32vw, 460px);
  aspect-ratio: 720 / 560;
  background: url("../img/aquarelle-1.webp") center / contain no-repeat;
  rotate: 180deg; /* la tache 1, retournée : chargée dans le coin bas droit */
  opacity: .7;
}
@media (min-width: 900px) {
  #date::before {
    top: 0;
    right: 0;
    width: clamp(220px, 22vw, 340px);
    aspect-ratio: 680 / 520;
    background: url("../img/aquarelle-2.webp") top right / contain no-repeat;
    opacity: .6;
  }
}
#date .resa { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) {
  #date .resa { grid-template-columns: .8fr 1.2fr; gap: 56px; }
  #date .resa-intro { position: sticky; top: 96px; }
}
#date .resa-intro h2 { margin-bottom: 16px; font-size: clamp(2rem, 3.8vw, 3rem); }
#date .resa-intro > p:not(.surtitre) { max-width: 30em; margin: 0 0 28px; font-size: 1.1rem; color: var(--doux, #6A5D58); }

#date .contact-direct { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
#date .contact-direct a {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  max-width: 100%;
  color: var(--encre, #3A302D);
  text-decoration: none;
}
#date .contact-direct a:hover .resa-contact-valeur { text-decoration: underline; text-underline-offset: 3px; }
#date .contact-direct a:focus-visible { outline: 3px solid var(--focus, #473C38); outline-offset: 3px; border-radius: 12px; }
.resa-contact-icone {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(181, 103, 91, .4);
  color: var(--action, #A35549);
}
.resa-contact-texte { display: grid; min-width: 0; line-height: 1.3; }
.resa-contact-type { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rose-fonce, #93574F); }
.resa-contact-valeur { font-size: 1.02rem; overflow-wrap: anywhere; }

/* ---------- Carnet ---------- */
.carnet {
  position: relative;
  min-width: 0;
  padding: 32px;
  border: 1px solid var(--ligne, #EDD9D0);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 26px 56px -30px rgba(71, 60, 56, .35);
  color: var(--encre, #3A302D);
  scroll-margin-top: 16px;
}
@media (max-width: 560px) { .carnet { padding: 24px 16px; } }

/* Progression (mode étapes seulement : la liste est [hidden] dans le HTML) */
.resa-progression {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.resa-progression-etat { order: -1; grid-column: 1 / -1; display: grid; gap: 10px; }
.resa-progression-texte { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rose-fonce, #93574F); }
.resa-progression-piste { position: relative; display: block; height: 3px; overflow: hidden; border-radius: 3px; background: var(--poudre, #FAEDE7); }
.resa-progression-barre {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--corail, #EB8F7A), var(--action, #A35549));
  transform: scaleX(.3333);
  transform-origin: left center;
}
.resa-progression-pas { display: flex; align-items: flex-start; gap: 8px; min-width: 0; font-size: .82rem; line-height: 1.3; color: var(--doux, #6A5D58); }
.resa-progression-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: -2px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--bord-champ, #877771);
  font-size: .72rem;
  font-weight: 700;
  font-variant-numeric: lining-nums;
}
.resa-progression-pas[aria-current="step"] { color: var(--encre, #3A302D); font-weight: 700; }
.resa-progression-pas[aria-current="step"] .resa-progression-num { background: var(--action, #A35549); box-shadow: none; color: #fff; }
.resa-progression-pas.resa-fait .resa-progression-num { box-shadow: inset 0 0 0 1.5px var(--action, #A35549); color: var(--action, #A35549); }
@media (max-width: 560px) {
  .resa-progression-pas { flex-direction: column; gap: 6px; font-size: .8rem; }
  .resa-progression-num { margin-top: 0; }
}

/* ---------- Formulaire ---------- */
.resa-form { display: block; margin: 0; }
.resa-piege { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.resa-etape { display: grid; gap: 20px; min-width: 0; margin: 0; padding: 0; border: 0; }
/* Sans JS : les trois étapes se suivent, séparées par un filet */
.resa-etape + .resa-etape { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--ligne, #EDD9D0); }
.carnet[data-mode="etapes"] .resa-etape + .resa-etape { margin-top: 0; padding-top: 0; border-top: 0; }

.resa-etape-titre {
  margin: 0;
  font-family: "Fraunces", "Fraunces Repli", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--gris, #473C38);
}
/* Numéro de l'étape : 23 px, pas un grand texte, donc le rose de « CHANTEUSE » (5,7:1 sur blanc) */
.resa-etape-num { font-style: italic; color: var(--rose-fonce, #93574F); }
.resa-etape-titre:focus,
.carton-titre:focus,
.carton:focus,
.resa-repli-texte:focus { outline: none; }

/* Cartes d'occasion : le radio natif couvre la carte, il en dessine le bord et reçoit le focus */
.resa-occasions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
.resa-occasion {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 76px;
  padding: 14px 14px 14px 16px;
  border-radius: 16px;
  cursor: pointer;
}
.resa-occasion input {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 1px solid var(--bord-champ, #877771);
  border-radius: inherit;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.resa-occasion:hover input:not(:checked) { border-color: var(--action, #A35549); background: #FFFCFA; }
.resa-occasion input:focus-visible { outline: 3px solid var(--focus, #473C38); outline-offset: 3px; }
.resa-occasion input[aria-invalid="true"] { border-color: var(--erreur, #A13F35); box-shadow: inset 0 0 0 1px var(--erreur, #A13F35); }
/* Carte choisie : le rose poudré, bord de 2 px au rose-rouge et une coche (pas la couleur seule) */
.resa-occasion-fond {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--poudre, #FAEDE7);
  box-shadow: inset 0 0 0 2px var(--action, #A35549);
  opacity: 0;
  pointer-events: none;
}
.resa-occasion input:checked ~ .resa-occasion-fond { opacity: 1; }
.resa-occasion-nom { padding-right: 24px; font-family: "Fraunces", "Fraunces Repli", Georgia, serif; font-size: 1.12rem; line-height: 1.2; color: var(--encre, #3A302D); }
.resa-occasion-prix { font-size: .88rem; font-weight: 500; line-height: 1.3; color: var(--rose-fonce, #93574F); font-variant-numeric: lining-nums; }
/* Précision sous le nom (ex. « Anniversaire, baptême, cocktail… ») : hors de .resa-occasion-nom,
   que reservation.js relit pour le rappel, le récapitulatif et le carton. */
.resa-occasion-detail { font-size: .82rem; line-height: 1.3; color: var(--doux, #6A5D58); }
/* Coche : l'état choisi ne repose pas sur la seule couleur */
.resa-occasion input:checked ~ .resa-occasion-nom::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--action, #A35549) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.2l3 3 6-6.4' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* Champs */
.resa-champ { display: grid; gap: 8px; min-width: 0; }
.resa-champ > label,
.resa-moments legend,
.cal-libelle { font-size: .95rem; font-weight: 700; line-height: 1.35; color: var(--encre, #3A302D); }
.resa-facultatif { font-weight: 400; color: var(--doux, #6A5D58); }
.resa-aide { margin: -4px 0 0; font-size: .88rem; color: var(--doux, #6A5D58); }

.carnet input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.carnet select,
.carnet textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--bord-champ, #877771);
  border-radius: 12px;
  background: #fff;
  color: var(--encre, #3A302D);
  font: inherit;
  font-size: max(16px, 1rem);
  line-height: 1.4;
  color-scheme: light;
}
.carnet textarea { min-height: 120px; resize: vertical; }
.carnet select {
  padding-right: 44px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23A35549' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
  cursor: pointer;
}
.carnet select option { background: #fff; color: var(--encre, #3A302D); }
.carnet input::placeholder,
.carnet textarea::placeholder { color: #776963; opacity: 1; } /* 5,3:1 sur blanc */
.carnet input:not([type="radio"]):not([type="checkbox"]):hover,
.carnet select:hover,
.carnet textarea:hover { border-color: var(--gris, #473C38); }
.carnet input:not([type="radio"]):not([type="checkbox"]):focus-visible,
.carnet select:focus-visible,
.carnet textarea:focus-visible { outline: 3px solid var(--focus, #473C38); outline-offset: 2px; border-color: var(--gris, #473C38); }
.carnet [aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) { border-color: var(--erreur, #A13F35); box-shadow: inset 0 0 0 1px var(--erreur, #A13F35); }

/* Message d'erreur : texte + pictogramme, jamais la couleur seule */
.resa-erreur { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: .92rem; font-weight: 500; line-height: 1.4; color: var(--erreur, #A13F35); }
.resa-erreur::before,
.resa-repli-texte::before {
  content: "!";
  content: "!" / "";
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
}

/* Heure et invités côte à côte ; seule, l'heure prend toute la largeur */
.resa-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 20px 12px; align-items: start; }
.resa-duo .resa-facultatif { display: block; }
/* Nom et mail côte à côte sur grand écran */
.resa-paire { display: grid; gap: 20px 12px; align-items: start; }
@media (min-width: 700px) { .resa-paire { grid-template-columns: 1fr 1fr; } }

/* Moments du mariage */
.resa-moments { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.resa-moments legend { padding: 0; }
.resa-cases { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.resa-moments .resa-erreur { margin-top: 8px; }
.resa-case {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  cursor: pointer;
}
.resa-case input {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 1px solid var(--bord-champ, #877771);
  border-radius: inherit;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.resa-case span { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.resa-case span::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--bord-champ, #877771);
  border-radius: 6px;
}
.resa-case:hover input:not(:checked) { border-color: var(--action, #A35549); }
.resa-case input:checked { border-color: var(--action, #A35549); background: var(--poudre, #FAEDE7); }
.resa-case input:checked + span::before {
  border-color: var(--action, #A35549);
  background: var(--action, #A35549) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.2l3 3 6-6.4' fill='none' stroke='%23FFFFFF' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.resa-case input:focus-visible { outline: 3px solid var(--focus, #473C38); outline-offset: 3px; }

/* Boutons Modifier (rappel et récapitulatif) */
.resa-modifier {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--action, #A35549);
  font: inherit;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.resa-modifier:hover { background: rgba(163, 85, 73, .1); color: var(--action-fonce, #8E4A40); }
.resa-modifier:focus-visible { outline: 3px solid var(--focus, #473C38); outline-offset: 1px; }

/* Rappel de l'occasion (étape 2) */
.resa-rappel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 2px 2px 2px 16px;
  border-radius: 18px;
  background: var(--poudre, #FAEDE7);
  box-shadow: inset 0 0 0 1px rgba(181, 103, 91, .35);
}
.resa-rappel-texte { font-weight: 500; font-variant-numeric: lining-nums; }

/* Récapitulatif (étape 3) */
.resa-recap {
  margin: 4px 0 0;
  padding: 4px 6px 4px 18px;
  border-radius: 16px;
  background: var(--papier, #FFFCF8);
  box-shadow: inset 0 0 0 1px rgba(181, 103, 91, .3);
}
.resa-recap-ligne { padding: 8px 0; border-bottom: 1px solid var(--ligne, #EDD9D0); }
.resa-recap-ligne:last-child { border-bottom: 0; }
.resa-recap dt { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rose-fonce, #93574F); }
.resa-recap dd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; }
.resa-recap-valeur { min-width: 0; overflow-wrap: anywhere; font-variant-numeric: lining-nums; }
@media (min-width: 700px) {
  .resa-recap { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; padding: 8px 6px 8px 18px; }
  .resa-recap-ligne { padding: 6px 0; border-bottom: 0; }
}

/* Navigation entre étapes et envoi */
.resa-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid var(--ligne, #EDD9D0);
}
.resa-nav [data-precedent] { margin-right: auto; }
.resa-envoi { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.resa-envoi .btn[aria-disabled="true"] { background: var(--corail, #EB8F7A); cursor: progress; }
@media (max-width: 560px) {
  .resa-nav [data-suivant] { flex: 1 1 auto; }
  .resa-envoi .btn { flex: 1 1 100%; }
}
.resa-notice { margin: 0; font-size: .9rem; color: var(--doux, #6A5D58); }
.resa-notice a { display: inline-block; padding: 11px 0; margin: -11px 0; color: var(--action, #A35549); text-underline-offset: 3px; }
.resa-notice a:focus-visible,
.resa-repli a:focus-visible { outline: 3px solid var(--focus, #473C38); outline-offset: 2px; }

/* Repli quand l'envoi échoue */
.resa-repli {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--poudre, #FAEDE7);
  box-shadow: inset 0 0 0 1px rgba(161, 63, 53, .45);
}
.resa-repli-texte { position: relative; margin: 0; padding-left: 28px; color: var(--encre, #3A302D); }
.resa-repli-texte::before { position: absolute; left: 0; top: 3px; color: var(--erreur, #A13F35); }
.resa-repli a { color: var(--action, #A35549); text-underline-offset: 3px; overflow-wrap: anywhere; }
.carnet .resa-copie { min-height: 180px; font-size: .95rem; }

/* Messages de statut (hors du formulaire) */
.resa-statut { margin: 16px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--poudre, #FAEDE7); color: var(--encre, #3A302D); }
.resa-statut:empty { margin: 0; padding: 0; }

/* Mode étapes : la date native est remplacée par le calendrier */
.carnet[data-mode="etapes"] .resa-etape { min-height: 0; }

/* ---------- Calendrier ---------- */
.cal { min-width: 0; }
.cal-tete { display: grid; gap: 6px; margin-bottom: 6px; }
.cal-libelle { margin: 0; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-mois {
  margin: 0;
  font-family: "Fraunces", "Fraunces Repli", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  text-align: center;
  text-transform: capitalize;
  color: var(--gris, #473C38);
}
.cal-prec,
.cal-suiv {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--bord-champ, #877771);
  border-radius: 50%;
  background: #fff;
  color: var(--action, #A35549);
  cursor: pointer;
}
.cal-prec:hover,
.cal-suiv:hover { border-color: var(--action, #A35549); background: var(--poudre, #FAEDE7); }
.cal-prec[aria-disabled="true"],
.cal-suiv[aria-disabled="true"] { border-color: var(--ligne, #EDD9D0); background: #fff; color: #C9BCB6; cursor: default; }
.cal-prec::before,
.cal-suiv::before { content: ""; width: 9px; height: 9px; border-left: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; }
.cal-prec::before { transform: translateX(2px) rotate(45deg); }
.cal-suiv::before { transform: translateX(-2px) rotate(-135deg); }

.cal-grille { width: 100%; border-collapse: collapse; border-spacing: 0; table-layout: fixed; }
@media (max-width: 560px) { .cal-grille { margin-inline: -8px; width: calc(100% + 16px); } }
.cal-grille th { padding: 4px 0 8px; font-size: .75rem; font-weight: 700; color: var(--doux, #6A5D58); text-align: center; }
.cal-grille abbr { text-decoration: none; }
.cal-grille td { height: 48px; padding: 1px 0; text-align: center; vertical-align: middle; }
.cal-jour {
  position: relative;
  display: block;
  width: 100%;
  max-width: 46px;
  height: 46px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--encre, #3A302D);
  font: inherit;
  font-size: 1rem;
  font-variant-numeric: tabular-nums lining-nums;
  cursor: pointer;
}
/* Jours : encre ; survol rose poudré ; jours hors calendrier (passés) plus clairs ; aujourd'hui cerclé de gris ;
   jours pris barrés avec un point rose-rouge ; jour choisi plein au rose-rouge, chiffre blanc (5,3:1). */
.cal-jour:hover:not([aria-disabled="true"]):not([aria-pressed="true"]) { background: var(--poudre, #FAEDE7); box-shadow: inset 0 0 0 1px rgba(163, 85, 73, .45); }
.cal-jour:focus-visible { outline: 3px solid var(--focus, #473C38); outline-offset: 1px; z-index: 1; }
/* Jours passés : estompés mais lisibles (4,8:1 sur blanc, contre 12,8:1 pour les jours libres) */
.cal-hors { color: #7D6F69; cursor: default; }
.cal-aujourdhui { box-shadow: inset 0 0 0 1.5px var(--doux, #6A5D58); }
.cal-complet { color: var(--doux, #6A5D58); text-decoration: line-through; text-decoration-thickness: 1.5px; cursor: not-allowed; }
.cal-complet::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--action, #A35549);
}
.cal-jour[aria-pressed="true"] { background: var(--action, #A35549); color: #fff; font-weight: 700; }
.cal-jour[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--rose, #B5675B);
  opacity: .55;
  pointer-events: none;
}
.cal.cal-invalide .cal-grille { box-shadow: 0 0 0 1px var(--erreur, #A13F35); border-radius: 12px; }
.cal-choix { min-height: 1.5em; margin: 10px 0 0; color: var(--encre, #3A302D); }
.cal-choix strong { font-weight: 700; }
.cal-legende { min-height: 2.8em; margin: 6px 0 0; font-size: .86rem; line-height: 1.45; color: var(--doux, #6A5D58); }
.cal[data-source="json"] .cal-legende { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: start; }
.cal[data-source="json"] .cal-maj { grid-column: 2; }
.cal-exemple {
  position: relative;
  display: inline-block;
  min-width: 1.9em;
  padding-bottom: 6px;
  text-align: center;
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
  color: var(--doux, #6A5D58);
}
.cal-exemple::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--action, #A35549);
}
.cal-maj { display: block; margin-top: 2px; color: var(--doux, #6A5D58); }

/* ---------- Carton de confirmation (index.html et merci.html) ----------
   Le papier de la carte, double filet rosé, « Merci » au rose-rouge du nom, petites touches d'or (guirlande,
   cœur du monogramme). Dans le carnet blanc (index) comme sur la page merci. */
.carton {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 72px 28px 30px;
  border-radius: 24px;
  background: var(--carton-fond, var(--papier, #FFFCF8));
  color: var(--encre, #3A302D);
  text-align: center;
  box-shadow:
    inset 0 0 0 1px rgba(181, 103, 91, .45),
    inset 0 0 0 7px var(--carton-fond, var(--papier, #FFFCF8)),
    inset 0 0 0 8px rgba(181, 103, 91, .22),
    var(--carton-ombre, 0 0 #0000);
}
@media (max-width: 560px) { .carton { padding: 68px 18px 28px; } }
.carton :focus-visible { outline: 3px solid var(--focus, #473C38); outline-offset: 3px; }
.carton .carton-titre:focus,
.carton .carton-titre:focus-visible { outline: none; }

.carton-guirlande { position: absolute; top: 10px; left: 26px; right: 26px; height: 44px; color: var(--or, #C9A27A); pointer-events: none; }
.carton-guirlande svg { position: absolute; top: 4px; left: 0; width: 100%; height: 40px; overflow: visible; }
.carton-lueur {
  position: absolute;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #FFF8EF 0 22%, #EBCDA8 55%, var(--or, #C9A27A) 100%);
  box-shadow: 0 0 10px 3px rgba(235, 205, 168, .6);
}
.carton-lueur::before { content: ""; position: absolute; left: 3px; top: -4px; width: 6px; height: 5px; border-radius: 1px; background: #9C7A56; }
.carton-lueur:nth-of-type(1) { left: 10%; top: 18px; }
.carton-lueur:nth-of-type(2) { left: 30%; top: 27px; }
.carton-lueur:nth-of-type(3) { left: 50%; top: 30px; }
.carton-lueur:nth-of-type(4) { left: 70%; top: 27px; }
.carton-lueur:nth-of-type(5) { left: 90%; top: 18px; }

.carton-coche { width: 56px; height: 56px; margin: 0 0 14px; color: var(--rose, #B5675B); }
.carton-titre {
  max-width: 100%;
  margin: 0;
  font-family: "Fraunces", "Fraunces Repli", Georgia, serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--gris, #473C38);
  overflow-wrap: anywhere;
  text-wrap: balance;
}
/* « Merci » au rose-rouge du nom (grand texte, 29 px au moins : 4,2:1 sur blanc, 4,1:1 sur papier) */
.carton-titre em { font-style: italic; color: var(--rose, #B5675B); }
.carton-sous-titre { margin: 8px 0 22px; font-size: 1.1rem; color: var(--doux, #6A5D58); }
.carton-recap {
  display: grid;
  width: 100%;
  max-width: 440px;
  margin: 0 0 22px;
  padding: 6px 0;
  border-block: 1px solid var(--ligne, #EDD9D0);
  text-align: left;
}
.carton-recap div { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.carton-recap dt { padding-top: .2em; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rose-fonce, #93574F); }
.carton-recap dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: lining-nums; }
.carton-texte { max-width: 32em; margin: 0 0 10px; }
.carton-texte strong { overflow-wrap: anywhere; }
.carton-note { margin: 0 0 14px; font-size: .92rem; color: var(--doux, #6A5D58); }
.carton-liens { margin: 0 0 14px; }
.carton-liens a,
.carton-retour { display: inline-flex; align-items: center; min-height: 44px; color: var(--action, #A35549); font-weight: 700; text-underline-offset: 3px; }
.carton > .btn { margin-bottom: 28px; }
/* Monogramme de la carte (le « C » d'Ephesis et son cœur doré), posé en bas du carton quelle que soit sa
   hauteur. 44 px : plus petit, le délié du C devient trop fin. Sert à index (#resa-carton), merci.html et la
   page d'erreur de contact.php, qui chargent toutes ce fichier. */
.carton::after {
  content: "";
  flex: none;
  width: 44px;
  height: 44px;
  margin-top: auto;
  background: url("../img/monogramme.svg") center / contain no-repeat;
}
/* .carton .btn-fantome : le bouton en contour commun (styles.css) */

/* ---------- Page merci.html (et page d'erreur de contact.php) : le papier de la carte ----------
   Taches d'aquarelle dans le coin haut droit (sous la barre) et le coin bas gauche, contre le filet rosé du
   pied de page : chaque tache s'appuie sur un bord visible. Le carton passe au blanc, avec une ombre. */
body.page-merci { background: var(--papier, #FFFCF8); }
body.page-merci .carton-page {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: grid;
  align-items: center;
  min-height: 72vh;
  padding: 56px 0 88px;
  background: var(--papier, #FFFCF8);
}
body.page-merci .carton-page::before,
body.page-merci .carton-page::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
body.page-merci .carton-page::before {
  top: 0;
  right: 0;
  width: clamp(220px, 36vw, 560px);
  aspect-ratio: 680 / 520;
  background: url("../img/aquarelle-2.webp") top right / contain no-repeat;
}
body.page-merci .carton-page::after {
  left: 0;
  bottom: 0;
  width: clamp(200px, 30vw, 460px);
  aspect-ratio: 720 / 560;
  background: url("../img/aquarelle-1.webp") top left / contain no-repeat;
  scale: 1 -1; /* la tache 1, retournée : chargée dans le coin bas gauche */
  opacity: .9;
}
body.page-merci .carton {
  --carton-fond: #fff;
  --carton-ombre: 0 30px 60px -34px rgba(71, 60, 56, .38);
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}
.carton-reseaux { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 4px 0 22px; padding: 0; list-style: none; }
.carton-reseaux a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--action, #A35549);
  color: var(--action, #A35549);
  font-weight: 500;
  text-decoration: none;
}
.carton-reseaux a:hover { background: var(--action, #A35549); color: #fff; }
.carton-reseaux svg { width: 18px; height: 18px; color: currentColor; }
.carton-erreurs { width: 100%; max-width: 440px; margin: 20px 0 18px; padding: 12px 0; border-block: 1px solid var(--ligne, #EDD9D0); list-style: none; text-align: left; }
.carton-erreurs li { padding: 6px 0; }
.carton-erreurs strong { color: var(--erreur, #A13F35); }
.carton-alerte { color: var(--erreur, #A13F35); }

/* ---------- Mouvement : habillage seulement, jamais d'état caché sans .anim ---------- */
@media (prefers-reduced-motion: no-preference) {
  .anim .resa-progression-barre { transition: transform var(--duree, 320ms) var(--courbe, cubic-bezier(.2, .7, .2, 1)); }
  .anim .resa-occasion-fond { transform: scale(.94); transition: transform var(--duree, 320ms) var(--courbe, cubic-bezier(.2, .7, .2, 1)); }
  .anim .resa-occasion input:checked ~ .resa-occasion-fond { transform: none; }

  /* Jour choisi : anneau rose qui se pose */
  .anim .cal-jour.cal-vient[aria-pressed="true"]::after { animation: resa-anneau 220ms cubic-bezier(.3, 1.4, .5, 1) both; }

  /* Carton : il s'ouvre comme une carte qu'on déplie, puis la coche se trace et la guirlande s'allume */
  .anim .carton:not([hidden]) { animation: resa-carton 700ms cubic-bezier(.2, .7, .1, 1) both; }
  .anim .carton:not([hidden]) .carton-coche { animation: resa-coche 450ms cubic-bezier(.2, .7, .2, 1) 350ms both; }
  .anim .carton:not([hidden]) .carton-lueur { animation: resa-filament 900ms ease-out both; }
  .anim .carton:not([hidden]) .carton-lueur:nth-of-type(1) { animation-delay: 520ms; }
  .anim .carton:not([hidden]) .carton-lueur:nth-of-type(2) { animation-delay: 640ms; }
  .anim .carton:not([hidden]) .carton-lueur:nth-of-type(3) { animation-delay: 760ms; }
  .anim .carton:not([hidden]) .carton-lueur:nth-of-type(4) { animation-delay: 880ms; }
  .anim .carton:not([hidden]) .carton-lueur:nth-of-type(5) { animation-delay: 1000ms; }
}
/* Chien de garde posé par reservation.js 2,2 s après l'ouverture : l'état final, même si les animations n'ont pas tourné */
.carton.carton-pose,
.carton.carton-pose * { animation: none !important; }
@keyframes resa-anneau { from { opacity: 0; transform: scale(.6); } to { opacity: .55; transform: scale(1); } }
@keyframes resa-carton { from { clip-path: inset(48% 0 48% 0 round 24px); } to { clip-path: inset(0 round 24px); } }
@keyframes resa-coche { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes resa-filament { 0% { opacity: 0; } 35% { opacity: .9; } 55% { opacity: .25; } 100% { opacity: 1; } }

/* ---------- Impression ---------- */
@media print {
  .resa-progression,
  .resa-nav,
  .cal-nav { display: none !important; }
}
