/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #21262d;
  --border:    #30363d;
  --text:      #e6edf3;
  --text-sub:  #8b949e;
  --orange:    #f97316;
  --orange-d:  #ea6c07;
  --green:     #22c55e;
  --red:       #ef4444;
  --yellow:    #eab308;
  --blue:      #3b82f6;
  --purple:    #a855f7;
  --radius:    10px;
  --shadow:    0 4px 24px rgba(0,0,0,.4);
}

html { font-size: 15px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ──────────────────────────────────────────────────────────────────── */
.header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; }
.logo:hover .logo-text { opacity: 0.85; }
.logo-icon { font-size: 2rem; }
.logo-text { font-size: 1.3rem; font-weight: 700; color: var(--orange); }
.logo-sub { display: block; font-size: .7rem; color: var(--text-sub); }
.header-actions { display: flex; align-items: center; gap: 12px; }

.badge-status {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 20px;
  font-size: .8rem; color: var(--text-sub);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: .4; }
}

.btn {
  padding: 8px 18px; border-radius: var(--radius);
  border: none; cursor: pointer; font-size: .85rem; font-weight: 600;
  transition: all .2s;
}
.btn-scan {
  background: var(--orange); color: #fff;
}
.btn-scan:hover { background: var(--orange-d); }
.btn-scan:disabled { opacity: .5; cursor: not-allowed; }

.btn-report {
  background: transparent;
  border: 1.5px solid #34d399 !important;
  color: #34d399 !important;
}
.btn-report:hover { background: rgba(52,211,153,.12); }

.btn-logout {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 6px 10px;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* ── Nav ─────────────────────────────────────────────────────────────────────── */
.nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 24px;
  display: flex; gap: 4px;
}
.nav-btn {
  background: none; border: none; color: var(--text-sub);
  padding: 12px 18px; cursor: pointer; font-size: .9rem;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  position: relative;
}
.nav-btn:hover { color: var(--text); }
.nav-btn.active { color: var(--orange); border-bottom-color: var(--orange); }
.badge-count {
  background: var(--red); color: #fff;
  font-size: .65rem; font-weight: 700;
  padding: 2px 5px; border-radius: 10px;
  position: absolute; top: 6px; right: 2px;
}

/* ── Main ────────────────────────────────────────────────────────────────────── */
.main {
  max-width: 1400px; margin: 0 auto;
  padding: 24px;
}
.section { display: none; }
.section.active { display: block; }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
  font-weight: 600; font-size: 1rem;
}
.card-sub { font-size: .78rem; color: var(--text-sub); font-weight: 400; }
.card-link { font-size: .8rem; color: var(--orange); }
.flex-1 { flex: 1; }

/* ── Metrics ─────────────────────────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.metric-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  text-align: center;
  transition: border-color .2s;
}
.metric-card:hover { border-color: var(--orange); }
.metric-icon { font-size: 1.6rem; margin-bottom: 6px; }
.metric-value {
  font-size: 1.8rem; font-weight: 700; color: var(--text);
  margin-bottom: 4px;
}
.metric-value.accent { color: var(--orange); }
.metric-value.success { color: var(--green); }
.metric-label { font-size: .72rem; color: var(--text-sub); }

/* ── Dashboard row ───────────────────────────────────────────────────────────── */
.dashboard-row {
  display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}

