* {
  box-sizing: border-box;
}

svg {
  width: 100%;
  height: auto;
}
body {
  font-family: 'Comfortaa', sans-serif;
  font-weight: bold;
  color: var(--text-dark);
  min-height: 100vh;
  height: 100%;
  overflow: hidden;
}


text,
.point,
g,
circle {
  pointer-events: none;
}

#zone-arriere-pays {
  fill: #b9b9b9;
}

#contour-zone-arriere-pays {
  fill: #b9b9b9;
  stroke-width: 0.002;
  cursor: pointer;
  transition: fill 0.2s ease;
}



path {
  transition: fill 0.3s ease;
}


g[id^="zone"] polygon,
g[id^="zone"] path {
  fill: #b9b9b9;
}


#qualimerlogo {
  display: block;
  margin: 1.5rem auto 0;
}

.styleTextAccueil {
  text-align: center;
  padding: 1rem 1.5rem 0.5rem;
  font-size: clamp(0.8rem, 2vw, 1rem);
}

.container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  align-items: start;
  gap: 1rem;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  
}


.zones-list {
  width: 100%;
  margin-top: 1rem;
}

.zones-list a {
  display: block;
  background: rgba(200, 220, 235, 0.6);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.625rem;
  text-decoration: none;
  color: #003b5c;
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  transition: all 0.2s ease;
}

.zones-list a { --tx: 0rem; transform: translateX(var(--tx)); }
.zones-list a:nth-child(1) { --tx: 5rem; }
.zones-list a:nth-child(2) { --tx: 4rem; }
.zones-list a:nth-child(3) { --tx: 3rem; }
.zones-list a:nth-child(4) { --tx: 2rem; }
.zones-list a:nth-child(5) { --tx: 1rem; }
.zones-list a:nth-child(6) { --tx: 0rem; }

.zones-list a:hover,
.zones-list a.hovered {
  background: rgba(180, 210, 230, 0.9);
  transform: translateX(calc(var(--tx) + 0.3125rem));
}

polygon:hover,
path:hover,
path.hovered {
  fill: #cca219;
}
.carte {
  width: 100%;
  margin-left: 4rem;
  margin-top: -1rem;
  overflow: visible;
}

.carte svg {
  width: 100%;
  height: auto;
  display: grid;
  overflow: visible;
}

.styleMentionLegale {
  margin-top: -1rem;
  padding: 0.5rem 1.5rem 1.5rem;
}

.styleMentionLegale a {
  display: inline-block;
  background: rgba(200, 220, 235, 0.6);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #003b5c;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.styleMentionLegale a:hover {
  background: rgba(180, 210, 230, 0.9);
  transform: translateX(0.3125rem);
}

.styleAccesCommunes {
  margin-top: -8rem;
  padding: 0.5rem 1.5rem 1.5rem;
}

.styleAccesCommunes a {
  display: inline-block;
  background: rgba(200, 220, 235, 0.6);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #003b5c;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.styleAccesCommunes a:hover {
  background: rgba(180, 210, 230, 0.9);
  transform: translateX(0.3125rem);
}

/* ── Tablette (≤ 900px) ── */

@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  body{
    height: auto;
    overflow: visible;
    background-image: none;
  }

  .carte     { order: 1; margin-top: -12rem;}
  .zones-list { order: 2; }

  .zones-list a:nth-child(1) { transform: translateX(0rem); }
  .zones-list a:nth-child(2) { transform: translateX(0rem); }
  .zones-list a:nth-child(3) { transform: translateX(0rem); }
  .zones-list a:nth-child(4) { transform: translateX(0rem); }
  .zones-list a:nth-child(5) { transform: translateX(0rem); }
  
  #qualimerlogo {
  display: block;
  width: min(80%, 400px);
  margin: 1.5rem auto 0;
  }

  .carte {
  width: 100%;
  margin-left: 0rem;
  margin-top: 0rem;
  overflow: hidden;

  }

  .styleAccesCommunes {
  margin-top: 0rem;
  }
}



/* ── Mobile (≤ 480px) ── */

@media (max-width: 480px) {
  .carte     { order: 1; margin-top: -7rem;}
  .zones-list a {
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
  }
  .carte {
  width: 100%;
  margin-left: 0rem;
  margin-top: 0rem;
  overflow: hidden;
  }
  .styleTextAccueil {
    font-size: 0.85rem;
    padding: 0.75rem 1rem 0;
  }

  .styleAccesCommunes {
  margin-top: 0rem;
  }
  body{
    height: auto;
    overflow: visible;
    background-image: none;
  }
}