/* pharmap.ma - minimal responsive styles */
:root {
  --bg: #f8f9fa;
  --fg: #212529;
  --primary: #0d6efd;
  --border: #dee2e6;
  --muted: #6c757d;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100vw;
}

.container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  overflow-x: hidden;
}

.header {
  background: var(--fg);
  color: #fff;
  padding: 1.25rem 0;
}
.header .tagline {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  opacity: 0.9;
}
.logo {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.35rem;
}

.main {
  flex: 1;
  padding: 2rem 0;
}

h1 {
  font-size: 1.75rem;
  margin-top: 0;
}
h1 .date {
  font-weight: 400;
  color: var(--muted);
  font-size: 1rem;
}

.lead {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.search-form {
  background: #fff;
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}
.search-form.inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.form-row {
  margin-bottom: 1rem;
}
.search-form.inline .form-row,
.search-form.inline label { margin-bottom: 0; }
.form-row label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.form-row input {
  width: 100%;
  max-width: 280px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
}
.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}
.btn:hover {
  filter: brightness(1.05);
}

.layout-map-table {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.map-section {
  flex: 1 1 380px;
  min-height: 280px;
}
.map-container {
  width: 100%;
  height: 280px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.results {
  flex: 1 1 380px;
  background: #fff;
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.results-meta {
  color: var(--muted);
  margin-bottom: 1rem;
}
.results-meta.last-updated {
  font-size: 0.9rem;
  margin-top: -0.5rem;
}
.text-muted { color: var(--muted); }
.no-results { color: var(--muted); }
.no-results-hint { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
.feedback-prompt { margin-top: 1.5rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.feedback-question { margin: 0 0 0.5rem; font-weight: 500; }
.feedback-btn { margin-right: 0.5rem; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: rgba(13, 110, 253, 0.08); }

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
}
.pharmacy-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
}
.pharmacy-table th,
.pharmacy-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.pharmacy-table th {
  font-weight: 600;
  background: var(--bg);
}
.pharmacy-table a {
  color: var(--primary);
  text-decoration: none;
}
.pharmacy-table a:hover {
  text-decoration: underline;
}

.privacy-disclaimer { font-size: 0.9rem; color: var(--muted); margin: -0.5rem 0 1rem; }
.proche-actions { margin-bottom: 1.5rem; }
.proche-test-coords { margin-top: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.proche-test-coords summary { cursor: pointer; font-weight: 500; }
.proche-test-coords .form-row { margin-bottom: 0.75rem; }
.proche-test-coords input { max-width: 12rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.9rem; }
.proche-test-coords .btn-sm { margin-right: 0.5rem; margin-bottom: 0.5rem; }
.near-results { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.5rem; max-width: 100%; overflow: hidden; }
.near-results .near-list { flex: 1 1 380px; min-width: 0; overflow: hidden; }
.near-results .map-section { flex: 1 1 380px; min-width: 0; }
.near-results .table-wrapper { max-width: 100%; }
.city-badge { font-size: 0.85rem; color: var(--muted); }
.proche-fallback { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.city-links { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.city-links li { margin: 0.35rem 0; }
.city-links a { color: var(--primary); text-decoration: none; }
.city-links a:hover { text-decoration: underline; }

/* Red pin for user location on /proche map (inline SVG, no external image) */
.user-red-pin.leaflet-marker-icon {
  background: none !important;
  border: none !important;
}

.error-page { text-align: center; padding: 2rem 0; }
.error-page .lead { margin-bottom: 1.5rem; }

.footer {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}
.footer .disclaimer {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.9;
}
.footer-links {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }

.breadcrumb { font-size: 0.875rem; margin-bottom: 0.75rem; color: var(--muted); }
.breadcrumb a { color: var(--link); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb a + a::before,
.breadcrumb a + span::before { content: " › "; margin: 0 0.25rem; color: var(--muted); }

.pharmacy-nap { margin: 1rem 0; }
.pharmacy-nap dt { font-weight: 600; margin-top: 0.5rem; }
.pharmacy-nap dd { margin-left: 0; }
.faq-block { margin-top: 2rem; }
.faq-block details { margin-bottom: 0.5rem; }
.faq-block summary { cursor: pointer; font-weight: 600; }
.district-links { margin-bottom: 0.5rem; font-size: 0.95rem; }

@media (max-width: 640px) {
  .container { padding: 0 0.75rem; }
  h1 { font-size: 1.35rem; word-wrap: break-word; }
  .lead { font-size: 0.95rem; }
  .search-form { padding: 1rem; margin-bottom: 1rem; }
  .pharmacy-table { font-size: 0.85rem; min-width: 320px; }
  .pharmacy-table th,
  .pharmacy-table td { padding: 0.4rem 0.35rem; }
  .layout-map-table { flex-direction: column; gap: 1rem; }
  .map-section { order: 0; min-height: 220px; width: 100%; }
  .map-container { height: 220px; touch-action: manipulation; max-width: 100%; }
  .results { order: 1; width: 100%; padding: 1rem; }
  .near-results { flex-direction: column; gap: 1rem; }
  .near-results .map-section { width: 100%; }
  .near-results .near-list { width: 100%; min-width: 0; }
  .near-results .map-container { height: 220px; touch-action: manipulation; max-width: 100%; }
  .near-results .pharmacy-table { min-width: 280px; }
  .proche-test-coords { padding: 0.75rem; }
  .btn { padding: 0.6rem 1rem; }
}
