/* 3. Le banc : lectures, temps à la main, réglages, demande. Les mêmes dans chaque vitrine, posés autrement. */

/* « Jouer » se reconnaît de loin, et au triangle */
.lectures [data-jouer="normale"]:not(.en-lecture)::before { content: ""; display: inline-block; margin-right: 9px; border: solid transparent; border-width: 6px 0 6px 10px; border-left-color: currentColor; }
.lectures [data-jouer="normale"].en-lecture::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 9px; background: currentColor; }
.lectures [data-jouer="normale"]::after { padding-left: 19px; } /* le signe et son écart */
.lectures { display: flex; flex-wrap: wrap; gap: 8px; }
.lectures button { border-color: var(--trait); background: var(--papier); color: var(--encre); }
.lectures [data-jouer="normale"], .lectures .en-lecture { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
@media (hover: hover) { .lectures button:hover, .copier button:hover { border-color: var(--encre); background: var(--encre); color: var(--papier); } }

/* ---------- Le temps à la main ---------- */
.horaire { padding: 12px 16px 8px; background: var(--papier); color: var(--encre); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--trait), 0 10px 22px rgb(30 18 50 / .12); }
.horaire figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 14px; font-weight: 600; }
.horaire figcaption span { font-weight: 400; color: var(--doux); }
.horaire.est-ratee { --courbe: var(--rate); }
.horaire { --courbe: var(--accent); --rate: #b3261e; }
.heure-lumen .horaire, .heure-peigne .horaire, .heure-monter .horaire, .heure-billet .horaire { --rate: #ff9d8a; }
.horaire.est-ratee figcaption span { color: var(--rate); font-weight: 600; }
/* La réglette déborde de 8 px de chaque côté : le centre du bouton tombe juste sur le repère */
.rails { position: relative; margin: 4px 8px 0; cursor: ew-resize; touch-action: pan-y; user-select: none; }
.piste-nom { display: block; padding-left: 5px; font-size: .84rem; line-height: 1.25; color: var(--encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail { position: relative; height: 24px; margin-bottom: 4px; border-bottom: 1px solid var(--trait); }
.rail svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rail polyline { fill: none; stroke: var(--courbe); stroke-width: 2.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.est-ratee .rail polyline { stroke-dasharray: 6 4; }
.rail line { stroke: var(--trait); vector-effect: non-scaling-stroke; stroke-dasharray: 2 3; }
.barre { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--courbe) 22%, var(--papier)); border-left: 2px solid var(--courbe); border-right: 2px solid var(--courbe); }
.piste-totale .rail { height: 9px; border: 0; }
.piste-totale .barre { background: var(--courbe); border: 0; }
.piste-totale .barre-bonne { background: var(--accent); top: 5px; box-shadow: 0 -2px 0 var(--papier); }
.barre-attente { background: repeating-linear-gradient(115deg, transparent 0 5px, var(--trait) 5px 7px); border-color: var(--trait); }
.rail:has(.barre-attente) { height: 12px; }
.graduations { position: relative; height: 18px; font-size: .8rem; color: var(--doux); font-variant-numeric: tabular-nums; }
.graduations span { position: absolute; padding-left: 3px; border-left: 1px solid var(--trait); line-height: 1.2; }
.repere { position: absolute; top: 0; bottom: 14px; left: 0; width: 2px; margin-left: -1px; background: var(--encre); pointer-events: none; }
.horaire label { display: block; }
.horaire input { height: 30px; }
.horaire output { display: block; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .95rem; }

/* ---------- Les réglages ---------- */
.reglages { display: grid; gap: 4px 22px; min-width: 0; padding: 10px 16px 12px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--trait), 0 10px 22px rgb(30 18 50 / .12); background: var(--papier); color: var(--encre); }
.reglages > legend { float: left; font-weight: 600; }
.reglages > label { display: grid; grid-template-columns: 1fr auto; align-items: end; font-size: .95rem; }
.reglages > label input { grid-column: 1 / -1; }
.reglages output { font-weight: 600; font-variant-numeric: tabular-nums; }
.courbes { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.courbes legend { float: left; width: 100%; font-size: .95rem; }
.courbes label { position: relative; display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 2px 10px 2px 7px; border: 1px solid var(--trait); border-radius: 3px; font-size: .88rem; line-height: 1.1; cursor: pointer; }
.courbes input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.courbes svg { width: 34px; height: 30px; overflow: visible; }
.courbes path { fill: none; stroke: currentColor; stroke-width: 3; }
.courbes label:has(:checked) { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
.courbes label:has(:focus-visible) { outline: 3px solid var(--encre); outline-offset: 2px; }

/* ---------- La demande ---------- */
/* La demande : un bon détaché d'un carnet */
.demande { padding: 16px 22px 14px 30px; color: var(--encre); background: radial-gradient(circle at 0 12px, transparent 6px, var(--papier) 6.6px) 0 0 / 100% 24px; border-radius: 0 8px 8px 0; }
.demande h3 { font: 700 1.5rem/1.1 var(--titre); margin-bottom: 6px; }
.demande .courte { max-width: 56ch; font-size: 1.08rem; }
.demande .precise { max-width: 72ch; margin-top: 4px; }
.demande b { font-weight: 600; white-space: nowrap; }
.demande summary { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; list-style: none; }
.demande summary::-webkit-details-marker { display: none; }
.demande summary::before { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 3px 3px 0; rotate: -45deg; }
[data-motion="full"] .demande summary::before { transition: rotate .18s ease-out; }
.demande [open] summary::before { rotate: 45deg; }
.demande summary:active { color: var(--accent); }
.demande summary:hover { text-decoration: underline; }
.copier { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 8px 0 2px; }
.copier button { border-color: var(--trait); background: var(--papier); color: var(--encre); }
.de-trop { max-width: 56ch; }
.de-trop strong { font-weight: 600; color: var(--accent); }

.bilan-ratee { flex-basis: 100%; font-weight: 600; }
.bilan-ratee:empty { position: absolute; }
