/* Écran titre, pause et choix de la route. Les entrées de menu sont des flèches de direction. */
.menu-layer { position: absolute; inset: 0; z-index: 40; display: none; }
.menu-layer.open { display: flex; }
body.title-open .title-screen { display: flex; }

.menu-list { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.menu-item {
  --bg: rgba(27, 31, 35, .9); --fg: var(--line-white); --rule: rgba(242, 243, 238, .55);
  position: relative; isolation: isolate; border: 0; background: var(--bg); color: var(--fg);
  min-width: 300px; padding: 11px 50px 12px 20px; text-align: left; border-radius: var(--r-sign) 0 0 var(--r-sign);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%);
  font-family: var(--display); font-weight: 700; font-style: italic; font-size: 1.6rem; line-height: 1;
  transition: transform .12s ease;
}
.menu-item::before, .menu-item::after { content: ''; position: absolute; border-radius: 4px 0 0 4px; }
.menu-item::before { z-index: -2; inset: 4px 5px 4px 4px; background: var(--rule); clip-path: polygon(0 0, calc(100% - 21px) 0, 100% 50%, calc(100% - 21px) 100%, 0 100%); }
.menu-item::after { z-index: -1; inset: 6px 8px 6px 6px; background: var(--bg); clip-path: polygon(0 0, calc(100% - 19px) 0, 100% 50%, calc(100% - 19px) 100%, 0 100%); }
.menu-item:hover, .menu-item:focus-visible { --bg: var(--line-white); --fg: var(--asphalt); --rule: var(--asphalt); transform: translateX(8px); outline: none; }
.menu-item.primary { --bg: var(--balise); --fg: var(--balise-ink); --rule: var(--balise-ink); font-weight: 800; font-size: 2rem; min-width: 360px; }
.menu-item.primary:hover, .menu-item.primary:focus-visible { --bg: #ffd04f; --fg: var(--balise-ink); --rule: var(--balise-ink); }
.menu-item.quiet { font-size: 1.2rem; min-width: 220px; --bg: transparent; --rule: transparent; }
.menu-item.quiet::after { background: transparent; }
.menu-title { margin: 0; font-family: var(--display); font-weight: 800; font-style: italic; font-size: 4.4rem; line-height: .9; letter-spacing: -.01em; }
.menu-sub { margin: 6px 0 22px; color: var(--gravel); font-weight: 600; font-size: var(--t-s); }

/* Écran titre */
.title-screen {
  flex-direction: column; justify-content: center; gap: 30px; padding: 32px var(--safe-r) var(--safe-b) calc(var(--safe-l) + 3cqw);
  background: linear-gradient(90deg, rgba(20, 23, 27, .94) 0%, rgba(20, 23, 27, .78) 34%, rgba(20, 23, 27, .1) 66%, rgba(20, 23, 27, 0) 100%);
}
.logo { margin: 0; display: flex; flex-direction: column; line-height: .8; }
.logo-main { font-family: var(--display); font-weight: 800; font-style: italic; font-size: clamp(5rem, 13cqw, 10.5rem); letter-spacing: -.02em; color: var(--line-white); }
/* Sous-titre posé sur une bande jaune, comme une plaque de balisage. */
.logo-sub { align-self: flex-start; font-family: var(--display); font-weight: 800; font-style: italic; font-size: clamp(1.3rem, 2.7cqw, 2.2rem); letter-spacing: .04em; color: var(--balise-ink); background: var(--balise); padding: .08em .5em .1em .4em; margin: .3em 0 0 .12em; clip-path: polygon(0 0, 100% 0, calc(100% - .45em) 100%, 0 100%); }
.title-car { margin: 16px 0 0 4px; color: var(--gravel); font-weight: 600; font-size: var(--t-s); }
.title-car b { color: var(--line-white); }
.title-foot { position: absolute; left: calc(var(--safe-l) + 3cqw); bottom: var(--safe-b); margin: 0; color: var(--gravel); font-size: var(--t-xs); font-weight: 600; }

/* Pause */
.pause { background: linear-gradient(90deg, rgba(20, 23, 27, .9), rgba(20, 23, 27, .55) 55%, rgba(20, 23, 27, .25)); backdrop-filter: blur(3px); padding: 28px var(--safe-r) var(--safe-b) calc(var(--safe-l) + 3cqw); align-items: center; }
.menu-column { display: flex; flex-direction: column; max-height: 100%; overflow-y: auto; scrollbar-width: none; padding-right: 20px; }
.region-travel { margin-top: 18px; max-width: 360px; background: var(--panel); border-radius: var(--r-ctl); border: 1px solid var(--hairline); }
.region-travel > summary { list-style: none; cursor: pointer; padding: 10px 12px; font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.region-travel > summary::-webkit-details-marker { display: none; }
.region-travel-fields { display: grid; gap: 10px; padding: 0 12px 12px; font-size: var(--t-s); }
.region-travel-fields label { display: grid; gap: 4px; }
#regionGo { border: 0; border-radius: var(--r-ctl); background: var(--sign-green); padding: 9px; font-weight: 600; box-shadow: inset 0 0 0 2px var(--sign-green), inset 0 0 0 3.5px var(--line-white); }

/* Choix de la route : un panneau par carte */
.map-picker { flex-direction: column; justify-content: center; gap: 20px; padding: 26px var(--safe-r) var(--safe-b) var(--safe-l); background: rgba(20, 23, 27, .9); backdrop-filter: blur(6px); overflow-y: auto; z-index: 45; }
.picker-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.picker-head .menu-title { font-size: 3.2rem; }
.map-signs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.map-sign {
  --bg: var(--sign-blue); position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; min-height: 150px;
  border: 0; border-radius: var(--r-sign); background: var(--bg); color: var(--line-white); padding: 16px 18px 15px;
  box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 6px var(--line-white), 0 10px 26px rgba(0, 0, 0, .3);
  transition: transform .14s ease, filter .14s;
}
.map-sign:hover, .map-sign:focus-visible { transform: translateY(-4px); filter: brightness(1.12); outline: none; }
.map-sign:focus-visible { box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 6px var(--line-white), 0 0 0 3px var(--balise); }
.map-sign.col { --bg: var(--sign-green); }
.map-sign.region { --bg: var(--sign-brown); }
.map-sign.local { --bg: var(--line-white); color: var(--asphalt); box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 6px var(--asphalt), 0 10px 26px rgba(0, 0, 0, .3); }
.map-sign .kind { font-size: var(--t-xs); font-weight: 600; opacity: .85; }
.map-sign strong { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 2rem; line-height: .95; }
.map-sign p { margin: 0; font-size: var(--t-s); opacity: .88; line-height: 1.35; max-width: 34ch; }
.map-sign .current { position: absolute; right: 14px; top: 13px; background: var(--balise); color: var(--balise-ink); font-size: .68rem; font-weight: 600; border-radius: 3px; padding: 2px 7px; }
.menu-close { font-size: var(--t-m); padding: 9px 16px; }

/* A quieter motorsport layout, with the yellow route arrow reserved for the main action. */
.title-screen { gap: 23px; background: linear-gradient(90deg,#0c151df5 0%,#0c151dc7 34%,#0c151d20 65%,transparent); }
.title-kicker { color: #c7d1d8; margin-bottom: 20px; }
.logo-main { font-size: clamp(4.8rem,11.8cqw,10.8rem); letter-spacing: -.025em; }
.logo-sub { font-size: clamp(1.1rem,2.15cqw,1.8rem); }
.title-intro { font: 500 clamp(1.35rem,2.1cqw,2rem)/1.05 var(--display); margin: 24px 0 0; color: #e7ecee; }
.title-car { max-width: 43ch; line-height: 1.6; font-size: .76rem; }
.title-menu { gap: 5px; }
.title-menu .menu-item:not(.primary) { min-width: 260px; background: transparent; clip-path: none; padding: 10px 16px; border-radius: 5px; font-size: 1.25rem; font-style: normal; }
.title-menu .menu-item:not(.primary)::before, .title-menu .menu-item:not(.primary)::after { display: none; }
.title-menu .menu-item:not(.primary):hover, .title-menu .menu-item:not(.primary):focus-visible { background: #ffffff0e; color: var(--line-white); transform: translateX(4px); box-shadow: inset 2px 0 var(--balise); }
.title-foot { display: flex; align-items: center; gap: 9px; }
.title-foot span { margin-left: 16px; opacity: .7; }
.title-edition { position: absolute; bottom: var(--safe-b); right: var(--safe-r); font: 500 .64rem/1.7 var(--body); letter-spacing: .12em; text-align: right; color: #c6d3dbb0; }
.pause { background: linear-gradient(90deg,#0c151df2,#0c151d8a 70%,#0c151d38); backdrop-filter: blur(4px); }
.pause .menu-column { width: min(730px,76cqw); padding: 8px 10px 8px 0; }
.pause .menu-title { font-size: clamp(2.5rem,5.5cqw,4.5rem); }
.pause-actions.menu-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; align-items: stretch; }
.pause-actions .menu-item { min-width: 0; clip-path: none; font-style: normal; font-size: 1.18rem; padding: 12px 16px; background: #172731e8; border: 1px solid #ffffff12; border-radius: 5px; }
.pause-actions .menu-item::before,.pause-actions .menu-item::after { display: none; }
.pause-actions .menu-item:hover,.pause-actions .menu-item:focus-visible { transform: translateX(2px); color: var(--line-white); background: #29404d; border-color: var(--balise); }
.pause-actions .menu-item.primary { grid-column: 1/-1; background: var(--balise); color: var(--balise-ink); font-size: 1.65rem; border-color: var(--balise); }
.pause-actions .menu-item.quiet { color: var(--gravel); }
.pause .region-travel { max-width: none; }
.map-picker { justify-content: flex-start; background: #0d1720f5; }
.picker-head { margin-top: auto; }
.map-signs { margin-bottom: auto; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); }
.map-sign { padding: 20px; min-height: 275px; box-shadow: inset 0 0 0 1px #ffffff50,0 14px 36px #0004; background: linear-gradient(145deg,#ffffff08,transparent),var(--bg); overflow: hidden; }
.map-sign.local { box-shadow: inset 0 0 0 1px #172731,0 14px 36px #0004; }
.map-sign .kind { font-size: .68rem; min-height: 24px; padding-right: 38px; }
.map-sign strong { font-size: 1.95rem; margin-bottom: 5px; }
.map-sign p { color: inherit; opacity: .74; font-size: .76rem; }
.map-sign .current { top: auto; bottom: 13px; right: 14px; padding: 3px 6px; font-size: .6rem; }
.map-sign .route-number { position: absolute; right: 17px; top: 14px; font: italic 800 1.8rem var(--display); opacity: .45; }
.route-features { font: 600 .66rem var(--body); opacity: .8; margin-top: auto; padding-top: 15px; padding-bottom: 17px; }
svg.route-preview { display: block; width: 100%; height: 82px; margin: 3px 0 13px; overflow: visible; }
.route-preview path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-preview .route-outline { stroke: #0003; stroke-width: 11px; }
.route-preview .route-line { stroke: #f2f3ee; stroke-width: 2.5px; }
.local .route-preview .route-line { stroke: #1d2931; }
.route-preview circle { fill: var(--balise); stroke: none; }
.options-menu { z-index: 50; align-items: center; justify-content: center; padding: 24px; background: #0b141de8; backdrop-filter: blur(8px); }
.options-shell { width: min(860px,94cqw); height: min(700px,90cqh); min-height: 0; display: flex; flex-direction: column; background: #14212af5; border: 1px solid #ffffff24; box-shadow: 0 30px 90px #0007; border-radius: 12px; overflow: hidden; }
.options-head { display: flex; justify-content: space-between; align-items: center; padding: 26px 30px 20px; gap: 20px; }
.options-head .menu-title { font-size: 3.2rem; }
.options-head .section-kicker { margin-bottom: 8px; }
.options-head kbd { margin-left: 10px; }
.options-nav { display: flex; gap: 4px; padding: 0 28px; border-bottom: 1px solid var(--hairline); }
.options-nav button { border: 0; border-bottom: 3px solid transparent; padding: 12px 16px; background: none; color: var(--gravel); font-weight: 600; font-size: .9rem; }
.options-nav button.sel { color: var(--line-white); border-bottom-color: var(--balise); }
.options-content { min-height: 0; overflow-y: auto; padding: 14px 30px 24px; scrollbar-color: var(--asphalt-3) transparent; }
.options-content > .group { border: 0; }
.options-content > .group > summary { display: none; }
.options-content .groupcontent { padding: 0; }
.options-content .input-setting { margin: 17px 0; gap: 8px; font-size: .9rem; }
.options-content .input-setting:not(.input-check) select { max-width: 460px; padding-block: 11px; }
.options-content .field { padding-block: 15px; }
.options-content .fieldrow label { font-size: .9rem; }
.options-content .note { max-width: 65ch; line-height: 1.6; }
.options-foot { margin: 0; padding: 11px 30px; background: #0c1720; border-top: 1px solid var(--hairline); font-size: .7rem; color: var(--gravel); }
.menu-column { overflow-x: hidden; }
.graphics-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 0 12px; border-top: 1px solid var(--hairline); margin-top: 22px; }
.graphics-heading h3 { font: 700 1.45rem var(--display); margin: 0 0 3px; }
.graphics-heading span { font-size: .7rem; color: var(--gravel); }
.graphics-group .graphics-setting:not(.input-check) { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.graphics-setting input[type=range], .graphics-setting select { grid-column: 1 / -1; }
.graphics-setting output { font-variant-numeric: tabular-nums; color: var(--balise); margin: 0; }
.graphics-group > summary { font-size: 1.15rem; padding-block: 13px; }
.graphics-heading .tiny-btn { flex: none; font-size: .72rem; }
