/* 15min.urgence-marseille.fr : charte urgence-marseille.fr (rouge / crème, Inter) + composants de carte
   repris de « À portée de tram » (site/styles.css, © Camille Roux, MIT), recolorés. */
:root {
  --red:#c0392b; --red-bg:#fdf0ee; --red-border:#f5c9c5; --cream:#faf8f4; --sand:#f2ede6; --warm:#ede8df;
  --text:#1c1c1c; --muted:#6b6560; --border:#ddd8d0; --white:#ffffff;
  --orange:#d4550a; --orange-bg:#fef3ec; --orange-border:#f8d4bb;
  --blue:#1a4a8a; --blue-bg:#eef3fb; --blue-border:#c4d5f0;
  --green:#1a6b3a; --green-bg:#edf7f1; --green-border:#b3ddc4;
  --purple:#5a2d82; --purple-bg:#f3eef9; --purple-border:#d0b8e8;
  /* échelle des temps (du plus court au plus long), comme sur les autres minisites */
  --t1:#1a6b3a; --t2:#74a55a; --t3:#e9c046; --t4:#e07a2e; --t5:#c0392b; --t6:#6d1b3a; --t0:#a9a39b;
  --depart:#3aa70b;
  --radius:16px; --shadow:0 6px 24px rgba(0,0,0,.08);
}
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { font-family:'Inter','Segoe UI',sans-serif; background:var(--cream); color:var(--text); min-height:100vh; -webkit-font-smoothing:antialiased; }
a { color:var(--red); text-underline-offset:2px; }
[hidden] { display:none !important; }
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

