/* L'atlas routier : signalétique, fond de relevé et chiffres alignés. */
@font-face{font-family:"Barlow Semi Condensed";src:url("vendor/fonts/barlow-semi-condensed-600.woff2") format("woff2");font-style:normal;font-weight:600;font-display:swap}
@font-face{font-family:"Barlow Semi Condensed";src:url("vendor/fonts/barlow-semi-condensed-700.woff2") format("woff2");font-style:normal;font-weight:700;font-display:swap}
:root{
  --paper:#eff3f4;--card:#fff;--ink:#153541;--muted:#516873;--line:#c9d6db;
  --amber:#ffbd55;--teal:#126577;--red:#a7491e;--navy:#102e3b;--tint:#e4eff2;
  --heading:"Barlow Semi Condensed","Arial Narrow",system-ui,sans-serif;
  --body:system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:ui-monospace,"SFMono-Regular",Consolas,monospace;--gutter:clamp(16px,4vw,72px);
}
body{font-family:var(--body);background:var(--paper);color:var(--ink)}
main#explorer{max-width:1600px;padding:clamp(12px,2vw,24px) var(--gutter) 0}
.header .site-name{margin:0;font:inherit;letter-spacing:normal}
.header{
  width:100%;max-width:none;min-height:68px;height:auto;padding:0 max(var(--gutter),calc((100vw - 1600px)/2 + var(--gutter)));
  gap:30px;align-items:center;background:var(--navy);color:white;border:0;box-shadow:inset 0 -1px #34515c
}
.header .brand{font:700 29px/1 var(--heading);letter-spacing:-.045em;gap:8px}
.header .brand img{width:35px;height:35px}.header .brand-dot{color:var(--amber);margin-left:-8px}
.header nav{gap:4px;align-self:stretch;align-items:center;margin:0 auto 0 6px}
.header .tab{padding:9px 15px;line-height:1.25;color:#dce9ed;text-decoration:none;font-size:13px;font-weight:550;border:1px solid transparent;border-radius:5px}
.header .tab:hover{color:#fff;background:#264652}
.header .tab.active{color:#172e36;background:var(--amber);border-color:var(--amber);font-weight:700}
.header .tab.active:after{display:none}.header .about-link{color:#e4eff1;font-size:12px}.header .about-link:hover{text-decoration:underline}
.header :focus-visible{outline-color:#fff}
.ambience-player, .ambience-controls { display: inline-flex; flex-shrink: 0; }
.header .ambience-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border: 1px solid #cfd8e8;
  border-radius: 0;
  background: #fff;
  color: #182947;
  font: 550 14px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: nowrap;
}
.header .ambience-controls button:hover { background: #edf2fc; border-color: #b2c3e4; }
.header .ambience-controls button:focus-visible { outline: 3px solid #6f9cf5; outline-offset: 3px; z-index: 1; }
.header #ambience-prev, .header #ambience-next { width: 32px; padding: 7px; }
.header #ambience-prev { border-radius: 7px 0 0 7px; }
.header #ambience-next { border-left: 0; border-radius: 0 7px 7px 0; }
.header #ambience-toggle { gap: 6px; flex-shrink: 0; border-left: 0; padding: 9px 12px; }
.header #ambience-toggle[aria-pressed="true"] { background: #edf2fc; border-color: #b2c3e4; color: #294fc7; }
.ambience-controls svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (max-width:800px) {
  .header .ambience-controls button { height: 36px; font-size: 12px; }
  .header #ambience-toggle { gap: 4px; padding: 7px 5px; }
  .header #ambience-prev, .header #ambience-next { width: 26px; padding: 5px; }
}
@media(max-width:400px){
  .header .site-name .brand{font-size:20px;gap:4px}.header .site-name .brand img{width:24px;height:24px}
}
.eyebrow{color:var(--muted)}
.feed-strip,.cmp-data-status,.optimizer-status{background:#e4eff2;border:1px solid #c6d9df;color:#314f5e;border-radius:4px}
.feed-strip{min-height:48px;padding:9px 13px;margin-bottom:14px;gap:10px}
.feed-strip strong{color:var(--ink)}.feed-strip span#feed-detail{color:#4c6672}
.status-dot{background:#a6702b}.status-dot.live{background:#217851}.status-dot.error{background:#ae452d}
button:hover:not(:disabled){background:#e5eff2}.quiet-button,.location-button,.search-wrap,select,.optimizer-form input:not([type=checkbox]),.optimizer-form select{border-color:#b6c9d0}
.quiet-button{color:var(--ink);font-weight:600;background:var(--card)}.text-button{color:var(--teal)}
.explore-layout{gap:16px;grid-template-columns:minmax(250px,290px) minmax(0,1fr)}
.filters,.map-card,.summary,.optimizer-form,.optimizer-result,.station-card{border-color:var(--line);border-radius:5px}
.filters{padding:17px 19px}.field-label,.filters legend,.results-controls .check{color:var(--ink)}
.fuel-buttons button{color:var(--ink);background:#f8fafb;border-radius:3px;font-weight:600}
.fuel-buttons button[aria-pressed=true]{background:var(--navy);color:white;box-shadow:inset 0 -3px var(--amber);border-color:var(--navy)}
.fuel-buttons button[aria-pressed=true]:hover{background:#234957}
.summary{background:var(--card);color:var(--ink);padding:15px 17px}
.summary .eyebrow{color:var(--muted);font-size:10px}
.summary p,.summary>div>span{color:var(--muted);font-size:.75rem}
.summary>div{margin:5px 0}.summary strong{font:600 37px/1.08 var(--heading);letter-spacing:-.035em;font-variant-numeric:tabular-nums}.map-top{background:#f8fafb;border-bottom:1px solid var(--line);align-items:center;flex-wrap:wrap;color:var(--ink)}
.map-legend,.map-note{background:white}.station-card.stale{border-left-color:#bc893b}
.map-legend{display:grid;justify-content:stretch;justify-items:center;gap:.25rem;padding:.65rem .5rem;color:var(--muted);text-align:center;font-size:.75rem;line-height:1.4}
.map-legend .map-price-key{width:min(100%,32rem);min-width:0;margin:0;color:var(--ink)}
.map-price-key figcaption{margin:0 0 .35rem;font-weight:600}
.map-price-axis{position:relative}
.map-price-ticks{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin:0;padding:0;list-style:none;font-variant-numeric:tabular-nums}
.map-price-ticks li{display:grid;gap:.55rem;justify-items:center;white-space:nowrap;line-height:1.2}
.map-price-ticks li:nth-child(3){font-weight:700}
.map-price-ramp{position:absolute;inset-inline:10%;top:50%;transform:translateY(-50%);height:5px;border-radius:3px;background:linear-gradient(90deg,#0f0,#000 50%,#f00)}
.map-price-key[data-scale="empty"] .map-price-ramp{background:#c7cecf}
.map-price-key[data-scale="uniform"] .map-price-ramp{background:#000}
.map-legend p{margin:0}
.map-station-status{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:.2rem .85rem;margin-top:.15rem}
.map-station-status>span{display:inline-flex;align-items:center;gap:.35rem;color:var(--ink)}
.map-status-dot{width:.7rem;height:.7rem;border:1px solid #000;border-radius:50%;background:#fff}
.map-status-outage{background:#777}
#map,.optimizer-map{background-color:#dae7ec}
#map{background-image:linear-gradient(#bdced550 1px,transparent 1px),linear-gradient(90deg,#bdced550 1px,transparent 1px);background-size:36px 36px}
:is(#map,#opt-map,#nearby-map) .station-map-tip{width:min(250px,calc(100vw - 54px));padding:7px 10px;border:0;border-radius:4px;white-space:normal;overflow-wrap:anywhere;font:12px/1.4 var(--body);color:var(--ink);box-shadow:0 2px 8px #15354132;pointer-events:none}
:is(#map,#opt-map,#nearby-map) .station-map-tip small{color:var(--muted);font-size:11px}
:is(#map,#opt-map,#nearby-map) .station-map-tip::before{top:clamp(6px,calc(50% - var(--station-tip-shift,0px)),calc(100% - 6px))}
:is(#map,#opt-map,#nearby-map) .station-map-tip .station-price-scale{margin:5px 0 0;padding-top:4px;font-size:11px;min-width:min(178px,39vw)}
:is(#map,#opt-map,#nearby-map) .station-map-heading{display:flex;align-items:center;gap:7px;margin-bottom:2px;font:700 15px/1.25 var(--body);color:var(--ink)}
:is(#map,#opt-map,#nearby-map) .station-map-address{margin:3px 0 8px;color:var(--muted);font:400 12px/1.35 var(--body);white-space:normal;overflow-wrap:anywhere}
:is(#map,#opt-map,#nearby-map) .station-map-heading img{display:block;width:26px;height:22px;flex:none;object-fit:contain}
:is(#map,#opt-map,#nearby-map) .station-map-popup .leaflet-popup-content{width:min(306px,calc(100vw - 72px))!important;margin:12px 13px;max-height:min(536px,65vh);max-height:min(536px,65dvh);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
:is(#map,#opt-map,#nearby-map) .station-map-popup .station-map-heading{min-height:22px;padding-right:32px}
:is(#map,#opt-map,#nearby-map) .station-map-popup .station-map-price-line{margin-block:6px}
:is(#map,#opt-map,#nearby-map) .station-map-popup .station-price-scale-group + .station-price-scale-group{margin-top:9px;padding-top:8px}
:is(#map,#opt-map,#nearby-map) .station-map-popup .leaflet-popup-content button{min-height:40px}
:is(#map,#opt-map,#nearby-map) .station-map-popup .leaflet-popup-close-button{display:grid;place-items:center;width:44px;height:44px;font:22px/1 var(--body);color:var(--muted)}
#nearby-map{container-type:size}
#nearby-map .station-map-popup{translate:var(--nearby-popup-x,0px) var(--nearby-popup-y,0px)}
#nearby-map .station-map-popup .leaflet-popup-tip-container{left:clamp(20px,calc(50% - var(--nearby-popup-x,0px)),calc(100% - 20px))}
#nearby-map .station-map-popup .leaflet-popup-content{width:min(306px,calc(100cqw - 46px))!important;max-height:min(536px,calc(100cqh - 184px))}
.station-price{font-variant-numeric:tabular-nums}
.results-heading h3,.optimizer-form legend,.optimizer-results-heading,#station-title{font-family:var(--heading);font-style:normal;font-weight:600;letter-spacing:-.02em}
.results-heading h3,.optimizer-results-heading{font-size:28px}.optimizer-intro{font-size:14px;margin-bottom:13px;color:var(--muted)}
.tag{background:#e2edf0;color:#355968;font:600 9px var(--mono)}
.optimizer-submit{background:var(--navy);color:white;border-bottom:3px solid var(--amber)}.optimizer-submit:hover:not(:disabled){background:#185162}
.optimizer-status.error{background:#faecdb;border-color:#e0c498}
.optimizer-result .rank{background:#dce9ed}.optimizer-result[aria-pressed=true]{border-color:var(--teal)}.detail-warning{background:#faedd4}
footer{max-width:1456px;margin:38px auto 0;padding:20px var(--gutter) 28px}
@media(max-width:1050px) and (min-width:761px){
  .header{gap:8px;min-height:58px;flex-wrap:nowrap;padding-block:7px}.header nav{gap:0;order:0;flex:1;width:auto;justify-content:center;margin:0}.header .tab{font-size:12px;padding:8px}.header .brand{font-size:24px}
}
@media(max-width:820px) and (min-width:761px){.header .tab{font-size:11px;padding:8px 5px}.header .brand{font-size:23px}.header .about-link{font-size:10px}}
@media(max-width:760px){
  .header{min-height:0;flex-wrap:wrap;gap:10px;padding-block:12px 9px;justify-content:space-between}.header .brand{font-size:25px}.header .brand img{width:29px;height:29px}
  .header nav{order:3;width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;margin:0;align-items:stretch}
  .header .tab{font-size:11px;display:grid;place-items:center;min-height:36px;padding:5px 2px;border-radius:3px;text-align:center}
  .header .about-link{font-size:11px}
  .explore-layout{grid-template-columns:1fr;gap:12px}.feed-strip{gap:6px 9px;padding:10px 12px}.feed-strip>div{flex-basis:80%}
  .filters{padding:15px 16px}.summary{padding:13px 15px}.map-top{padding:10px}.optimizer-intro{font-size:13px}.results-heading h3,.optimizer-results-heading{font-size:24px}
  footer{margin-inline:var(--gutter);padding-inline:0}
}
@media(min-width:761px) and (max-width:1100px){footer{margin-inline:auto}}
@media(min-width:1101px){.map-top>.check:first-of-type{margin-left:auto}.map-top{gap:20px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.map-zone-note{margin:0;padding:8px 14px;text-align:center;color:var(--ink);background:#f3f6f5;font-size:12px;line-height:1.5}

.fuel-badge{display:inline-block;vertical-align:middle;width:1.65rem;height:1.65rem;flex:none;margin-inline-end:.35em}
.price-rows-label-with-icon>.fuel-badge{width:1.9rem;height:1.9rem;margin:0}

@media (max-width: 540px) {
  .header nav {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .header .tab { min-height: 44px; font-size: 12px; }
  .header #site-language button { min-width: 32px; min-height: 38px; }
  .header .about-link { display: inline-flex; align-items: center; min-height: 38px; }

  /* A 16px input keeps Safari at the current zoom when the keyboard opens. */
  #view-stations :is(input[type=search], select),
  #price-guide input,
  .comparison-view .cmp-controls :is(input, select),
  .optimizer-form input:not([type=checkbox]), .optimizer-form select {
    min-height: 44px;
    font-size: 16px;
  }
  #view-stations input[type=search] { text-overflow: ellipsis; }
  #view-stations :is(.field-label, .filter-row label, .filters legend),
  .comparison-view .cmp-controls label, .optimizer-form label { font-size: 13px; }
  #view-stations .fuel-buttons button, #comparison-root .comparison-fuel-tabs button { min-height: 38px; font-size: 12px; }
  #view-stations .map-top :is(.check, .text-button) { min-height: 32px; font-size: 12px; }
  #view-stations .map-top .check { display: inline-flex; align-items: center; }
  #map .leaflet-control-zoom a, #opt-map .leaflet-control-zoom a { width: 38px; height: 38px; line-height: 38px; }
  #station-dialog .close-dialog { min-width: 44px; min-height: 44px; }
}
@media (max-width: 430px) {
  .header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand music" "about language" "tabs tabs";
    gap: 1px 10px;
  }
  .header .site-name { grid-area: brand; justify-self: start; }
  .header .ambience-player { grid-area: music; justify-self: end; }
  .header #site-language { grid-area: language; justify-self: end; }
  .header .about-link { grid-area: about; justify-self: start; }
  .header nav { grid-area: tabs; }
  #view-stations .explore-layout .filters > .filter-row { grid-column: 1 / -1; }
  .comparison-view .cmp-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
  }
  .comparison-view .cmp-controls label { min-width: 0; }
  .comparison-view .cmp-controls label:first-child { grid-column: 1 / -1; }
}

.station-results > .results-heading { margin-top: 0; }
.station-results > .pagination { margin-bottom: 0; }
