/* Page de reservation du client : docs/DESIGN.md (source de verite). Une idee par ecran, mobile d'abord (390 px), toujours claire
   (<html data-theme="clair">, reglage `theme_reservation` par defaut) ou, en `auto`, clair ou sombre selon l'appareil du client.
   TOUTE couleur est un jeton defini dans le bloc ci-dessous (scripts/verifier-couleurs.sh le controle) ; l'accent de
   l'organisation et ses derives arrivent par ./theme.css (apparence.py : contraste calcule, --sur-accent), avec, en clair, le fond
   choisi par l'organisation (`fond_clair`, blanc par defaut : les valeurs ci-dessous) et ses derives (--fond-2, --trait, textes...). */

/* jetons:debut */
:root {
  color-scheme: light dark;
  /* accent par defaut (#6b21a8), remplace par theme.css */
  --accent: #6b21a8; --accent-fort: #5e1d94; --accent-doux: #ede4f5; --sur-accent: #ffffff;
  --fond: #ffffff; --fond-2: #f5f5f7; --trait: #e5e5ea; --texte: #1d1d1f; --texte-2: #6e6e73; --texte-3: #86868b;
  /* semantiques fixes : aplat, texte lisible (>= 4,5:1), fond doux */
  --succes: #34c759; --succes-texte: #248a3d; --succes-doux: #e3f6e8;
  --alerte: #ff9f0a; --alerte-texte: #b25000; --alerte-doux: #fff1dd;
  --erreur: #ff3b30; --erreur-texte: #d70015; --erreur-doux: #ffe5e3;
  --hachure: #e5e5ea;
  --ombre: 0 1px 2px rgba(0, 0, 0, .06);
  --ombre-haut: 0 -1px 2px rgba(0, 0, 0, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) {
    --accent: #7e3eb3; --accent-fort: #6f379e; --accent-doux: #191120; --sur-accent: #ffffff;
    --fond: #000000; --fond-2: #1c1c1e; --trait: #2c2c2e; --texte: #f5f5f7; --texte-2: #a1a1a6; --texte-3: #8e8e93;
    --succes: #30d158; --succes-texte: #30d158; --succes-doux: #0f2a17;
    --alerte: #ff9f0a; --alerte-texte: #ff9f0a; --alerte-doux: #2e2010;
    --erreur: #ff453a; --erreur-texte: #ff6961; --erreur-doux: #331311;
    --hachure: #2c2c2e;
    --ombre: none;
    --ombre-haut: none;
  }
}
@media (prefers-color-scheme: dark) and (min-width: 52rem) {
  :root:not([data-theme="clair"]) { --fond: #0b0b0c; }
}
/* theme_reservation = clair : le sombre ne s'applique jamais (ni jetons ci-dessus, ni bloc sombre de theme.css) */
:root[data-theme="clair"] { color-scheme: light; }
/* jetons:fin */

:root {
  --r-champ: 14px; --r-carte: 22px; --r-rond: 999px;
  --duree: 200ms;
  font-family: -apple-system, "SF Pro Text", "Inter", system-ui, sans-serif;
  color: var(--texte);
  background: var(--fond);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, button, a, input, select, textarea, label, .journee, .colonne { touch-action: manipulation; }
body { margin: 0; line-height: 1.4; font-size: 1.0625rem; background: var(--fond); }
[hidden] { display: none !important; }
h1, h2 { font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
h1 { font-size: 1.75rem; margin: .5rem 0 1.5rem; }
h2 { font-size: 1.375rem; margin: 2rem 0 1rem; }
h1:focus { outline: none; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- en-tete : logo et nom de l'organisation, progression discrete ---- */
.haut { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .75rem 1.5rem; padding-top: max(.75rem, env(safe-area-inset-top)); background: var(--fond);
  border-bottom: 1px solid var(--trait); }
.marque { margin: 0; font-weight: 700; font-size: 1.0625rem; letter-spacing: -.02em; display: flex; align-items: center; gap: .75rem;
  min-width: 0; }
.logo { height: 2rem; width: auto; max-width: 7.5rem; object-fit: contain; border-radius: 8px; }
.progression { margin: 0; font-size: .8125rem; color: var(--texte-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.jauge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 2px; border: 0; appearance: none; -webkit-appearance: none;
  background: transparent; color: var(--accent); }
.jauge::-webkit-progress-bar { background: transparent; }
.jauge::-webkit-progress-value { background: var(--accent); transition: width var(--duree) ease-out; }
.jauge::-moz-progress-bar { background: var(--accent); }

.page { max-width: 34rem; margin: 0 auto; padding: 1.5rem 1.5rem 16rem; }
.chapo { font-size: 1.0625rem; color: var(--texte-2); margin: -.75rem 0 1.5rem; }
.aide, .mention { color: var(--texte-2); font-size: .9375rem; }
.mention { font-size: .8125rem; color: var(--texte-3); }
.rappel { margin: -1rem 0 1.5rem; color: var(--texte-2); font-size: .9375rem; }
.bandeau-simulation, .deplacer, .echeance, .note-pack, .duree-shooting, .brouillon {
  background: var(--accent-doux); color: var(--texte); border-radius: var(--r-champ); padding: .875rem 1rem; font-size: .9375rem; margin: 0 0 1rem; }
.deplacer { background: var(--alerte-doux); }
.brouillon .lien { padding: 0 0 0 .25rem; min-height: 0; }

/* ---- champ : fond-2, rayon 14, libelle au-dessus, coche verte quand valide, message sous le champ ---- */
.champ { display: grid; gap: .5rem; margin: 0 0 1rem; font-weight: 600; font-size: .9375rem; color: var(--texte-2); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input:not([type]), select, textarea {
  font: inherit; font-weight: 400; color: var(--texte); background: var(--fond-2); border: 1px solid transparent;
  border-radius: var(--r-champ); padding: .75rem 1rem; min-height: 50px; width: 100%;
  transition: border-color var(--duree) ease-out; }
input::placeholder, textarea::placeholder { color: var(--texte-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
textarea { resize: vertical; }
input, select, textarea { font-size: max(16px, 1.0625rem) !important; }   /* aucun zoom au toucher (iPhone) */
.ligne-champs { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: end; }
.verif { margin: -.5rem 0 1rem; font-size: .8125rem; min-height: 1.2em; }
.verif.ok { color: var(--succes-texte); }
.verif.ok::before { content: "✓ "; font-weight: 700; }
.verif.ko { color: var(--erreur-texte); }
.verif.attente { color: var(--texte-2); }
.erreur { color: var(--erreur-texte); font-weight: 600; background: var(--erreur-doux); border-radius: var(--r-champ); padding: .75rem 1rem; }
.verif.ko, .verif.ok, .verif.attente { background: none; padding: 0; }

.suggestions { list-style: none; margin: -.5rem 0 1rem; padding: .25rem; background: var(--fond); border: 1px solid var(--trait);
  border-radius: var(--r-champ); box-shadow: var(--ombre); }
.suggestions li { padding: .75rem; min-height: 44px; border-radius: 10px; cursor: pointer; }
.suggestions li:hover, .suggestions li:focus, .suggestions li[aria-selected=true] { background: var(--fond-2); }

/* ---- boutons : principal (plein, accent), secondaire (fond-2), texte (accent) ; arrondi complet ---- */
.bouton { font: inherit; font-weight: 600; min-height: 50px; padding: .75rem 1.5rem; border-radius: var(--r-rond); cursor: pointer;
  width: 100%; border: 0; transition: background var(--duree) ease-out, opacity var(--duree) ease-out; }
.bouton.principal { background: var(--accent); color: var(--sur-accent); }
.bouton.principal:hover:not(:disabled) { background: var(--accent-fort); }
.bouton.secondaire { background: var(--fond-2); color: var(--texte); }
.bouton.petit { min-height: 44px; width: auto; padding: .5rem 1rem; margin-bottom: 1rem; }
.bouton:disabled { opacity: .4; cursor: not-allowed; }
.bouton[aria-busy=true] { opacity: .7; }
.bouton.ajouter { margin: 0 0 1.5rem; background: transparent; color: var(--accent); border: 1.5px dashed var(--accent); }
.choix-entree, .actions { display: grid; gap: .75rem; margin: 1.5rem 0 1rem; }
.lien { font: inherit; font-weight: 600; background: none; border: 0; color: var(--accent); padding: .75rem 0; min-height: 44px;
  cursor: pointer; text-align: left; }
.retour { margin-top: .5rem; }
a.bouton { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.lien-paiement { margin: 1rem 0; }
.actions form { margin: 0; }
#garde .bouton, #garde-expiree .bouton { margin-bottom: .75rem; }

/* ---- groupes, cartes selectionnables (coche + contour accent quand active) ---- */
.groupe { border: 0; margin: 0 0 1.75rem; padding: 0; min-width: 0; }
legend, .sous-titre { font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; margin: 0 0 .75rem; padding: 0; color: var(--texte); }
.sous-groupe { margin-bottom: 1.25rem; }
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .75rem; }
.carte, .option, .derniers button { font: inherit; text-align: left; color: var(--texte); background: var(--fond);
  border: 1px solid var(--trait); border-radius: var(--r-carte); box-shadow: var(--ombre); cursor: pointer;
  transition: border-color var(--duree) ease-out, background var(--duree) ease-out; }
.carte { position: relative; display: grid; gap: .25rem; align-content: center; padding: 1rem 2.75rem 1rem 1.125rem; min-height: 64px;
  font-weight: 600; }
.carte small { color: var(--texte-2); font-size: .8125rem; font-weight: 400; }
.carte[aria-pressed=true] { border: 2px solid var(--accent); background: var(--accent-doux); padding: calc(1rem - 1px) calc(2.75rem - 1px) calc(1rem - 1px) calc(1.125rem - 1px); }
.carte[aria-pressed=true]::after { content: "✓"; position: absolute; top: .875rem; right: 1rem; width: 1.375rem; height: 1.375rem;
  border-radius: var(--r-rond); background: var(--accent); color: var(--sur-accent); font-size: .8125rem; font-weight: 800;
  display: grid; place-items: center; }
.cartes.grandes .carte { min-height: 88px; font-size: 1.0625rem; }
.carte.large { width: 100%; }
.carte.inactive { opacity: .5; }

/* formule : carte avec un choix ; mise en avant = degrade accent (seule exception de DESIGN.md) */
.option { display: flex; gap: .875rem; align-items: flex-start; padding: 1rem 1.125rem; margin-bottom: .75rem; }
.option:has(input:checked) { border: 2px solid var(--accent); padding: calc(1rem - 1px) calc(1.125rem - 1px); }
.option input, .case input { width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--accent); flex: none; }
.option-texte { display: grid; gap: .25rem; }
.option-texte span { color: var(--texte-2); font-size: .9375rem; }
.option.en-avant { background: linear-gradient(135deg, var(--accent), var(--accent-fort)); color: var(--sur-accent); border-color: transparent; }
.option.en-avant .option-texte span { color: var(--sur-accent); opacity: .85; }
.option.en-avant input { accent-color: var(--sur-accent); }
.pack-extras { display: grid; gap: .25rem; padding-top: .25rem; }
.case { display: flex; gap: .75rem; align-items: center; min-height: 44px; margin-bottom: 1rem; color: var(--texte); font-weight: 400; }

/* stepper + / - */
.compteur { display: inline-grid; grid-template-columns: 44px 4rem 44px; align-items: center; gap: .25rem; padding: 3px;
  background: var(--fond-2); border-radius: var(--r-rond); }
.compteur button { font: inherit; font-size: 1.375rem; height: 44px; border: 0; border-radius: var(--r-rond); background: var(--fond);
  color: var(--accent); cursor: pointer; box-shadow: var(--ombre); }
.compteur output { text-align: center; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* recapitulatif : carte arrondie, valeurs a droite */
.recap { display: grid; grid-template-columns: auto 1fr; gap: .625rem 1rem; background: var(--fond-2); padding: 1.25rem; border-radius: var(--r-carte);
  margin: 0 0 1.5rem; }
.recap dt { color: var(--texte-2); }
.recap dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
/* recapitulatif (retours A6) : une carte par bien, empilees (jamais de tableau), puis UN seul « Total a payer » */
.recap-cartes { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .75rem; }
.recap-carte { background: var(--fond-2); border-radius: var(--r-carte); padding: 1rem 1.25rem; min-width: 0; overflow-wrap: anywhere; }
.recap-titre { margin: 0 0 .375rem; font-weight: 700; letter-spacing: -.01em; }
.recap-infos { list-style: none; padding: 0; margin: 0 0 .75rem; color: var(--texte-2); font-size: .9375rem; display: grid; gap: .125rem; }
.recap-lignes { margin: 0; padding-top: .5rem; border-top: 1px solid var(--trait); }
.recap-lignes .libelle { min-width: 0; }
.lignes li.remise .montant, .lignes li.remise .libelle { color: var(--succes-texte); }
/* remise d'enchainement (retours A8) : prix plein raye puis prix reduit, ligne « Remise enchainement : -X € » ; sans remise, rien */
.lignes .avant, .recap dd s { color: var(--texte-3); text-decoration: line-through; font-weight: 400; margin-right: .25rem; }
.lignes li.ligne-remise { padding-top: 0; font-size: .875rem; }
.recap .remise { color: var(--succes-texte); }
/* apres paiement : bandeau tout en haut, une ligne par bien */
.bandeau-succes { background: var(--succes-doux); color: var(--texte); border-radius: var(--r-champ); padding: 1rem 1.25rem; margin: 0 0 1.5rem;
  box-shadow: inset 0 0 0 1.5px var(--succes); }
.bandeau-succes h1, .bandeau-succes p { font-size: 1.375rem; margin: 0 0 .5rem; color: var(--succes-texte); letter-spacing: -.02em; }
.bandeau-succes ul { margin: 0; padding-left: 1.25rem; }
.bandeau-succes strong { display: block; font-size: 1.375rem; color: var(--succes-texte); letter-spacing: -.02em; margin: 0 0 .25rem; }
.bandeau-succes .ligne { display: block; }
/* retours A10 : bien paye « a replacer » : jour, puis heures libres (boutons), sans couleur propre */
#replacer { margin: 1.5rem 0; }
.replacer-jour { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.heures-replacer { display: flex; flex-wrap: wrap; gap: .5rem; }
.heures-replacer .bouton { min-width: 6rem; }
/* ecran de remerciement (retours A9) : point d'arrivee, a la couleur du photographe (accent par theme.css), clair ou sombre */
.merci { background: var(--accent-doux); border-radius: var(--r-carte); padding: 2rem 1.5rem 1.5rem; margin: 0 0 2rem; text-align: center;
  animation: merci-entree var(--duree) ease-out; }
.merci-coche { width: 4rem; height: 4rem; margin: 0 auto 1rem; border-radius: var(--r-rond); background: var(--accent); position: relative; }
.merci-coche::after { content: ""; position: absolute; left: 1.45rem; top: .95rem; width: .85rem; height: 1.6rem; border: solid var(--sur-accent);
  border-width: 0 .3rem .3rem 0; transform: rotate(45deg); }
.merci h1 { font-size: 1.75rem; letter-spacing: -.03em; margin: 0 0 .75rem; outline: none; }
.merci p { color: var(--texte-2); margin: 0 0 .75rem; line-height: 1.4; }
.merci .merci-lead { color: var(--texte); font-size: 1.0625rem; }
.merci-biens { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; text-align: left; }
.merci-biens li { background: var(--fond); border-radius: var(--r-champ); padding: .75rem 1rem; display: grid; gap: .125rem; overflow-wrap: anywhere; }
.merci-quand { font-weight: 600; }
.merci-ou { color: var(--texte-2); font-size: .9375rem; }
.merci .merci-fin { color: var(--texte); font-weight: 600; margin: 1rem 0 0; }
.modifier-infos, .mes-reservations { margin: 1.5rem 0; }
.modifier-infos > summary { cursor: pointer; color: var(--accent); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
@keyframes merci-entree { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }
.dernier { display: grid; gap: .375rem; }
.derniers .dernier[data-statut] { background: var(--fond-2); border-radius: var(--r-champ); padding: .75rem 1rem; }
.dernier-titre { font-weight: 600; overflow-wrap: anywhere; }
.dernier-statut { color: var(--texte-2); font-size: .9375rem; }
.dernier[data-statut="tiers"] .dernier-statut, .dernier[data-statut="a_payer"] .dernier-statut { color: var(--alerte-texte); }
.dernier form { margin: 0; }
.derniers .dernier .bouton { text-align: center; background: var(--fond); }
.frais-recap { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; padding: 0 1.25rem; font-variant-numeric: tabular-nums; }
.facultatif { color: var(--texte-3); font-weight: 400; }
.qui-paie { margin: 1rem 0 0; }
.completer-ici { margin: 1.5rem 0; }
.bien-completer { margin: 0 0 1rem; }
.sous-total { display: flex; justify-content: space-between; gap: 1rem; margin: .375rem 0 0; padding-top: .5rem; border-top: 1px solid var(--trait);
  font-weight: 600; font-variant-numeric: tabular-nums; }
.sous-total .montant { white-space: nowrap; }
.total-payer { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 1rem; padding: 1rem 1.25rem;
  border: 2px solid var(--accent); border-radius: var(--r-carte); font-weight: 700; }
.total-payer output { font-size: 1.75rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prix-change { background: var(--alerte-doux); color: var(--texte); font-weight: 600; border-radius: var(--r-champ); padding: .875rem 1rem;
  margin: 0 0 1rem; box-shadow: inset 0 0 0 1.5px var(--alerte); }
.completer { margin: 1.5rem 0 0; }
.reference { font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.recap-biens, .panier-gerer { padding: 0; list-style: none; display: grid; gap: .5rem; }
.recap-biens li, .panier-gerer li { background: var(--fond-2); border-radius: var(--r-champ); padding: .75rem 1rem; font-variant-numeric: tabular-nums; }
.compte { display: block; font-size: 1.375rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--texte); margin-top: .25rem; }
.compte:empty { display: none; }
.appel a { font-weight: 700; }
.sur-place-modifier { background: var(--fond-2); border-radius: var(--r-champ); padding: .75rem 1rem; }
.sur-place-modifier summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--accent); cursor: pointer; }
.sur-place-modifier input { background: var(--fond); }
/* page « gerer » en etapes (retours A11) : indicateur d'etape, biens en lignes (detail au toucher), un bien a la fois */
.visuellement-cache { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; }
.etapes ol { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; counter-reset: etape; }
.etapes li { min-width: 0; }
.etapes a, .etapes span[aria-disabled] { display: flex; flex-direction: column; align-items: center; gap: .25rem; min-height: 44px; padding: .25rem 0;
  text-decoration: none; color: var(--texte-3); font-size: .8125rem; text-align: center; }
.etapes a { color: var(--texte-2); }
.etape-num { width: 1.75rem; height: 1.75rem; border-radius: var(--r-rond); display: grid; place-items: center; font-weight: 700;
  font-variant-numeric: tabular-nums; background: var(--fond-2); color: var(--texte-2); }
.etapes li.fait .etape-num { background: var(--accent-doux); color: var(--accent); font-size: 0; }
.etapes li.fait .etape-num::after { content: ""; width: .35rem; height: .7rem; border: solid var(--accent); border-width: 0 .15rem .15rem 0;
  transform: translateY(-.1rem) rotate(45deg); }
.etapes li.courante .etape-num { background: var(--accent); color: var(--sur-accent); font-size: .8125rem; }
.etapes li.courante .etape-num::after { content: none; }
.etapes li.courante a { color: var(--texte); font-weight: 600; }
.biens-gerer { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.detail-bien { background: var(--fond-2); border-radius: var(--r-champ); }
.detail-bien > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 44px; padding: .875rem 1rem; }
.detail-bien > summary::-webkit-details-marker { display: none; }
.detail-bien > summary::after { content: ""; flex: none; width: .5rem; height: .5rem; border: solid var(--texte-3); border-width: 0 2px 2px 0;
  transform: rotate(45deg); transition: transform var(--duree) ease-out; margin-left: -.25rem; }
.detail-bien[open] > summary::after { transform: rotate(-135deg); }
.detail-bien-titre { display: grid; gap: .125rem; min-width: 0; overflow-wrap: anywhere; }
.detail-bien-adresse { font-weight: 600; }
.detail-bien-quand { color: var(--texte-2); font-size: .9375rem; }
.detail-bien-prix { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.detail-bien-lignes { background: transparent; padding: 0 1rem 1rem; margin: 0; border-radius: 0; }
.recap .sous-total-libelle, .recap .sous-total-montant { color: var(--texte); font-weight: 600; padding-top: .5rem; border-top: 1px solid var(--trait); }
.total-gerer .total-libelle, .total-gerer .total-montant { color: var(--texte); font-weight: 700; font-size: 1.375rem; letter-spacing: -.02em; }
.etapes-biens { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.etapes-biens a { display: inline-flex; align-items: center; gap: .375rem; min-height: 44px; padding: 0 1rem; border-radius: var(--r-rond);
  background: var(--fond-2); color: var(--texte); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.etapes-biens a[aria-current] { background: var(--accent); color: var(--sur-accent); }
.etapes-biens li.fait a::before { content: ""; width: .3rem; height: .6rem; border: solid currentColor; border-width: 0 .14rem .14rem 0;
  transform: translateY(-.1rem) rotate(45deg); }
.actions-bien { display: grid; gap: .75rem; margin: 1.5rem 0 0; }
.bien-completer:focus { outline: none; }
#t-completer:focus, #t-recap:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .detail-bien > summary::after { transition: none; } }

/* ---- ticket de prix : toujours visible pendant le choix, decompose ligne par ligne ---- */
.ticket { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; background: var(--fond); border-top: 1px solid var(--trait);
  border-radius: var(--r-carte) var(--r-carte) 0 0; box-shadow: var(--ombre-haut);
  padding: .875rem 1.5rem calc(.875rem + env(safe-area-inset-bottom)); max-height: 46vh; overflow: auto; }
.ticket > * { max-width: 34rem; margin-left: auto; margin-right: auto; }
.lignes { list-style: none; padding: 0; margin: 0 auto .375rem; font-size: .9375rem; color: var(--texte-2); }
.lignes li { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; }
.lignes .montant { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--texte); }
.total { display: flex; justify-content: space-between; align-items: baseline; margin: .25rem auto 0; padding-top: .5rem;
  border-top: 1px solid var(--trait); font-weight: 700; }
.total output { font-size: 1.75rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ticket-message { margin: .25rem auto 0; font-size: .8125rem; color: var(--texte-2); }
.ticket.calcul .total output { opacity: .5; }
.ticket[data-statut=indisponible] .total output, .ticket[data-statut=pack_requis] .total output { color: var(--texte-3); }
.total-panier { margin: .25rem auto 0; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--texte-2); }

/* ---- panier de biens ---- */
.biens-liste { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.biens-liste li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .25rem .5rem .25rem 1rem;
  background: var(--accent-doux); border-radius: var(--r-champ); }
.biens-liste .retirer { flex: none; }
.derniers { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.derniers button { width: 100%; min-height: 50px; padding: .75rem 1rem; border-radius: var(--r-champ); }
.revenir { margin: -.5rem 0 1rem; }

/* ---- planning semaine (decision 0018) : en-tetes de jours, grille, blocs (occupe, mon bien, economie, a valider) ---- */
.semaine-nav { display: grid; grid-template-columns: 44px 1fr 44px; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.semaine-titre { margin: 0; text-align: center; font-weight: 700; letter-spacing: -.01em; }
.jour-fleche { font: inherit; font-size: 1.5rem; width: 44px; height: 44px; border: 0; border-radius: var(--r-rond); background: var(--fond-2);
  color: var(--accent); cursor: pointer; }
.jour-fleche:disabled { color: var(--texte-3); cursor: not-allowed; }
.legende { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; font-size: .8125rem; color: var(--texte-2); }
.legende li { display: flex; align-items: center; gap: .375rem; background: var(--fond-2); border-radius: var(--r-rond); padding: .25rem .625rem .25rem .375rem; }
.legende span { width: 12px; height: 12px; border-radius: var(--r-rond); display: inline-block; }
.pastille-libre { background: var(--fond); box-shadow: inset 0 0 0 1px var(--trait); }
.pastille-eco { background: var(--succes); }
.pastille-panier { background: var(--accent-doux); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pastille-pris { background: var(--trait); }
.pastille-grisee { background: repeating-linear-gradient(135deg, var(--trait) 0 2px, var(--fond-2) 2px 4px); }
.pastille-valider { background: var(--alerte); }

/* les sept jours tiennent dans la largeur (390 px compris) : aucun defilement horizontal, aucun recentrage (retours A7) */
.semaine { display: flex; gap: 2px; margin: 0 0 1rem; }
.semaine-jours { position: relative; flex: 1; min-width: 0; display: flex; gap: 2px; }
.echelle { flex: 0 0 2rem; }
.echelle .journee { background: none; cursor: default; }
.heure-libelle { position: absolute; left: 0; right: .25rem; margin-top: -.5rem; text-align: right; font-size: .75rem; color: var(--texte-3);
  white-space: nowrap; height: auto !important; font-variant-numeric: tabular-nums; border: 0; }
.colonne { flex: 1 1 0; min-width: 0; }
.colonne-tete { margin: 0 0 .375rem; height: 2.75rem; display: grid; text-align: center; line-height: 1.15; border-radius: var(--r-champ); align-content: center; }
.colonne-tete small { color: var(--texte-2); font-size: .75rem; }
.colonne-tete strong { font-size: .8125rem; }
.colonne.aujourdhui .colonne-tete { background: var(--accent-doux); }
.colonne.aujourdhui .colonne-tete small, .colonne.aujourdhui .colonne-tete strong { color: var(--texte); }
/* hors disponibilites : fond-2 a hachures fines ; plage ouverte : fond */
.journee { position: relative; margin: 0; border-radius: 10px; touch-action: pan-y; cursor: pointer; min-height: 4rem; overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--hachure) 0 1px, var(--fond-2) 1px 6px); }
/* jour en cours de calcul : plages en hachures douces, remplies des la reponse du serveur (affichage progressif, A7) */
.colonne.en-calcul .plage { background: repeating-linear-gradient(135deg, var(--accent-doux) 0 2px, var(--fond) 2px 9px); }
.colonne.en-calcul .journee { cursor: progress; }
.journee-vide { margin: 0; padding: 1.25rem; color: var(--texte-2); background: var(--fond-2); border-radius: var(--r-champ); }
.heure-ligne { position: absolute; left: 0; right: 0; border-top: 1px solid var(--trait); pointer-events: none; z-index: 1; }
.plage { position: absolute; left: 0; right: 0; background: var(--fond); }
.colonne.passe .colonne-tete { color: var(--texte-3); }
.jour-indisponible { position: absolute; inset: .25rem .25rem auto; z-index: 3; display: grid; gap: .25rem; padding: .5rem; font-size: .75rem;
  color: var(--texte-2); background: var(--fond); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--trait); cursor: default; }
.jour-indisponible p { margin: 0; }
.jour-indisponible .lien { padding: 0; font-size: .8125rem; text-align: left; }
.bloc-pris { position: absolute; left: 2px; right: 2px; background: var(--fond-2); color: var(--texte-2); font-size: .75rem; font-weight: 600;
  padding: .25rem .375rem; overflow: hidden; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--trait); z-index: 2; cursor: not-allowed; }
.grisee { position: absolute; left: 0; right: 0; z-index: 1; cursor: not-allowed;
  background: repeating-linear-gradient(135deg, var(--hachure) 0 1px, var(--fond-2) 1px 6px); }
.eco { position: absolute; left: 2px; right: 2px; background: var(--succes-doux); border: 1.5px dashed var(--succes); border-radius: 8px; z-index: 2;
  display: flex; align-items: flex-start; }
.eco-bouton { font: inherit; font-size: .8125rem; font-weight: 700; color: var(--succes-texte); background: var(--fond); border: 0;
  border-radius: var(--r-rond); margin: .25rem; padding: .25rem .5rem; min-height: 44px; min-width: 44px; cursor: pointer; box-shadow: var(--ombre); }
.bloc-choisi { position: absolute; left: 2px; right: 2px; min-height: 44px; background: var(--accent); color: var(--sur-accent);
  border-radius: 10px; z-index: 3; box-shadow: var(--ombre); overflow: hidden; touch-action: none; cursor: grab; }
.bloc-choisi.a-valider { box-shadow: inset 0 0 0 2px var(--alerte); }
.bloc-texte { margin: 0; padding: .25rem .375rem; font-weight: 700; font-size: .8125rem; }
.bloc-texte .court { display: none; }
.bloc-panier { position: absolute; left: 2px; right: 2px; background: var(--accent-doux); color: var(--texte); font-size: .75rem; font-weight: 700;
  padding: .25rem .375rem; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--accent); z-index: 3; overflow: hidden; cursor: grab;
  touch-action: none; min-height: 44px; }
.bloc-panier small { display: block; font-weight: 600; color: var(--texte-2); }
.bloc-panier.glisse { opacity: .85; }
.choix-bloc { font-weight: 600; min-height: 1.4em; }
.validation { color: var(--alerte-texte); font-weight: 600; }

/* colonnes etroites (mobile) : textes des blocs serres, coupes proprement ; cibles toujours >= 44 px de haut */
@media (max-width: 51.99rem) {
  .colonne-tete small, .heure-libelle { font-size: .6875rem; }
  .heure-libelle { right: .125rem; }
  .bloc-pris, .bloc-panier, .bloc-texte { font-size: .625rem; letter-spacing: -.02em; line-height: 1.2; padding: .125rem 2px;
    white-space: nowrap; }
  .bloc-pris .long, .bloc-panier .sep, .bloc-texte .long, .bloc-panier small { display: none; }
  .bloc-texte .court { display: inline; }
  .bloc-panier > span { display: block; }
  .bloc-pris, .bloc-panier, .bloc-choisi, .eco { left: 1px; right: 1px; }
  .eco-bouton { min-width: 0; width: calc(100% - .25rem); margin: .125rem; padding: .125rem 0; font-size: .625rem; letter-spacing: -.02em;
    white-space: nowrap; }
  .jour-indisponible { inset: .125rem .125rem auto; padding: .25rem; font-size: .6875rem; overflow-wrap: anywhere; }
}
@media (min-width: 52rem) {
  .page { padding-bottom: 4rem; margin-left: max(1.5rem, calc(50vw - 30rem)); }
  .ticket { left: auto; right: max(1.5rem, calc(50vw - 30rem)); top: 6rem; bottom: auto; width: 22rem; border: 1px solid var(--trait);
    border-radius: var(--r-carte); max-height: none; box-shadow: var(--ombre); }
  .colonne { min-width: 0; flex-basis: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
