/* contact : ex-bloc <style> de page-contact-blueprint-light.php, source de vérité depuis le 09/09/2026 (plan poids-html-blueprint-light, lot 2). Tokens : var(--color-*) uniquement. */
/* ═══════════════════════════════════════════════════════════════════
   STYLES SPECIFIQUES - PAGE CONTACT
   ═══════════════════════════════════════════════════════════════════ */

.contact-blueprint-light {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.contact-blueprint-light *,
.contact-blueprint-light *::before,
.contact-blueprint-light *::after {
  box-sizing: border-box;
}

/* ═══ HERO COMPACT ═══ */

.contact-hero {
  background: var(--color-bleu);
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 40px 80px;
  position: relative;
}

.contact-hero__content {
  max-width: 700px;
}

.contact-hero__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.contact-hero__eyebrow::before,
.contact-hero__eyebrow::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--color-orange);
}

.contact-hero__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--font-light);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-white);
  margin: 0 0 20px;
}

.contact-hero__cafe-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.22em;
  margin: 0 0.22em; /* respiration autour de l'icône café (TP 14/07) */
  color: var(--color-white);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.contact-hero__cafe-link:hover,
.contact-hero__cafe-link:focus-visible {
  /* Beige plutôt qu'orange + léger agrandissement (TP 14/07). */
  color: var(--color-beige);
  transform: scale(1.18);
}

@media (prefers-reduced-motion: reduce) {
  .contact-hero__cafe-link { transition: color 0.2s ease; }
  .contact-hero__cafe-link:hover,
  .contact-hero__cafe-link:focus-visible { transform: none; }
}

.contact-hero__cafe-link:focus-visible {
  outline: 2px solid var(--color-mint);
  outline-offset: 3px;
  border-radius: 4px;
}

.contact-hero__cafe-icon { display: block; }

.contact-hero__subtitle {
  font-size: var(--text-lg);
  font-weight: var(--font-normal);
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* ═══ SECTION FORMULAIRE + INFOS ═══ */

.contact-main {
  padding: clamp(60px, 8vh, 100px) clamp(24px, 5vw, 80px);
  background: var(--color-white);
}

.contact-main__container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

/* ═══ FORMULAIRE CF7 ═══ */

.contact-form__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--color-bleu);
  margin: 0 0 12px;
}

.contact-form__intro {
  font-size: var(--text-base);
  color: var(--color-gray-600);
  margin: 0 0 28px;
  line-height: 1.7;
}

/* Override CF7 defaults */
.contact-form .wpcf7 {
  font-family: var(--font-body);
}


.contact-form .wpcf7-form-control-wrap {
  display: block;
  margin-bottom: 16px;
}

/* Réduire les marges CF7 <p> */
.contact-form .wpcf7-form p {
  margin: 0 0 4px;
}

.contact-form .wpcf7 label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-bleu);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.contact-form .wpcf7 input[type="text"],
.contact-form .wpcf7 input[type="email"],
.contact-form .wpcf7 input[type="tel"],
.contact-form .wpcf7 textarea,
.contact-form .wpcf7 select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}

.contact-form .wpcf7 input:focus,
.contact-form .wpcf7 textarea:focus,
.contact-form .wpcf7 select:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(242, 126, 51, 0.1);
}

.contact-form .wpcf7 textarea {
  min-height: 110px;
  resize: vertical;
}

.contact-form .wpcf7 select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ═══ CUSTOM FILE UPLOAD ═══ */

.contact-file-upload {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1.5px dashed var(--color-gray-200);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
  margin-bottom: 16px;
}

.contact-file-upload:hover {
  border-color: var(--color-orange);
  background: rgba(242, 126, 51, 0.03);
}

.contact-file-upload__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(13, 40, 87, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.contact-file-upload:hover .contact-file-upload__icon {
  background: rgba(242, 126, 51, 0.1);
}

.contact-file-upload__icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-bleu);
  fill: none;
  stroke-width: 1.5;
  transition: stroke 0.3s ease;
}

