/*
 * contact.css
 * Bundle conditionnel — chargé uniquement sur template-contact.php
 * Extrait de main.css le 13 mai 2026 (audit perf)
 */

/* ===== PAGE CONTACT ===== */

/* Bannière contact — split gauche teal / droite photo */
.contact-banner {
  display: flex;
  min-height: 300px;
  overflow: hidden;
  position: relative;
}
.contact-banner-left {
  background: linear-gradient(135deg, #014f5a 0%, #027B8E 55%, #03a0b8 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 5rem 3rem 2rem;
  position: relative;
  z-index: 2;
  color: #fff;
  flex: 0 0 55%;
  clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
}
.contact-banner-left h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 .6rem;
}
.contact-banner-left .breadcrumb { margin: 0; }
.contact-banner-left .breadcrumb a,
.contact-banner-left .breadcrumb span { color: rgba(255,255,255,.75); }
.contact-banner-right {
  background-size: 115% auto;
  background-position: 3% 35%;
  background-repeat: no-repeat;
  position: absolute;
  top: 0; right: 0;
  width: 55%;
  height: 100%;
  z-index: 1;
}
.contact-banner-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(1,79,90,.45) 0%, transparent 40%);
}
@media (max-width: 768px) {
  .contact-banner { flex-direction: column; min-height: auto; }
  .contact-banner-left { flex: none; clip-path: none; padding: 2.5rem 1.5rem; }
  .contact-banner-right { position: relative; width: 100%; height: 200px; }
}

/* Bloc formulaire */
.contact-form-block {
  background: var(--gray-light);
  padding: 4rem 2rem;
}
.contact-form-wrap {
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(2,123,142,.08);
  overflow: hidden;
}
.contact-form-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 2.5rem 1.75rem;
  border-bottom: 1px solid var(--gray-mid);
}
.contact-form-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #014f5a 0%, #027B8E 100%);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.contact-form-icon svg {
  width: 24px; height: 24px;
  stroke: #fff; stroke-width: 1.5;
}
.contact-form-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--teal);
  margin: 0 0 .3rem;
}
.contact-form-header p {
  font-size: .88rem;
  color: var(--gray-text);
  margin: 0;
}
.contact-cf7-wrap {
  padding: 2rem 2.5rem 2.5rem;
}

/* Styles CF7 dans ce contexte */
.contact-cf7-wrap .wpcf7-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.75rem;
}
.contact-cf7-wrap .wpcf7-form p {
  margin-bottom: 1.1rem;
}
/* Champs pleine largeur */
.contact-cf7-wrap .wpcf7-form p:has(textarea),
.contact-cf7-wrap .wpcf7-form p:has(select),
.contact-cf7-wrap .wpcf7-form p:has(input[type="submit"]),
.contact-cf7-wrap .wpcf7-form p:has(.wpcf7-acceptance),
.contact-cf7-wrap .wpcf7-form .wpcf7-response-output {
  grid-column: 1 / -1;
}
.contact-cf7-wrap .wpcf7-form label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: .35rem;
}
.contact-cf7-wrap input[type="text"],
.contact-cf7-wrap input[type="email"],
.contact-cf7-wrap input[type="tel"],
.contact-cf7-wrap textarea {
  width: 100%;
  border: 1.5px solid #d8e2e8;
  border-radius: 10px;
  padding: .7rem 1rem;
  font-family: inherit;
  font-size: .92rem;
  color: #1a1a1a;
  background: #f8fafb;
  transition: border-color .2s, box-shadow .2s, background .2s;
  box-sizing: border-box;
}
.contact-cf7-wrap input[type="text"]:focus,
.contact-cf7-wrap input[type="email"]:focus,
.contact-cf7-wrap input[type="tel"]:focus,
.contact-cf7-wrap textarea:focus {
  outline: none;
  border-color: var(--color-primary, #027B8E);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(2,123,142,.1);
}
/* Select moderne — suppression du style natif */
.contact-cf7-wrap select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid #d8e2e8;
  border-radius: 10px;
  padding: .7rem 2.75rem .7rem 1rem;
  font-family: inherit;
  font-size: .92rem;
  color: #1a1a1a;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23027B8E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 0.9rem center / 16px,
    #f8fafb;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.contact-cf7-wrap select:focus {
  outline: none;
  border-color: var(--color-primary, #027B8E);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(2,123,142,.1);
}
.contact-cf7-wrap textarea { resize: vertical; min-height: 130px; }
.contact-cf7-wrap input[type="submit"] {
  background: var(--color-primary, #027B8E);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .85rem 2.5rem;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .15s;
  margin-top: .25rem;
}
.contact-cf7-wrap input[type="submit"]:hover {
  background: #016070;
  transform: translateY(-1px);
}

/* Bande infos horizontale */
.contact-info-strip {
  background: linear-gradient(135deg, #014f5a 0%, #027B8E 60%, #03a0b8 100%);
  padding: 3rem 2rem;
}
.contact-info-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.contact-info-block {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0 2rem;
  border-left: 1px solid rgba(255,255,255,0.15);
}
.contact-info-block:first-child { border-left: none; padding-left: 0; }
.contact-info-block:last-child { padding-right: 0; }
.cib-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.cib-icon svg {
  width: 20px; height: 20px;
  stroke: #fff; stroke-width: 1.8;
}
.cib-content h3 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.55);
  margin: 0 0 .5rem;
}
.cib-content p {
  font-size: .85rem;
  color: rgba(255,255,255,.88);
  line-height: 1.65;
  margin: 0;
}
.cib-phone {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .2rem;
}
.cib-phone:hover { text-decoration: underline; }

/* Photo mairie — à droite du texte d'adresse */
.cib-adresse-row {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin-top: .2rem;
}
.cib-adresse-row p { margin: 0; flex-shrink: 0; }
.cib-mairie-photo {
  width: 90px;
  height: 72px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 6px;
  opacity: 0.88;
  border: 1.5px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}

/* Responsive contact */
@media (max-width: 900px) {
  .contact-info-inner { grid-template-columns: repeat(2, 1fr); gap: 2rem 0; }
  .contact-info-block:nth-child(3) { border-left: none; padding-left: 0; }
  .contact-info-block:nth-child(odd) { padding-left: 0; }
}
@media (max-width: 700px) {
  .contact-cf7-wrap .wpcf7-form { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .contact-form-header { flex-direction: column; align-items: flex-start; padding: 1.5rem; }
  .contact-cf7-wrap { padding: 1.5rem; }
  .contact-info-inner { grid-template-columns: 1fr; gap: 1.75rem 0; }
  .contact-info-block { border-left: none; padding: 0; }
  .contact-info-block:not(:first-child) {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 1.75rem;
  }
}

