@font-face {
  font-family: "FranklinGothicHeavy";
  src: url("./assets/FranklinGothicHeavy-Regular.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-top: #123935;
  --bg-bottom: #0d2a27;
  --panel: rgba(6, 30, 27, 0.78);
  --panel-strong: rgba(6, 30, 27, 0.9);
  --panel-border: rgba(173, 255, 240, 0.15);
  --text: #effffb;
  --muted: #b9e8df;
  --accent: #7dd3fc;
  --accent-strong: #99f6e4;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  --map-max-width: 1280px;
  --map-max-width-mobile: 880px;
  --map-zoom: 1;
  --responsive-map-zoom: 1;
  --responsive-map-pan-x: 0px;
  --responsive-map-pan-y: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background-color: #6fb7f2;
}

body {
  font-family: "FranklinGothicHeavy", "Outfit", sans-serif;
  color: var(--text);
 /* background:
    radial-gradient(circle at top left, rgba(225, 80, 96, 0.26), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(225, 80, 96, 0.14), transparent 28%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));*/
  background:  #6fb7f2;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 90%);
}

.theme-map .page-shell,
.theme-admin .admin-shell {
  min-height: 100vh;
  padding: 32px;
}

.theme-map {
  /*padding-bottom: 108px;*/
}

.page-shell {
  display: grid;
  place-items: center;
}

.map-header {
    position: absolute;
    top: 50px;
    right: 80px;
}


.map-footer {
  position: fixed;
  left: 150px;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 18px;
  border: 1px solid rgba(173, 255, 240, 0.12);
  border-radius: 999px;
  background: rgba(4, 24, 22, 0.48);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.map-footer__logo {
  display: block;
  height: 58px;
  width: auto;
  opacity: 0.94;
}

.hero-card {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--panel-border);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(13, 41, 38, 0.88), rgba(4, 21, 19, 0.82)),
    rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.map-stage {
  width: min(96vw, 1480px);
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.map-copy {
  position: absolute;
  left: 10px;
  top: 460px;
  z-index: 4;
  width: min(53vw, 540px);
  color: #000;
}

.map-copy__title {
  margin: 0;
  font-family: "FranklinGothicHeavy", "Outfit", sans-serif;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.map-copy__date {
  margin: 4px 0 22px;
  font-family: "FranklinGothicHeavy", "Outfit", sans-serif;
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
  line-height: 1;
}

.map-copy__body {
  font-family: "FranklinGothicHeavy", "Outfit", sans-serif;
  font-size: clamp(1rem, 1.15vw, 1.8rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.map-copy__body p {
  margin: 0 0 10px;
}

.map-title-wrap {
  position: absolute;
  top: 26px;
  left: 18px;
  z-index: 4;
  pointer-events: none;
  width: min(44vw, 650px);
}

.map-title {
  margin: 0;
  font-family: "FranklinGothicHeavy", "Outfit", sans-serif;
  font-weight: 800;
  font-size: clamp(4.4rem, 8.5vw, 8rem);
  line-height: 0.82;
  letter-spacing: -0.07em;
  text-transform: none;
  color: #f7f4f1;
  transform: rotate(-7deg);
  text-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
}

.map-title__line {
  display: block;
  opacity: 0;
  transform: translateY(26px) rotate(2deg) scale(0.96);
  animation: title-in 820ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.map-title__line:last-child {
  animation-delay: 140ms;
  margin-left: 1.42em;
}

.map-title__letter {
  display: inline-block;
  transform-origin: center bottom;
  animation: letter-bounce 7.2s ease-in-out infinite;
}

.map-title__letter--space {
  width: 0.24em;
}

.map-title__line:nth-child(1) .map-title__letter:nth-child(1) { animation-delay: 0.1s; }
.map-title__line:nth-child(1) .map-title__letter:nth-child(2) { animation-delay: 0.22s; }
.map-title__line:nth-child(1) .map-title__letter:nth-child(4) { animation-delay: 0.34s; }
.map-title__line:nth-child(1) .map-title__letter:nth-child(5) { animation-delay: 0.46s; }
.map-title__line:nth-child(1) .map-title__letter:nth-child(6) { animation-delay: 0.58s; }
.map-title__line:nth-child(1) .map-title__letter:nth-child(7) { animation-delay: 0.7s; }
.map-title__line:nth-child(1) .map-title__letter:nth-child(8) { animation-delay: 0.82s; }
.map-title__line:nth-child(1) .map-title__letter:nth-child(9) { animation-delay: 0.94s; }
.map-title__line:nth-child(1) .map-title__letter:nth-child(10) { animation-delay: 1.06s; }
.map-title__line:nth-child(1) .map-title__letter:nth-child(11) { animation-delay: 1.18s; }
.map-title__line:nth-child(2) .map-title__letter:nth-child(1) { animation-delay: 1.3s; }
.map-title__line:nth-child(2) .map-title__letter:nth-child(2) { animation-delay: 1.42s; }
.map-title__line:nth-child(2) .map-title__letter:nth-child(3) { animation-delay: 1.54s; }
.map-title__line:nth-child(2) .map-title__letter:nth-child(4) { animation-delay: 1.66s; }
.map-title__line:nth-child(2) .map-title__letter:nth-child(5) { animation-delay: 1.78s; }
.map-title__line:nth-child(2) .map-title__letter:nth-child(6) { animation-delay: 1.9s; }
.map-title__line:nth-child(2) .map-title__letter:nth-child(7) { animation-delay: 2.02s; }

.map-title-car {
  position: relative;
  width: min(36vw, 340px);
  margin-top: -44px;
  margin-left: -42px;
  /*filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.22));*/
  animation: car-body-bounce 3.2s ease-in-out infinite;
}

.map-title-car::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 12%;
  bottom: 10px;
  height: 24px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(9, 35, 32, 0.34), transparent 72%);
  filter: blur(12px);
  animation: car-shadow-pulse 3.2s ease-in-out infinite;
}

.map-title-car__image {
  display: block;
  width: 100%;
  height: auto;
  animation:
    car-wheel-roll 0.9s linear infinite,
    car-engine-shift 2.6s ease-in-out infinite;
}

.hero-copy,
.map-wrap {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--accent-strong);
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-family: "FranklinGothicHeavy", "Outfit", sans-serif;
  font-size: clamp(3.2rem, 6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 52ch;
  margin: 20px 0 28px;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted);
}

.city-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.city-button,
button,
.panel-link {
      margin-top: 20px;
    border: 2px solid rgb(255 255 255);
    border-radius: 999px;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    font-size: 20px;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.city-button:hover,
.city-button:focus-visible,
.city-button.is-active,
button:hover,
button:focus-visible,
.panel-link:hover,
.panel-link:focus-visible {
  outline: none;
  transform: translateY(-2px);
  background: rgba(125, 211, 252, 0.14);
  border-color: #000;
  box-shadow: 0 12px 24px rgba(8, 145, 178, 0.18);
}

.city-panel,
.admin-panel,
.admin-hero {
  padding: 20px 22px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}

.panel-label {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.city-panel h2,
.admin-panel h2 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.city-panel p:last-of-type,
.admin-hint {
  line-height: 1.25;
  text-align: justify;
  color: var(--muted);
}

.admin-entry {
  margin-top: 22px;
}

.map-wrap {
  width: 100%;
  min-height: min(92vh, 1100px);
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  overflow: visible;
  margin-left: 260px;
  margin-top: 49px;
}

.map-glow {
  position: absolute;
  inset: 6% 10%;
  background:
    radial-gradient(circle at center, rgba(45, 212, 191, 0.24), transparent 42%),
    radial-gradient(circle at 65% 38%, rgba(125, 211, 252, 0.18), transparent 32%);
  filter: blur(30px);
}

.france-map {
  width: min(100%, var(--map-max-width));
  max-height: 92vh;
  height: auto;
  overflow: visible;
  display: block;
  position: relative;
  z-index: 1;
}

.map-zoom-controls {
  display: none;
}

.map-base-layer {
  transform-box: view-box;
  transform-origin: center center;
  transform: scale(var(--map-zoom));
}

.france-svg-base {
  filter:
    drop-shadow(10px 16px 0 rgba(0, 0, 0, 0.14))
    drop-shadow(0 18px 44px rgba(0, 0, 0, 0.16));
}

.map-routes path {
  fill: none;
  stroke: rgb(239 115 185 / 78%);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 14 14;
}

.route-bus-icon {
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.24));
}

.city-marker {
  cursor: pointer;
}

.city-marker .hit-area {
  fill: transparent;
}

.city-marker .label-hit-area {
  fill: transparent;
}

.city-marker .pulse {
  fill: rgba(153, 246, 228, 0.2);
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.8s ease-out infinite;
  transition: fill 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.city-marker .dot {
  fill: #ecfeff;
  stroke: #0f172a;
  stroke-width: 5;
  transition: transform 180ms ease, fill 180ms ease, filter 180ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

.city-marker .label {
  fill: #000;
  font-family: "FranklinGothicHeavy", "Outfit", sans-serif;
  font-size: 26px;
  font-weight: 600;
  paint-order: stroke;
  /*stroke: rgba(4, 16, 15, 0.9);*/
  stroke-width: 6px;
  stroke-linejoin: round;
  pointer-events: none;
  transition: fill 180ms ease, filter 180ms ease;
  letter-spacing: -1px;
}

.city-marker .city-date {
  /*fill: #f7f4f1;*/
  font-family: "FranklinGothicHeavy", "Outfit", sans-serif;
  font-size: 16px;
  font-weight: 800;
  paint-order: stroke;
  /*stroke: rgba(4, 16, 15, 0.9);*/
  stroke-width: 5px;
  stroke-linejoin: round;
  pointer-events: none;
  transition: fill 180ms ease, filter 180ms ease;
  letter-spacing: -1px;
}

.city-marker.is-active .dot,
.city-marker:hover .dot {
  fill: #7dd3fc;
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 4px 8px rgba(125, 211, 252, 0.22));
}

.city-marker.is-active .pulse,
.city-marker:hover .pulse {
  fill: rgba(125, 211, 252, 0.28);
  opacity: 0.95;
  transform: translateY(-2px) scale(1.04);
}

.city-marker.is-active .label,
.city-marker:hover .label {
  fill: #ffffff;
  filter: drop-shadow(0 2px 6px rgba(4, 16, 15, 0.22));
}

.city-marker.is-active .city-date,
.city-marker:hover .city-date {
  fill: #ffffff;
  filter: drop-shadow(0 2px 6px rgba(4, 16, 15, 0.22));
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 52px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(135deg, rgba(18, 26, 44, 0.22), rgba(111, 183, 242, 0.18)),
    rgba(91, 151, 226, 0.2);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(0px);
  transition:
    opacity 260ms ease,
    visibility 260ms ease,
    backdrop-filter 360ms ease;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: blur(18px) saturate(1.05);
}

.modal-card {
  width: min(100%, 1660px);
  min-height: min(80vh, 920px);
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(380px, 0.98fr);
  gap: clamp(30px, 4vw, 74px);
  align-items: center;
  padding: clamp(42px, 4vw, 68px) clamp(36px, 4vw, 72px);
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(146, 192, 246, 0.94), rgba(126, 178, 240, 0.9) 58%, rgba(151, 194, 245, 0.82)),
    rgba(139, 186, 242, 0.9);
  box-shadow:
    0 34px 90px rgba(19, 26, 43, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  transition:
    opacity 260ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 320ms ease;
}

.modal.is-open .modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.26), transparent 24%),
    radial-gradient(circle at 62% 76%, rgba(76, 107, 172, 0.18), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.modal-card::after {
  content: "";
  position: absolute;
  inset: auto auto -80px 42%;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 68%);
  filter: blur(22px);
  pointer-events: none;
}

.modal-card:focus,
.modal-card:focus-visible,
.modal-close:focus,
.modal-close:focus-visible,
.city-marker:focus,
.city-marker:focus-visible {
  outline: none;
  box-shadow: none;
}

.modal-close {
  position: absolute;
  top: clamp(24px, 3vw, 36px);
  right: clamp(22px, 3vw, 36px);
  margin: 0;
  display: block;
  width: 76px;
  height: 76px;
  padding: 0;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 220ms ease 80ms,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1) 80ms,
    background 180ms ease,
    border-color 180ms ease;
}

.modal.is-open .modal-close {
  opacity: 1;
  transform: translateY(0);
  z-index: 2;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.modal-close__bar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.modal-close__bar:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close__bar:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-media {
  display: block;
  width: min(100%, 600px);
  aspect-ratio: 1.16 / 0.8;
  max-height: min(54vh, 500px);
  object-fit: cover;
  justify-self: start;
  align-self: center;
  border-radius: 30px;
  box-shadow:
    0 22px 52px rgba(28, 43, 72, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: translateX(-22px) scale(1.02);
  transition: opacity 360ms ease 40ms, transform 760ms cubic-bezier(0.16, 1, 0.3, 1) 40ms;
}

.modal.is-open .modal-media {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.modal-content {
  max-width: 680px;
  padding-right: clamp(18px, 3vw, 54px);
  align-self: center;
  opacity: 0;
  transform: translateX(28px);
  transition:
    opacity 260ms ease 110ms,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1) 110ms;
}

.modal-date-line {
  margin: 0 0 6px;
  color: #000;
  font-family: "FranklinGothicHeavy", "Outfit", sans-serif;
  font-size: clamp(1.8rem, 2.4vw, 3rem);
  line-height: 0.94;
  text-align: left;
}

.modal-date-line .city-date {
  color: #000;
}

.modal-heading {
  font-size: clamp(2.8rem, 4.1vw, 4.9rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0 0 clamp(18px, 1.8vw, 24px);
  color: #000;
  text-wrap: balance;
  text-align: left;
}

.modal-description {
  margin: 0 0 clamp(24px, 2.4vw, 34px);
  /*max-width: 26ch;*/
  font-family: "Outfit", "FranklinGothicHeavy", sans-serif;
  font-weight: 500;
  font-size: clamp(1.02rem, 1.25vw, 1.7rem);
  line-height: 1.38;
  letter-spacing: -0.02em;
  color: #000;
  text-align: left;
  text-wrap: pretty;
  white-space: pre-line;
}

.modal.is-open .modal-content {
  opacity: 1;
  transform: translateX(0);
}

.modal-cta {
      display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 208px;
    padding: 15px 26px;
    border-radius: 999px;
    border: 2px solid rgba(6, 30, 27, 0.78);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(4, 16, 15, 0.9);
    font-family: "FranklinGothicHeavy", "Outfit", sans-serif;
    font-size: clamp(1.05rem, 1.2vw, 1.45rem);
    line-height: 1;
    box-shadow: 0 14px 28px rgba(63, 95, 145, 0.16);
}

.modal-cta:hover,
.modal-cta:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
  transform: translateY(-1px);
}

.admin-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.admin-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}

.admin-hero h1 {
  max-width: none;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

label {
  display: block;
  margin: 14px 0 8px;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(173, 255, 240, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

select option {
  color: #041f1c;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.admin-separator {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid rgba(173, 255, 240, 0.14);
}

.admin-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.admin-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(173, 255, 240, 0.12);
}

.admin-item--route {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.admin-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.admin-debug-output {
  margin: 14px 0 0;
  padding: 14px 16px;
  max-height: 280px;
  overflow: auto;
  border-radius: 18px;
  background: rgba(7, 18, 20, 0.82);
  border: 1px solid rgba(173, 255, 240, 0.12);
  color: rgba(223, 252, 247, 0.92);
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-actions button {
  padding: 10px 14px;
}

.route-visual {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.route-city {
  font-weight: 700;
}

.route-line-visual {
  position: relative;
  display: block;
  height: 34px;
}

.route-line-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(
    90deg,
    rgba(153, 246, 228, 0.18),
    rgba(153, 246, 228, 0.5),
    rgba(153, 246, 228, 0.18)
  );
}

.route-line-track::after {
  content: "";
  position: absolute;
  inset: -3px 0;
  background-image: radial-gradient(circle, rgba(223, 252, 247, 0.6) 1px, transparent 1.5px);
  background-size: 14px 8px;
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.5;
}

.route-bus {
  position: absolute;
  top: 50%;
  left: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
  transform: translateY(-50%);
  animation: bus-drive 3.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22));
}

@keyframes bus-drive {
  0% {
    left: 4%;
    transform: translateY(-50%) rotate(-2deg);
  }
  50% {
    transform: translateY(calc(-50% - 1px)) rotate(1deg);
  }
  100% {
    left: calc(100% - 34px);
    transform: translateY(-50%) rotate(2deg);
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.82);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.45);
    opacity: 0;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

@keyframes title-in {
  0% {
    opacity: 0;
    transform: translateY(26px) rotate(2deg) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

@keyframes letter-bounce {
  0%, 86%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  89% {
    transform: translateY(-0.1em) rotate(-2deg);
  }
  92% {
    transform: translateY(0.03em) rotate(1.2deg);
  }
  95% {
    transform: translateY(-0.04em) rotate(-0.8deg);
  }
}

@keyframes car-body-bounce {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-4px) rotate(0.8deg);
  }
}

@keyframes car-engine-shift {
  0%, 100% {
    transform: translateX(0) translateY(0);
  }
  20% {
    transform: translateX(2px) translateY(-1px);
  }
  40% {
    transform: translateX(-1px) translateY(0);
  }
  60% {
    transform: translateX(2px) translateY(-2px);
  }
  80% {
    transform: translateX(-2px) translateY(0);
  }
}

@keyframes car-wheel-roll {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(0deg);
  }
}

@keyframes car-shadow-pulse {
  0%, 100% {
    transform: scaleX(1);
    opacity: 0.34;
  }
  50% {
    transform: scaleX(0.94);
    opacity: 0.24;
  }
}

@media (max-width: 980px) {
  .hero-card,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    flex-direction: column;
    align-items: start;
  }

  h1 {
    max-width: none;
  }

  .map-wrap {
    width: 100%;
    min-height: min(92vh, 1100px);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
    overflow: visible;
    margin-left: 0;
    margin-top: 0;
  }

  .map-title-wrap {
    top: -50px;
    left: 40px;
    width: min(80vw, 100%);
  }

  .map-copy {
    top: 390px;
    left: 14px;
    width: min(32vw, 340px);
  }
}

@media (max-width: 640px) {
  .map-stage {
    width: min(100%, 1480px);
        min-height: calc(100vh - 64px);
        display: grid;
        place-items: center;
        position: relative;
        z-index: 1;
        align-content: start;
}

  html,
  body {
    min-height: 100dvh;
  }

  body {
    min-height: 100dvh;
  }

  .theme-map .page-shell,
  .theme-admin .admin-shell {
             padding: 90px 0;
        margin-left: -10px;
        margin-right: 0px;
        min-height: 100dvh;
        overflow: hidden;
  }

  .theme-map {
    padding-bottom: 0px;
    padding-top: 0px;
  }

  .map-footer {
    bottom: 14px;
    padding: 10px 14px;
  }

  .map-footer__logo {
    height: 22px;
  }

  .hero-card,
  .admin-panel,
  .admin-hero {
    border-radius: 24px;
  }

  h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }

  .city-panel h2,
  .modal-content h3,
  .admin-panel h2 {
    font-size: 1.5rem;
  }

  .city-marker .label {
    font-size: 28px;
    stroke-width: 7px;
  }

  .city-marker .city-date {
    font-size: 19px;
    stroke-width: 5px;
  }

  .france-map {
    width: min(100%, var(--map-max-width-mobile));
    max-height: 82vh;
    transform:
      translate(var(--responsive-map-pan-x), var(--responsive-map-pan-y))
      scale(var(--responsive-map-zoom));
    transform-origin: center center;
    transition: transform 220ms ease;
    touch-action: none;
  }

  .france-map.is-pannable {
    cursor: grab;
  }

  .france-map.is-dragging {
    cursor: grabbing;
    transition: none;
  }

  .city-marker .label {
    font-size: 28px;
    stroke-width: 7px;
  }

  .admin-row,
  .admin-item {
    grid-template-columns: 1fr;
  }

  .france-map {
    width: min(100%, 760px);
    max-height: 82vh;
  }

  .map-zoom-controls {
    position: absolute;
    right: 12px;
    bottom: -60px;
    z-index: 6;
    display: grid;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(5, 26, 24, 0.72);
    /*box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);*/
  }

  .map-zoom-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    font-size: 1.4rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.1);
  }

  .map-zoom-button--reset {
    font-size: 0.78rem;
  }

  .modal {
    padding: 22px;
  }

  .modal-card {
    width: min(100%, 1100px);
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 80px 28px 34px;
    border-radius: 28px;
  }

  .modal-content {
    max-width: none;
    padding: 0 6px 10px;
  }

  .modal-media {
    width: 100%;
    max-height: 40vh;
    border-radius: 28px;
  }

  .modal-description {
    max-width: none;
    font-size: clamp(1rem, 2.3vw, 1.28rem);
  }

  .modal-close {
    top: 18px;
    right: 18px;
    width: 68px;
    height: 68px;
  }

  .map-title {
    font-size: clamp(2.8rem, 16vw, 4.8rem);
    line-height: 0.9;
  }

  .map-title__line:last-child {
    margin-left: -0.2em;
  }

  .map-title-car {
        width: min(46vw, 300px);
        margin-top: -57px;
        margin-left: 160px;
  }

  .map-copy {
    position: relative;
        top: auto;
        left: auto;
        width: min(100%, 100%);
        margin: 170px auto 10px;
        padding: 0 20px 0 30px;
        background: #6fb7f2;
  }

  .map-copy__title {
    font-size: 1.8rem;
  }

  .map-copy__date {
    font-size: 1rem;
    margin-bottom: 14px;
  }

  .map-copy__body {
    font-size: 0.98rem;
    line-height: 1.1;
  }

  .map-copy__body p {
    max-width: 100%;
  }

  .map-wrap {
    width: 100%;
    min-height: min(92vh, 1100px);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
    overflow: visible;
    margin-left: 0;
    margin-top: 0;
  }

  .map-wrap {
    min-height: min(60vh, 920px);
  }

  .map-routes path {
    stroke-width: 4;
    stroke-dasharray: 10 10;
  }

  .city-marker .dot {
    stroke-width: 4;
  }
}