.contact-file-upload:hover .contact-file-upload__icon svg {
  stroke: var(--color-orange);
}

.contact-file-upload__text {
  flex: 1;
  min-width: 0;
}

.contact-file-upload__label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-bleu);
  margin-bottom: 2px;
}

.contact-file-upload__status {
  font-size: var(--text-xs);
  color: var(--color-gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-file-upload__status.has-file {
  color: var(--color-orange);
  font-weight: var(--font-medium);
}

.contact-file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

/* ═══ SUBMIT BUTTON (AWWWARDS) ═══ */

.contact-form .wpcf7 button.wpcf7-submit,
.contact-form .wpcf7 input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 32px;
  background: var(--color-orange);
  color: var(--color-white);
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-form .wpcf7 button.wpcf7-submit .overflow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.contact-form .wpcf7 button.wpcf7-submit svg {
  width: 16px;
  height: 14px;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-form .wpcf7 button.wpcf7-submit:hover,
.contact-form .wpcf7 input[type="submit"]:hover {
  background: var(--color-orange-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(242, 126, 51, 0.35),
              0 3px 10px rgba(242, 126, 51, 0.2);
}

.contact-form .wpcf7 button.wpcf7-submit:hover svg {
  transform: translateX(4px);
}

.contact-form .wpcf7 button.wpcf7-submit:active,
.contact-form .wpcf7 input[type="submit"]:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(242, 126, 51, 0.25);
}

.contact-form .wpcf7 button.wpcf7-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.contact-form .wpcf7 button.wpcf7-submit:hover::before {
  opacity: 1;
}

/* CF7 validation messages */
.contact-form .wpcf7-not-valid-tip {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: 6px;
}

.contact-form .wpcf7-response-output {
  padding: 16px 20px;
  border-radius: 8px;
  font-size: var(--text-sm);
  margin-top: 24px;
}

.contact-form .wpcf7-mail-sent-ok {
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-light);
  color: var(--color-success);
}

.contact-form .wpcf7-validation-errors,
.contact-form .wpcf7-acceptance-missing {
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-light);
  color: var(--color-error);
}

/* ═══ COORDONNEES ═══ */

/* Coordonnées agence — refonte sobre (TP 14/07) : filet orange signature sur
   fond beige, icônes inline discrètes, labels en sr-only (les icônes portent
   le sens, l'accessibilité garde le texte). */
.contact-info {
  margin-top: 26px;
  padding: 22px 26px;
  border-left: 3px solid var(--color-orange);
  background: var(--color-beige);
}

.contact-info__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--color-bleu);
  margin: 0 0 14px;
}

.contact-info__item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.contact-info__item:last-child { margin-bottom: 0; }

.contact-info__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.contact-info__icon svg {
  width: 17px;
  height: 17px;
  stroke: var(--color-orange);
  fill: none;
  stroke-width: 1.7;
}

.contact-info__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-info__value {
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.5;
}

.contact-info__value a {
  color: var(--color-bleu);
  text-decoration: none;
  transition: color 0.2s ease;
}

#contact-agency-phone .contact-info__value a { font-weight: var(--font-semibold); }

.contact-info__value a:hover {
  color: var(--color-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-info__divider { display: none; }

/* ═══ TOGGLE PAYS ═══ */

.contact-country-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--color-gray-50, #fafafa);
  border-radius: 50px;
  margin-bottom: 24px;
}

.contact-country-toggle__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 50px;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-gray-600);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.contact-country-toggle__btn[aria-selected="true"] {
  background: var(--color-bleu);
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(13, 40, 87, 0.25);
}

