/* Plan 8 : la feuille de départ. Sur ordinateur, les choix se déplient sous la ligne ; sur téléphone, un sélecteur natif. */
.depart {
  padding: clamp(32px, 6svh, 72px) max(var(--marge), env(safe-area-inset-right)) clamp(48px, 9svh, 96px) max(var(--marge), env(safe-area-inset-left));
  background: var(--nuit);
}
.depart:focus { outline: none; }
/* Arrivée par « Réserver » : la feuille se pose 16 px sous la barre ; ces 16 px sont déjà de la nuit, pas le bas de la photo précédente. */
.depart { position: relative; }
.depart::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 16px; background: var(--nuit); }
.depart__col { max-width: 720px; margin-inline: auto; }
.depart__titre { margin-bottom: clamp(20px, 4svh, 40px); font-weight: 300; font-size: clamp(44px, 6vw, 80px); }

/* Six lignes libellé-valeur, cinq filets. */
.rang + .rang { border-top: 1px solid var(--bleu); }
.rang__tete { display: grid; grid-template-columns: 132px minmax(0, 1fr) 20px; align-items: baseline; gap: 0 12px; width: 100%; min-height: 76px; padding: 16px 0 14px; text-align: left; }
.rang__lib { font-size: 14px; color: var(--brume); }
.rang__val { font-size: 40px; line-height: 1.06; text-wrap: balance; }
.rang__val.est-vide { color: var(--brume); }
button.rang__tete::after {
  content: ""; align-self: center; justify-self: end; width: 9px; height: 9px; margin-top: -6px;
  border-right: 1.5px solid var(--brume); border-bottom: 1.5px solid var(--brume); transform: rotate(45deg); transition: transform .3s var(--doux);
}
button.rang__tete[aria-expanded="true"]::after { transform: translateY(5px) rotate(225deg); }
@media (hover: hover) { button.rang__tete:hover::after { border-color: var(--ecume); } }
.rang__choix { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--doux); }
.rang__dedans { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .35s; }
.rang__tete[aria-expanded="true"] + .rang__choix { grid-template-rows: 1fr; }
.rang__tete[aria-expanded="true"] + .rang__choix .rang__dedans { visibility: visible; transition-delay: 0s; }
.rang__dedans > :last-child { margin-bottom: 24px; }

/* Les choix, sous la ligne (ordinateur). */
.option {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; width: 100%; min-height: 56px; padding: 8px 14px;
  text-align: left; border-top: 1px solid rgb(230 238 242 / .1);
}
.option__a { font-size: 17px; }
.option__b { grid-column: 1; font-size: 14.5px; color: var(--brume); }
.option__c { grid-column: 2; grid-row: 1 / span 2; font-size: 15px; color: var(--reflet); text-align: right; font-variant-numeric: tabular-nums; }
.option[aria-checked="true"] { background: var(--bleu); }
.option[aria-disabled="true"] { cursor: not-allowed; color: var(--brume); }
.option[aria-disabled="true"] .option__a { text-decoration: line-through; }
@media (hover: hover) { .option:not([aria-disabled="true"]):hover { background: rgb(49 59 66 / .6); } }

.qte-rang { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 8px 14px; border-top: 1px solid rgb(230 238 242 / .1); }
.qte-rang p { display: grid; font-size: 17px; }
.qte-rang small { font-size: 14.5px; color: var(--brume); }
.qte-rang small b { color: var(--ecume); }
.qte { display: flex; align-items: center; }
.qte button { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--brume); }
.qte button:disabled { border-color: var(--bleu); color: var(--bleu); cursor: not-allowed; }
.qte svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.qte output { width: 56px; text-align: center; font: 400 32px/1 var(--titre); font-variant-numeric: lining-nums; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; padding: 4px 0; font-variant-numeric: tabular-nums; }
.cal__mois { grid-column: 1 / -1; padding: 12px 6px 2px; font-size: 14.5px; color: var(--reflet); }
.cal__sem { display: grid; place-items: center; height: 28px; font-size: 13px; color: var(--brume); }
.cal button { display: grid; place-items: center; min-height: 48px; font-size: 16px; }
.cal button[aria-checked="true"] { background: var(--ecume); color: var(--nuit); font-weight: 700; }
.cal button[aria-disabled="true"] { color: var(--brume); text-decoration: line-through; cursor: not-allowed; }
.cal .est-aujourdhui { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
@media (hover: hover) { .cal button:not([aria-disabled="true"]):not([aria-checked="true"]):hover { background: var(--bleu); } }

/* Les chiffres d'Imbue sont proportionnels : les heures sont en Inria Sans, dans des cases de largeur fixe. */
.creneaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 2px; padding: 4px 0; }
.creneaux button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 56px; font-size: 17px; font-variant-numeric: tabular-nums; }
.creneaux small { font-size: 12.5px; }
.creneaux button[aria-checked="true"] { background: var(--ecume); color: var(--nuit); font-weight: 700; }
.creneaux button[aria-disabled="true"] { color: var(--brume); cursor: not-allowed; }
.creneaux button[aria-disabled="true"] span { text-decoration: line-through; }
.creneaux .est-peu small { font-weight: 700; color: var(--ecume); }
.creneaux button[aria-checked="true"] small { color: var(--nuit); }
@media (hover: hover) { .creneaux button:not([aria-disabled="true"]):not([aria-checked="true"]):hover { background: var(--bleu); } }
.choix__note { padding: 12px 14px; font-size: 15px; color: var(--reflet); }