.derniere .map-title__letter{
    color: #000;
}

.map-title__line.tournee {
    margin-top: -30px;
    transform: rotate(-4deg) !important;
}

p.size-date {font-size:40px}

@media (max-width: 640px) {
  .map-header {
    position: absolute;
    top: 11px;
    left: 20px;
    width: 180px;
}

  .modal {
    padding: 12px;
  }

  .modal-card {
    gap: 18px;
    padding: 72px 18px 22px;
    border-radius: 22px;
  }

  .modal-media {
    max-height: 34vh;
    border-radius: 22px;
  }

  .modal-date-line,
  p.size-date {
    font-size: clamp(1.25rem, 8vw, 2.05rem);
    line-height: 0.96;
  }

  .modal-heading {
    font-size: clamp(2rem, 12vw, 3rem);
    margin-bottom: 12px;
  }

  .modal-description {
    font-size: 0.96rem;
    line-height: 1.42;
    margin-bottom: 20px;
  }

  .modal-cta {
    width: 100%;
    min-width: 0;
    font-size: 1rem;
    padding: 14px 20px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 56px;
    height: 56px;
  }

  .modal-close__bar {
    width: 20px;
  }
}

/* php-json final layout: desktop + mobile only, breakpoint 900px, no transitions */
*,
*::before,
*::after {
  transition: none !important;
}

