/* Version mobile (téléphone tenu en PAYSAGE). La classe « mobile » est posée sur <html> par index.html (écran tactile de moins de 900 px, ou ?mobile pour tester). */
html.mobile, html.mobile body { touch-action: none; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; height: 100dvh; }

/* en portrait, la scène serait trop petite : on demande de tourner le téléphone */
#tourner { display: none; }
@media (orientation: portrait) {
  html.mobile #tourner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; text-align: center; text-transform: uppercase; padding: 24px; box-sizing: border-box; }
  html.mobile #tourner svg { width: 64px; animation: tourne-tel 2.4s steps(1) infinite; }
  html.mobile #tourner .t1 { font-size: clamp(15px, 5.2vw, 22px); letter-spacing: 2px; max-width: 100%; }
  html.mobile #tourner .t2 { font-size: clamp(10px, 3.2vw, 13px); letter-spacing: 1px; opacity: .8; max-width: 100%; }
  html.mobile #tourner .btn { margin-top: 12px; font-size: 14px; }
}
@keyframes tourne-tel { 0%, 45% { transform: rotate(0deg); } 50%, 95% { transform: rotate(-90deg); } }

/* paysage, petits écrans : tout l'interface rétrécit */
@media (max-height: 520px) {
  html.mobile .btn { font-size: 12px; padding: 5px 10px; margin: 2px; letter-spacing: 1px; }
  html.mobile #retour { left: 10px; top: 8px; } html.mobile #quitter { right: 10px; top: 8px; gap: 6px; }
  html.mobile #points { top: 10px; gap: 5px; } html.mobile #points button { font-size: 10px; padding: 5px 7px; line-height: 14px; letter-spacing: 0; }
  html.mobile #plaque { font-size: 26px; padding: 4px 16px 6px; letter-spacing: 2px; }
  html.mobile #aide { left: 10px; bottom: 8px; gap: 16px; font-size: 11px; letter-spacing: 1px; }
  html.mobile .marque i { font-size: 11px; padding: 1px 6px; letter-spacing: 0; }
  html.mobile #toast { font-size: 12px; }
  html.mobile #passer { right: 10px; bottom: 10px; width: 40px; height: 40px; }
  /* lecteur compact : plus étroit, en bas à droite */
  html.mobile body.lec-compact #lecteur { width: min(360px, calc(100vw - 200px)); padding: 8px; gap: 3px 8px; }
  html.mobile body.lec-compact #lecteur .btn { width: 34px; height: 34px; padding: 0; }
  html.mobile body.lec-compact #lec-titre { font-size: 12px; letter-spacing: 1px; }
  html.mobile body.lec-compact #lec-temps, html.mobile body.lec-compact #lec-duree { font-size: 11px; min-width: 24px; }
  html.mobile body.lec-compact #lecteur #lec-barre { height: 16px; }
  html.mobile body.lecpos-droite.lecteur-on #lecteur { right: 10px; bottom: 10px; }
  /* chargement */
  html.mobile #chargement-titre { font-size: 56px; } html.mobile #chargement .barre { margin-top: 16px; height: 22px; }
  html.mobile #chargement-sous { font-size: 13px; letter-spacing: 6px; } html.mobile #chargement .ligne { font-size: 11px; margin-top: 10px; }
  html.mobile #chargement-pct { font-size: 18px; }
}

/* ?capture dans l'adresse : aucune interface à l'écran (captures d'écran propres, image d'aperçu du site) */
html.capture #points, html.capture #retour, html.capture #quitter, html.capture #aide, html.capture #marques, html.capture #lecteur, html.capture #plaque, html.capture #tip, html.capture #toast, html.capture #astuce, html.capture #passer, html.capture #defile, html.capture #tourner { display: none !important; }
