/* Hunting days on the Carte and in the planner (js/map-hunt.js). */

/* ── "Chasse" button: computer only, under the "Balades du jour" pill/card
   (js sets `top` from the card's bottom; this is the fallback). ── */
.hunt-btn {
  position: fixed;
  top: calc(var(--header-h, 56px) + 112px);
  right: 12px;
  z-index: 1150;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 999px;
  background: var(--surface-0, #fff);
  color: var(--text-strong, #111827);
  font: 700 0.86rem/1 var(--font-sans, Inter, system-ui, sans-serif);
  box-shadow: var(--shadow-md, 0 4px 14px rgba(0, 0, 0, 0.18));
  cursor: pointer;
}
.hunt-btn .ic { flex: none; width: 18px; height: 18px; color: #c2410c; }
.hunt-btn:hover { background: var(--surface-1, #f9fafb); }
.hunt-btn.is-today { background: #c2410c; border-color: #c2410c; color: #fff; }
.hunt-btn.is-today .ic { color: #fff; }
.hunt-btn.is-today:hover { background: #9a3412; }
.hunt-btn:focus-visible { outline: 3px solid #c2410c; outline-offset: 2px; }
[data-theme="dark"] .hunt-btn:not(.is-today) .ic { color: #fb923c; }
body.planner-open .hunt-btn,
body.planner-open .hunt-panel,
body.measuring-active .hunt-btn,
body.hunt-open .hunt-btn { display: none; }
@media (max-width: 640px) {
  .hunt-btn { display: none; } /* phones: menu › Jours de chasse */
}

/* ── Panel: top-right on a computer, top of the screen on a phone ── */
.hunt-panel {
  position: fixed;
  top: calc(var(--header-h, 56px) + 64px);
  right: 12px;
  z-index: 1156;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - var(--header-h, 56px) - 150px);
  overflow-y: auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-0, #fff);
  color: var(--text, #0f172a);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  font-size: 0.9rem;
}
/* Inside the planner frame there is no site header. */
.bwr-embed .hunt-panel { top: 12px; max-height: calc(100vh - 24px); }
@media (max-width: 640px) {
  /* On a phone keep the hatched lots visible under the list (scrolls). */
  .hunt-panel {
    top: calc(var(--header-h, 56px) + 8px);
    left: 8px;
    right: 8px;
    width: auto;
    max-height: 42vh;
  }
  .bwr-embed .hunt-panel { top: 8px; max-height: 42vh; }
}
.hunt-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hunt-panel-head strong { margin-right: auto; }
.hunt-panel-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: -10px -10px -10px 0;
  border: none; border-radius: 999px; background: none; color: inherit; cursor: pointer;
}
.hunt-panel-close .ic { width: 20px; height: 20px; }
.hunt-panel-lead { margin: 4px 0 10px; color: var(--text-muted, #475569); }
.hunt-panel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hunt-panel-list li { display: grid; gap: 2px; padding: 8px 10px; border-left: 4px solid #c2410c; background: var(--surface-1, #f8fafc); border-radius: 6px; }
.hunt-panel-list small { color: var(--text-muted, #475569); }
.hunt-panel-src { margin: 10px 0 0; font-size: 0.78rem; color: var(--text-muted, #475569); }
.hunt-panel-src a { color: inherit; font-weight: 700; }
[data-theme="dark"] .hunt-panel { background: var(--surface-1, #1e293b); }
[data-theme="dark"] .hunt-panel-list li { background: var(--surface-2, #0f172a); }

/* "Voir la carte": only the head + the row of days stay, the map is free. */
.hunt-panel-toggle {
  min-height: 36px;
  padding: 4px 12px;
  border: 1.5px solid #c2410c;
  border-radius: 999px;
  background: none;
  color: #c2410c;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
[data-theme="dark"] .hunt-panel-toggle { color: #fb923c; border-color: #fb923c; }
.hunt-panel.is-compact .hunt-panel-body { display: none; }
.hunt-panel.is-compact { padding-bottom: 8px; }

/* Row of days: today + every hunting day still to come (scrolls sideways). */
.hunt-days {
  display: flex;
  gap: 6px;
  margin: 8px -16px 0;
  padding: 2px 16px 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.hunt-day {
  flex: none;
  scroll-snap-align: start;
  display: grid;
  gap: 1px;
  min-width: 84px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1.5px solid #fdba74;
  border-radius: 10px;
  background: var(--surface-1, #fff7ed);
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.hunt-day small { font-size: 0.72rem; font-weight: 500; color: var(--text-muted, #475569); }
.hunt-day.is-empty { border-color: var(--border, #cbd5e1); }
.hunt-day.is-on { background: #c2410c; border-color: #c2410c; color: #fff; }
.hunt-day.is-on small { color: #ffedd5; }
.hunt-day:focus-visible { outline: 3px solid #c2410c; outline-offset: 2px; }
.hunt-panel-day { margin: 8px 0 0; font-weight: 700; }
.hunt-panel-day::first-letter { text-transform: uppercase; }
[data-theme="dark"] .hunt-day { background: var(--surface-2, #0f172a); border-color: #9a3412; }
[data-theme="dark"] .hunt-day.is-on { background: #c2410c; border-color: #c2410c; }

/* "Montrer les zones sur la carte": stripes on/off (stays in the compact panel). */
.hunt-show {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 4px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.hunt-show input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: #c2410c; cursor: pointer; }