.page-shell {
  min-height: auto;
  width: 100%;
  justify-items: center;
}

.map-stage {
      width: min(1250px, 1440px);
    min-height: calc(100vh - 220px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(600px, 0.95fr) minmax(640px, 1.05fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:         "title map"        "copy map";
    align-items: center;
    column-gap: clamp(0px, 0vw, 0px);
    row-gap: 0px;
    place-items: unset;
    padding: 28px 0 0;
}

.map-title-wrap {
  position: relative;
  top: auto;
  left: auto;
  grid-area: title;
  align-self: end;
  width: min(100%, 620px);
}

.map-copy {
  position: relative;
  top: auto;
  left: auto;
  grid-area: copy;
  align-self: start;
  width: min(100%, 560px);
  margin-top: 8px;
}

.map-wrap {
  grid-area: map;
  align-self: center;
  width: 120%;
  min-height: min(88vh, 980px);
  margin: 0;
}

.map-footer {
  position: relative;
  left: auto;
  bottom: 30px;
  transform: none;
  width: min(94vw, 1440px);
  margin: 24px auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.map-footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-footer__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 512px;
  flex-wrap: wrap;
}

.map-footer__logo {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.map-footer__logo--nova {
  height: 55px;
}

.city-button,
button,
.panel-link {
  margin-top: 0;
}

.modal {
  backdrop-filter: blur(0);
  transition:
    opacity 220ms ease,
    visibility 220ms ease,
    backdrop-filter 320ms ease;
}

.modal.is-open {
  backdrop-filter: blur(14px);
}

.theme-map.is-modal-open .france-map {
  transform: none !important;
}

@keyframes modalCardIntro {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  72% {
    opacity: 1;
    transform: translateY(-4px) scale(1.008);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalMediaIntro {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalContentIntro {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalCloseIntro {
  0% {
    opacity: 0;
    transform: translateY(-12px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-card {
  width: min(100%, 1160px);
  min-height: auto;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 0.95fr);
  gap: 28px;
  padding: 34px 34px 30px;
  align-items: start;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 240ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.is-open .modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: modalCardIntro 520ms cubic-bezier(0.2, 0.9, 0.24, 1) both;
}

.modal-media {
  width: 100%;
  max-height: 320px;
  align-self: start;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 260ms ease 40ms,
    transform 340ms ease 40ms;
}

.modal.is-open .modal-media {
  opacity: 1;
  transform: translateY(0);
  animation: modalMediaIntro 620ms cubic-bezier(0.16, 1, 0.3, 1) 70ms both;
}

.modal-content {
  max-width: 460px;
  padding-right: 18px;
  align-self: start;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 260ms ease 90ms,
    transform 340ms ease 90ms;
}

.modal.is-open .modal-content {
  opacity: 1;
  transform: translateY(0);
  animation: modalContentIntro 520ms cubic-bezier(0.2, 0.9, 0.24, 1) 130ms both;
}

.modal-description {
  /*max-width: 34ch;*/
}

.modal-date-line,
p.size-date {
  font-size: clamp(1.1rem, 1.35vw, 1.65rem);
  margin-bottom: 4px;
}

.modal-heading {
  font-size: clamp(2rem, 2.6vw, 3.1rem);
  margin-bottom: 10px;
}

.modal-description {
  font-size: clamp(0.92rem, 1vw, 1.1rem);
  line-height: 1.32;
  margin-bottom: 16px;
}

.modal-cta {
  min-width: 170px;
  padding: 12px 20px;
  font-size: clamp(0.92rem, 0.95vw, 1.05rem);
}

.modal-close {
  width: 62px;
  height: 62px;
  top: 18px;
  right: 18px;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 220ms ease 120ms,
    transform 280ms ease 120ms,
    background 160ms ease,
    border-color 160ms ease;
}

.modal.is-open .modal-close {
  opacity: 1;
  transform: translateY(0);
  animation: modalCloseIntro 320ms ease 190ms both;
}

@media (max-width: 900px) {
  .map-stage {
  width: min(75vw, 1440px);
  
}
  .theme-map .page-shell,
  .theme-admin .admin-shell {
    padding: 20px 16px 68px;
    margin: 0;
    overflow: hidden;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    flex-direction: column;
    align-items: start;
  }

  .map-stage {
    width: 100%;
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "title"
      "copy"
      "map";
    align-content: start;
    row-gap: 14px;
    column-gap: 0;
    padding-top: 40px;
  }

  .map-title-wrap {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin: 0 0 8px;
  }

  .map-title {
    font-size: clamp(3rem, 18vw, 4.8rem);
    line-height: 0.88;
  }

  .map-title__line:last-child {
    margin-left: 0.65em;
  }

  .map-title-car {
            width: min(58vw, 220px);
        margin-top: -30px;
        margin-left: 112px;
  }

  .map-copy {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
    background: transparent;
  }

  .map-copy__body {
    font-size: 1rem;
    line-height: 1.18;
  }

  .map-wrap {
    grid-area: map;
    margin: 0;
    min-height: min(40vh, 860px);
        width: 100%;
  }

  .france-map {
    width: min(100%, 820px);
    max-height: 70vh;
    transform:
      translate(var(--responsive-map-pan-x), var(--responsive-map-pan-y))
      scale(var(--responsive-map-zoom));
    transform-origin: center center;
    touch-action: none;
  }

  .map-zoom-controls {
    position: absolute;
            right: 0px;
        bottom: -60px;
    z-index: 6;
    display: grid;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(5, 26, 24, 0.72);
    /*box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);*/
  }

  .modal {
    place-items: start center;
    padding: 18px 12px 26px;
  }

  .modal-card {
    grid-template-columns: 1fr;
    gap: 16px;
    width: min(100%, 720px);
    max-height: calc(100dvh - 44px);
    padding: 58px 16px 24px;
    border-radius: 22px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .modal-media {
    max-height: 28vh;
    border-radius: 22px;
  }

  .modal-content {
    max-width: none;
    padding-right: 0;
  }

  .modal-date-line,
  p.size-date {
    font-size: clamp(1.05rem, 6vw, 1.45rem);
    line-height: 0.96;
  }

  .modal-heading {
    font-size: clamp(1.8rem, 10vw, 2.4rem);
    margin-bottom: 10px;
  }

  .modal-description {
    max-width: none;
    font-size: 0.92rem;
    line-height: 1.36;
    margin-bottom: 16px;
  }

  .modal-cta {
    width: 100%;
    min-width: 0;
    font-size: 0.95rem;
    padding: 12px 18px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 52px;
    height: 52px;
  }

  .modal-close__bar {
    width: 20px;
  }

  .map-footer {
    width: 100%;
    margin-top: 18px;
  }

  .map-footer__inner {
    justify-content: center;
    padding: 16px;
    border-radius: 22px;
  }

  .map-footer__logos {
    gap: 34px;
    width: 100%;
    justify-content: center;
  }

  .map-footer__logo {
    /*height: 38px;*/
    max-width: 100%;
  }

  .map-footer__logo--nova {
    height: 36px;
  }
}



/* 1. La section */
section.map-stage {
  position: relative;
}

/* 2. Désactiver les overlays qui bloquent */
section.map-stage::before,
section.map-stage::after,
section.map-stage .background,
section.map-stage .overlay,
section.map-stage .wpb_single_image,
section.map-stage img {
  pointer-events: none;
}

/* 3. Réactiver les éléments cliquables */
section.map-stage a,
section.map-stage button,
section.map-stage .tt_button,
section.map-stage .wp-block-button__link {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.cta-carte{margin-right:20px;}

.nova-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100vw;
  min-height: 122px;
  padding: 10px 34px 14px;
  color: #fff;
  background: #0a0a0d;
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  font-family: "FranklinGothicHeavy", Arial, sans-serif;
}

.nova-header::after {
  content: "";
  position: absolute;
  top: 0;
  right: -24px;
  bottom: 0;
  width: 24px;
  background: #0a0a0d;
}

body.theme-map {
  overflow-x: hidden;
  padding-top: 122px;
}

.nova-header__brand-row {
  position: relative;
  min-height: 62px;
  display: grid;
  place-items: center;
}

.nova-header__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 126px;
  line-height: 0;
}

.nova-header__brand img {
  display: block;
  width: 100%;
  height: auto;
  filter: invert(1);
}

.nova-header__nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 6px;
}

.nova-header__nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nova-header__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nova-header a {
  color: #fff;
  text-decoration: none;
}

.nova-header__nav a {
  font-size: clamp(1.05rem, 1.55vw, 1.45rem);
  line-height: 1;
  white-space: nowrap;
  text-shadow: 2px 2px 0 rgba(111, 183, 242, 0.42);
}

.nova-header__nav a:hover,
.nova-header__nav a:focus-visible {
  color: #b2b3ff;
}

.nova-header__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 4px 15px 5px;
  border-radius: 999px;
  background: #9fa2ff;
  color: #050508;
  font-size: clamp(1rem, 1.45vw, 1.35rem);
  line-height: 1;
  white-space: nowrap;
}

.nova-header__actions a:hover,
.nova-header__actions a:focus-visible {
  background: #fff;
}

@media (max-width: 1060px) {
  .nova-header {
    padding-inline: 22px;
  }

  .nova-header__nav-row {
    gap: 18px;
  }

  .nova-header__nav {
    gap: 14px;
  }

  .nova-header__actions {
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .nova-header {
    min-height: 116px;
    overflow: hidden;
  }

  body.theme-map {
    padding-top: 116px;
  }

  .nova-header__brand {
    width: 112px;
  }

  .nova-header__nav-row {
    justify-content: flex-start;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nova-header__nav-row::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 640px) {
  .nova-header {
    min-height: 108px;
    padding: 8px 16px 12px;
  }

  body.theme-map {
    padding-top: 108px;
  }

  .nova-header__brand-row {
    min-height: 54px;
  }

  .nova-header__brand {
    width: 96px;
  }

  .nova-header__nav a,
  .nova-header__actions a {
    font-size: 1rem;
  }

.nova-header__actions a {
    min-height: 27px;
    padding-inline: 12px;
  }
}

.partner-header {
  position: sticky;
  top: 122px;
  z-index: 25;
  height: 0;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.partner-header__inner {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding: 72px 48px 0;
}

.partner-header__logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.partner-header .map-footer__logo--enercoop {
  height: 58px;
  width: auto;
  max-width: min(220px, 42vw);
  object-fit: contain;
  opacity: 0.96;
  pointer-events: auto;
}

@media (max-width: 900px) {
  .partner-header {
    top: 116px;
  }

  .partner-header__inner {
    padding: 54px 22px 0;
  }

  .partner-header .map-footer__logo--enercoop {
    height: 42px;
    max-width: 38vw;
  }
}

@media (max-width: 640px) {
  .partner-header {
    top: 108px;
  }

  .partner-header__inner {
    padding: 44px 14px 0;
  }

  .partner-header .map-footer__logo--enercoop {
    height: 34px;
    max-width: 44vw;
  }
}
