:root {
  --ink: #1F2937;
  --ink-soft: #5B6472;
  --paper: #FFFFFF;
  --bg: #F3F5F7;
  --accent: #F0A500;
  --accent-soft: #FFF3DB;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
}

/* ---------- Bande du haut ---------- */

#topbar {
  height: 64px;
  flex: 0 0 auto;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(20, 20, 30, 0.06);
  z-index: 1000;
  position: relative;
}

#logo {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1.45em;
  letter-spacing: 0.2px;
  white-space: nowrap;
  color: var(--ink);
}
#logo span { color: var(--accent); }

#topbar-actions {
  display: flex;
  gap: 8px;
}

.topbar-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--paper);
  border: 1px solid #E7E9EC;
  color: var(--ink);
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 600;
  font-size: 0.85em;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(20, 20, 30, 0.06);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.topbar-btn:hover { background: #FAFAFA; box-shadow: 0 3px 10px rgba(20, 20, 30, 0.1); }
.topbar-btn:active { transform: scale(0.96); }
.topbar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.topbar-btn .icon { font-size: 1em; line-height: 1; color: var(--ink-soft); }

#randomBtn.spin .icon {
  animation: diceRoll 0.5s ease;
}
@keyframes diceRoll {
  0%   { transform: rotate(0deg) scale(1); }
  40%  { transform: rotate(200deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #randomBtn.spin .icon { animation: none; }
}

#favBtn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #3A2600;
}
#favBtn.active .icon { color: #3A2600; }

/* Sur mobile étroit : icônes seules pour ne pas déborder */
@media (max-width: 480px) {
  #logo { font-size: 1.2em; }
  .topbar-btn .label { display: none; }
  .topbar-btn { padding: 9px 11px; }
}

/* ---------- Carte ---------- */

#lunchBanner {
  display: none;
  background: #D32F2F;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-family: 'Inter', Arial, sans-serif;
  padding: 8px;
  animation: blink 1s infinite;
  flex: 0 0 auto;
  z-index: 999;
}
#lunchBanner.visible { display: block; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@media (prefers-reduced-motion: reduce) {
  #lunchBanner { animation: none; }
}

#map {
  flex: 1 1 auto;
  width: 100%;
}

/* ---------- Panneau de filtres par tags (injecté par app.js) ---------- */

.filter-control {
  background: var(--paper);
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(20, 20, 30, 0.12);
  max-height: 260px;
  overflow-y: auto;
  font: 13px 'Inter', Arial, sans-serif;
  color: var(--ink);
}
.filter-title { font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.filter-option { display: block; margin-bottom: 4px; cursor: pointer; color: var(--ink-soft); }
.filter-control hr { margin: 6px 0; border: none; border-top: 1px solid #EEE; }

/* ---------- Marqueurs personnalisés ---------- */

.map-marker {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(20, 20, 30, 0.18);
  font-size: 14px;
  color: var(--ink);
}

.map-marker.favorite {
  background: var(--accent);
  border-color: var(--accent);
  color: #3A2600;
}

.map-marker.closed {
  background: #EDEDED;
  border-color: #B5B5B5;
  color: #9A9A9A;
  box-shadow: none;
}

.bureau-marker {
  width: 38px;
  height: 38px;
  background: var(--ink);
  border-color: var(--ink);
  color: #171918;
  font-size: 16px;
  overflow: hidden;
  padding: 6px;
}

.bureau-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