/* ── Opportunities ─────────────────────────────────────────────────────────── */
.opportunities-list { display: flex; flex-direction: column; gap: 10px; }
.opportunity-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg3); border-radius: 8px; padding: 12px;
  border-left: 3px solid var(--orange);
  cursor: pointer; transition: background .2s;
}
.opportunity-item:hover { background: #2d3139; }
.opportunity-item.high { border-left-color: var(--red); }
.opportunity-item.medium { border-left-color: var(--yellow); }
.opp-badge {
  background: var(--orange); color: #fff;
  font-size: .7rem; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
  white-space: nowrap;
}
.opp-badge.high { background: var(--red); }
.opp-badge.medium { background: var(--yellow); color: #000; }
.opp-title { font-weight: 600; font-size: .88rem; margin-bottom: 2px; }
.opp-detail { font-size: .75rem; color: var(--text-sub); }
.opp-savings {
  margin-left: auto; text-align: right;
  font-weight: 700; color: var(--green);
  font-size: .9rem; white-space: nowrap;
}

/* ── Alerts mini ─────────────────────────────────────────────────────────────── */
.alerts-mini-list { display: flex; flex-direction: column; gap: 8px; }
.alert-mini-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 8px;
  background: var(--bg3); font-size: .82rem;
}
.alert-mini-item .sev-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.sev-dot.high { background: var(--red); }
.sev-dot.medium { background: var(--yellow); }
.sev-dot.low { background: var(--blue); }
.alert-mini-title { flex: 1; }
.alert-mini-time { font-size: .7rem; color: var(--text-sub); white-space: nowrap; }

/* ── Category overview ──────────────────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.cat-card {
  background: var(--bg3); border-radius: 8px; padding: 14px;
  border: 1px solid var(--border);
}
.cat-card-header {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; margin-bottom: 10px;
}
.cat-count { font-size: .75rem; color: var(--text-sub); margin-left: auto; }
.cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .82rem;
}
.cat-item:last-child { border-bottom: none; }
.cat-item-name { flex: 1; color: var(--text-sub); }
.cat-item-price { font-weight: 600; }
.cat-item-gap {
  font-size: .72rem; padding: 2px 7px; border-radius: 5px;
  margin-left: 8px;
}
.cat-item-gap.hot { background: rgba(239,68,68,.2); color: var(--red); }
.cat-item-gap.warm { background: rgba(234,179,8,.2); color: var(--yellow); }
.cat-item-gap.cool { background: rgba(59,130,246,.15); color: var(--blue); }
.cat-filters { display: flex; gap: 8px; }

/* ── Price table ─────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
.price-table {
  width: 100%; border-collapse: collapse; font-size: .84rem;
}
.price-table th {
  text-align: left; padding: 10px 12px;
  color: var(--text-sub); font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  white-space: nowrap;
}
.price-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.price-table tr:hover td { background: var(--bg3); }
.price-cell {
  font-weight: 600; white-space: nowrap;
  position: relative;
}
.price-cell.best-price { color: var(--green); }
.price-cell.worst-price { color: var(--red); }
.price-cell.na { color: var(--text-sub); font-weight: 400; }
.price-link { font-size: .7rem; display: block; color: var(--orange); margin-top: 1px; }
.gap-badge {
  padding: 3px 8px; border-radius: 6px;
  font-size: .72rem; font-weight: 700;
  white-space: nowrap;
}
.gap-badge.gap-high { background: rgba(239,68,68,.2); color: var(--red); }
.gap-badge.gap-med  { background: rgba(234,179,8,.2); color: var(--yellow); }
.gap-badge.gap-low  { background: rgba(34,197,94,.15); color: var(--green); }
.cat-tag {
  padding: 3px 8px; border-radius: 6px; font-size: .72rem;
  font-weight: 600; white-space: nowrap;
}
.cat-tag.isolation   { background: rgba(249,115,22,.15); color: var(--orange); }
.cat-tag.electricite { background: rgba(234,179,8,.15); color: var(--yellow); }
.cat-tag.plomberie   { background: rgba(59,130,246,.15); color: var(--blue); }
.cat-tag.peinture    { background: rgba(168,85,247,.15); color: var(--purple); }

.btn-detail {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-sub); padding: 4px 10px; border-radius: 6px;
  cursor: pointer; font-size: .75rem; white-space: nowrap;
}
.btn-detail:hover { border-color: var(--orange); color: var(--orange); }
.loading-cell { text-align: center; padding: 40px; color: var(--text-sub); }

/* ── Filters ─────────────────────────────────────────────────────────────────── */
.filters-row {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.select-filter {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 6px 10px; border-radius: 7px;
  font-size: .82rem; cursor: pointer;
}
.select-filter:focus { outline: none; border-color: var(--orange); }
.search-input {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 6px 12px; border-radius: 7px;
  font-size: .82rem; width: 220px;
}
.search-input:focus { outline: none; border-color: var(--orange); }

/* ── Alerts full ─────────────────────────────────────────────────────────────── */
.alerts-full-list { display: flex; flex-direction: column; gap: 10px; }
.alert-full-item {
  background: var(--bg3); border-radius: 10px; padding: 16px;
  border-left: 4px solid var(--border);
  display: flex; gap: 14px; align-items: flex-start;
}
.alert-full-item.high   { border-left-color: var(--red); }
.alert-full-item.medium { border-left-color: var(--yellow); }
.alert-full-item.low    { border-left-color: var(--blue); }
.alert-icon { font-size: 1.6rem; flex-shrink: 0; }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
.alert-detail { font-size: .78rem; color: var(--text-sub); margin-bottom: 6px; word-break: break-word; }
.alert-meta {
  display: flex; gap: 10px; flex-wrap: wrap; font-size: .72rem; color: var(--text-sub);
}
.alert-savings {
  background: rgba(34,197,94,.15); color: var(--green);
  padding: 2px 8px; border-radius: 5px; font-weight: 700; white-space: nowrap;
}
.alert-type-badge {
  padding: 2px 8px; border-radius: 5px; font-weight: 700;
  font-size: .72rem;
}
.alert-type-DROP { background: rgba(239,68,68,.15); color: var(--red); }
.alert-type-GAP  { background: rgba(249,115,22,.15); color: var(--orange); }
.alert-type-DEAL { background: rgba(34,197,94,.15); color: var(--green); }

/* ── History ─────────────────────────────────────────────────────────────────── */
.history-controls {
  display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.chart-container {
  position: relative; height: 360px; margin-bottom: 20px;
}
.history-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.history-stat-card {
  background: var(--bg3); border-radius: 8px; padding: 14px;
  border: 1px solid var(--border);
}
.hsc-store { font-weight: 700; font-size: .85rem; margin-bottom: 8px; }
.hsc-row { display: flex; justify-content: space-between; font-size: .78rem; margin-bottom: 4px; color: var(--text-sub); }
.hsc-val { color: var(--text); font-weight: 600; }

/* ── Modal ───────────────────────────────────────────────────────────────────── */
.modal {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal.open { display: flex; }
.modal-content {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px;
  max-width: 640px; width: 95%; max-height: 90vh; overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; font-size: .9rem; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--red); border-color: var(--red); }
.modal-product-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.modal-price-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px;
}
.modal-price-card {
  background: var(--bg3); border-radius: 8px; padding: 14px;
  border: 1px solid var(--border);
}
.modal-price-card.best { border-color: var(--green); }
.mpc-store { font-size: .78rem; color: var(--text-sub); margin-bottom: 4px; }
.mpc-price { font-size: 1.3rem; font-weight: 700; }
.mpc-price.best-val { color: var(--green); }
.mpc-price.worst-val { color: var(--red); }
.mpc-link { font-size: .72rem; color: var(--orange); display: block; margin-top: 4px; }
.savings-banner {
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3);
  border-radius: 8px; padding: 14px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.savings-icon { font-size: 1.5rem; }
.savings-text { font-size: .9rem; }
.savings-amount { font-size: 1.2rem; font-weight: 700; color: var(--green); }

/* ── Toast ───────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px; z-index: 300;
}
.toast {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 18px;
  font-size: .85rem; max-width: 320px;
  animation: slideIn .3s ease;
  display: flex; align-items: center; gap: 10px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--blue); }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Empty states ─────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 32px; color: var(--text-sub);
  font-size: .88rem;
}

/* ── Store color headers ─────────────────────────────────────────────────────── */
#th-lm    { border-top: 3px solid #006F3C; }
#th-casto { border-top: 3px solid #0055A4; }
#th-bd    { border-top: 3px solid #E2051B; }
#th-mm    { border-top: 3px solid #00A870; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
/* ── Export CSV button ──────────────────────────────────────────────────────── */
.export-group { display: flex; align-items: center; gap: 6px; }
.btn-export {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 6px 14px; border-radius: 6px;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; font-family: inherit;
  transition: border-color .2s, background .2s;
}
.btn-export:hover { border-color: var(--orange); background: rgba(249,115,22,.08); }

/* ── Trends summary ─────────────────────────────────────────────────────────── */
.trends-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.ts-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 16px; text-align: center;
}
.ts-num { font-size: 1.8rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.ts-label { font-size: .75rem; color: var(--text-sub); }
.ts-down { border-color: rgba(34,197,94,.25); }
.ts-down .ts-num { color: var(--green); }
.ts-up { border-color: rgba(239,68,68,.25); }
.ts-up .ts-num { color: var(--red); }
.ts-stable .ts-num { color: var(--text-sub); }
.ts-new .ts-num { color: var(--blue); }

/* ── Trends grid ─────────────────────────────────────────────────────────────── */
.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  padding: 20px;
}
.trend-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px;
  cursor: pointer; transition: transform .2s, border-color .2s;
}
.trend-card:hover { transform: translateY(-2px); border-color: var(--orange); }

