/* =========================================================
   PAGE CONTACT
   ========================================================= */

.contact-page {
  display: flex;
  flex-direction: column;
}

.contact-wall {
  flex: 1;
  padding: 32px 0 40px;
}

/* =========================================================
   VARIABLES LOCALES
   ========================================================= */

.contact-page {
  --contact-text-size: clamp(0.88rem, 2.8vw, 0.96rem);
  --contact-panel-padding: 18px;
  --contact-tile-gap: 16px;
  --contact-border: 1px solid rgb(var(--color-grid));
}

/* =========================================================
   UTILITIES
   ========================================================= */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
}

/* =========================================================
   BANDEAU CONTACT DIRECT
   ========================================================= */

.contact-topbar {
  position: sticky;
  top: calc(var(--header-height) + 10px);
  z-index: 1000;
  margin-bottom: 50px;
}

.contact-topbar__inner {
  display: grid;
  gap: 14px;
  width: min(100%, 300px);
  margin-left: auto;
  padding: var(--contact-panel-padding);
  border: var(--contact-border);
  background: rgb(var(--color-surface));
  box-shadow: var(--shadow-card);
}

.contact-topbar__eyebrow,
.contact-copy__eyebrow,
.contact-map-tile__eyebrow {
  margin: 0;
  color: rgb(var(--color-brand));
  font-size: var(--contact-eyebrow-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-topbar__list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-topbar__item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
}

.contact-topbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.contact-topbar__icon-svg {
  display: block;
  width: 18px;
  height: 18px;
}

.contact-topbar__value,
.contact-topbar__value a {
  font-size: var(--contact-text-size);
  line-height: 1.5;
}

.contact-topbar__value {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.contact-topbar__value a {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

/* =========================================================
   GRILLE PRINCIPALE
   ========================================================= */

.contact-main {
  display: grid;
  grid-template-columns: minmax(400px, 0.9fr) minmax(0, 1.35fr);
  gap: 28px;
  align-items: stretch;
}

/* =========================================================
   BLOC ENTREPRISE
   ========================================================= */

.contact-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 16px 18px 0;
  overflow: hidden;
  isolation: isolate;
}

.contact-copy > * {
  position: relative;
  z-index: 1;
}

.contact-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(var(--color-grid)) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--color-grid)) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: 0 0;
}

.contact-copy__eyebrow {
  margin-bottom: 18px;
}

.contact-copy__title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.contact-copy__address,
.contact-copy__label {
  font-size: var(--contact-text-size);
  line-height: 1.6;
  color: rgb(var(--color-text));
}

.contact-copy__address {
  margin: 14px 0 0;
}

.contact-copy__list {
  display: grid;
  gap: 0;
  margin: 24px 0 0;
}

.contact-copy__line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-copy__label {
  margin: 0;
  white-space: nowrap;
  font-size: var(--contact-text-size);
  line-height: 1.6;
  color: rgb(var(--color-text));
}

/* =========================================================
   COPY CHIPS
   ========================================================= */

.copy-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: visible;
}

.copy-chip:hover {
  text-decoration: none;
}

.copy-chip--title,
.copy-chip--inline,
.copy-chip--address {
  width: fit-content;
  max-width: 100%;
  font-size: var(--contact-text-size);
}

.copy-chip--title {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: rgb(var(--color-text));
}

.copy-chip--inline {
  display: inline-flex;
  align-items: center;
  white-space: normal;
}

.copy-chip::after {
  content: "⧉ copier";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgb(var(--color-brand) / 0.5);
  color: rgb(230 230 230);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(2px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
  pointer-events: none;
}

html[lang="en"] .copy-chip::after {
  content: "⧉ copy";
}

.copy-chip:hover::after,
.copy-chip:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

html[lang="fr"] .copy-chip[data-copy-state="copied"]::after {
  content: "✓ copié !";
  background: rgb(193 245 205);
  color: rgb(18 120 48);
  opacity: 1;
  transform: translateY(0);
}

html[lang="en"] .copy-chip[data-copy-state="copied"]::after {
  content: "✓ copied!";
  background: rgb(193 245 205);
  color: rgb(18 120 48);
  opacity: 1;
  transform: translateY(0);
}

.copy-chip:focus-visible {
  outline: 2px solid rgb(var(--color-brand));
  outline-offset: 4px;
}

/* =========================================================
   COLONNE DROITE
   ========================================================= */

.contact-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  gap: var(--contact-tile-gap);
  align-self: stretch;
}

.contact-map-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: 1 / -1;
  min-height: 100%;
  overflow: hidden;
  border: var(--contact-border);
  background: rgb(var(--color-bg));
  isolation: isolate;
}

.contact-map-tile__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 0;
}

.contact-map {
  width: calc(100% - 20px);
  min-height: 333px;
  height: 100%;
  margin: 14px 10px 10px;
  border: var(--contact-border);
  overflow: hidden;
  background: rgb(var(--color-bg));
}

.contact-map .leaflet-control-attribution {
  font-size: 0.72rem;
}

.contact-map .leaflet-popup-content-wrapper,
.contact-map .leaflet-popup-tip {
  border-radius: 0;
  box-shadow: var(--shadow-card);
}

.contact-map__marker {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-map__marker-dot {
  display: block;
  width: 18px;
  height: 18px;
  border: 3px solid rgb(255 255 255);
  border-radius: 999px;
  background: rgb(var(--color-brand));
  box-shadow: 0 4px 14px rgb(4 57 217 / 0.28);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
  .contact-topbar {
    position: sticky;
    top: 88px;
  }

  .contact-main {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-copy::before {
    background-size: 60px 60px;
  }

  .contact-map {
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .contact-wall {
    padding: 20px 0 28px;
  }

  .contact-copy {
    padding: 24px 0 24px 20px;
    border-radius: 20px;
  }

  .contact-copy::before {
    background-size: 50px 50px;
  }

  .contact-copy__title {
    max-width: 100%;
  }

  .contact-gallery {
    gap: 10px;
  }

  .contact-map {
    width: calc(100% - 16px);
    min-height: 280px;
    margin: 12px 8px 8px;
  }

  .copy-chip {
    gap: 0;
  }

  .copy-chip::after {
    margin-left: 5px;
  }
}