/* Lecteur 180/360. Textes posés sur l'image, sans fond : l'ombre garde la lecture
   possible sur une image claire. Tout est blanc, donc neutre avec des lunettes rouge/cyan. */
.lecteur {
  /* Polices : celles de la page si elle les définit, sinon Michroma et Anybody */
  --l-titre: var(--police-titre, Michroma, "Eurostile Extended", "Arial Nova", Arial, sans-serif);
  --l-police: var(--police-texte, Anybody, "Arial Nova", Arial, sans-serif);
  --l-texte: #ffffff;
  --l-ombre: 0 0 1px #000, 0 0 2px #000, 0 0 4px #000, 0 0 7px rgb(0 0 0 / .9), 0 0 14px rgb(0 0 0 / .75);
  --l-marge: clamp(14px, 2.4vw, 36px);
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: #000; color: var(--l-texte); overflow: hidden; font: 17px/1.35 var(--l-police); font-synthesis: none;
}
html:has(.lecteur[open]) { overflow: hidden; }
.lecteur::backdrop { background: #000; }
.lecteur [hidden] { display: none !important; }
.lecteur-scene { position: absolute; inset: 0; background: #000; }
.lecteur-source { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: .01; pointer-events: none; }
.lecteur-affiche { position: absolute; inset: 0; background: center / cover no-repeat; }
.lecteur-image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; cursor: grab; touch-action: none; }
.lecteur-image:active { cursor: grabbing; }
.lecteur.vu .lecteur-image { opacity: 1; }
.lecteur.vu .lecteur-affiche { display: none; }

.lecteur button, .lecteur select { font: inherit; font-weight: 600; color: var(--l-texte); background: none; border: 0; border-radius: 0; padding: 10px 0; min-height: 44px; cursor: pointer; text-shadow: var(--l-ombre); text-decoration: none; text-underline-offset: 7px; text-decoration-thickness: 2px; }
.lecteur button:hover, .lecteur select:hover, .lecteur button[aria-pressed="true"] { text-decoration-line: underline; }
/* Un menu coupe l'ombre de son texte au ras de sa boîte, ce qui dessine un rectangle : ombre par filtre à la place */
.lecteur select { appearance: none; -webkit-appearance: none; text-shadow: none; filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 2px rgb(0 0 0 / .85)) drop-shadow(0 0 6px rgb(0 0 0 / .6)); }
.lecteur select option { background: #1b1b1b; color: #fff; text-shadow: none; }
.lecteur :focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* Boutons en icônes : trait blanc, même ombre que le chevron du mur */
.lecteur .lecteur-icone { position: relative; display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; }
.lecteur-icone svg { width: 26px; height: 26px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 3px rgb(0 0 0 / .9)) drop-shadow(0 0 8px rgb(0 0 0 / .6)); transition: scale .15s; pointer-events: none; }
.lecteur-icone svg .plein { fill: currentColor; stroke: none; }
.lecteur button.lecteur-icone:hover svg, .lecteur-qualite-boite:hover svg { scale: 1.12; }
/* Lunettes actives : trait sous l'icône */
.lecteur button.lecteur-icone[aria-pressed="true"]::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 3px; height: 2px; background: #fff; box-shadow: 0 0 3px #000, 0 0 6px rgb(0 0 0 / .7); }
/* Qualité : vrai menu, transparent, posé sur la roue dentée */
.lecteur-qualite-boite { width: 44px; height: 44px; }
.lecteur .lecteur-qualite { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; padding: 0; min-height: 0; }
.lecteur-qualite-boite:has(select:focus-visible) { outline: 3px solid #fff; outline-offset: 4px; }

.lecteur-titre { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lecteur .lecteur-fermer { position: absolute; z-index: 1; right: var(--l-marge); top: calc(var(--l-marge) - 10px); }
.lecteur-etat, .lecteur-aide { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; font-weight: 600; white-space: nowrap; pointer-events: none; text-shadow: var(--l-ombre); }
.lecteur-etat { top: 46%; }
.lecteur-aide { top: 22%; }

.lecteur-commandes { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--l-marge) max(calc(var(--l-marge) - 10px), env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(160px, 1fr) auto; gap: 0 28px; align-items: center; pointer-events: none; }
.lecteur-commandes button, .lecteur-commandes select, .lecteur-commandes input, .lecteur-commandes label { pointer-events: auto; }
.lecteur-ligne { display: flex; gap: 0 24px; align-items: center; flex-wrap: wrap; }
.lecteur-temps-ligne { flex-wrap: nowrap; gap: 14px; }
.lecteur-temps { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; text-shadow: var(--l-ombre); }
.lecteur-divers { justify-content: flex-end; gap: 0 6px; }

.lecteur input[type="range"] { appearance: none; -webkit-appearance: none; background: none; min-height: 32px; min-width: 60px; margin: 0; cursor: pointer; }
.lecteur input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .35), 0 0 10px rgb(0 0 0 / .45); }
.lecteur input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .4), 0 0 8px rgb(0 0 0 / .5); }
.lecteur input[type="range"]::-moz-range-track { height: 3px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .35), 0 0 10px rgb(0 0 0 / .45); }
.lecteur input[type="range"]::-moz-range-thumb { width: 17px; height: 17px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .4), 0 0 8px rgb(0 0 0 / .5); }
.lecteur-barre { flex: 1; }

