/* ========================================
   PAGE CONTACT (/contact)
   Haut de page : styles de la page À propos (a-propos.css, classe about-page sur le body) ;
   fond de section : page Blog (blog-list.css) ; champs, bouton, erreurs : page Témoignages
   (testimonials-page.css, classes tm-*). Ici : boutons du haut de page, coordonnées, pastilles du
   type de projet, menus déroulants, consentement, carte OpenStreetMap.
   Réglages : admin « Page Contact ».
   ======================================== */

/* ---- Haut de page : écrire, appeler ---- */
.ct-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 28px;
}

.ct-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--site-sans);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
}

.ct-hero-link svg {
  width: 19px;
  height: 19px;
  color: var(--site-lime);
}

.ct-hero-link:hover {
  color: var(--site-lime);
}

/* ---- Coordonnées et formulaire ---- */
.ct-section {
  scroll-margin-top: var(--site-header-h, 76px);
}

.ct-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(40px, 5vw, 88px);
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

.ct-info {
  position: sticky;
  top: calc(var(--site-header-h, 76px) + 32px);
}

.ct-info-title,
.ct-form-title,
.ct-map-title {
  margin: 0;
  font-family: var(--site-serif);
  font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  color: #fff;
}

.ct-details {
  display: grid;
  gap: 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.ct-details li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ct-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--site-lime);
  background: rgba(157, 198, 107, 0.1);
  border: 1px solid rgba(157, 198, 107, 0.22);
  border-radius: 50%;
}

.ct-icon svg {
  width: 21px;
  height: 21px;
}

.ct-details li > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-top: 2px;
  font-family: var(--site-sans);
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
  overflow-wrap: anywhere;
}

.ct-details small {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.ct-details a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(157, 198, 107, 0.45);
  text-underline-offset: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.ct-details a:hover {
  color: var(--site-lime);
  text-decoration-color: var(--site-lime);
}

.ct-line {
  display: block;
}

.ct-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 30px 0 0;
  padding: 10px 18px;
  font-family: var(--site-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--site-lime);
  background: rgba(157, 198, 107, 0.08);
  border: 1px solid rgba(157, 198, 107, 0.25);
  border-radius: 999px;
}

.ct-badge svg {
  width: 17px;
  height: 17px;
}

