/* The film is a window onto the road; the existing depth and reply stay. */
@import url('./route-v1.css?v=3');

.av-road { scroll-margin-top: 78px; }
.av-road-backdrop {
  background-image: url('./affiche-paysage.webp');
  background-position: center 55%;
  filter: blur(24px) saturate(.8);
  opacity: .64;
}
.av-road::before {
  background: linear-gradient(110deg,#11182766,#111827bd 58%,#111827f5),linear-gradient(0deg,#131a29,transparent 66%);
}
.av-road-layout { max-width: 1200px; gap: clamp(28px,4vw,58px); }
.av-road-figure { position: relative; width: min(100%,800px); }
.av-road-frame {
  aspect-ratio: 16 / 9;
  background: #171d29;
  border: 1px solid #fff2;
  border-radius: clamp(18px,2vw,28px);
  box-shadow: 0 24px 68px #02081766,0 1px 0 #ffffff1c inset;
}
.av-road-frame > picture,
.av-road-frame > picture > img,
.av-road-preview { display: block; width: 100%; height: 100%; object-fit: contain; }
.av-road-preview {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  transition: opacity .5s ease;
}
.av-road-frame.is-previewing .av-road-preview { opacity: 1; }
.av-road-film-open {
  position: absolute; inset: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; border: 0;
  border-radius: clamp(18px,2vw,28px);
  display: flex; align-items: end; padding: clamp(14px,2.4vw,24px);
  background: linear-gradient(0deg,#070e20b8,transparent 38%);
  color: #fff; cursor: pointer; text-align: left; font: inherit;
}
.av-road-film-label { display: flex; align-items: center; gap: 12px; }
.av-road-film-label strong { font-size: 1rem; line-height: 1.3; font-weight: 750; }
.av-road-film-label small { display: block; font-size: .875rem; color: #f8f4eb; margin-top: 3px; }
.av-road-play {
  display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px;
  border: 1px solid #fff7; border-radius: 50%; background: #ffcf4d; color: #192333;
  box-shadow: 0 5px 20px #0004; transition: transform .2s,box-shadow .2s;
}
.av-road-play svg { width: 21px; height: 21px; fill: currentColor; margin-left: 3px; }
.av-road-preview-toggle {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid #fff5; border-radius: 50%; color: #fff; background: #141d30b8;
  cursor: pointer; backdrop-filter: blur(10px);
}
.av-road-preview-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.av-road-preview-toggle .av-road-preview-resume { display: none; }
.av-road-preview-toggle[data-state='paused'] .av-road-preview-resume { display: block; }
.av-road-preview-toggle[data-state='paused'] .av-road-preview-pause { display: none; }
.av-road-preview-note {
  position: absolute; left: 16px; top: 21px; padding: 6px 10px;
  border-radius: 20px; color: #fff; background: #111a2b9c;
  font-size: .875rem; pointer-events: none; opacity: 0;
}
.av-road-frame.is-previewing .av-road-preview-note { opacity: 1; }
.av-road figcaption { margin: 7px 0 0; text-align: start; font-size: .45rem; color: #c5cbd6; opacity: .8; }
.av-road-answer { gap: 22px; }
.av-road-kicker { margin: 0; color: var(--road-gold); font-size: .875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.av-road h2 { font-size: clamp(1.8rem,3.1vw,3rem); max-width: 23ch; }
.av-road-welcome { max-width: 28ch; color: #e5e6ed; line-height: 1.6; font-size: 1rem; margin: -5px 0 0; }
.av-road-sign { transition: transform .18s,box-shadow .18s,background .18s; }
.av-road-film-open:focus-visible { outline: 3px solid var(--road-gold); outline-offset: -7px; border-radius: inherit; }
.av-road-preview-toggle:focus-visible,
.av-road-cinema button:focus-visible,
.av-road-cinema a:focus-visible { outline: 3px solid #ffcf4d; outline-offset: 4px; }
[hidden].av-road-preview-toggle { display: none; }
@media(hover:hover) {
  .av-road-film-open:hover .av-road-play { transform: scale(1.08); box-shadow: 0 0 0 7px #ffcf4d24,0 5px 20px #0004; }
  .av-road-preview-toggle:hover { background: #293c59; }
}
@media(min-width:1000px) {
  .av-road-layout { grid-template-columns: minmax(0,1.85fr) minmax(0,1fr); align-items: center; }
  .av-road-answer { justify-items: start; text-align: start; }
  .av-road h2 { max-width: 13ch; }
}
@media(orientation:portrait) and (max-width:1024px) {
  .av-road-frame { aspect-ratio: 9 / 16; }
  .av-road-figure { width: min(100%,340px,calc(53svh * 9 / 16)); }
  .av-road figcaption { text-align: center; }
  .av-road-backdrop { background-image: url('./affiche-portrait.webp'); }
  .av-road-layout { gap: 30px; }
  .av-road-film-open {
    position: static; aspect-ratio: auto; align-items: center; justify-content: center;
    margin-block-start: 10px; padding: 8px 12px; border: 1px solid #fff2;
    border-radius: 14px; background: #172234;
  }
  .av-road-film-label { gap: 10px; }
  .av-road-play { flex-basis: 42px; width: 42px; height: 42px; }
  .av-road-film-label small { font-size: .8125rem; }
  .av-road-preview-note {
    left: 10px; top: 20px; max-width: calc(100% - 70px);
    padding: 3px 7px; font-size: .6875rem; line-height: 1.3;
  }
  .av-road-preview-toggle { top: 12px; right: 12px; }
}
@media(orientation:portrait) and (min-width:700px) and (max-width:1024px) {
  .av-road-layout { grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; max-width: 780px; gap: 34px; }
  .av-road-answer { justify-items: start; text-align: start; }
  .av-road h2 { font-size: clamp(2rem,4.2vw,2.8rem); max-width: 14ch; }
}
@media(max-width:699px) {
  .av-road-answer { gap: 18px; }
  .av-road h2 { max-width: 22ch; font-size: clamp(1.75rem,6.9vw,2.25rem); }
  .av-road-welcome { display: none; }
  .av-road-kicker { font-size: .8125rem; }
}
@media(orientation:landscape) and (max-height:600px) {
  .av-road-layout { grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 22px; }
  .av-road-answer { gap: 13px; }
  .av-road-kicker,.av-road-welcome { display: none; }
  .av-road h2 { font-size: clamp(1.45rem,3.2vw,2rem); }
  .av-road-figure { width: 100%; }
}

/* A native modal keeps keyboard focus inside the film and Escape closes it. */
.av-road-cinema {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh;
  max-height: none; margin: 0; padding: 0; border: 0; background: #0b111fee; color: #fff9ec;
  overflow: auto; overscroll-behavior: contain;
}
.av-road-cinema::backdrop { background: #090f1ae8; backdrop-filter: blur(18px); }
.av-road-cinema[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 76px 32px 26px; }
.av-road-cinema-close {
  position: absolute; top: max(18px,env(safe-area-inset-top)); right: max(22px,env(safe-area-inset-right));
  display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 15px;
  border: 1px solid #fff3; border-radius: 30px; color: #fff; background: #ffffff0d; font: inherit; font-size: .875rem; cursor: pointer;
}
.av-road-cinema-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.av-road-cinema-heading { text-align: center; flex: none; }
.av-road-cinema-heading h3 { color: #fff9ec; font-size: clamp(1.3rem,2vw,1.75rem); line-height: 1.2; letter-spacing: -.025em; margin: 0; }
.av-road-cinema-heading p { margin: 7px 0 0; color: #cbd1e0; font-size: .875rem; line-height: 1.4; }
.av-road-cinema-stage { position: relative; width: min(100%,1100px,calc((100dvh - 262px) * 16 / 9)); flex: none; }
.av-road-cinema-stage[data-format='portrait'] { width: min(100%,calc((100dvh - 300px) * 9 / 16),390px); }
.av-road-cinema-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; border-radius: 16px; box-shadow: 0 22px 90px #0008; }
[data-format='portrait'] .av-road-cinema-video { aspect-ratio: 9 / 16; }
.av-road-cinema-formats { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 8px; flex: none; }
.av-road-cinema-formats button {
  display: flex; align-items: center; gap: 8px; padding: 11px 16px; min-height: 44px; border: 1px solid #fff3;
  border-radius: 30px; background: #ffffff09; color: #e5e9f0; cursor: pointer; font: inherit; font-size: .875rem;
}
.av-road-cinema-formats button[aria-pressed='true'] { color: #192333; background: #ffcf4d; border-color: #ffcf4d; }
.av-road-format-icon { display: block; width: 19px; height: 12px; border: 1.5px solid currentColor; border-radius: 3px; }
.av-road-format-icon.is-portrait { width: 11px; height: 18px; }
.av-road-cinema-credit { font-size: .45rem; color: #c5cbd6; opacity: .8; margin: -5px 0 0; text-align: center; flex: none; }
.av-road-cinema-status { color: #f3ead5; text-align: center; font-size: .875rem; line-height: 1.5; margin: 0; }
.av-road-cinema-status a { color: #ffcf4d; text-decoration: underline; text-underline-offset: 3px; }
.av-road-cinema-status button { margin-left: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid #ffcf4d; border-radius: 24px; background: transparent; color: #ffcf4d; font: inherit; cursor: pointer; }
body.av-road-cinema-open { overflow: hidden; }
@media(max-width:600px) {
  .av-road-cinema[open] { padding: max(74px,calc(env(safe-area-inset-top) + 62px)) 16px max(20px,env(safe-area-inset-bottom)); gap: 15px; }
  .av-road-cinema-stage { width: 100%; }
  .av-road-cinema-stage[data-format='portrait'] { width: min(100%,calc((100dvh - 300px) * 9 / 16),360px); }
  .av-road-cinema-video { border-radius: 13px; }
  .av-road-cinema-heading p { max-width: 30ch; margin-inline: auto; }
}
@media(orientation:landscape) and (max-height:600px) {
  .av-road-cinema[open] { padding: 16px 80px; gap: 10px; }
  .av-road-cinema-heading,.av-road-cinema-credit { display: none; }
  .av-road-cinema-stage { width: min(100%,calc((100dvh - 96px) * 16 / 9)); }
  .av-road-cinema-stage[data-format='portrait'] { width: min(100%,calc((100dvh - 96px) * 9 / 16)); }
  .av-road-cinema-close { top: max(12px,env(safe-area-inset-top)); right: max(12px,env(safe-area-inset-right)); width: 44px; padding: 12px; }
  .av-road-cinema-close span { display: none; }
  .av-road-cinema-formats button { padding: 8px 14px; }
}
@media(prefers-reduced-motion:reduce) {
  .av-road-preview,.av-road-sign,.av-road-play { transition: none; }
}
body.pause-motion .av-road-preview { transition: none; }

/* The same clip can fill the screen without changing playback or orientation. */
.av-road-cinema .av-road-expand{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;touch-action:manipulation}
.av-road-expand svg{width:19px;height:19px;flex:none}
.av-road-cinema-video::-webkit-media-controls-fullscreen-button{display:none}
.av-road-cinema-stage:fullscreen,.av-road-cinema-stage:-webkit-full-screen{width:100vw!important;height:100dvh!important;max-width:none!important;display:flex;align-items:center;justify-content:center;background:#000}
.av-road-cinema-stage:fullscreen .av-road-cinema-video,.av-road-cinema-stage:-webkit-full-screen .av-road-cinema-video{width:100%;height:100%;max-height:100dvh;aspect-ratio:auto;object-fit:contain;border-radius:0;box-shadow:none}
.av-road-cinema.is-expanded[open]{padding:0;gap:0;overflow:hidden}
.av-road-cinema.is-expanded .av-road-cinema-heading,.av-road-cinema.is-expanded .av-road-cinema-credit{display:none}
.av-road-cinema.is-expanded .av-road-cinema-stage{width:100%!important;min-height:0;flex:1;display:flex;align-items:center;justify-content:center}
.av-road-cinema.is-expanded .av-road-cinema-video{width:100%;height:100%;max-height:calc(100dvh - 80px);aspect-ratio:auto;object-fit:contain;border-radius:0;box-shadow:none}
.av-road-cinema.is-expanded .av-road-cinema-formats{padding:12px 16px max(12px,env(safe-area-inset-bottom));background:#0b1220;width:100%}
.av-road-cinema.is-expanded .av-road-cinema-close{z-index:2}
@media(max-width:560px){.av-road-cinema .av-road-expand{flex-basis:100%;max-width:240px}.av-road-cinema.is-expanded .av-road-cinema-formats{gap:6px;padding:8px}.av-road-cinema.is-expanded .av-road-expand{flex-basis:auto}.av-road-cinema.is-expanded .av-road-cinema-video{max-height:calc(100dvh - 116px)}}

.av-road-fullscreen{display:contents}
.av-road-fullscreen:fullscreen{width:100vw;height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#000;padding:0;gap:0}
.av-road-fullscreen:fullscreen .av-road-cinema-stage{width:100%!important;min-height:0;flex:1;display:flex;align-items:center;justify-content:center}
.av-road-fullscreen:fullscreen .av-road-cinema-video{width:100%;height:100%;max-height:calc(100dvh - 80px);aspect-ratio:auto;object-fit:contain;border-radius:0;box-shadow:none}
.av-road-fullscreen:fullscreen .av-road-cinema-formats{padding:12px 16px;background:#0b1220;width:100%}
@media(max-width:560px){.av-road-fullscreen:fullscreen .av-road-cinema-video{max-height:calc(100dvh - 126px)}}
