Files
Fuel-Advisor/style.css
root 726bc25fb0 Enseignes normalisees du referentiel data.gouv et pictogrammes locaux
Referentiel des noms et enseignes (ODbL, enrichi OpenStreetMap) joint sur l identifiant officiel: 181/213 stations couvertes. Pictogrammes generes localement (monogrammes + pompe Fuel Advisor), aucun logo de marque tierce ni hotlink. Artefacts OSM filtres.
2026-09-13 12:28:41 +02:00

70 lines
11 KiB
CSS

:root{color-scheme:dark;--bg:#0b1220;--panel:#142035;--line:#29374b;--text:#edf3fa;--muted:#a2b0c4;--accent:#68dfc3;--warn:#f9cb72;--bad:#ff9393}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at top left,#193749,transparent 65%),var(--bg);font:15px/1.55 system-ui,-apple-system,Segoe UI,sans-serif;color:var(--text);min-height:100vh}main{max-width:1240px;margin:auto;padding:36px 24px}header{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:30px}.eyebrow{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);font-weight:750}h1{font-size:clamp(32px,4vw,52px);line-height:1.08;letter-spacing:-.045em;margin:12px 0}h1 span{color:var(--accent)}h2{font-size:20px;letter-spacing:-.025em;margin:0 0 16px}h3{font-size:16px;margin:22px 0 10px}p{margin:10px 0}.header-actions,.inline,.section-title,.dialog-head,.item-actions{display:flex;align-items:center;gap:10px}.layout{display:grid;grid-template-columns:355px minmax(0,1fr);gap:20px}aside,#result{display:grid;gap:18px;align-content:start}.card{background:linear-gradient(135deg,#17263b,#101c2d);border:1px solid var(--line);border-radius:20px;padding:24px;box-shadow:0 12px 30px #0002}.compact{padding:20px}.section-title,.dialog-head{justify-content:space-between}.section-title h2{margin:0;font-size:17px}label{display:block;font-size:13px;font-weight:650;color:#c6d4e7;margin:16px 0 7px}input,select{display:block;width:100%;background:#0b1627;color:var(--text);border:1px solid #36465c;border-radius:10px;padding:11px 12px;font:inherit;min-height:44px}label input,label select{margin-top:7px}input:focus,select:focus,button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}button{font:inherit;font-size:13px;font-weight:700;border:1px solid transparent;border-radius:10px;padding:11px 14px;cursor:pointer;min-height:42px;white-space:normal}.primary{background:var(--accent);color:#09211e}.secondary{background:#203048;color:var(--text);border-color:#34455b}button:hover{filter:brightness(1.12)}button:disabled{opacity:.55;cursor:wait}select:disabled{opacity:.75}.wide{width:100%;margin-top:20px}.small{padding:6px 10px;min-height:34px;font-size:12px}.hint,.muted{color:var(--muted);font-size:13px}.hint:empty,.form-error:empty{display:none}.inline>input,.inline>div{min-width:0;flex:1}.location-actions{margin-top:12px}.location-label{font-size:12px;color:var(--accent);padding-top:30px;overflow-wrap:anywhere}.empty{min-height:320px;padding-top:36px}.empty h2{font-size:26px;margin:16px 0}.empty p{max-width:520px;color:var(--muted)}.tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.tags span,.badge{font-size:11px;background:#23374a;color:#cee5e5;padding:5px 9px;border-radius:7px}.badge{display:inline-block;margin:0 6px 6px 0}.badge.brand{background:#1d4a44;color:#a7f3e3;font-weight:700}.station-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;margin:14px 0}.station-card{background:#0d192a;border:1px solid #25364b;border-radius:12px;padding:12px}.station-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.station-head strong{font-size:14px;overflow-wrap:anywhere}.station-head span{font-size:17px;font-weight:750;color:var(--accent);white-space:nowrap}.station-head small{font-size:10px;color:var(--muted)}.station-card p{margin:4px 0}.job-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px}.nav-actions{display:flex;gap:8px;margin-top:10px}.nav-btn{font-size:12px;font-weight:700;color:#09211e;background:var(--accent);border-radius:8px;padding:7px 11px;text-decoration:none;white-space:nowrap}.nav-btn+.nav-btn{background:#2f4a68;color:var(--text)}.pressure{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:14px 16px;border-radius:12px;background:#0d192a;border:1px solid #25364b;margin-bottom:14px}.pressure strong{font-size:17px}.pressure-up{border-color:#8a6a3c;background:#2c2317}.pressure-down{border-color:#2f6a5c;background:#12261f}.factors{display:grid;gap:10px}.factor{display:grid;grid-template-columns:34px minmax(0,1fr);gap:12px;align-items:start;border-top:1px solid var(--line);padding-top:10px}.factor:first-child{border-top:0}.factor-arrow{font-size:20px;text-align:center}.arrow-up{color:var(--warn)}.arrow-down{color:var(--accent)}.arrow-flat{color:var(--muted)}.arrow-unknown{color:#8894a6}.factor p{margin:2px 0}.factor-levels{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}.lvl{font-size:11px;font-weight:750;padding:4px 8px;border-radius:7px;background:#2c2317;color:#f9cb72}.lvl-EXTRÊME{background:#4a1f1f;color:#ffb4a8}.factor-chain{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin:6px 0}.measured{color:#dbe7f5;font-weight:600}.chain-arrow{color:var(--muted)}.effect{font-weight:750;white-space:nowrap}.effect-up{color:var(--warn)}.effect-down{color:var(--accent)}.effect-flat{color:var(--muted)}.effect-unknown{color:#8894a6}.mini{width:100%;height:52px;display:block;margin:8px 0}.mini polyline{stroke:var(--accent);stroke-width:2;fill:none;vector-effect:non-scaling-stroke}.mini circle{fill:var(--accent)}.verdict{font-size:clamp(24px,3vw,34px);line-height:1.2;margin:12px 0 20px}.tone-refuel,.tone-topup{color:var(--warn)}.tone-wait,.tone-none{color:var(--accent)}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.metric{background:#0d192a;border:1px solid #25364b;border-radius:12px;padding:14px}.metric strong{display:block;font-size:22px;line-height:1.4}.metric span{font-size:11px;color:var(--muted)}.reasons{padding-left:19px;color:#c1cee0;font-size:13px}.reasons li{margin:8px 0}.notice{padding:12px;border:1px solid #78603c;background:#382d1e;color:#f3d9ac;border-radius:10px;font-size:13px}.station{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;border-top:1px solid var(--line);padding:15px 0}.station:first-child{border-top:0}.station strong{font-size:14px;overflow-wrap:anywhere}.station .price{font-size:23px;font-weight:750;color:var(--accent);white-space:nowrap}.station .price small{font-size:11px}.station p{margin:2px 0}.buckets{display:flex;gap:6px;flex-wrap:wrap;max-height:110px;overflow:auto;margin:12px 0}.bucket{font-size:11px;padding:4px 7px;background:#203048;border-radius:6px}.chart{width:100%;height:170px;display:block;margin-top:16px}.chart polyline{stroke:var(--accent);stroke-width:2.5;fill:none;vector-effect:non-scaling-stroke}.chart circle{fill:var(--accent)}.chart text{fill:var(--muted);font-size:10px}.chart line{stroke:var(--line)}.error,.form-error{color:var(--bad);font-size:13px}.loading{color:var(--muted);padding:32px}.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}dialog{border:1px solid #35465b;border-radius:20px;background:var(--panel);color:var(--text);width:min(560px,calc(100% - 24px));max-height:90vh;padding:24px;box-shadow:0 30px 100px #0009}dialog::backdrop{background:#030a16b8}dialog h2{margin:0}.close{font-size:24px;padding:0 12px}form h3{border-top:1px solid var(--line);padding-top:18px}form button[type=submit]{margin-top:20px}.item{padding:14px 0;border-bottom:1px solid var(--line)}.item-actions{margin-top:8px}.items{margin-bottom:16px}footer{font-size:11px;color:#8a9bb1;margin-top:30px;max-width:950px}details{margin-top:16px}summary{cursor:pointer;color:#cbd8e8;font-size:13px}[hidden]{display:none!important}@media(max-width:850px){main{padding:22px 16px}.layout{grid-template-columns:1fr}header{align-items:flex-start;flex-direction:column;gap:14px}.header-actions{width:100%}.header-actions button{flex:1}.card{padding:20px}.empty{min-height:240px}.metrics{gap:6px}.metric{padding:11px}.metric strong{font-size:19px}.two{gap:10px}.station .price{font-size:20px}}
/* Les cartes doivent rester contenues, même avec une chaîne sans espaces. */
.card, .card *, .item, .station, .station-card { max-width: 100%; overflow-wrap: anywhere; }
.card, .card > *, .station > *, .factor > *, .item { min-width: 0; }
.card a { white-space: normal; }
/* --- Carte principale : la réponse opérationnelle domine le haut de page --- */
.hero{border-left:4px solid var(--line,#e3e8f0)}
.hero .verdict{margin:.2rem 0 .4rem;font-size:clamp(1.6rem,7vw,2.4rem);line-height:1.1;letter-spacing:-.01em}
.hero-quantity{margin:.2rem 0 .3rem;font-size:clamp(1.05rem,4.6vw,1.3rem);font-weight:600}
.hero-trend{margin:.2rem 0 .5rem;font-size:.98rem}
.hint-inline{opacity:.65;font-size:.8em}
.hero.tone-refuel{border-left-color:#1d4ed8}
.hero.tone-wait{border-left-color:#0f766e}
.hero.tone-topup{border-left-color:#b45309}
/* --- 3 meilleures stations, très compactes --- */
.top-stations{display:grid;gap:.5rem;grid-template-columns:1fr}
.compact-station{padding:.55rem .7rem}
.compact-station.best{border-color:#1d4ed8;box-shadow:0 0 0 1px #1d4ed8 inset}
.compact-station .station-head{display:flex;justify-content:space-between;gap:.5rem;align-items:baseline;min-width:0}
.compact-station .station-head strong{min-width:0;overflow-wrap:anywhere}
.compact-station .hint{margin:.15rem 0}
/* --- Sections techniques repliées par défaut sur mobile --- */
details.section-collapse>summary{cursor:pointer;display:flex;flex-direction:column;gap:.15rem;list-style:none}
details.section-collapse>summary::-webkit-details-marker{display:none}
details.section-collapse>summary::after{content:'Afficher';font-size:.8rem;opacity:.7}
details.section-collapse[open]>summary::after{content:'Masquer'}
@media (min-width:760px){
.top-stations{grid-template-columns:repeat(3,1fr)}
details.section-collapse[open]>summary::after{content:''}
}
img.brand-logo{width:40px;height:40px;flex:0 0 auto}
.brand{display:flex;align-items:center;gap:.6rem;min-width:0}
/* --- Barre du haut : véhicule et autonomie avant la décision --- */
.top-bar{padding:.6rem .75rem}
.top-bar-row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:flex-end}
.top-field{display:flex;flex-direction:column;min-width:0;flex:1 1 9rem}
.top-field label{font-size:.82rem;opacity:.8}
.top-field input,.top-field select{width:100%}
.top-bar #advise{flex:1 1 100%}
.top-bar #status{margin:.35rem 0 0}
.top-bar #vehicle-info{margin:.35rem 0 0}
@media (min-width:760px){.top-bar #advise{flex:0 0 auto}}
/* Mobile : la réponse opérationnelle passe avant le formulaire. L'ordre demandé est
Fuel Advisor, véhicule, autonomie, décision, quantité, tendance, première station.
Le reste du formulaire (carburant, favori, rayon, recherche) vient ensuite. */
@media (max-width:759px){
.layout{display:flex;flex-direction:column}
#result{order:1}
.layout>aside{order:2}
}
/* Sur mobile, le haut de page doit montrer la réponse, pas le slogan : l'en-tête
marketing est réduit au nom, et les mentions de la carte passent en second. */
@media (max-width:759px){
header h1{display:none}
header{align-items:center;padding-bottom:.3rem}
.hero .tags{display:none}
.hero{padding-top:.6rem;padding-bottom:.6rem}
.top-bar{padding-top:.45rem;padding-bottom:.45rem}
}
/* Pictogrammes d'enseigne locaux (voir brands.svg) */
.brand-tile{width:26px;height:26px;flex:0 0 auto;border-radius:7px;display:inline-block;vertical-align:middle}
.station-head .brand-tile{width:30px;height:30px;margin-right:.4rem}
.badge.brand{gap:.45rem}