.ct-form-intro {
  margin: 12px 0 26px;
  font-family: var(--site-sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

/* ---- Type de projet : pastilles (radios) ---- */
.ct-types {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.ct-types legend {
  float: none;
  width: auto;
  margin: 0 0 10px;
  padding: 0;
  font-family: var(--site-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
}

.ct-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ct-pills input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ct-pills label {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  cursor: pointer;
  font-family: var(--site-sans);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.ct-pills label:hover {
  border-color: rgba(157, 198, 107, 0.6);
}

.ct-pills input:checked + label {
  color: var(--site-green-deep, #10201a);
  background: var(--site-lime);
  border-color: var(--site-lime);
}

.ct-pills input:focus-visible + label {
  outline: 2px solid var(--site-lime);
  outline-offset: 2px;
}

/* ---- Menus déroulants, comme les champs ---- */
.tm-field .ct-select {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  font-family: var(--site-sans);
  font-size: 15px;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5' fill='none' stroke='%239dc66b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  appearance: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tm-field .ct-select:hover {
  border-color: rgba(157, 198, 107, 0.4);
}

.tm-field .ct-select:focus {
  outline: none;
  border-color: var(--site-lime);
}

/* Liste ouverte : fond sombre lisible (Windows, Android) */
.ct-select option {
  color: #fff;
  background: #172c23;
}

/* ---- Consentement ---- */
.ct-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
}

.ct-consent input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  cursor: pointer;
  accent-color: var(--site-lime);
}

.ct-consent label {
  margin: 0;
  cursor: pointer;
  font-family: var(--site-sans);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}

.ct-consent a {
  color: var(--site-lime);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ct-consent-error {
  display: block;
  margin-left: 32px;
}

.ct-consent-error[hidden] {
  display: none;
}

/* ---- Carte ---- */
.ct-map-section {
  position: relative;
  min-height: clamp(420px, 52vw, 560px);
  background: #142820;
  isolation: isolate;
}

.ct-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #142820;
}

/* Sans script (ou avant chargement) : lien vers la carte */
.ct-map-fallback {
  position: absolute;
  top: 50%;
  right: 8%;
  transform: translateY(-50%);
  font-family: var(--site-sans);
  font-size: 14px;
  color: var(--site-lime);
}

.ct-map.is-ready .ct-map-fallback {
  display: none;
}

/* Tuiles OpenStreetMap en mode sombre, teintées vert par le filtre #ct-tint (contact.ejs) :
   seules les tuiles changent, le repère garde ses couleurs */
.ct-map .leaflet-tile-pane {
  filter: grayscale(1) invert(1) contrast(1.3) brightness(0.95) url(#ct-tint);
}

.ct-map .leaflet-container,
.ct-map.leaflet-container {
  font-family: var(--site-sans);
  background: #142820;
}

.ct-map .leaflet-control-zoom a {
  color: #fff;
  background: rgba(16, 32, 26, 0.92);
  border-color: rgba(157, 198, 107, 0.3);
}

.ct-map .leaflet-control-zoom a:hover {
  color: var(--site-green-deep, #10201a);
  background: var(--site-lime);
}

.ct-map .leaflet-control-attribution {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(16, 32, 26, 0.8);
}

.ct-map .leaflet-control-attribution a {
  color: var(--site-lime);
}

/* Repère : point vert entouré d'une onde (zone, sans adresse précise) */
.ct-marker {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
}

.ct-marker::before,
.ct-marker::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.ct-marker::before {
  background: var(--site-lime);
  border: 4px solid #10201a;
  box-shadow: 0 0 0 2px var(--site-lime), 0 0 28px 8px rgba(157, 198, 107, 0.55);
}

.ct-marker::after {
  background: rgba(157, 198, 107, 0.35);
  animation: ct-pulse 2.6s ease-out infinite;
}

@keyframes ct-pulse {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(4.5); opacity: 0; }
}

/* Carte d'information posée sur la carte, à gauche */
.ct-map-card {
  position: absolute;
  top: 50%;
  left: max(clamp(20px, 4vw, 56px), calc((100% - 1440px) / 2 + 56px));
  z-index: 500;
  width: min(420px, calc(100% - 40px));
  padding: clamp(28px, 3vw, 40px);
  background: rgba(16, 32, 26, 0.92);
  border: 1px solid rgba(157, 198, 107, 0.2);
  border-radius: 22px;
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.9);
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
}

.ct-map-title {
  font-size: clamp(26px, 2.2vw, 34px);
}

.ct-map-note {
  margin: 14px 0 0;
  font-family: var(--site-sans);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.ct-map-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 24px;
}

.ct-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  font-family: var(--site-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--site-green-deep, #10201a);
  background: var(--site-lime);
  border-radius: 999px;
  transition: background-color 0.3s ease;
}

.ct-map-btn svg {
  width: 16px;
  height: 16px;
}

.ct-map-btn:hover {
  color: var(--site-green-deep, #10201a);
  background: #b5d68c;
}

.ct-map-link {
  font-family: var(--site-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.ct-map-link:hover {
  color: var(--site-lime);
}

.ct-hero-link:focus-visible,
.ct-details a:focus-visible,
.ct-map-btn:focus-visible,
.ct-map-link:focus-visible,
.ct-consent a:focus-visible {
  outline: 2px solid var(--site-lime);
  outline-offset: 3px;
}

/* ========================================
   TABLETTE ET MOBILE
   ======================================== */
@media (max-width: 1199px) {
  .ct-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .ct-info {
    position: static;
  }

  .ct-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Carte au-dessus, carte d'information en dessous */
  .ct-map-section {
    min-height: 0;
  }

  .ct-map {
    position: relative;
    height: 420px;
  }

  .ct-map-card {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    margin: -60px clamp(20px, 4vw, 56px) 0;
    transform: none;
  }

  .ct-map-section {
    padding-bottom: clamp(56px, 7vw, 80px);
  }
}

@media (max-width: 575px) {
  .ct-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .ct-icon {
    width: 42px;
    height: 42px;
  }

  .ct-pills label {
    height: 38px;
    padding: 0 14px;
    font-size: 13.5px;
  }

  /* 16 px : pas de zoom automatique de la page sur iPhone en touchant un menu */
  .tm-field .ct-select {
    font-size: 16px;
  }

  .ct-map {
    height: 340px;
  }

  .ct-map-card {
    margin: -48px 16px 0;
    padding: 26px 22px;
  }

  .ct-form-title,
  .ct-info-title {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-marker::after {
    animation: none;
  }
}