.trend-down { border-left: 3px solid var(--green); }
.trend-up   { border-left: 3px solid var(--red); }
.trend-stable { border-left: 3px solid var(--border); }
.trend-new  { border-left: 3px solid var(--blue); }

.tc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tc-category { font-size: .72rem; color: var(--text-sub); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.tc-arrow { font-size: 1.2rem; }
.tc-name { font-weight: 700; font-size: .9rem; margin-bottom: 6px; line-height: 1.3; }
.tc-change { font-size: .82rem; font-weight: 600; margin-bottom: 8px; }
.trend-down-text  { color: var(--green); }
.trend-up-text    { color: var(--red); }
.trend-stable-text { color: var(--text-sub); }
.trend-new-text   { color: var(--blue); }
.tc-best { font-size: .78rem; color: var(--text-sub); margin-bottom: 10px; }
.tc-best strong { color: var(--text); }

.tc-stores { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.trend-store-row {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem;
}
.tsr-name  { color: var(--text-sub); width: 46px; flex-shrink: 0; }
.tsr-price { flex: 1; font-weight: 600; }
.tsr-change { font-size: .72rem; font-weight: 700; }
.store-down .tsr-change { color: var(--green); }
.store-up   .tsr-change { color: var(--red); }
.store-down .tsr-price  { color: var(--green); }
.store-up   .tsr-price  { color: var(--red); }

/* ── Baromètre MaterioScan ───────────────────────────────────────────────── */
.baro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 4px 0 8px;
}

.baro-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px;
  text-align: center;
  transition: transform .18s, border-color .18s;
  border-top: 4px solid var(--border);
}
.baro-card:hover { transform: translateY(-2px); }