.ia-haut { background:#f1efea; color:#6b6560; font-size:.68rem; line-height:1.5; text-align:center; padding:.45rem .9rem; border-bottom:1px solid rgba(0,0,0,.08); }
.ia-haut span { display:block; max-width:1000px; margin:0 auto; }
.ia-bas { max-width:820px; margin:1.3rem auto 0; padding-top:.9rem; border-top:1px solid rgba(128,128,128,.35); font-size:.75rem; line-height:1.55; opacity:.85; text-align:center; }

.top-banner { background:var(--red); color:#fff; text-align:center; padding:.6rem 1rem; font-size:.85rem; font-weight:600; letter-spacing:.03em; }
.top-banner a { color:#fff; }
.notice-bar { background:#1a1a2e; color:#f0ede8; border-bottom:2px solid var(--orange); padding:1rem 2rem; }
.notice-inner { max-width:1120px; margin:0 auto; display:flex; flex-wrap:wrap; align-items:center; gap:.4rem 2rem; }
.notice-title { font-size:.95rem; font-weight:800; color:#fff; }
.notice-text { font-size:.85rem; color:#c8c3bb; line-height:1.6; flex:1; min-width:200px; }
.notice-text a { color:#f0ede8; }
.notice-source { font-size:.82rem; font-weight:700; color:var(--orange); white-space:nowrap; }

.hero { background:var(--white); border-bottom:1px solid var(--border); padding:2.6rem 1.25rem 2rem; display:flex; flex-direction:column; align-items:center; text-align:center; }
h1 { font-size:clamp(1.7rem,4.5vw,3rem); font-weight:900; line-height:1.15; max-width:900px; margin-bottom:1rem; letter-spacing:-.02em; }
h1 em { color:var(--red); font-style:normal; }
.hero-sub { font-size:clamp(.95rem,2vw,1.08rem); color:var(--muted); max-width:760px; line-height:1.7; margin-bottom:1.3rem; }
.hero-sub strong { color:var(--text); }
.hero-badges { display:flex; flex-wrap:wrap; gap:.6rem; justify-content:center; margin-bottom:1.4rem; }
.badge { display:inline-flex; align-items:center; gap:.4rem; padding:.35rem .9rem; border-radius:999px; font-size:.78rem; font-weight:700; letter-spacing:.04em; border:1px solid; }
.badge-red { background:var(--red-bg); color:var(--red); border-color:var(--red-border); }
.badge-blue { background:var(--blue-bg); color:var(--blue); border-color:var(--blue-border); }
.badge-orange { background:var(--orange-bg); color:var(--orange); border-color:var(--orange-border); }
.badge-green { background:var(--green-bg); color:var(--green); border-color:var(--green-border); }
.badge-purple { background:var(--purple-bg); color:var(--purple); border-color:var(--purple-border); }

/* recherche d'un départ */
.search { position:relative; display:flex; gap:8px; width:min(620px,100%); }
.search input { flex:1; min-width:0; padding:12px 16px; border:1px solid var(--border); border-radius:10px; font:inherit; font-size:1rem; background:var(--white); color:var(--text); }
.search input:focus { outline:2px solid var(--red); outline-offset:1px; border-color:transparent; }
.search-results { position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:15; margin:0; padding:6px; list-style:none; text-align:left; border:1px solid var(--border); border-radius:12px; background:var(--white); box-shadow:var(--shadow); }
.search-results button { display:block; width:100%; padding:9px 10px; border:0; border-radius:8px; background:none; font:inherit; color:var(--text); text-align:left; cursor:pointer; }
.search-results button:hover, .search-results button:focus-visible { background:var(--sand); }
.search-results small { display:block; color:var(--muted); font-size:.8rem; }
.steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; width:min(820px,100%); margin:18px 0 0; padding:0; list-style:none; text-align:left; color:var(--muted); font-size:.86rem; line-height:1.45; }
.steps li { padding:10px 12px; border:1px solid var(--border); border-radius:12px; background:var(--cream); }
.steps strong { display:block; margin-bottom:2px; color:var(--text); }

.button { padding:10px 16px; border:1px solid var(--border); border-radius:10px; background:var(--white); color:var(--text); font:inherit; font-weight:600; cursor:pointer; white-space:nowrap; }
.button:hover { border-color:#bdb6ad; }
.button.primary { border-color:var(--red); background:var(--red); color:#fff; }
.button.primary:hover { background:#a93226; }
.icon-button { width:38px; height:38px; border:1px solid var(--border); border-radius:10px; background:var(--white); color:var(--text); font:inherit; font-size:1.15rem; font-weight:600; line-height:1; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.06); }
.icon-button:hover { background:var(--sand); }
.link-button { padding:0; border:0; background:none; color:var(--muted); font:inherit; font-size:.8rem; text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
.link-button:hover { color:var(--text); }

/* la carte */
.carte-section { padding:1.6rem 1.25rem 2.4rem; }
.section-inner { max-width:960px; margin:0 auto; }
.section-inner.large { max-width:1200px; }
.map-card { border:1px solid var(--border); border-radius:var(--radius); background:var(--white); overflow:hidden; box-shadow:var(--shadow); }
.map-stage { position:relative; height:min(74vh,760px); min-height:440px; background:#f1efe9; }
.map-stage:fullscreen { height:100vh; }
#mapCanvas { display:block; width:100%; height:100%; touch-action:none; cursor:crosshair; }
#mapCanvas.panning { cursor:grabbing; }
#mapCanvas.over-marker { cursor:grab; }
#mapCanvas.over-lieu { cursor:pointer; }
.noscript { margin:0; padding:16px 18px; border-bottom:1px solid var(--border); background:var(--red-bg); font-weight:500; }
.infobulle { position:absolute; z-index:6; pointer-events:none; max-width:300px; padding:5px 9px; border-radius:8px; background:rgba(28,28,28,.92); color:#fff; font-size:.8rem; font-weight:500; line-height:1.35; box-shadow:var(--shadow); }

.trip-panel { position:absolute; top:14px; left:14px; width:300px; max-height:calc(100% - 28px); overflow:auto; padding:14px 16px; border:1px solid var(--border); border-radius:14px; background:rgba(255,255,255,.95); box-shadow:var(--shadow); }
.trip-panel p { margin:0; }
.trip-eyebrow { color:var(--muted); font-size:.7rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; }
.trip-from, .trip-to { margin-top:2px !important; font-weight:700; letter-spacing:-.01em; line-height:1.3; }
.trip-sub { margin-top:2px !important; color:var(--muted); font-size:.78rem; line-height:1.4; }
.proches { margin-top:10px; padding-top:10px; border-top:1px solid var(--border); display:flex; flex-direction:column; gap:3px; }
.proches .trip-eyebrow { margin-bottom:4px; }
.proche { display:grid; grid-template-columns:1.4rem 1fr auto; gap:.45rem; align-items:center; width:100%; padding:4px 4px; border:0; border-radius:8px; background:none; font:inherit; color:var(--text); text-align:left; cursor:pointer; }
.proche:hover:not(:disabled) { background:var(--sand); }
.proche:disabled { cursor:default; color:var(--muted); }
.proche .ico { font-size:1rem; text-align:center; }
.proche .nom { min-width:0; font-size:.84rem; font-weight:600; line-height:1.25; }
.proche .nom small { display:block; color:var(--muted); font-size:.72rem; font-weight:400; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tps { display:inline-block; min-width:3.4rem; text-align:center; padding:.18rem .45rem; border-radius:.35rem; font-weight:800; font-variant-numeric:tabular-nums; font-size:.78rem; color:#fff; white-space:nowrap; }
.tps.t15 { background:var(--t1); } .tps.t30 { background:var(--t3); color:#2b2000; } .tps.t45 { background:var(--t4); } .tps.t90 { background:var(--t5); } .tps.tnd { background:var(--t0); }
.trip-result { margin-top:12px; padding-top:12px; border-top:1px solid var(--border); }
.trip-duration { margin-top:8px !important; font-size:2rem; font-weight:900; letter-spacing:-.03em; }
.trip-steps { margin:10px 0 0; padding:0; list-style:none; font-size:.88rem; color:#444; }
.trip-steps li { display:flex; align-items:baseline; gap:8px; padding:4px 0; }
.trip-steps .badge { flex:none; min-width:26px; padding:2px 6px; border:0; border-radius:6px; font-size:.78rem; font-weight:700; letter-spacing:0; text-align:center; }
.trip-steps .walk { background:var(--sand); color:#444; }
.trip-steps .minutes { margin-left:auto; color:var(--muted); white-space:nowrap; }
.trip-row { display:flex; align-items:baseline; justify-content:space-between; }
.segmented { display:flex; align-items:center; flex-wrap:wrap; gap:4px; margin-top:12px; padding-top:10px; border-top:1px solid var(--border); font-size:.8rem; color:var(--muted); }
.segmented span { margin-right:4px; }
.segmented button { padding:4px 10px; border:1px solid var(--border); border-radius:999px; background:var(--white); color:#444; font:inherit; font-weight:500; cursor:pointer; }
.segmented button[aria-pressed="true"] { border-color:var(--red); background:var(--red-bg); color:var(--text); }
.trip-hint { margin-top:10px !important; color:var(--muted); font-size:.83rem; line-height:1.45; }

.map-buttons { position:absolute; top:14px; right:14px; display:flex; flex-direction:column; gap:6px; }
.legend { position:absolute; left:14px; bottom:14px; width:230px; padding:10px 12px 8px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.92); font-size:.75rem; }
.legend-bar { height:10px; border-radius:999px; }
.legend-labels { display:flex; justify-content:space-between; margin-top:4px; color:#444; font-weight:500; }
.legend-pictos { display:flex; flex-wrap:wrap; gap:.25rem .7rem; margin-top:6px; padding-top:6px; border-top:1px solid var(--border); color:#444; }
.legend-pictos i { display:inline-block; width:10px; height:10px; vertical-align:-1px; margin-right:.3rem; }
.legend-pictos .pi-ecole { background:var(--blue); border:1px solid #fff; }
.legend-pictos .pi-equip { background:#8e44ad; border-radius:50%; border:1px solid #fff; }
.legend-pictos .pi-arret { background:#fff; border-radius:50%; border:1px solid #333; }
.legend-pictos .pi-iso { width:14px; height:0; border-top:2px solid #111; vertical-align:3px; }

.controls { display:flex; flex-wrap:wrap; align-items:center; gap:12px 22px; padding:14px 18px; border-top:1px solid var(--border); }
.control-group { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.control-group.actions { margin-left:auto; }
.control-label { margin-right:4px; color:var(--muted); font-size:.72rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; }
.pill-toggle { display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border:1px solid var(--border); border-radius:999px; background:var(--white); font-size:.88rem; font-weight:500; cursor:pointer; user-select:none; }
.pill-toggle:has(input:checked) { border-color:var(--red); background:var(--red-bg); }
.pill-toggle:has(input:disabled) { cursor:default; }
.pill-toggle input { margin:0; accent-color:var(--red); }
.pill-toggle small { color:var(--muted); font-weight:400; }
.pill-toggle.cat:has(input:checked) { border-color:var(--cat); background:color-mix(in srgb, var(--cat) 12%, white); }
.pill-toggle.cat input { accent-color:var(--cat); }
input[type="range"] { width:140px; accent-color:var(--red); }
output { min-width:52px; font-size:.9rem; font-weight:600; }
.reach { margin:0; padding:0 18px 16px; color:#444; font-size:.92rem; line-height:1.5; }
.reach:empty { display:none; }

/* chiffres et texte */
.facts { background:var(--sand); border-top:1px solid var(--border); border-bottom:1px solid var(--border); padding:2.6rem 1.25rem; }
.section-label { font-size:.75rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); margin-bottom:1.3rem; text-align:center; }
.facts-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1rem; }
.fact-card { background:var(--white); border:1px solid var(--border); border-radius:.75rem; padding:1.3rem 1.5rem; }
.fact-card.highlight { border-color:var(--red-border); background:var(--red-bg); }
.fact-card.blue { border-color:var(--blue-border); background:var(--blue-bg); }
.fact-card.green { border-color:var(--green-border); background:var(--green-bg); }
.fact-card.orange { border-color:var(--orange-border); background:var(--orange-bg); }
.fact-number { font-size:2.2rem; font-weight:900; color:var(--red); line-height:1; margin-bottom:.4rem; }
.fact-number.blue { color:var(--blue); } .fact-number.green { color:var(--green); } .fact-number.orange { color:var(--orange); }
.fact-text { font-size:.88rem; color:var(--muted); line-height:1.5; }

.section { padding:3rem 1.25rem; border-bottom:1px solid var(--border); }
.section.white { background:var(--white); } .section.cream { background:var(--cream); } .section.sand { background:var(--sand); }
.section h2 { font-size:1.5rem; font-weight:800; margin-bottom:1rem; letter-spacing:-.02em; }
.section h3 { font-size:1.08rem; font-weight:800; margin:1.6rem 0 .6rem; }
.section p { color:var(--muted); line-height:1.8; font-size:.97rem; max-width:780px; margin-bottom:1rem; }
.section p strong, .section li strong { color:var(--text); }
.section ul { color:var(--muted); font-size:.93rem; line-height:1.7; max-width:780px; padding-left:1.2rem; margin-bottom:1rem; }
.section ul li { margin-bottom:.35rem; }
.info-box, .warn-box, .good-box { border-radius:0 .5rem .5rem 0; padding:1.1rem 1.4rem; margin:1.4rem 0; max-width:860px; }
.info-box { background:var(--blue-bg); border:1px solid var(--blue-border); border-left:4px solid var(--blue); }
.warn-box { background:var(--orange-bg); border:1px solid var(--orange-border); border-left:4px solid var(--orange); }
.good-box { background:var(--green-bg); border:1px solid var(--green-border); border-left:4px solid var(--green); }
.info-box p, .warn-box p, .good-box p, .info-box li, .warn-box li { color:var(--text); font-size:.93rem; line-height:1.7; margin-bottom:0; }
.info-box p + p, .warn-box p + p { margin-top:.7rem; }
.box-title { font-weight:800; font-size:.8rem; text-transform:uppercase; letter-spacing:.07em; margin-bottom:.5rem; }
.info-box .box-title { color:var(--blue); } .warn-box .box-title { color:var(--orange); } .good-box .box-title { color:var(--green); }
.table-wrap { overflow-x:auto; border-radius:.6rem; border:1px solid var(--border); margin:1.2rem 0; background:var(--white); max-width:860px; }
table { width:100%; border-collapse:collapse; font-size:.86rem; background:var(--white); }
thead { background:var(--sand); }
th { padding:.6rem .8rem; text-align:left; font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); border-bottom:1px solid var(--border); }
td { padding:.55rem .8rem; border-bottom:1px solid #f0ede8; vertical-align:top; color:var(--text); line-height:1.5; }
tr:last-child td { border-bottom:none; }

footer { background:#1a1a2e; color:#c8c3bb; padding:2.2rem 1.25rem 2.4rem; font-size:.86rem; line-height:1.7; }
footer .section-inner p { margin-bottom:.6rem; }
footer a { color:#f0ede8; }
footer .ia-bas { color:#c8c3bb; }

.toast { position:fixed; left:50%; bottom:24px; z-index:30; transform:translateX(-50%); padding:10px 16px; border-radius:10px; background:var(--text); color:#fff; font-weight:500; box-shadow:var(--shadow); }

@media (max-width:720px) {
  .notice-bar { padding:.8rem 1rem; }
  .hero { padding-top:1.6rem; }
  .steps { display:none; }
  .search { flex-direction:column; }
  .carte-section { padding:1rem .5rem 1.6rem; }
  .map-stage { height:auto; min-height:0; }
  .map-stage:fullscreen #mapCanvas { height:100vh; }
  #mapCanvas { height:62vh; }
  /* sur mobile, le panneau passe sous la carte au lieu de la recouvrir */
  .trip-panel { position:static; width:auto; max-height:none; padding:14px 16px; border:0; border-top:1px solid var(--border); border-radius:0; background:var(--white); box-shadow:none; }
  .map-stage:fullscreen .trip-panel { display:none; }
  .trip-duration { font-size:1.5rem; }
  .legend { top:10px; bottom:auto; left:10px; width:170px; padding:8px 10px 6px; }
  .legend-pictos { display:none; }
  .map-buttons { top:10px; right:10px; }
  .control-group.actions { margin-left:0; }
  .section { padding:2.2rem 1rem; }
}
