/* Polices hébergées sur le site (sous-ensemble latin, licence OFL : vendor/fonts/OFL-*.txt) : aucune requête vers un tiers. */
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url(vendor/fonts/eb-garamond-400.woff2) format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url(vendor/fonts/eb-garamond-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url(vendor/fonts/hanken-grotesk-400.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url(vendor/fonts/hanken-grotesk-500.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url(vendor/fonts/hanken-grotesk-600.woff2) format('woff2'); }
/* Tokens Atelya (projets/032-EXT-atelya/workdir/site.css) */
:root { color-scheme: dark; --bg: #131315; --surface: #1b1b1d; --fg: #e4e2e4; --mut: #c5c6cd; --acc: #e4c198; --on-acc: #422c0f; --pri: #bbc6e3; --bad: #ffb4ab; --line: rgba(126,128,136,.25); }
/* Thème clair : mêmes rôles, contrastes AA sur fond clair (or assombri pour le texte). */
:root[data-theme="light"] { color-scheme: light; --bg: #f7f5f0; --surface: #ffffff; --fg: #1b1b1d; --mut: #55565c; --acc: #8a6232; --on-acc: #ffffff; --pri: #2f4a7a; --bad: #b3261e; --line: rgba(60,60,70,.18); }
.ctl { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.ctl button { font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .05em; padding: 4px 8px; min-height: 32px; border-radius: 4px; border: 1px solid var(--line); background: none; color: var(--mut); cursor: pointer; }
.ctl button:hover { color: var(--fg); border-color: var(--acc); }
.ctl button[aria-pressed="true"] { color: var(--on-acc); background: var(--acc); border-color: var(--acc); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: 'Hanken Grotesk', sans-serif; }
body { display: flex; flex-direction: column; }
header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 16px 24px 4px; }
.brand { font-family: 'EB Garamond', serif; font-size: 24px; color: var(--acc); letter-spacing: -.025em; text-decoration: none; margin-right: 14px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
footer { padding: 6px 24px 10px; font-size: 13px; color: var(--mut); border-top: 1px solid var(--line); }
footer a { color: var(--pri); }
@media (max-width: 600px) { header, #legend, #hint, footer { padding-left: 16px; padding-right: 16px; } h1 { font-size: 24px; } }
h1 { margin: 0; display: inline; font-family: 'EB Garamond', serif; font-weight: 400; font-size: 30px; color: var(--fg); }
#status { font-size: 15px; color: var(--mut); }
#status.err { color: var(--bad); }
#legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 24px; font-size: 15px; color: var(--mut); }
#legend b { display: inline-block; min-width: 26px; padding: 1px 6px; margin-right: 6px; border-radius: 6px; color: #fff; text-align: center; }
#map { flex: 1; min-height: 0; }
.pick { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--acc); box-shadow: 0 0 0 3px rgba(19,19,21,.6); }
.veh-pop .maplibregl-popup-content { background: var(--surface); color: var(--fg); font-family: 'Hanken Grotesk', sans-serif; border: 1px solid var(--line); border-radius: 6px; padding: 10px 28px 10px 12px; }
.veh-pop .maplibregl-popup-tip { border-top-color: var(--surface); border-bottom-color: var(--surface); }
.veh-pop .maplibregl-popup-close-button { color: var(--mut); font-size: 18px; }
.vp-head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.vp-head b { min-width: 28px; padding: 1px 6px; border-radius: 4px; color: #fff; text-align: center; }
.vp-dest { margin-top: 6px; font-size: 15px; }
.vp-est { margin-top: 6px; font-size: 12px; color: var(--acc); font-style: italic; }
.vp-meta { margin-top: 2px; font-size: 13px; color: var(--mut); }
#next-open, .primary { font: inherit; font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: 4px; border: 0; background: var(--acc); color: var(--on-acc); cursor: pointer; transition: opacity 150ms cubic-bezier(.16,1,.3,1); }
#next-open:hover, .primary:hover { opacity: .88; }
#next { position: fixed; right: 16px; bottom: 56px; width: min(360px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.4); padding: 14px 16px; z-index: 10; }
#next[hidden] { display: none; }
#next .top { display: flex; justify-content: space-between; align-items: center; }
#next .title { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
#next-close { font: inherit; font-size: 22px; line-height: 1; background: none; border: 0; color: var(--mut); cursor: pointer; padding: 4px 8px; min-width: 44px; min-height: 44px; }
#next h2 { font-family: 'EB Garamond', serif; font-weight: 400; font-size: 24px; margin: 6px 0 2px; color: var(--fg); }
#next .meta { font-size: 13px; color: var(--mut); margin: 4px 0 8px; }
#next .err { color: var(--bad); font-size: 14px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 15px; }
.rows b { min-width: 30px; padding: 2px 6px; border-radius: 4px; color: #fff; text-align: center; font-size: 14px; }
.rows .dest { flex: 1; }
.rows .mins { color: var(--acc); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows .mins.late { color: var(--bad); }
.ico { width: 18px; height: 18px; flex: none; vertical-align: -4px; color: var(--mut); }
#legend label { display: inline-flex; align-items: center; gap: 4px; }
#next h2 .ico { width: 22px; height: 22px; margin-right: 6px; color: var(--acc); }
.vp-head .ico { color: var(--mut); }
.incidents { margin: 8px 0; padding: 8px 10px; border-left: 3px solid var(--acc); background: rgba(228,193,152,.08); border-radius: 4px; }
.inc-title { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); }
.inc { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--fg); }
.others { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 13px; padding: 6px 10px; min-height: 36px; border-radius: 4px; border: 1px solid var(--line); background: none; color: var(--fg); cursor: pointer; }
.chip:hover { border-color: var(--acc); }
button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
#legend label { cursor: pointer; }
#hint { padding: 0 24px 6px; font-size: 13px; color: var(--mut); }
#legend { align-items: center; }
#legend .more { display: inline-block; position: relative; font-size: 15px; color: var(--mut); }
#legend .more summary { cursor: pointer; list-style: none; padding: 2px 8px; border: 1px solid var(--line); border-radius: 4px; }
#legend .more summary::-webkit-details-marker { display: none; }
#legend .more summary::after { content: ' ▾'; }
#legend .more[open] summary::after { content: ' ▴'; }
#legend .more-box { position: absolute; z-index: 20; top: 100%; left: 0; margin-top: 4px; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.3); white-space: nowrap; }
/* Mobile et accessibilité (Styloscope 12/11) : textes ≥ 14 px, cibles tactiles ≥ 44 px, pas de délai de tap. */
html { touch-action: manipulation; }
#hint, footer { font-size: 14px; }
#legend label { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; }
#legend input[type=checkbox] { width: 20px; height: 20px; }
.ctl button, .chip, #next-close, #legend .more summary { min-height: 44px; min-width: 44px; }
.ctl { gap: 8px; }
/* Pages de texte (À propos, 404). */
body.page { display: block; height: auto; }
.doc { max-width: 720px; margin: 0 auto; padding: 24px 20px 48px; line-height: 1.6; font-size: 16px; }
.doc h1 { font-family: 'EB Garamond', serif; font-weight: 400; font-size: 36px; color: var(--acc); margin: 12px 0; }
.doc h2 { font-family: 'EB Garamond', serif; font-weight: 400; font-size: 24px; margin: 28px 0 8px; }
.doc a { color: var(--pri); }
/* Mobile (Styloscope 12/11, 2e passage) : aucun texte sous 14 px, champs à 16 px (pas de zoom iOS), cibles 48 px
   espacées de 8 px, pas de délai de tap sur les éléments actifs. */
a, button, input, label, summary { touch-action: manipulation; }
input, select, textarea { font-size: 16px; }
@media (max-width: 767px) {
  .eyebrow, .ctl button, .vp-meta, .vp-est, .inc, .inc-title, .chip, #next .meta, #next .title, .rows b, footer, #hint, #status, #legend { font-size: 14px !important; }
  .ctl button, .chip, #next-close, #legend .more summary, #next-open, .primary { min-height: 48px; min-width: 48px; }
  #legend label { min-height: 48px; }
  .ctl, .others, #legend { gap: 8px; }
}
/* Sélecteur de langue (liste native : compact, accessible). */
.ctl select { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }
.ctl select:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
footer .sources { display: none; }
/* Téléphone (12/11) : la carte prend l'écran. En-tête sur deux lignes courtes, filtres sur une ligne qui défile,
   « Prochains passages » en bouton flottant, panneau en bas d'écran, pied réduit à un lien vers les sources. */
@media (max-width: 767px) {
  body { height: 100dvh; }
  header { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 0; gap: 4px 8px; align-items: center; }
  header > div:first-child { flex: 1 1 auto; min-width: 0; }
  .brand { font-size: 20px; margin-right: 8px; }
  h1 { font-size: 20px !important; }
  .eyebrow { display: none; }
  header > div:last-child { display: flex; align-items: center; gap: 8px; width: 100%; }
  #status { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ctl { margin-left: 0; }
  .ctl select { font-size: 16px; min-height: 48px; }
  #legend { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px 14px; padding-top: 2px; }
  #legend::-webkit-scrollbar { display: none; }
  #legend label, #legend .more { flex: none; white-space: nowrap; }
  /* Menu « Autres couches » hors de la ligne qui défile (sinon rogné) : position fixe sous son bouton. */
  #legend .more-box { position: fixed; top: auto; left: 16px; right: 16px; white-space: normal; }
  #next-open { position: fixed; z-index: 9; left: 50%; transform: translateX(-50%); bottom: calc(52px + env(safe-area-inset-bottom)); box-shadow: 0 6px 20px rgba(0,0,0,.45); border-radius: 24px; padding: 12px 22px; }
  #next-open[aria-expanded="true"] { display: none; }
  #next { left: 0; right: 0; bottom: 0; width: 100%; max-height: 55dvh; border-radius: 12px 12px 0 0; border-bottom: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  footer { padding-top: 4px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); white-space: nowrap; overflow-x: auto; }
  footer .credits { display: none; }
  footer .sources { display: inline; }
  footer .mail { display: none; }
  /* Encoche en paysage (viewport-fit=cover) : marges latérales sûres. */
  header, #legend, #hint, footer { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  /* Attribution du fond de carte : « i » à 44 px ; dépliée, le bouton flottant s'efface pour ne pas la couvrir. */
  .maplibregl-ctrl-attrib-button { min-width: 44px; min-height: 44px; background-repeat: no-repeat; background-position: center; }
  .maplibregl-ctrl-attrib.maplibregl-compact { min-width: 44px; min-height: 44px; }
  .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) { background: transparent; padding: 0; min-width: 44px; }
  .maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-button { border-radius: 50%; background-color: rgba(255,255,255,.85); }
  .maplibregl-ctrl-attrib.maplibregl-compact::after { display: none; }
  body:has(.maplibregl-compact-show) #next-open { display: none; }
  /* Ligne de passage : la destination garde sa largeur, les minutes passent dessous si besoin. */
  .rows li { flex-wrap: wrap; row-gap: 2px; }
  .rows .dest { flex: 1 1 40%; min-width: 0; }
  .rows .mins { flex: 0 1 auto; margin-left: auto; white-space: normal; text-align: right; }
  footer a { display: inline-block; padding: 12px 0; }
}
/* Revue UX 12/11 : aide masquée au premier geste partout ; état cliquable (détail par réseau) ; contrôles de la carte. */
body.used #hint { display: none; }
#status-more { font: italic 600 15px 'EB Garamond', serif; min-width: 44px; min-height: 44px; margin-left: 2px; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--mut); cursor: pointer; flex: none; }
#status-more[hidden], #status-detail[hidden] { display: none; }
#status-more[aria-expanded="true"] { color: var(--on-acc); background: var(--acc); border-color: var(--acc); }
#status-detail { padding: 0 24px 6px; font-size: 14px; color: var(--mut); }
@media (max-width: 767px) { #status-detail { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); } }
.locate-btn .ico { width: 18px; height: 18px; color: #333; vertical-align: middle; }
@media (pointer: coarse), (max-width: 767px) { .maplibregl-ctrl-group button { width: 44px; height: 44px; } }
@media (max-width: 767px) { header > div:last-child { flex-wrap: wrap; } #status.err { white-space: normal; overflow: visible; order: 3; flex: 1 1 100%; } }
.view3d-btn { font: 600 13px 'Hanken Grotesk', sans-serif !important; color: #333; }
.view3d-btn[aria-pressed="true"] { background: #e4c198 !important; color: #422c0f; }