.contact-country-toggle__btn:hover:not([aria-selected="true"]) {
  background: var(--color-gray-200, #e0e0e0);
}

.contact-country-toggle__flag {
  font-size: 1.1em;
  line-height: 1;
}

/* ═══ PANNEAU CARTE (SIDEBAR) ═══ */

.contact-map-panel {
  border-radius: 12px;
  background: transparent;
  overflow: hidden;
  margin-bottom: 28px;
}

.contact-map-panel .tooltip-cta {
  display: none;
}

.contact-map-panel .kytom-map {
  margin: 0 auto;
  text-align: center;
}

.contact-map-panel .kytom-map svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* Zoom & recenter maps to fill the panel */
.contact-map-panel .kytom-map-france svg {
  transform: scale(1.08) translate(-3%, 0);
  transform-origin: center center;
}

/* Carte unifiée FR + ES : decalage vers la droite et bas pour cadrer le panel sidebar */
.contact-map-panel--unified .kytom-map-france svg {
  transform: scale(0.95) translate(10%, 6%);
  transform-origin: center center;
}

/* Carte Espagne : viewBox recadré via JS (RECADRAGE CARTE ESPAGNE) pour centrer sur le continent. */

/* Highlight agence cliquee sur la carte (zone [data-agency] ou pole) */
.contact-map-panel .is-form-selected {
  filter: brightness(1.25) saturate(1.25);
  transition: filter 0.3s ease;
}

/* ═══ AGENCY INFO FADE-IN ═══ */

#contact-agency-info {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#contact-agency-info.is-visible {
  opacity: 1;
}

/* ═══ DATA-COUNTRY TOGGLE ═══ */

[data-country][hidden] {
  display: none !important;
}

/* ═══ REGION FIELD FLASH ═══ */

@keyframes fieldFlash {
  0% { box-shadow: 0 0 0 3px rgba(242, 126, 51, 0.4); }
  100% { box-shadow: 0 0 0 3px rgba(242, 126, 51, 0); }
}

.contact-form .wpcf7 select.is-flashing,
.contact-form .wpcf7 input.is-flashing {
  animation: fieldFlash 0.8s ease-out;
  border-color: var(--color-orange);
}

@media (prefers-reduced-motion: reduce) {
  .contact-form .wpcf7 select.is-flashing,
  .contact-form .wpcf7 input.is-flashing { animation: none; }
}

/* Autocomplétion société (P1 enrichissement) : listbox sous le champ. */
.kysuggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--color-white);
  border: 1px solid var(--color-gray-medium);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  max-height: 260px;
  overflow-y: auto;
}
.kysuggest li {
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.kysuggest li strong { color: var(--color-bleu); font-weight: var(--font-semibold); }
.kysuggest li span { color: var(--color-gray-text); font-size: 12px; margin-left: 6px; }
.kysuggest li:hover,
.kysuggest li[aria-selected="true"] { background: var(--color-beige); }

/* Ligne RGPD sous le formulaire : lien « mentions légales » aux couleurs du
   thème (le bleu navigateur par défaut jurait — TP 14/07). */
.contact-form .cf7-rgpd { color: var(--color-gray-text); }
.contact-form .cf7-rgpd a {
  color: var(--color-bleu);
  font-weight: var(--font-medium);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}
.contact-form .cf7-rgpd a:hover,
.contact-form .cf7-rgpd a:focus-visible {
  color: var(--color-orange);
}
.contact-form .cf7-rgpd a:focus-visible {
  outline: 3px solid var(--color-mint);
  outline-offset: 2px;
}

/* Label « Votre message » : redondant avec le placeholder du textarea —
   sr-only, l'accessibilité conserve le texte (TP 14/07). */
.contact-form .message label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══ SIDEBAR ═══ */

.contact-sidebar {
  position: sticky;
  top: 120px;
}

/* ═══ RESPONSIVE ═══ */

@media (max-width: 1024px) {
  .contact-main__container {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .contact-sidebar {
    position: static;
  }

  .contact-info {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .contact-info__title {
    grid-column: 1 / -1;
  }

  .contact-info__divider {
    display: none;
  }
}

@media (max-width: 640px) {
  .contact-hero {
    min-height: 35vh;
    padding: 120px 24px 60px;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }

  .contact-country-toggle {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-form .wpcf7 button.wpcf7-submit:hover,
  .contact-form .wpcf7 input[type="submit"]:hover {
    transform: none;
    box-shadow: none;
  }

  .contact-form .wpcf7 button.wpcf7-submit svg {
    transition: none;
  }
}
