/* ============================================================
   public/assets/css/carteCircuits.css — Carte interactive des circuits
   La carte occupe toute la zone. Le panneau des circuits flotte à gauche sur ordinateur,
   et devient un tiroir en bas sur mobile (poignée pour l'agrandir).
   Les !important protègent boutons et liens des styles globaux du site.
   ============================================================ */
.ekc {
  --navy: #073b4c;
  --navy-2: #0b4f64;
  --cu: #b4532a;
  --ink: #14303a;
  --mu: #6b8590;
  --line: #e6ecee;
  --line-2: #dfe6e8;
  --mer: #dfe8eb;
  --terre: #f5efe7;
  --vert: #1f7a52;
  --ombre: 0 1px 2px rgba(7, 59, 76, .08), 0 6px 18px rgba(7, 59, 76, .10);
  --ombre-l: 0 0 0 1px rgba(7, 59, 76, .06), 0 12px 32px rgba(7, 59, 76, .14);
  position: relative;
  height: calc(100vh - 77px);       /* barre de navigation mobile */
  height: calc(100dvh - 77px);
  min-height: 520px;
  overflow: hidden;
  color: var(--ink);
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

.ekc button, .ekc input, .ekc select { font: inherit; }
.ekc button:focus-visible, .ekc a:focus-visible, .ekc input:focus-visible, .ekc select:focus-visible { outline: 2px solid #d7a78a; outline-offset: 2px; }
.ekc-visu { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ════════ Carte ════════ */
.ekc-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--mer);
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.ekc-map.is-drag { cursor: grabbing; }
.ekc-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.ekc-terre { fill: var(--terre); stroke: #cdb8a3; stroke-width: 1; }
.ekc-mer { font-size: 12.5px; font-style: italic; fill: #8ca1a8; pointer-events: none; }
.ekc-zone { font-size: 15px; font-style: italic; fill: #9a8a76; opacity: .85; pointer-events: none; }

/* Repères fixes : capitale et aéroports internationaux */
.ekc-ref {
  position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px;
  display: grid; place-items: center; border-radius: 50%; background: var(--navy);
  box-shadow: 0 0 0 2.5px #fff, 0 3px 8px rgba(7, 59, 76, .3); pointer-events: none;
}
.ekc-ref.is-capitale { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.ekc-ref svg { width: 14px; height: 14px; fill: #fff; }
.ekc-ref.is-capitale svg { width: 16px; height: 16px; }
.ekc-ref.is-mini { width: 10px; height: 10px; margin: -5px 0 0 -5px; box-shadow: 0 0 0 2px #fff; }
.ekc-ref-l {
  position: absolute; left: 0; top: 0; margin: -17px 0 0 20px; padding: 5px 9px 6px; border-radius: 8px;
  background: #fff; box-shadow: 0 0 0 1px #e1e8ea, 0 3px 10px rgba(7, 59, 76, .1);
  white-space: nowrap; pointer-events: none; line-height: 1.2;
}
.ekc-ref-l.is-g { margin-left: 0; translate: calc(-100% - 20px) 0; }
.ekc-ref-l b { display: block; font-size: 12.5px; font-weight: 600; color: var(--navy); }
.ekc-ref-l small { display: block; margin-top: 2px; font-size: 10.5px; color: #5b7480; }

/* Légende : ordinateur, vue d'ensemble uniquement */
.ekc-leg {
  position: absolute; right: 16px; bottom: 120px; z-index: 2; width: 240px; padding: 12px 14px;   /* en bas à droite, au-dessus du copyright */
  border-radius: 12px; background: rgba(255, 255, 255, .95); box-shadow: 0 6px 18px rgba(7, 59, 76, .14);
  font-family: Poppins, system-ui, sans-serif;
}
.ekc.has-circuit .ekc-leg { display: none; }
@media (max-width: 1199px) { .ekc-leg { display: none; } }   /* écran étroit : elle mordrait sur l'île */
.ekc .ekc-leg p { margin: 0; text-indent: 0px;}
.ekc .ekc-leg-t { margin-bottom: 4px !important; font-size: 12.5px; font-weight: 600; color: var(--navy); }
.ekc .ekc-leg-l { display: flex; gap: 9px; align-items: flex-start; margin-top: 7px; font-size: 11.5px; line-height: 1.4; color: #4a6670; }
.ekc-leg-l b { display: block; font-size: 12px; font-weight: 500; color: var(--ink); text-indent: 0px;}
.ekc-leg-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; }
.ekc-leg-ic svg { width: 13px; height: 13px; fill: #fff; }
.ekc-leg-ic.is-trait { background: none; border-radius: 0; position: relative; }
.ekc-leg-ic.is-trait::before { content: ""; position: absolute; left: 1px; right: 1px; top: 10px; height: 2px; border-radius: 2px; background: #7f98a0; }

.ekc-autre { fill: none; stroke: #7f98a0; stroke-width: 2; stroke-linecap: round; opacity: .55; pointer-events: none; }
.ekc-autre.is-dim { opacity: .22; }
.ekc-hit { fill: none; stroke: transparent; stroke-width: 16; stroke-linecap: round; cursor: pointer; }
.ekc-hit:hover { stroke: rgba(180, 83, 42, .22); }

.ekc-reste { fill: none; stroke: #b9a690; stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.ekc-bord { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; }
.ekc-trace { fill: none; stroke: var(--cu); stroke-width: 4; stroke-linecap: round; }

.ekc-echelle path { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.ekc-echelle text { font-size: 11.5px; fill: var(--ink); }

/* Repères */
.ekc-pins { position: absolute; inset: 0; pointer-events: none; }

.ekc .ekc-pin {
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(7, 59, 76, .35);
  cursor: pointer;
  pointer-events: auto;
  transition: background-color .2s ease;
}

.ekc .ekc-pin.is-avenir { background: #fff; color: var(--mu); border-color: #b9c7cb; box-shadow: none; }
.ekc .ekc-pin.is-cur { width: 30px; height: 30px; margin: -15px 0 0 -15px; background: var(--cu); font-size: 12.5px; box-shadow: 0 0 0 5px rgba(180, 83, 42, .22), 0 2px 6px rgba(7, 59, 76, .3); }
.ekc .ekc-pin:hover { background: var(--navy-2); color: #fff; border-color: #fff; }

.ekc-tag {
  position: absolute;
  left: 0;
  top: 0;
  height: 24px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(7, 59, 76, .16);
}

.ekc-tag.is-avenir { background: rgba(255, 255, 255, .8); color: var(--mu); box-shadow: none; }
.ekc-tag.is-cur { background: var(--navy); color: #fff; font-weight: 600; }

/* Mini fiche */
.ekc-card {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 236px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--ombre);
  pointer-events: none;
  animation: ekcIn .16s ease-out;
}

.ekc-card[hidden] { display: none; }

.ekc-card::after {
  content: "";
  position: absolute;
  left: var(--fleche, 50%);
  bottom: -6px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 0 0 2px 0;
}

.ekc-card.is-bas::after { top: -6px; bottom: auto; border-radius: 2px 0 0 0; }

.ekc-card-ph { display: block; height: 128px; border-radius: 12px 12px 0 0; overflow: hidden; background: #e9dfd3; }
.ekc-card-ph.is-vide { display: none; }
.ekc-card-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ekc-card-bd { display: flex; flex-direction: column; padding: 10px 13px 12px; }
.ekc-card-k { font-size: 11.5px; color: var(--mu); }
.ekc-card-t { font-size: 14.5px; font-weight: 600; color: var(--navy); line-height: 1.3; margin-top: 1px; }
.ekc-card-d { font-size: 12.5px; color: #4a6670; line-height: 1.45; margin-top: 4px; }

@keyframes ekcIn { from { opacity: 0; } to { opacity: 1; } }

/* Outils : zoom et vue d'ensemble */
.ekc-tools { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; flex-direction: column; gap: 8px; }

.ekc-zoom { display: flex; flex-direction: column; border-radius: 10px; background: #fff; box-shadow: var(--ombre); overflow: hidden; }

.ekc .ekc-zoom button,
.ekc .ekc-all {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}

.ekc .ekc-zoom button + button { border-top: 1px solid var(--line); }
.ekc .ekc-all { border-radius: 10px; box-shadow: var(--ombre); }
.ekc .ekc-zoom button:hover, .ekc .ekc-all:hover { background: #f1f5f6; }
.ekc-tools svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }


/* Lecteur */
.ekc-player {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--ombre);
  cursor: default;
}

.ekc-player[hidden] { display: none; }

.ekc .ekc-play {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
}

.ekc .ekc-play:hover { background: var(--navy-2); }
.ekc-play svg { width: 16px; height: 16px; fill: currentColor; }
.ekc-play .i-pause, .ekc-play.is-pause .i-play { display: none; }
.ekc-play.is-pause .i-pause { display: block; }

.ekc-prog { flex: 1; min-width: 0; }
.ekc-info { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.ekc-now { font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ekc-count { color: var(--mu); font-variant-numeric: tabular-nums; flex: none; }

.ekc-track { position: relative; height: 4px; margin: 10px 6px 6px; border-radius: 2px; background: var(--line); }
.ekc-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--cu); }
.ekc-ticks { position: absolute; inset: 0; }

.ekc .ekc-ticks button {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c8d3d6;
  cursor: pointer;
}

.ekc .ekc-ticks button.is-fait { background: var(--cu); }
.ekc .ekc-ticks button::before { content: ""; position: absolute; inset: -8px; }

.ekc-src { position: absolute; right: 12px; bottom: 74px; z-index: 1; font-size: 10px; color: #8ca1a8; pointer-events: none; }


/* ════════ Panneau ════════ */
.ekc-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  height: 46%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: var(--ombre-l);
  transition: height .25s ease;
}

.ekc-panel.is-plein { height: 86%; }
.ekc.has-circuit .ekc-panel { height: 52%; }
.ekc.has-circuit .ekc-panel.is-plein { height: 86%; }

.ekc .ekc-grab {
  flex: none;
  display: grid;
  place-items: center;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ekc-grab span { width: 40px; height: 5px; border-radius: 3px; background: #d5dee1; }

.ekc-filters { flex: none; padding: 2px 14px 10px; border-bottom: 1px solid #eef2f3; }
.ekc-searchrow { display: flex; gap: 8px; }

.ekc-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  margin: 0;
  padding: 0 12px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: #8aa0a7;
  cursor: text;
}

.ekc-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--navy); }
.ekc-search svg, .ekc-sort svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ekc .ekc-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  box-shadow: none;
}

.ekc-search input::placeholder { color: #8aa0a7; }

.ekc-sort {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--navy);
}

.ekc .ekc-sort select {
  height: 42px;
  padding: 0 30px 0 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--navy);
  font-size: 13px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.ekc-sort svg { position: absolute; right: 9px; width: 14px; height: 14px; pointer-events: none; }

.ekc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.ekc .ekc-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #d9e2e5;
  color: #2c4a55;
  font-size: 12.5px;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}

.ekc .ekc-chip:hover { box-shadow: inset 0 0 0 1px #9fb3ba; }
.ekc .ekc-chip[aria-pressed="true"] { background: var(--navy); color: #fff; box-shadow: none; }
.ekc .ekc-chip:focus-visible { outline: 2px solid var(--cu); outline-offset: 2px; }

.ekc-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 18px;
  scrollbar-width: thin; scrollbar-color: #cfd9dc transparent; }

/* Fiche du circuit choisi */
.ekc-sel { margin: 12px 14px 0; border-radius: 14px; box-shadow: inset 0 0 0 1px #e1e8ea; }
.ekc-sel[hidden] { display: none; }

.ekc-sel-head { display: flex; gap: 12px; align-items: flex-start; padding: 12px; }
.ekc-sel-tx { flex: 1; min-width: 0; }
.ekc-dep { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--vert); }
.ekc-dep::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2fbf71; flex: none; }
.ekc .ekc-sel-t { margin: 2px 0 0; font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--navy); }
.ekc .ekc-sel-nom { margin: 3px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--mu); text-indent: 0px;}

.ekc .ekc-x {
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f1f4f5;
  color: var(--navy);
  cursor: pointer;
}

.ekc .ekc-x:hover { background: #e6ecee; }
.ekc-x svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.ekc .ekc-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid #eef2f3; }
.ekc-stats > div { padding: 11px 13px 12px; }
.ekc-stats > div + div { border-left: 1px solid #eef2f3; }
.ekc .ekc-stats dt { font-size: 11.5px; font-weight: 400; color: var(--mu); }
.ekc .ekc-stats dd { margin: 3px 0 0; display: flex; flex-direction: column; gap: 4px; }
.ekc-stats b { font-size: 16px; font-weight: 600; color: var(--navy); letter-spacing: -.2px; line-height: 1.2; }
.ekc-stats b small { font-size: 12px; font-weight: 500; color: var(--mu); letter-spacing: 0; }
.ekc-stats em { font-style: normal; font-size: 11.5px; color: var(--mu); }

.ekc-dbar { position: relative; display: inline-block; width: 46px; height: 4px; border-radius: 2px; background: #e3e9eb; flex: none; }
.ekc-dbar.is-l { width: 72px; }
.ekc-dbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--navy); }

.ekc-step { padding: 12px 13px 4px; border-top: 1px solid #eef2f3; }
.ekc-step-l { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--mu); }
.ekc-step-l b { font-weight: 500; color: var(--ink); }
.ekc-step-l { align-items: center; }
.ekc-step-k { display: inline-flex; align-items: center; gap: 8px; }
.ekc .ekc-mplay { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--navy); color: #fff; cursor: pointer; flex: none; }
.ekc .ekc-mplay:hover { background: var(--navy-2); }
.ekc-mplay svg { width: 11px; height: 11px; fill: currentColor; }
.ekc-mplay .i-pause, .ekc-mplay.is-pause .i-play { display: none; }
.ekc-mplay.is-pause .i-pause { display: block; }
.ekc-step-nom { font-weight: 600; color: var(--cu); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ekc-segs { display: flex; gap: 3px; margin-top: 8px; }
.ekc .ekc-segs button { flex: 1; height: 14px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.ekc .ekc-segs button::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 4px; border-radius: 2px; background: #e3e9eb; }
.ekc .ekc-segs button.is-passe::before { background: var(--navy); }
.ekc .ekc-segs button.is-cur::before { background: var(--cu); }

.ekc-etapes { padding: 4px 13px 0; }
.ekc-etapes summary { font-size: 12.5px; font-weight: 500; color: var(--navy); cursor: pointer; padding: 6px 0; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.ekc-etapes summary::-webkit-details-marker { display: none; }

/* Étapes : frise verticale */
.ekc-days { list-style: none; margin: 4px 0 6px; padding: 0; position: relative; }
.ekc-days::before { content: ""; position: absolute; left: 10px; top: 14px; bottom: 14px; width: 2px; background: #dbe3e6; }
.ekc .ekc-day button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 4px 0; border: 0; background: transparent; text-align: left; color: var(--mu); font-size: 13px; cursor: pointer; }
.ekc-dot { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px #c3d0d4; color: var(--mu); font-size: 10.5px; font-weight: 600; position: relative; }
.ekc-day-tx { display: flex; flex-direction: column; line-height: 1.3; }
.ekc-day-tx small { font-size: 11.5px; color: var(--mu); }
.ekc-day.is-passe button { color: var(--ink); }
.ekc-day.is-passe .ekc-dot { background: var(--navy); box-shadow: none; color: #fff; }
.ekc-day.is-cur button { color: var(--navy); font-weight: 600; }
.ekc-day.is-cur .ekc-dot { background: var(--cu); box-shadow: 0 0 0 4px rgba(180, 83, 42, .18); color: #fff; }

.ekc-acts { display: flex; gap: 8px; padding: 10px 13px 13px; }

.ekc a.ekc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
}

.ekc a.ekc-btn.is-p { flex: 1; background: var(--navy); color: #fff !important; }
.ekc a.ekc-btn.is-p:hover { background: var(--navy-2); }
.ekc a.ekc-btn.is-s { background: #fff; color: var(--navy) !important; box-shadow: inset 0 0 0 1px #d3dde0; }
.ekc a.ekc-btn.is-s:hover { box-shadow: inset 0 0 0 1px #aebfc4; }

/* Liste */
.ekc-lh { display: flex; justify-content: space-between; padding: 14px 26px 6px; font-size: 12px; color: var(--mu); }
.ekc-lh b { font-weight: 500; }
.ekc-lh-autres, .ekc.has-circuit .ekc-lh-all { display: none; }
.ekc.has-circuit .ekc-lh-autres { display: inline; }

.ekc .ekc-list { list-style: none; margin: 0 !important; padding: 0 16px !important; display: grid; gap: 14px; }
.ekc .ekc-row { margin: 0 !important; padding: 0 !important; list-style: none; }
.ekc-row[hidden] { display: none; }

/* Carte circuit : grande photo, badge posé dessus */
.ekc .ekc-row-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px #e3e9eb;
  text-align: left;
  cursor: pointer;
  transition: box-shadow .2s;
}
.ekc .ekc-row-btn:hover { box-shadow: 0 0 0 1px #c9d5d9, 0 6px 18px rgba(7, 59, 76, .10); }
.ekc .ekc-row-btn:focus-visible { outline: 2px solid var(--cu); outline-offset: 2px; }

.ekc-ph { position: relative; display: block; aspect-ratio: 16 / 9; background: #e9dfd3; overflow: hidden; }
.ekc-ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.ekc .ekc-row-btn:hover .ekc-ph img { transform: scale(1.04); }

.ekc-bdg {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  padding: 6px 11px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(7, 59, 76, .18);
}
.ekc-bdg i { width: 7px; height: 7px; border-radius: 50%; background: #2e9e63; flex: none; }
.ekc-bdg.is-fort { background: var(--navy); color: #fff; }

/* Étiquettes sous le titre, colorées par famille */
.ekc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ekc-tags span { padding: 3px 9px; border-radius: 20px; font-size: 11.5px; line-height: 1.4; }
.ekc-tags .is-pro { background: #eaf2f5; color: #0b4f64; }
.ekc-tags .is-sty { background: #f8ece4; color: #9a4420; }
.ekc-tags .is-det { background: #e7f2eb; color: #2f6b4a; }
.ekc-tags .is-inc { background: var(--navy); color: #fff; }

.ekc-row-tx { display: flex; flex-direction: column; padding: 11px 14px 13px; }
.ekc-t { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--navy); }
.ekc-pf { margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: #4a6670; }
.ekc-m { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 9px; font-size: 12.5px; color: var(--ink); }
.ekc-price { white-space: nowrap; }
.ekc-price small { font-size: 12px; color: var(--mu); }
.ekc-price b { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -.2px; font-variant-numeric: tabular-nums; }

.ekc-vide { margin: 10px 26px; font-size: 13px; line-height: 1.55; color: var(--mu); }
.ekc .ekc-vide a { color: var(--navy) !important; text-decoration: underline; text-underline-offset: 3px; }

/* Mobile : lecteur remplacé par la progression de la fiche */
@media (max-width: 899px) {
  .ekc-player { display: none !important; }
  .ekc-src { display: none; }
  .ekc-leg { display: none; }
  .ekc-zone { font-size: 13px; }
  .ekc.has-circuit .ekc-filters { display: none; }   /* place à la fiche ; la croix ramène la liste */
  .ekc-tools { top: 12px; right: 12px; }
  /* Fermer plus facilement : croix plus grande, poignée plus haute (glisser vers le bas referme) */
  .ekc .ekc-x { width: 40px; height: 40px; }
  .ekc-x svg { width: 17px; height: 17px; }
  .ekc .ekc-grab { height: 28px; touch-action: none; }
  .ekc-panel { will-change: transform; }
}

/* ════════ Ordinateur ════════ */
@media (min-width: 900px) {
  .ekc-scroll { scrollbar-gutter: stable both-edges; }   /* marge égale des deux côtés : cartes centrées */
  .ekc .ekc-list { padding: 0 8px !important; }
  .ekc { height: calc(100vh - 126px); min-height: 620px; }
  .ekc-panel,
  .ekc.has-circuit .ekc-panel {
    left: 16px;
    top: 16px;
    bottom: 16px;
    right: auto;
    width: 384px;
    height: auto;
    border-radius: 18px;
  }
  .ekc-grab { display: none !important; }
  .ekc-filters { padding: 16px 16px 10px; }
  .ekc-player { left: calc(50% + 200px); right: auto; bottom: 24px; width: min(540px, calc(100% - 480px)); transform: translateX(-50%); }
  .ekc-tools { top: 20px; right: 20px; }
  .ekc-src { bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .ekc-card { animation: none; }
  .ekc .ekc-pin, .ekc-panel { transition: none; }
}


/* Vignette de la fiche du circuit choisi */
.ekc-thumb { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; background: #e9dfd3; flex: none; display: block; }
.ekc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Appel à l'action sur la photo : dit ce que fait le clic */
.ekc-go {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px 0 10px;
  border-radius: 999px;
  background: rgba(7, 59, 76, .88);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background .2s;
}
.ekc-go svg { width: 14px; height: 14px; fill: currentColor; }
.ekc .ekc-row-btn:hover .ekc-go,
.ekc-row.is-apercu .ekc-go { background: var(--cu); }
.ekc-row.is-apercu .ekc-row-btn { box-shadow: 0 0 0 2px var(--cu); }

/* ════════ Mobile : carte d'abord ════════
   Sans circuit ouvert : envies en haut, circuits en carrousel en bas, bouton « Liste ».
   Liste plein écran (.is-plein) et fiche d'un circuit (.has-circuit) gardent le tiroir. */
.ekc-retour, .ekc-liste-btn, .ekc-chip-s { display: none !important; }

@media (max-width: 899px) {
  /* Pas de barre de défilement dans le tiroir : son apparition/disparition faisait trembler les cartes */
  .ekc-scroll { scrollbar-width: none; scrollbar-gutter: auto; }
  .ekc-scroll::-webkit-scrollbar { display: none; }

  /* Carrousel : on zoome aux doigts, les boutons ne reviennent qu'avec un circuit ouvert */
  .ekc:not(.has-circuit) .ekc-tools { display: none; }

  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) {
    inset: 0;
    height: auto;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    pointer-events: none;
  }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) > * { pointer-events: auto; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-grab { display: none; }

  /* Envies flottantes */
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-filters { position: absolute; top: 12px; left: 12px; right: 12px; padding: 0; border: 0; pointer-events: none; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-searchrow { display: none; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-chips { margin: 0; pointer-events: none; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-chip { pointer-events: auto; height: 34px; box-shadow: 0 2px 8px rgba(7, 59, 76, .16); }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-chip[aria-pressed="true"] { box-shadow: 0 2px 8px rgba(7, 59, 76, .25); }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc .ekc-chip-s,
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-chip-s { display: inline-flex !important; width: 34px; padding: 0; justify-content: center; }
  .ekc-chip-s svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

  /* Carrousel */
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-scroll {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    flex: none;
    padding: 8px 0 16px;            /* place pour l'ombre et le liseré cuivre : la carte n'est plus rognée */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    scrollbar-gutter: auto;
    pointer-events: auto;          /* un défileur sans pointeur ne reçoit pas le glissé du doigt (Safari iOS) */
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-scroll::-webkit-scrollbar { display: none; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-lh { display: none; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-list { display: flex; gap: 12px; width: max-content; pointer-events: auto; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-row { flex: none; width: min(300px, calc(100vw - 64px)); scroll-snap-align: center; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-row-btn { box-shadow: 0 8px 24px rgba(7, 59, 76, .18); }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-row.is-apercu .ekc-row-btn { box-shadow: 0 0 0 2px var(--cu), 0 8px 24px rgba(7, 59, 76, .18); }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-ph { aspect-ratio: auto; height: 120px; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-pf { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-tags { display: none; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-row-tx { padding: 10px 13px 12px; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-m { margin-top: 7px; }
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-vide { margin: 0 16px; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(7, 59, 76, .18); pointer-events: auto; }

  /* Bouton Liste, au-dessus du carrousel */
  .ekc:not(.has-circuit) .ekc-panel:not(.is-plein) .ekc-liste-btn {
    display: inline-flex !important;
    position: absolute;
    left: 50%;
    bottom: 246px;
    transform: translateX(-50%);
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(7, 59, 76, .3);
    cursor: pointer;
  }
  .ekc-liste-btn b { font-weight: 500; }
  .ekc-liste-btn svg, .ekc-retour svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* Liste plein écran */
  .ekc:not(.has-circuit) .ekc-panel.is-plein { top: 0; height: auto; border-radius: 0; }
  .ekc:not(.has-circuit) .ekc-panel.is-plein .ekc-grab { display: none; }
  .ekc:not(.has-circuit) .ekc-panel.is-plein .ekc-retour {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    height: 40px;
    margin: 8px 6px 0;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: var(--navy);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
  }
  .ekc .ekc-panel.is-plein .ekc-list { gap: 14px; }

  /* La carte occupe tout l'écran sous l'en-tête du site (hauteur mesurée par le JS) */
  .ekc { position: fixed; top: var(--ekc-top, 72px); left: 0; right: 0; bottom: 0; height: auto; min-height: 0; z-index: 2; }
  html:has(#ekCarte), body:has(#ekCarte) { overflow: hidden; overscroll-behavior: none; }

  /* Page carte : pas de pied de page sur mobile, la carte occupe l'écran */
  body:has(#ekCarte) .footer,
  body:has(#ekCarte) .trust-saas-section,
  body:has(#ekCarte) .sub-footer { display: none !important; }

  /* Pas de bulle WhatsApp sur cette page en mobile : elle masquait les cartes (le devis reste à un clic) */
  body:has(#ekCarte) .ws-wrapper,
  body:has(#ekCarte) #whatsapp-btn { display: none !important; }
}