/* ══════════════════════════════════════════════════
   INFO TRAFIC — thèmes clair + sombre
   (pages /info-trafic/, /info-trafic/<dept>/, .../<ville>/)
══════════════════════════════════════════════════ */
:root {
  --tf-bg1:     #eef2f7;
  --tf-bg2:     #f8fafc;
  --tf-card:    rgba(255,255,255,.9);
  --tf-card-bd: rgba(0,0,0,.09);
  --tf-card-sh: 0 2px 14px rgba(0,0,0,.08);
  --tf-soft:    var(--text-soft);
  --tf-softer:  rgba(22,24,29,.42);
  --tf-tile:    light;
}
html[data-theme="dark"] {
  --tf-bg1:     #141a24;
  --tf-bg2:     #0b0f16;
  --tf-card:    rgba(255,255,255,.07);
  --tf-card-bd: rgba(255,255,255,.13);
  --tf-card-sh: none;
  --tf-soft:    rgba(255,255,255,.58);
  --tf-softer:  rgba(255,255,255,.36);
  --tf-tile:    dark;
}

body { background: transparent !important; }

#tf-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--tf-bg1) 0%, var(--tf-bg2) 100%);
}

.tf { position: relative; z-index: 1; font-family: Montserrat, sans-serif; color: var(--text); padding-bottom: 56px; }
.tf-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ── Breadcrumb ── */
.tf-breadcrumb { text-align: center; padding: 14px 18px 0; font-size: .72rem; color: var(--tf-softer); }
.tf-breadcrumb a { color: var(--tf-soft); text-decoration: none; }
.tf-breadcrumb a:hover { color: var(--text); text-decoration: underline; }

/* ── Hero ── */
.tf-hero { text-align: center; padding: 26px 18px 18px; }
.tf-hero-eyebrow { font-size: .65rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--tf-soft); margin-bottom: 6px; }
.tf-hero-title { font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 800; line-height: 1.1; margin: 0 0 6px; }
.tf-hero-title span { color: var(--brand); }
html[data-theme="dark"] .tf-hero-title span { color: var(--accent); }
.tf-hero-sub { font-size: .9rem; color: var(--tf-soft); margin: 0; max-width: 640px; margin: 0 auto; }

/* ── Live badge ── */
.tf-live {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px;
  padding: 4px 12px; border-radius: 9999px; font-size: .62rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--brand);
}
.tf-live::before { content:''; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: tf-pulse 1.4s infinite; }
@keyframes tf-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ── Section title ── */
.tf-section-title {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--tf-soft); margin: 22px 0 10px; display: flex; align-items: center; gap: 6px;
}
.tf-section-title::after { content:''; flex:1; height:1px; background: var(--tf-card-bd); }
.tf-section-title .material-symbols-outlined { font-size: 14px; }

/* ── Cards ── */
.tf-card { background: var(--tf-card); border: 1px solid var(--tf-card-bd); border-radius: 18px; box-shadow: var(--tf-card-sh); }