.total { margin-top: 8px; padding-top: 28px; border-top: 1px solid var(--ecume); color: var(--reflet); }
.total__lib { font-size: 14px; color: var(--brume); }
.total__prix { margin: 2px 0 14px; font-weight: 300; font-size: 88px; color: var(--ecume); }
.total p + p { margin-top: 2px; }
.total__action { margin-top: 28px; }
.total__rappel { display: none; }
.total__go { min-width: 280px; min-height: 56px; font-size: 17px; }

@media (max-width: 767px) {
  .rang__tete { grid-template-columns: minmax(0, 1fr) 20px; gap: 2px 12px; min-height: 64px; padding: 10px 0; }
  .rang__lib { grid-column: 1 / -1; }
  .rang__val { font-size: 30px; }
  .rang__choix { display: none; }
  /* Téléphone : pas de feuille, un sélecteur natif sous la ligne ; la valeur en Imbue en reste la lecture. */
  .rang { position: relative; }
  .rang[data-natif] .rang__tete { pointer-events: none; }
  .rang[data-natif="machines"] button.rang__tete::after { display: none; }
  .rang[data-natif="machines"] .rang__val { display: none; }
  .natif { position: relative; display: flex; align-items: center; min-height: 48px; }
  .natif + .natif { margin-top: -4px; }
  .natif__val { flex: 1 1 auto; font-size: 30px; line-height: 1.06; }
  .natif__val.est-vide { color: var(--brume); }
  /* Même chevron, même bord droit que les autres lignes. */
  .natif::after { content: ""; flex: none; width: 9px; height: 9px; margin: -6px 0 0 12px; border-right: 1.5px solid var(--brume); border-bottom: 1.5px solid var(--brume); transform: rotate(45deg); }
  .natif select { position: absolute; inset: 0; width: 100%; min-height: 48px; opacity: 0; font-size: 16px; cursor: pointer; }
  .rang:has(select:focus-visible) { outline: 2px solid var(--reflet); outline-offset: 2px; }
  .rang[data-natif]:not([data-natif="machines"]) .natif { position: absolute; inset: 0; }
  .rang[data-natif]:not([data-natif="machines"]) .natif__val, .rang[data-natif]:not([data-natif="machines"]) .natif::after { visibility: hidden; }
  .rang[data-natif="machines"] { padding-bottom: 10px; }
  .rang[data-natif="machines"] .rang__tete { min-height: 0; padding-bottom: 0; }
  .total__prix { font-size: 64px; }
  /* « Continuer » reste sous le pouce tant que la feuille est à l'écran. */
  .total__action { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 16px; margin: 20px calc(var(--marge) * -1) 0; padding: 12px var(--marge) calc(12px + env(safe-area-inset-bottom)); background: var(--nuit); border-top: 1px solid var(--bleu); }
  .total__action > div { flex: 1 1 auto; }
  .total__rappel { display: block; flex: none; min-width: 2.6em; font-size: 32px; color: var(--ecume); }
  .total__go { width: 100%; min-width: 0; }
  .depart { padding-top: 8px; padding-bottom: 0; }
  .depart__titre { margin-bottom: 12px; }
}
/* Téléphone court (iPhone SE, Safari barres ouvertes) : à l'arrivée par « Réserver », la ligne « Retour » reste au-dessus de la barre collante. */
@media (max-width: 767px) and (max-height: 720px) {
  .depart__titre { margin-bottom: 8px; font-size: 36px; }
  .rang__tete { min-height: 56px; padding: 6px 0; }
  .rang__val, .natif__val { font-size: 26px; }
  .rang[data-natif="machines"] { padding-bottom: 6px; }
}

/* Dans une liste de choix, l'anneau de focus se dessine à l'intérieur de la case : il ne mord pas sur la voisine. */
.option:focus-visible, .cal button:focus-visible, .creneaux button:focus-visible, .qte button:focus-visible { outline-offset: -4px; }
.rang__tete:focus-visible { outline-offset: 2px; }