.lecteur-3d { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 34px; align-items: center; text-shadow: var(--l-ombre); font-weight: 600; }
.lecteur-3d label { display: flex; gap: 12px; align-items: center; }
.lecteur-3d input[type="range"] { width: 160px; }
.lecteur-3d output { min-width: 46px; font-variant-numeric: tabular-nums; }
.lecteur-3d input[type="checkbox"] { width: 20px; height: 20px; accent-color: #fff; }
.lecteur-3d p { margin: 0; font-weight: 500; }

.lecteur-fin { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; background: rgb(0 0 0 / .72); padding-bottom: 90px; }
.lecteur-fin p { margin: 0; font: 400 25px/1.25 var(--l-titre); }
.lecteur-fin div, .lecteur-fin span { display: flex; flex-wrap: wrap; gap: 0 28px; align-items: center; justify-content: center; }
.lecteur-fin span:empty { display: none; }
.lecteur-fin button, .lecteur-fin a { color: #fff; font-weight: 600; text-decoration: underline 2px; text-underline-offset: 7px; }
.lecteur-fin .lecteur-icone { min-width: 64px; min-height: 64px; }
.lecteur-fin .lecteur-icone svg { width: 40px; height: 40px; }

/* Commandes rangées pendant le film */
.lecteur-commandes, .lecteur-fermer { transition: opacity .25s, visibility .25s; }
.lecteur.calme .lecteur-commandes, .lecteur.calme .lecteur-fermer { opacity: 0; visibility: hidden; }
.lecteur.calme .lecteur-image { cursor: none; }

@media (max-width: 720px) {
  .lecteur-commandes { grid-template-columns: minmax(0, 1fr); }
  .lecteur-commandes > * { min-width: 0; }
  .lecteur-divers { justify-content: space-between; }
  .lecteur-aide { white-space: normal; width: min(80vw, 300px); text-align: center; text-wrap: balance; }
  .lecteur-3d { gap: 0 18px; flex-wrap: nowrap; }
  .lecteur-3d label { min-width: 0; gap: 10px; }
  .lecteur-3d label:nth-child(2) { flex: 1; }
  .lecteur-3d input[type="range"] { width: auto; flex: 1; min-width: 40px; }
  .lecteur-3d .lecteur-case, .lecteur-3d p, .lecteur-3d label:first-child > span { display: none; }
}
@media (max-width: 720px) and (orientation: portrait) {
  .lecteur-plein { display: none; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .lecteur { font-size: 15px; }
  .lecteur button, .lecteur select { min-height: 38px; padding: 6px 0; }
  .lecteur .lecteur-icone { min-height: 38px; }
  .lecteur-3d p { display: none; }
}