/* ── Waze live map ── */
.tf-map-card { overflow: hidden; margin-bottom: 4px; }
.tf-map-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--tf-card-bd); flex-wrap: wrap;
}
.tf-map-head-l { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 800; }
.tf-map-head-l .material-symbols-outlined { color: var(--brand); font-size: 18px; }
html[data-theme="dark"] .tf-map-head-l .material-symbols-outlined { color: var(--accent); }
.tf-map-head-r { font-size: .68rem; color: var(--tf-soft); }
.tf-waze { width: 100%; border: 0; display: block; background: #1b1f2a; }
.tf-waze.tf-waze-lg { height: 560px; }
.tf-waze.tf-waze-md { height: 480px; }
@media(max-width:600px) { .tf-waze.tf-waze-lg, .tf-waze.tf-waze-md { height: 420px; } }

/* ── Legend ── */
.tf-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 16px; font-size: .72rem; color: var(--tf-soft); }
.tf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tf-legend i { width: 22px; height: 6px; border-radius: 9999px; display: inline-block; }
.tf-l-ok { background: #22c55e; } .tf-l-slow { background: #f59e0b; } .tf-l-jam { background: #ef4444; } .tf-l-block { background: #7f1d1d; }

/* ── Leaflet picker map ── */
#tf-map { height: 460px; display: block; }
@media(max-width:600px) { #tf-map { height: 340px; } }
.tf-pick-label { background: transparent !important; border: none !important; }
.tf-pick-inner {
  border-radius: 10px; padding: 4px 9px; font-family: Montserrat, sans-serif; font-weight: 800;
  font-size: .72rem; white-space: nowrap; cursor: pointer; transition: transform .15s;
  background: rgba(255,255,255,.92); border: 1.5px solid rgba(205,0,0,.3); color: #16181d;
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
}
html[data-theme="dark"] .tf-pick-inner { background: rgba(10,18,28,.88); border-color: rgba(255,255,255,.22); color: #fff; }
.tf-pick-inner:hover { transform: scale(1.08) translateY(-2px); }
.leaflet-tooltip {
  font-family: Montserrat, sans-serif; font-size: 13px; font-weight: 700;
  background: var(--tf-card) !important; border: 1px solid var(--tf-card-bd) !important;
  color: var(--text) !important; box-shadow: var(--tf-card-sh) !important;
}

/* ── Pills ── */
.tf-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.tf-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; border-radius: 9999px;
  background: var(--tf-card); border: 1px solid var(--tf-card-bd); color: var(--tf-soft);
  font-size: .76rem; font-weight: 600; font-family: Montserrat, sans-serif; text-decoration: none;
  box-shadow: var(--tf-card-sh); transition: all .15s;
}
.tf-pill:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.tf-pill .material-symbols-outlined { font-size: 14px; }

/* ── Grid (dept/ville layout) ── */
.tf-grid { display: grid; grid-template-columns: 1fr 320px; gap: 14px; align-items: start; }
@media(max-width:900px) { .tf-grid { grid-template-columns: 1fr; } }
.tf-col { display: flex; flex-direction: column; gap: 14px; }

/* ── Conditions panel (road weather) ── */
.tf-cond { padding: 14px 16px; }
.tf-cond-title { font-size: .6rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tf-soft); margin-bottom: 12px; display: flex; align-items: center; gap: 5px; }
.tf-cond-title .material-symbols-outlined { font-size: 13px; }
.tf-cond-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--tf-card-bd); }
.tf-cond-row:last-child { border-bottom: none; }
.tf-cond-ico { font-size: 1.25rem; width: 26px; text-align: center; flex-shrink: 0; }
.tf-cond-body { flex: 1; }
.tf-cond-lbl { font-size: .82rem; font-weight: 700; }
.tf-cond-desc { font-size: .68rem; color: var(--tf-soft); }
.tf-cond-val { font-size: 1.05rem; font-weight: 800; }
.tf-alert {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; margin-bottom: 12px;
  font-size: .76rem; font-weight: 700; background: rgba(239,68,68,.12); color: #b91c1c; border: 1px solid rgba(239,68,68,.3);
}
html[data-theme="dark"] .tf-alert { color: #fca5a5; }
.tf-alert.ok { background: rgba(34,197,94,.12); color: #15803d; border-color: rgba(34,197,94,.3); }
html[data-theme="dark"] .tf-alert.ok { color: #86efac; }
.tf-mini-spin { width: 16px; height: 16px; border: 2px solid var(--tf-card-bd); border-top-color: var(--brand); border-radius: 50%; animation: tf-spin .7s linear infinite; display: inline-block; }
@keyframes tf-spin { to { transform: rotate(360deg); } }

/* ── Commune list + search ── */
.tf-search-wrap { padding: 14px 16px; }
.tf-search {
  width: 100%; box-sizing: border-box; padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid var(--tf-card-bd); background: var(--bg); color: var(--text);
  font-family: Montserrat, sans-serif; font-size: .85rem; outline: none;
}
.tf-search:focus { border-color: var(--brand); }
.tf-commune-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 12px; max-height: 360px; overflow-y: auto; }
.tf-commune {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px;
  background: var(--tf-card); border: 1px solid var(--tf-card-bd); text-decoration: none;
  color: var(--text); font-size: .78rem; font-weight: 600; transition: all .12s;
}
.tf-commune:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.tf-commune .material-symbols-outlined { font-size: 14px; color: var(--brand); flex-shrink: 0; }
.tf-commune:hover .material-symbols-outlined { color: #fff; }
html[data-theme="dark"] .tf-commune .material-symbols-outlined { color: var(--accent); }
.tf-no-result { padding: 14px; font-size: .8rem; color: var(--tf-soft); text-align: center; }

/* ── Info / SEO blocks ── */
.tf-prose { padding: 16px; font-size: .85rem; line-height: 1.6; color: var(--tf-soft); }
.tf-prose h2 { font-size: .95rem; color: var(--text); margin: 0 0 8px; }
.tf-prose p { margin: 0 0 10px; }
.tf-prose a { color: var(--brand); }
html[data-theme="dark"] .tf-prose a { color: var(--accent); }

/* ── Sources ── */
.tf-sources { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 16px; }
.tf-source {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px;
  background: var(--tf-card); border: 1px solid var(--tf-card-bd); color: var(--tf-soft);
  font-size: .76rem; font-weight: 700; text-decoration: none; transition: all .15s;
}
.tf-source:hover { border-color: var(--brand); color: var(--brand); }
html[data-theme="dark"] .tf-source:hover { color: var(--accent); border-color: var(--accent); }
.tf-source .material-symbols-outlined { font-size: 16px; }
