/* MDF2026 V70.6.1 — Carte des marchés (page publique).
   S'appuie sur les variables et le thème existants ; aucune palette parallèle. */

.marches-wrap { padding-bottom: 48px; }

.marches-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 18px 0 16px;
  padding: 14px 16px;
  background: #f4f8f6;
  border: 1px solid #dce6e6;
  border-radius: 10px;
}
.marches-controls label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #3a4a52; }
.marches-controls input[type="search"] { min-width: 240px; }
.marches-count { margin: 0 0 0 auto; align-self: center; font-weight: 700; }

.marches-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.marches-map { width: 100%; height: 520px; border-radius: 10px; border: 1px solid #dce6e6; background: #e9eef0; z-index: 0; }
.marches-map.leaflet-container { font: inherit; }
.marches-attrib { font-size: 12px; margin-top: 6px; }
.marches-attrib a { color: inherit; }

.marches-list { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.marches-item { background: #fff; border: 1px solid #dce6e6; border-radius: 10px; padding: 12px 14px; }
.marches-item.is-hidden { display: none; }
.marches-item.is-current { border-color: #123f6d; box-shadow: 0 0 0 2px rgba(18, 63, 109, .12); }
.marches-item h3, .marches-item .marches-item-title { margin: 0 0 6px; font-size: 17px; }
.marches-item .marches-item-title a { color: #123f6d; text-decoration: none; }
.marches-item .marches-item-title a:hover { text-decoration: underline; }
.marches-item p { margin: 2px 0; font-size: 14px; }
.marches-item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px !important; }
.marches-noresult, .marches-empty { padding: 16px; background: #f4f8f6; border: 1px dashed #b9c8cc; border-radius: 10px; color: #3a4a52; }
.marches-map-note { font-size: 13px; margin-top: 6px; }

/* Contenu enrichi (Description / Informations pratiques) rendu par la fiche. */
.marches-rich { margin: 0 0 14px; }
.marches-rich > :first-child { margin-top: 0; }
.marches-rich img { max-width: 100%; height: auto; }
.marches-rich table { width: 100%; border-collapse: collapse; }
.marches-rich table th, .marches-rich table td { border: 1px solid #dce6e6; padding: 6px 8px; text-align: left; }

/* Marqueurs RONDS, colorés selon le TYPE du marché (couleur définie en base).
   `background` est appliqué en ligne ; ce style garantit la forme ronde. */
.marches-point { display: block; width: 18px; height: 18px; border-radius: 50%; background: #123f6d; border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.45); }
.marches-point--today { outline: 3px solid rgba(179, 84, 30, .85); outline-offset: 2px; }

/* Pastille de couleur devant le titre d'un marché (liste). */
.marches-item-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: middle; border: 2px solid #fff; box-shadow: 0 0 0 1px #dce6e6; }

/* Légende des types et des créneaux (au-dessus de la carte). */
.marches-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 16px; padding: 10px 14px; background: #fbfdfc; border: 1px solid #dce6e6; border-radius: 10px; }
.marches-legend-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #3a4a52; }
.marches-legend-item { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid transparent; border-radius: 999px; padding: 3px 10px 3px 6px; font: inherit; font-size: 13px; color: #22333b; cursor: pointer; }
.marches-legend-item:hover { background: #eef4f1; border-color: #dce6e6; }
.marches-legend-item.is-active { background: #123f6d; border-color: #123f6d; color: #fff; }
.marches-legend-item.is-static { cursor: default; color: #5b6b73; }
.marches-legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #dce6e6; }
.marches-fact-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; border: 2px solid #fff; box-shadow: 0 0 0 1px #dce6e6; vertical-align: middle; }

.marches-fiche-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 24px; align-items: start; margin-top: 12px; }
.marches-fiche-image { width: 100%; height: auto; border-radius: 10px; margin-bottom: 16px; }
.marches-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 20px; }
.marches-facts dt { font-weight: 800; color: #123f6d; }
.marches-facts dd { margin: 0; }
.marches-fiche-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.marches-mini-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.marches-fiche .marches-map { height: 320px; }

@media (max-width: 900px) {
  .marches-layout, .marches-fiche-grid { grid-template-columns: 1fr; }
  .marches-map { height: 380px; }
  .marches-list { max-height: none; }
  .marches-count { margin-left: 0; width: 100%; }
  .marches-controls input[type="search"] { min-width: 0; width: 100%; }
}
@media (max-width: 480px) {
  .marches-map { height: 300px; }
  .marches-controls { flex-direction: column; align-items: stretch; }
}
