/* Carte des implantations Océalia
   Couleurs reprises des variables globales Elementor du site (repli : encre #1F1E17, crème #F7F5EA, orange #FF9A03)
   Titres : Herbarium · Texte : Manrope (servies par le plugin). Tout est limité à .oc-carte. */

@font-face { font-family: "OC Herbarium"; src: url("../fonts/Herbarium.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "OC Manrope"; src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

.oc-carte {
  /* Couleurs globales Elementor du site, avec valeur de repli si elles sont absentes */
  --ink: var(--e-global-color-secondary, #1F1E17);
  --ink-2: var(--e-global-color-text, #5C5A50);
  --cream: var(--e-global-color-1caf227, #F7F5EA);
  --beige: #E6E0D0;
  --white: #FFFFFF;
  --orange: var(--e-global-color-accent, #FF9A03);
  --orange-ink: #8A4F00;
  --display: "OC Herbarium", Georgia, serif;
  --body: "OC Manrope", Arial, Helvetica, sans-serif;
  display: grid;
  grid-template-columns: minmax(300px, 390px) 1fr;
  height: var(--oc-h, 680px);
  background: var(--cream);
  color: var(--ink);
  font: 15px/1.5 var(--body);
  text-align: left;
  border: 1px solid var(--beige);
}
.oc-carte, .oc-carte * { box-sizing: border-box; }
.oc-carte [hidden] { display: none !important; }
/* Neutralise les styles de boutons et champs du thème */
.oc-carte button, .oc-carte input {
  font: inherit; color: inherit; margin: 0; text-transform: none; letter-spacing: normal;
  line-height: 1.3; box-shadow: none; min-height: 0; height: auto; border-radius: 0;
}
.oc-carte :focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.oc-side { background: var(--cream); border-right: 1px solid var(--beige); display: flex; flex-direction: column; min-height: 0; }

.oc-head { background: var(--white); color: var(--ink); padding: 18px 22px 20px; display: grid; gap: 14px; border-bottom: 3px solid var(--orange); }
.oc-brand { display: flex; align-items: center; gap: 14px; }
.oc-brand img { width: 54px; height: auto; background: var(--white); border: 1px solid var(--beige); border-radius: 4px; padding: 4px; }
.oc-sur { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-ink); font-weight: 700; }
.oc-carte .oc-title { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; margin: 2px 0 0; letter-spacing: .01em; color: var(--ink); }

.oc-search { display: flex; gap: 8px; margin: 0; }
.oc-carte .oc-search input { flex: 1; min-width: 0; width: auto; border: 1px solid var(--beige); background: var(--cream); color: var(--ink); padding: 11px 18px; border-radius: 999px; }
.oc-search input::placeholder { color: var(--ink-2); }
.oc-carte .oc-btn { border: 2px solid var(--orange); background: var(--orange); color: var(--ink); padding: 9px 18px; cursor: pointer; white-space: nowrap; font-weight: 700; border-radius: 999px; transition: background .15s, color .15s; }
.oc-carte .oc-btn:hover { background: transparent; color: var(--orange); }
.oc-carte .oc-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.oc-carte .oc-ghost:hover { background: var(--ink); color: var(--cream); }
.oc-carte .oc-around { display: flex; align-items: center; gap: 10px; border: 1px solid var(--beige); background: transparent; color: var(--ink); padding: 10px 18px; cursor: pointer; width: 100%; text-align: left; font-weight: 600; border-radius: 999px; }
.oc-carte .oc-around:hover { border-color: var(--orange); color: var(--orange-ink); }
.oc-consent { border-radius: 14px; background: var(--cream); color: var(--ink); padding: 14px; font-size: 13.5px; display: grid; gap: 10px; border-left: 4px solid var(--orange); }
.oc-consent div { display: flex; gap: 8px; flex-wrap: wrap; }
.oc-msg { font-size: 13px; color: var(--orange-ink); }
.oc-msg:empty { display: none; }

.oc-filters { padding: 14px 22px 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.oc-carte .oc-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--beige); background: var(--white); padding: 4px 11px 4px 6px; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 999px; }
.oc-chip i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 1px var(--c); margin-left: 2px; }
.oc-chip img { width: 20px; height: 20px; object-fit: contain; flex: none; }
.oc-chip b { font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.oc-carte .oc-chip:hover { border-color: var(--ink); }
.oc-carte .oc-chip[aria-pressed="false"] { background: transparent; color: var(--ink-2); }
.oc-chip[aria-pressed="false"] i { background: transparent; }
.oc-chip[aria-pressed="false"] img { opacity: .35; filter: grayscale(1); }

.oc-hint { margin: 0; padding: 0 22px 12px; border-bottom: 1px solid var(--beige); font-size: 12px; color: var(--ink-2); }
.oc-count { padding: 12px 22px 6px; font-size: 11.5px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.oc-carte .oc-list { list-style: none; margin: 0; padding: 0 10px 12px; overflow-y: auto; flex: 1; min-height: 0; }
.oc-carte .oc-list li { margin: 0; padding: 0; }
.oc-carte .oc-list li::before { content: none; }
.oc-carte .oc-list button { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: stretch; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; cursor: pointer; }
.oc-carte .oc-list button:hover { background: var(--white); }
.oc-bar { background: var(--c); border-radius: 2px; }
.oc-n { font-weight: 700; display: block; line-height: 1.3; }
.oc-s { font-size: 12.5px; color: var(--ink-2); }
.oc-d { font-size: 13px; color: var(--orange-ink); font-variant-numeric: tabular-nums; font-weight: 700; align-self: center; }
.oc-more { padding: 6px 22px 14px; font-size: 12.5px; color: var(--ink-2); }
.oc-more:empty { display: none; }

/* z-index 0 : les calques Leaflet restent sous les en-têtes fixes du thème */
.oc-map { position: relative; z-index: 0; height: 100%; min-height: 320px; background: var(--beige); }

.oc-pin { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 2.5px solid var(--white); box-shadow: 0 1px 3px rgba(31, 30, 23, .45); }
.oc-pin--icon { display: grid; place-items: center; width: 34px; height: 34px; background: var(--white); border: 2.5px solid var(--c); }
.oc-carte .oc-pin--icon img { width: 22px; height: 22px; object-fit: contain; max-width: none; }
.oc-cluster { display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: var(--ink); font-weight: 800; font-size: 13px; border: 2px solid var(--ink); box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 2px 5px rgba(31, 30, 23, .35); }
.oc-me { width: 16px; height: 16px; border-radius: 50%; background: var(--orange); border: 3px solid var(--white); box-shadow: 0 0 0 7px rgba(255, 154, 3, .28); }

.oc-carte .leaflet-popup-content-wrapper { border-radius: 0; background: var(--cream); box-shadow: 0 4px 18px rgba(31, 30, 23, .25); }
.oc-carte .leaflet-popup-tip { background: var(--cream); }
.oc-carte .leaflet-popup-content { margin: 16px 18px; font: 14px/1.5 var(--body); min-width: 230px; color: var(--ink); }
.oc-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); border-left: 3px solid var(--c); padding-left: 6px; margin-bottom: 4px; }
.oc-carte .oc-tag img { width: 18px; height: 18px; object-fit: contain; }
.oc-carte .oc-pop h3 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0 0 6px; line-height: 1.05; color: var(--ink); }
.oc-carte .oc-pop p { margin: 0 0 6px; }
.oc-carte .oc-pop .oc-act { font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
.oc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.oc-carte .oc-actions a { display: inline-block; padding: 6px 12px; font-weight: 700; font-size: 13px; text-decoration: none; border: 2px solid var(--orange); color: var(--ink); background: var(--orange); border-radius: 999px; }
.oc-carte .oc-actions a.oc-alt { background: transparent; }
.oc-carte a.leaflet-popup-close-button { color: var(--ink); }

@media (max-width: 820px) {
  .oc-carte { grid-template-columns: 1fr; grid-template-rows: 55vh auto; height: auto; }
  .oc-map { order: -1; }
  .oc-side { border-right: 0; }
  .oc-carte .oc-list { max-height: 60vh; }
}
@media (prefers-reduced-motion: reduce) {
  .oc-carte * { transition: none !important; animation: none !important; }
}
