/* Scène 4 — la règle devient le module : la règle des jours en haut, la phrase, les rangées. */
.s4 {
  display: flex; flex-direction: column;
  padding: clamp(16px, 2.4vh, 28px) 0 clamp(24px, 4vh, 48px);
}
.jours { position: relative; background: #fff; border-top: 2px solid var(--encre); border-bottom: 2px solid var(--encre); }
.jours.va-deplier { transform: translateY(var(--dy, 200px)); opacity: 0; }
.jours.va-deplier.deplie { transform: none; opacity: 1; transition: transform .45s var(--courbe), opacity .3s; }
.jours__piste {
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.jours__piste::-webkit-scrollbar { display: none; }
.jours__piste:focus-visible { outline: 2px solid var(--encre); outline-offset: 4px; }
.jours__rang { display: flex; width: max-content; padding-inline: calc(50% - 28px); }
.jour {
  position: relative; flex: none; width: 56px; height: 84px; padding-top: 10px;
  display: grid; justify-items: center; align-content: start; gap: 2px;
  scroll-snap-align: center; border-left: 1px solid rgb(16 38 27 / .14);
  font-variant-numeric: tabular-nums;
}
.jour__ini { font: 600 13px/1 var(--texte); font-stretch: 80%; color: var(--gris); }
.jour__n { font: 600 22px/1.1 var(--titre); }
.jour__c { font: 500 12.5px/1 var(--texte); color: var(--gris); }
.jour__mois { position: absolute; left: 4px; bottom: 4px; font: 600 11px/1 var(--texte); color: var(--pin); }
.jour.est-ferme { background: repeating-linear-gradient(135deg, rgb(16 38 27 / .16) 0 1.5px, transparent 1.5px 7px); cursor: default; }
.jour.est-ferme .jour__n { text-decoration: line-through; text-decoration-thickness: 2px; }
.jour[aria-current] .jour__n, .jour[aria-current] .jour__ini, .jour[aria-current] .jour__c { color: #fff; }
.jour[aria-current] { background: var(--encre); }
.jours__aiguille { position: absolute; left: 50%; top: -14px; bottom: -14px; width: 16px; margin-left: -8px; pointer-events: none; }
.jours__aiguille::before, .jours__aiguille::after { content: ""; position: absolute; left: 0; width: 16px; height: 12px; background: var(--encre); }
.jours__aiguille::before { top: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.jours__aiguille::after { bottom: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

.module { width: 100%; padding: 0 var(--marge); display: grid; gap: clamp(14px, 2.4vh, 26px); margin-top: clamp(18px, 3vh, 36px); }
.module__depart { font: 600 clamp(26px, 2.6vw, 44px)/1.15 var(--titre); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.module__sorties { border: 0; margin: 0; padding: 0; min-width: 0; }
.module__sorties > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.rang {
  position: relative; display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto; grid-template-areas: "case nom duree prix" ". note note note";
  align-items: center; column-gap: 14px; row-gap: 4px;
  min-height: 64px; padding: 12px 18px; background: #fff; cursor: pointer;
}
.rang input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: inherit; font-size: 16px; width: 100%; height: 100%; }
.rang__case { grid-area: case; width: 22px; height: 22px; border: 2px solid var(--encre); border-radius: 50%; display: grid; place-items: center; }
.rang input:checked ~ .rang__case::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pin); }
.rang:has(input:checked) { box-shadow: inset 0 0 0 2px var(--pin); }
.rang:has(input:focus-visible) { outline: 2px solid var(--encre); outline-offset: 2px; }
.rang__nom { grid-area: nom; font: 500 18px/1.2 var(--texte); }
.rang__duree { grid-area: duree; font: 400 16px/1 var(--texte); font-variant-numeric: tabular-nums; }
.rang__prix { grid-area: prix; font: 600 24px/1 var(--titre); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.rang__note { grid-area: note; font: 400 15px/1.35 var(--texte); color: var(--gris); }
.rang.est-barre { cursor: not-allowed; background: repeating-linear-gradient(135deg, rgb(16 38 27 / .07) 0 1.5px, #fff 1.5px 8px); }
.rang.est-barre .rang__nom { text-decoration: line-through; text-decoration-thickness: 2px; }
.rang.est-barre .rang__case { border-style: dashed; }
.rang.est-barre .rang__note { color: var(--encre); font-weight: 600; }

.module__bas { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 16px 40px; }
.module__l { display: block; font: 600 15px/1 var(--texte); margin-bottom: 8px; }
.pas { display: flex; align-items: center; background: #fff; }
.pas button { width: 52px; height: 52px; display: grid; place-items: center; }
.pas button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pas button:disabled { color: #9AAAA0; cursor: default; }
.pas output { min-width: 40px; text-align: center; font: 600 26px/1 var(--titre); font-variant-numeric: tabular-nums; }
.module__reste { margin-top: 6px; font: 500 15px/1.2 var(--texte); color: var(--gris); min-height: 1.2em; }
.module__total { justify-self: end; text-align: right; }
.module__somme { font: 700 clamp(64px, 5.6vw, 96px)/.95 var(--titre); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.module__vide { display: block; font: 600 clamp(22px, 2vw, 30px)/1.2 var(--titre); }
.module__acompte { margin-top: 8px; font: 500 16px/1.35 var(--texte); }
.continuer {
  min-width: 200px; height: 56px; padding: 0 28px;
  background: var(--pin); color: #fff; font: 600 18px/1 var(--texte);
  border-radius: 4px;
}
.continuer:disabled { background: #fff; color: var(--gris); box-shadow: inset 0 0 0 2px #9AAAA0; cursor: not-allowed; }
@media (hover: hover) { .continuer:not(:disabled):hover { background: var(--encre); } }
.module__maree { font: 500 16px/1.4 var(--texte); color: var(--gris); max-width: 62ch; }
.mentions { font: 500 12.5px/1.4 var(--texte); color: var(--gris); }

@media (max-width: 1199px) {
  .module__sorties > div { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .jour { height: 76px; }
  .module__depart { font-size: 26px; }
  .rang { column-gap: 10px; padding: 10px 14px; grid-template-areas: "case nom prix" ". duree duree" ". note note"; grid-template-columns: 24px minmax(0, 1fr) auto; }
  .rang__nom { font-size: 17px; }
  .rang__duree { font-size: 15px; }
  .rang__prix { font-size: 22px; min-width: 0; }
  .rang__note { font-size: 14px; }
  .module__bas { grid-template-columns: 1fr auto; }
  .module__total { grid-column: 1 / -1; grid-row: 1; justify-self: start; text-align: left; }
  .module__somme { font-size: 64px; }
  .continuer { align-self: end; min-width: 0; width: 100%; }
}