.baro-down   { border-top-color: var(--green); }
.baro-up     { border-top-color: #f87171; }
.baro-stable { border-top-color: var(--orange); }

.baro-cat {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--text-sub); margin-bottom: 10px;
}
.baro-index {
  font-size: 2.4rem; font-weight: 800; line-height: 1;
  color: var(--text); margin-bottom: 4px;
}
.baro-down  .baro-index { color: var(--green); }
.baro-up    .baro-index { color: #f87171; }

.baro-arrow { font-size: 1.4rem; margin-bottom: 6px; }

.baro-pct {
  font-size: .8rem; font-weight: 700; margin-bottom: 4px;
}
.baro-down   .baro-pct { color: var(--green); }
.baro-up     .baro-pct { color: #f87171; }
.baro-stable .baro-pct { color: var(--text-sub); }

.baro-note {
  font-size: .7rem; color: var(--text-sub);
  border-top: 1px solid var(--border); margin-top: 8px;
  padding-top: 8px; letter-spacing: .4px;
}

/* ── Résumé du marché ────────────────────────────────────────────────────── */
.resume-marche-card .card-header {
  align-items: flex-start;
}
.resume-actions {
  display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap;
  margin-left: 12px;
}
.btn-sm {
  font-size: .75rem !important; padding: 5px 10px !important;
}

/* Grille 2 colonnes mensuel / annuel */
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0 24px;
}
.resume-col-sep {
  background: var(--border);
  width: 1px;
}
.resume-col-title {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--text-sub);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Ligne catégorie + valeur */
.resume-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.resume-row:last-child { border-bottom: none; }
.resume-cat {
  font-size: .875rem; color: var(--text);
}
.resume-val {
  font-size: .9rem; font-weight: 700; letter-spacing: .3px;
}
.resume-down { color: var(--green); }
.resume-up   { color: #f87171; }
.resume-flat { color: var(--text-sub); }
.resume-na   { color: var(--muted); font-size: .78rem; font-weight: 400; font-style: italic; }

/* Print / PDF — 1 page : Baromètre + Résumé uniquement */
@media print {
  @page { margin: 12mm; size: A4 portrait; }

  *, *::before, *::after { box-sizing: border-box; }

  body, html {
    background: #fff !important;
    color: #000 !important;
    font-size: 10.5pt;
    margin: 0; padding: 0;
  }

  /* Masquer tout sauf le contenu Marché */
  header.header,
  nav.nav,
  #section-dashboard,
  #section-prices,
  #section-alerts,
  #section-chantiers,
  #section-history,
  #card-radar-prix,
  .resume-actions,
  #baro-legend,
  .toast-container { display: none !important; }

  .main { padding: 0 !important; margin: 0 !important; }
  #section-marche {
    display: block !important;
    padding: 0 !important; margin: 0 !important;
  }

  /* Cards */
  .card {
    border: 1px solid #d0d0d0 !important;
    background: #fff !important;
    box-shadow: none !important;
    margin-bottom: 10pt !important;
    page-break-inside: avoid;
    border-radius: 6pt !important;
  }
  .card-header { border-bottom: 1px solid #d0d0d0 !important; color: #000 !important; }
  .card-header span { color: #000 !important; }

  /* Baromètre : 4 colonnes sur 1 ligne */
  .baro-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8pt !important;
  }
  .baro-card {
    page-break-inside: avoid;
    border: 1px solid #d0d0d0 !important;
    padding: 10pt 8pt !important;
  }
  .baro-cat   { color: #555 !important; }
  .baro-index { font-size: 1.5rem !important; color: #000 !important; }
  .baro-note  { color: #888 !important; border-top-color: #d0d0d0 !important; }
  .baro-down  { border-top-color: #16a34a !important; }
  .baro-up    { border-top-color: #dc2626 !important; }
  .baro-down  .baro-index { color: #16a34a !important; }
  .baro-up    .baro-index { color: #dc2626 !important; }
  .baro-down  .baro-pct   { color: #16a34a !important; }
  .baro-up    .baro-pct   { color: #dc2626 !important; }
  .baro-stable .baro-pct  { color: #555 !important; }

  /* Résumé du marché */
  .resume-grid       { gap: 0 20pt !important; }
  .resume-col-sep    { background: #d0d0d0 !important; }
  .resume-col-title  { color: #555 !important; border-bottom-color: #d0d0d0 !important; }
  .resume-cat        { color: #000 !important; }
  .resume-val        { color: #000 !important; }
  .resume-down       { color: #16a34a !important; }
  .resume-up         { color: #dc2626 !important; }
  .resume-flat       { color: #555 !important; }
  .resume-na         { color: #999 !important; }
  .resume-row        { border-bottom-color: #eee !important; }
}

/* ── Chantiers PRO ─────────────────────────────────────────────────────────── */

/* Badge PRO */
.pro-badge { display:inline-block; font-size:.6rem; font-weight:700; background:linear-gradient(135deg,var(--orange),#f59e0b); color:#000; padding:1px 5px; border-radius:4px; vertical-align:middle; margin-left:4px; letter-spacing:.03em; }
.nav-btn-pro { border-color: rgba(249,115,22,.3); }
.nav-btn-pro.active, .nav-btn-pro:hover { border-color:var(--orange); color:var(--orange); }

/* Top bar */
.chantier-top-bar { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; flex-wrap:wrap; gap:12px; }
.chantier-section-title { font-size:1.15rem; font-weight:700; }
.chantier-section-sub   { font-size:.82rem; color:var(--text-sub); margin-top:3px; }
.chantier-top-actions   { display:flex; gap:10px; }

/* Carte chantier */
.chantier-card         { margin-bottom:16px; }
.chantier-card-header  { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; padding-bottom:12px; border-bottom:1px solid var(--border); margin-bottom:12px; }
.chantier-card-title   { display:flex; align-items:flex-start; gap:12px; }
.chantier-icon         { font-size:1.8rem; line-height:1; }
.chantier-name         { font-weight:700; font-size:1.05rem; }
.chantier-meta         { font-size:.76rem; color:var(--text-sub); margin-top:3px; }
.chantier-card-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.chantier-best-tag     { font-size:.84rem; color:var(--green); }
.btn-link              { background:none; border:none; cursor:pointer; font-size:.85rem; padding:0; color:var(--orange); }
.btn-link:hover        { text-decoration:underline; }
.btn-danger            { color:var(--red) !important; }
.btn-edit              { color:#7dd3fc !important; font-size:1rem; }
.btn-edit:hover        { opacity:.8; }

/* Chips matériaux */
.ci-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.ci-chip  { font-size:.75rem; background:var(--bg3); border:1px solid var(--border); border-radius:4px; padding:3px 8px; color:var(--text-sub); }

/* Comparatif prix */
.chantier-prices-title { font-size:.78rem; font-weight:700; color:var(--text-sub); text-transform:uppercase; letter-spacing:.05em; margin-bottom:8px; }
.chantier-store-list   { display:flex; flex-direction:column; gap:6px; }
.csr           { display:flex; justify-content:space-between; align-items:center; padding:9px 14px; border-radius:8px; background:var(--bg3); border:1px solid transparent; font-size:.9rem; }
.csr-best      { background:rgba(34,197,94,.08); border-color:rgba(34,197,94,.3); }
.csr-left      { display:flex; align-items:center; gap:10px; }
.csr-medal     { font-size:1rem; }
.csr-store     { font-weight:500; }
.csr-right     { display:flex; align-items:center; gap:8px; }
.csr-tag-best  { font-size:.75rem; color:var(--green); font-weight:600; }
.csr-tag-diff  { font-size:.75rem; color:var(--text-sub); }
.csr-noprice   { font-size:.82rem; color:var(--text-sub); padding:10px 0; font-style:italic; }
.chantier-savings { margin-top:10px; font-size:.82rem; color:var(--text-sub); background:rgba(249,115,22,.07); border:1px solid rgba(249,115,22,.2); border-radius:6px; padding:7px 14px; }

/* Empty state */
.chantier-empty      { text-align:center; padding:60px 20px; color:var(--text-sub); }
.chantier-empty-icon { font-size:3rem; margin-bottom:12px; }
.chantier-empty-text { font-size:1.05rem; font-weight:600; color:var(--text); margin-bottom:6px; }
.chantier-empty-sub  { font-size:.85rem; }

/* Input générique */
.chantier-input { background:var(--bg3); border:1px solid var(--border); border-radius:var(--radius); color:var(--text); padding:8px 13px; font-size:.9rem; outline:none; width:100%; transition:border-color .2s; }
.chantier-input:focus { border-color:var(--orange); }

/* ── Modal nouveau chantier ─────────────────────────────────────────────────── */
.cmodal-overlay { position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,.65); backdrop-filter:blur(4px); display:flex; align-items:flex-start; justify-content:center; padding:40px 16px 16px; overflow-y:auto; }
.cmodal         { background:var(--bg2); border:1px solid var(--border); border-radius:14px; width:100%; max-width:840px; box-shadow:var(--shadow); display:flex; flex-direction:column; }
.cmodal-header  { display:flex; justify-content:space-between; align-items:center; padding:18px 22px 14px; border-bottom:1px solid var(--border); font-weight:700; font-size:1rem; }
.cmodal-close   { background:none; border:none; cursor:pointer; color:var(--text-sub); font-size:1.2rem; padding:0 4px; }
.cmodal-close:hover { color:var(--text); }
.cmodal-body    { padding:20px 22px; overflow-y:auto; max-height:62vh; }
.cmodal-footer  { display:flex; justify-content:space-between; align-items:center; padding:14px 22px 18px; border-top:1px solid var(--border); flex-wrap:wrap; gap:10px; }
.cmodal-row3    { display:grid; grid-template-columns:1fr 140px 1fr; gap:14px; margin-bottom:20px; }
.cform-group    { display:flex; flex-direction:column; gap:6px; }
.cform-label    { font-size:.82rem; font-weight:600; color:var(--text-sub); }
.cform-req      { color:var(--orange); }
.cform-hint     { font-weight:400; font-size:.75rem; color:var(--text-sub); }
.cform-section-title { font-size:.88rem; font-weight:700; margin-bottom:14px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.cn-count       { font-size:.82rem; color:var(--text-sub); }

/* ── Product picker ─────────────────────────────────────────────────────────── */
.product-picker   { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.picker-cat       { background:var(--bg3); border:1px solid var(--border); border-radius:10px; padding:12px 14px; }
.picker-cat-title { font-size:.78rem; font-weight:700; color:var(--orange); text-transform:uppercase; letter-spacing:.06em; margin-bottom:10px; }
.picker-item      { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:6px; cursor:pointer; transition:background .15s; font-size:.84rem; }
.picker-item:hover        { background:rgba(249,115,22,.06); }
.picker-item-active       { background:rgba(249,115,22,.1) !important; }
.picker-check             { accent-color:var(--orange); width:14px; height:14px; cursor:pointer; flex-shrink:0; }
.picker-name              { flex:1; }
.picker-unit-badge        { font-size:.7rem; color:var(--text-sub); background:var(--bg); border:1px solid var(--border); border-radius:3px; padding:1px 5px; flex-shrink:0; }
.picker-qty-wrap          { display:inline-flex; align-items:center; gap:4px; }
.picker-qty               { width:58px; background:var(--bg2); border:1px solid var(--orange); border-radius:5px; color:var(--text); padding:3px 7px; font-size:.84rem; text-align:right; outline:none; }

/* ── Signalement terrain — modal ─────────────────────────────────────────── */
.signal-modal-content {
  max-width: 560px !important;
  padding: 28px 28px 24px !important;
}
.signal-modal-title {
  font-size: 1.1rem; font-weight: 700; margin: 0 0 4px;
}
.signal-modal-sub {
  font-size: .82rem; color: var(--text-sub); margin: 0 0 20px;
}
.signal-row2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 12px;
}
.signal-field { margin-bottom: 12px; position: relative; }
.signal-field:last-child { margin-bottom: 0; }
.signal-label {
  display: block; font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-sub); margin-bottom: 5px;
}
.signal-input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 7px; color: var(--text); padding: 9px 12px;
  font-size: .875rem; outline: none; box-sizing: border-box;
  transition: border-color .15s;
}
.signal-input:focus { border-color: var(--orange); }

/* Autocomplete suggestions */
.sig-suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 7px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.sig-suggest-item {
  padding: 9px 12px; cursor: pointer; font-size: .85rem;
  transition: background .12s;
}
.sig-suggest-item:hover { background: var(--bg3); }
.sig-suggest-cat {
  font-size: .7rem; color: var(--muted); text-transform: uppercase;
  margin-right: 6px;
}

/* Footer modal */
.signal-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px; gap: 12px; flex-wrap: wrap;
}
.sig-note {
  font-size: .74rem; color: var(--muted); flex: 1;
}

/* Messages retour */
.sig-msg {
  border-radius: 7px; padding: 10px 14px;
  font-size: .84rem; font-weight: 600; margin-top: 12px;
}
.sig-msg-ok    { background: rgba(52,211,153,.12); color: #34d399; border: 1px solid #34d399; }
.sig-msg-error { background: rgba(248,113,113,.12); color: #f87171; border: 1px solid #f87171; }

/* ── Signalements — liste dans Alertes ───────────────────────────────────── */
.rep-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 12px 20px; gap: 12px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.rep-row:last-child { border-bottom: none; }
.rep-row:hover { background: rgba(255,255,255,.02); }
.rep-left { flex: 1; min-width: 0; }
.rep-name {
  font-weight: 700; font-size: .9rem; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rep-meta  { font-size: .78rem; color: var(--text-sub); margin-bottom: 3px; }
.rep-comment { font-size: .76rem; color: var(--muted); font-style: italic; }

.rep-right {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 5px; flex-shrink: 0; min-width: 120px;
}
.rep-price { font-size: 1.1rem; font-weight: 800; color: var(--orange); }
.rep-votes { font-size: .75rem; color: var(--muted); }
.rep-actions { display: flex; gap: 6px; margin-top: 2px; }
.btn-vote {
  font-size: .72rem; padding: 3px 9px; border-radius: 5px; border: none;
  cursor: pointer; font-weight: 600; transition: opacity .15s;
}
.btn-yes { background: rgba(52,211,153,.15); color: #34d399; }
.btn-no  { background: rgba(248,113,113,.15); color: #f87171; }
.btn-yes:hover { opacity: .75; }
.btn-no:hover  { opacity: .75; }

/* Badges statut signalement */
.rep-badge {
  font-size: .7rem; font-weight: 700; padding: 2px 8px;
  border-radius: 5px; letter-spacing: .3px;
}
.rep-pending { background: rgba(249,115,22,.15); color: var(--orange); }
.rep-ok      { background: rgba(52,211,153,.15); color: #34d399; }
.rep-ko      { background: rgba(248,113,113,.15); color: #f87171; }

@media (max-width: 768px) {
  .main { padding: 12px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-row { flex-direction: column; }
  .header-inner { flex-wrap: wrap; gap: 8px; }
  .price-table { font-size: .75rem; }
  .store-col { min-width: 90px; }
  .modal-price-grid { grid-template-columns: 1fr; }
  .chantier-card-header { flex-direction: column; }
  .chantier-top-bar { flex-direction: column; align-items: flex-start; }
  .cmodal-row3 { grid-template-columns: 1fr; }
  .product-picker { grid-template-columns: 1fr; }
  .carte-filters { flex-direction: column; gap: 10px; }
  .map-container { height: 400px; }
}

/* ── Carte interactive ────────────────────────────────────────────────────────── */

.carte-filters {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
}
.carte-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.carte-filter-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-sub);
}
.carte-select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: .82rem;
  padding: 6px 10px;
  cursor: pointer;
  min-width: 190px;
}
.carte-select:focus { outline: none; border-color: var(--orange); }
.carte-checkboxes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text);
  padding-top: 3px;
}
.carte-checkboxes label { display: flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.carte-checkboxes input[type=checkbox] { accent-color: var(--orange); width: 14px; height: 14px; }
.carte-counter {
  margin-left: auto;
  font-size: .78rem;
  color: var(--text-sub);
  white-space: nowrap;
  padding-bottom: 2px;
}
.carte-debug-link {
  font-size: .72rem;
  color: var(--text-sub);
  text-decoration: none;
  opacity: .5;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  white-space: nowrap;
  transition: opacity .15s;
}
.carte-debug-link:hover { opacity: 1; color: var(--orange); border-color: var(--orange); }

.map-container {
  height: 560px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #0d1117;
}

/* Bannière chargement OSM */
.map-osm-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 10px;
  background: #f9731610;
  border: 1px solid #f9731640;
  border-radius: 10px;
  font-size: .82rem;
  color: #f97316;
  flex-wrap: wrap;
}
.map-notice-spinner { font-size: 1rem; animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-notice-refresh {
  margin-left: auto;
  padding: 4px 12px;
  background: #f9731620;
  border: 1px solid #f9731650;
  border-radius: 6px;
  color: #f97316;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.map-notice-refresh:hover { background: #f9731635; }

.carte-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: .78rem;
  color: var(--text-sub);
}
.carte-legend span { display: flex; align-items: center; gap: 5px; }

/* Emoji marker Leaflet */
.map-emoji-icon {
  background: none !important;
  border: none !important;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.7));
}

/* Override Leaflet pour dark theme */
.leaflet-popup-content-wrapper {
  background: #1c2128 !important;
  border: 1px solid #30363d !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.5) !important;
  color: #e6edf3 !important;
  padding: 0 !important;
}
.leaflet-popup-content { margin: 0 !important; }
.leaflet-popup-tip-container .leaflet-popup-tip { background: #1c2128 !important; }
.leaflet-popup-close-button { color: #8b949e !important; top: 8px !important; right: 10px !important; font-size: 16px !important; }
.leaflet-popup-close-button:hover { color: #f97316 !important; }
.leaflet-control-zoom a { background: #1c2128 !important; color: #e6edf3 !important; border-color: #30363d !important; }
.leaflet-control-zoom a:hover { background: #f97316 !important; color: #fff !important; }
.leaflet-control-attribution { background: rgba(13,17,23,.8) !important; color: #555 !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: #666 !important; }

/* Popup contenu */
.mpop { padding: 14px 16px; min-width: 200px; }
.mpop-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid;
  margin-bottom: 8px;
}
.mpop-name {
  font-size: 14px;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 4px;
  line-height: 1.3;
}
.mpop-store { font-size: 12px; color: #8b949e; margin-bottom: 3px; }
.mpop-price { font-size: 18px; font-weight: 800; color: #f97316; margin: 6px 0; }
.mpop-savings { font-size: 13px; color: #3fb950; margin: 4px 0; }
.mpop-status { font-size: 12px; margin: 4px 0; font-weight: 600; }
.mpop-region { font-size: 11px; color: #555; margin-top: 6px; }

/* Adresse cliquable */
.mpop-address {
  display: block;
  font-size: 12px;
  color: #8b949e;
  text-decoration: none;
  margin: 5px 0 3px;
  line-height: 1.4;
  transition: color .15s;
}
.mpop-address:hover { color: #60a5fa; text-decoration: underline; }

/* Téléphone cliquable */
.mpop-phone {
  display: block;
  font-size: 12px;
  color: #8b949e;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color .15s;
}
.mpop-phone:hover { color: #3fb950; }

/* Boutons navigation GPS */
.mpop-nav-btns {
  display: flex;
  gap: 7px;
  margin: 8px 0 6px;
}
.mpop-nav-btn {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  justify-content: center;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.mpop-nav-btn:hover { opacity: .85; transform: translateY(-1px); }
.mpop-nav-btn:active { transform: translateY(0); }
.mpop-nav-gmaps {
  background: #1a73e833;
  color: #60a5fa;
  border: 1px solid #1a73e855;
}
.mpop-nav-gmaps:hover { background: #1a73e844; }
.mpop-nav-waze {
  background: #00c3ff22;
  color: #5ce1ff;
  border: 1px solid #00c3ff44;
}
.mpop-nav-waze:hover { background: #00c3ff33; }

.mpop-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #f97316;
  text-decoration: none;
  font-weight: 600;
}

/* ── Éclaireurs Leaderboard ──────────────────────────────────────────────── */
.card-eclaireurs { margin-bottom: 1.5rem; }
.eclaireurs-list { display: flex; flex-direction: column; gap: 2px; }
.eclaireur-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: background .15s;
}
.eclaireur-row:hover { background: #1c2128; }
.eclaireur-medal { font-size: 1.3rem; min-width: 28px; text-align: center; }
.eclaireur-rank { display: inline-block; width: 24px; height: 24px; border-radius: 50%;
  background: #30363d; color: #8b949e; font-size: .75rem; font-weight: 700;
  text-align: center; line-height: 24px; }
.eclaireur-info { flex: 1; min-width: 0; }
.eclaireur-name { font-size: .9rem; font-weight: 600; color: var(--text); }
.eclaireur-meta { font-size: .75rem; color: var(--text-sub); margin-top: 1px; }
.eclaireur-badge-icon { font-size: 1rem; }
.eclaireur-stars { font-size: .7rem; }
.eclaireur-points { font-size: 1.15rem; font-weight: 800; color: var(--orange); white-space: nowrap; }
.eclaireur-pts-label { font-size: .65rem; color: var(--text-sub); font-weight: 400; }

/* Badge chips in report list */
.rep-badge-eclaireur { font-size: .7rem; padding: 1px 5px; border-radius: 4px;
  background: #f9731622; color: #f97316; border: 1px solid #f9731644; margin-left: 4px; }
.mpop-link:hover { text-decoration: underline; }

/* ── Bouton Éclaireurs ───────────────────────────────────────────────────── */
.btn-eclaireurs {
  background: transparent; border: 1px solid var(--orange); color: var(--orange);
  border-radius: 6px; padding: 4px 10px; font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s;
}
.btn-eclaireurs:hover { background: var(--orange); color: #fff; }
.lb-see-all { border-radius: 6px; }

/* ── Leaderboard Drawer ──────────────────────────────────────────────────── */
.lb-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1200;
  backdrop-filter: blur(2px);
}
.lb-drawer {
  position: fixed; top: 0; right: -440px; width: 420px; max-width: 96vw; height: 100vh;
  background: #0d1117; border-left: 1px solid #30363d;
  z-index: 1201; display: flex; flex-direction: column;
  transition: right .3s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 32px rgba(0,0,0,.6);
}
.lb-drawer.lb-open { right: 0; }
.lb-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid #30363d; flex-shrink: 0;
}
.lb-drawer-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.lb-close {
  background: none; border: none; color: #8b949e; cursor: pointer;
  font-size: 1.1rem; padding: 4px 8px; border-radius: 6px;
}
.lb-close:hover { background: #21262d; color: var(--orange); }
.lb-profile { padding: 14px 20px; border-bottom: 1px solid #30363d; flex-shrink: 0; }
.lb-profile-card { display: flex; align-items: flex-start; gap: 12px; }
.lb-profile-avatar { font-size: 2rem; line-height: 1; }
.lb-profile-title { font-size: .95rem; font-weight: 700; color: var(--text); }
.lb-profile-stats { font-size: .75rem; color: var(--text-sub); margin-top: 4px; }
.lb-profile-tip { font-size: .7rem; color: #555; margin-top: 5px; font-style: italic; }
.lb-profile-loading { color: var(--text-sub); font-size: .85rem; padding: 8px 0; }
.lb-region-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; border-bottom: 1px solid #21262d; flex-shrink: 0;
}
.lb-region-label { font-size: .75rem; color: var(--text-sub); white-space: nowrap; }
.lb-region-select {
  flex: 1; background: #21262d; border: 1px solid #30363d; color: var(--text);
  border-radius: 6px; padding: 5px 8px; font-size: .8rem; cursor: pointer;
}
.lb-list { flex: 1; overflow-y: auto; padding: 8px 12px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px; border-radius: 8px; transition: background .12s;
}
.lb-row:hover { background: #161b22; }
.lb-medal { font-size: 1.4rem; min-width: 32px; text-align: center; line-height: 1; }
.lb-rank-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: #21262d;
  color: #8b949e; font-size: .8rem; font-weight: 700;
}
.lb-row-info { flex: 1; min-width: 0; }
.lb-row-name { font-size: .9rem; font-weight: 600; color: var(--text); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lb-row-meta { font-size: .72rem; color: var(--text-sub); margin-top: 2px; }
.lb-badge-chip {
  font-size: .68rem; background: #f9731622; color: #f97316;
  border: 1px solid #f9731644; padding: 1px 6px; border-radius: 10px;
}
.lb-stars { font-size: .65rem; }
.lb-row-pts { font-size: 1.2rem; font-weight: 800; color: var(--orange); text-align: right; white-space: nowrap; }
.lb-pts-lbl { font-size: .62rem; color: var(--text-sub); font-weight: 400; margin-left: 2px; }

/* ── Store Fiche (bottom sheet) ─────────────────────────────────────────── */
.sf-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1300; }
.sf-modal {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(110%);
  width: min(500px, 96vw); background: #161b22;
  border: 1px solid #30363d; border-radius: 18px 18px 0 0;
  z-index: 1301; padding: 22px 20px 28px;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 -8px 32px rgba(0,0,0,.5);
}
.sf-modal.sf-open { transform: translateX(-50%) translateY(0); }
.sf-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.sf-brand { font-size: 1rem; font-weight: 700; }
.sf-city  { font-size: .8rem; color: var(--text-sub); margin-top: 3px; }
.sf-close { background: none; border: none; color: #8b949e; cursor: pointer; font-size: 1.1rem; padding: 4px 8px; border-radius: 6px; }
.sf-close:hover { color: var(--orange); }
.sf-address { font-size: .85rem; color: var(--text-sub); margin-bottom: 12px; padding: 10px 12px; background: #0d1117; border-radius: 8px; line-height: 1.5; }
.sf-phone { margin-bottom: 14px; }
.sf-phone-link { color: #3fb950; font-size: .9rem; text-decoration: none; font-weight: 600; }
.sf-phone-link:hover { text-decoration: underline; }
.sf-nav-btns { display: flex; gap: 10px; }
.sf-nav-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 14px; border-radius: 10px; text-decoration: none;
  font-size: .88rem; font-weight: 600; transition: opacity .15s, transform .1s;
}
.sf-nav-btn:hover { opacity: .85; transform: translateY(-1px); }
.sf-gmaps    { background: #1a73e822; color: #60a5fa; border: 1px solid #1a73e844; }
.sf-waze-btn { background: #33ccff22; color: #33ccff; border: 1px solid #33ccff44; }

/* ── Mini-leaderboard sur la Carte ──────────────────────────────────────── */
.carte-lb-mini {
  margin: 10px 0 4px;
  background: #0d1117; border: 1px solid #21262d; border-radius: 10px;
  padding: 12px 16px;
}
.carte-lb-mini-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.carte-lb-mini-title { font-size: .85rem; font-weight: 700; color: var(--text); }
.carte-lb-mini-list {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.carte-lb-pill {
  display: flex; align-items: center; gap: 7px;
  background: #161b22; border: 1px solid #30363d; border-radius: 8px;
  padding: 7px 12px; flex: 1; min-width: 140px;
}
.carte-lb-pill-medal { font-size: 1.2rem; line-height: 1; }
.carte-lb-pill-info { flex: 1; min-width: 0; }
.carte-lb-pill-name { font-size: .8rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-lb-pill-meta { font-size: .68rem; color: var(--text-sub); margin-top: 1px; }
.carte-lb-pill-pts { font-size: 1rem; font-weight: 800; color: var(--orange); white-space: nowrap; }
.carte-lb-empty { font-size: .8rem; color: var(--text-sub); font-style: italic; padding: 4px 0; }

/* Clickable store button in report list */
.rep-store-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text-sub); font-size: .82rem; font-family: inherit;
  transition: color .12s; text-align: left; display: inline;
}
.rep-store-btn:hover { color: var(--orange); text-decoration: underline; }
