/* Contact — v2
   Mise en page en deux colonnes : introduction à gauche, formulaire à droite. */

.site-header.home-header { background: #fff !important; }

.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-dropdown-toggle {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 0 9px; border: 0; background: transparent;
  color: #1e2a37; font: inherit; cursor: pointer;
}
.nav-dropdown-toggle::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 0; height: 2px;
  background: var(--home-green); transform: translateX(-50%); transition: width 180ms ease;
}
.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown:focus-within .nav-dropdown-toggle::after { width: 100%; }
.nav-dropdown-menu {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 50%;
  min-width: 245px; padding: 9px 0; border: 1px solid var(--home-line);
  border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(23,55,95,.10);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.home-header .nav-dropdown-menu a {
  display: block; padding: 10px 18px; color: var(--home-text); white-space: nowrap;
}
.home-header .nav-dropdown-menu a::after { display: none; }
.home-header .nav-dropdown-menu a:hover,
.home-header .nav-dropdown-menu a:focus-visible { background: var(--home-hero-blue); color: var(--home-navy); }

.contact-page {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.22fr);
  gap: clamp(54px, 7vw, 104px);
  align-items: start;
  width: min(100%, 1280px);
  margin: 0 auto;
  background: var(--home-paper);
  padding: clamp(62px, 7vw, 94px) clamp(24px, 6vw, 92px) clamp(86px, 8vw, 118px);
}

.contact-intro {
  position: sticky;
  top: 105px;
  width: 100%;
  margin: 0;
  padding-top: 18px;
  text-align: left;
}

.contact-kicker {
  margin: 0 0 14px;
  color: var(--home-green-dark);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.contact-intro h1 {
  max-width: 520px;
  margin: 0;
  color: var(--home-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 4.1vw, 4.5rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.025em;
}

.contact-accent {
  display: block;
  width: 44px;
  height: 2px;
  margin: 21px 0 25px;
  background: var(--home-green);
}

.contact-lead {
  max-width: 500px;
  margin: 0;
  color: var(--home-text);
  font-size: clamp(1.02rem, 1.1vw, 1.12rem);
  line-height: 1.75;
}

.contact-form-section {
  width: 100%;
  margin: 0;
  padding: clamp(32px, 4vw, 48px);
  border: 1px solid var(--home-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(23,55,95,.055);
}

.contact-form-heading {
  margin-bottom: 28px;
}

.contact-form-heading h2 {
  margin: 0;
  color: var(--home-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.4vw, 2.45rem);
  font-weight: 400;
}

.discovery-form {
  display: grid;
  gap: 21px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  color: var(--home-navy);
  font-size: .94rem;
  font-weight: 650;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfd8d8;
  border-radius: 10px;
  background: #fff;
  color: var(--home-text);
  font: inherit;
  line-height: 1.5;
  padding: 12px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 104px;
}

.form-field select {
  min-height: 48px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--home-green);
  box-shadow: 0 0 0 3px rgba(151, 173, 111, .17);
}

.form-field textarea::placeholder {
  color: #899294;
}

/* Le bouton reprend exactement le traitement du CTA standard du site :
   bleu #73a5ba, forme pilule et vert au survol/clic. */
.contact-submit {
  justify-self: start;
  margin-top: 7px;
}

@media (max-width: 980px) {
  .contact-page {
    grid-template-columns: 1fr;
    gap: 42px;
    width: 100%;
  }

  .contact-intro {
    position: static;
    max-width: 760px;
    padding-top: 0;
  }

  .contact-lead {
    max-width: 680px;
  }

  .contact-form-section {
    max-width: 900px;
  }
}

@media (max-width: 760px) {
  .contact-page {
    padding-top: 54px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-section {
    padding: 30px 22px;
    border-radius: 18px;
  }

  .contact-submit {
    width: 100%;
    justify-content: center;
  }
}


/* Menu personnalisé du champ Service / Programme.
   Le survol et la sélection reprennent le bleu pâle du sous-menu Accompagnement. */
.custom-select {
  position: relative;
}

.custom-select-trigger {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid #cfd8d8;
  border-radius: 10px;
  background: #fff;
  color: #899294;
  font: inherit;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.custom-select-trigger.has-value {
  color: var(--home-text);
}

.custom-select-trigger:focus-visible,
.custom-select.is-open .custom-select-trigger {
  outline: none;
  border-color: var(--home-green);
  box-shadow: 0 0 0 3px rgba(151, 173, 111, .17);
}

.custom-select-arrow {
  flex: 0 0 auto;
  color: var(--home-navy);
  font-size: 1rem;
  transition: transform 160ms ease;
}

.custom-select.is-open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  padding: 7px 0;
  border: 1px solid var(--home-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23,55,95,.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.custom-select.is-open .custom-select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-menu [role="option"] {
  display: block;
  width: 100%;
  padding: 11px 15px;
  border: 0;
  background: #fff;
  color: var(--home-text);
  font: inherit;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.custom-select-menu [role="option"]:hover,
.custom-select-menu [role="option"]:focus-visible,
.custom-select-menu [role="option"][aria-selected="true"] {
  outline: none;
  background: var(--home-hero-blue);
  color: var(--home-navy);
}

/* Validation accessible du sélecteur Service / programme */
.form-error {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  color: #8a2f2f;
}
.form-error[hidden] { display: none; }
.custom-select-trigger[aria-invalid="true"] {
  outline: 2px solid #8a2f2f;
  outline-offset: 2px;
}

/* Correction ciblée : sous-menu dans le flux à 390 px. */
@media (max-width: 700px) {
  .main-nav .nav-dropdown { width: 100%; min-width: 0; }
  .main-nav .nav-dropdown-menu {
    position: static; left: 0; right: auto; top: auto;
    width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
    margin: 0; padding: 4px 0 4px 18px;
    transform: none !important;
  }
  .main-nav .nav-dropdown-menu a { white-space: normal; overflow-wrap: anywhere; }
}

/* v5 : garder le point d'interrogation avec « programme » sur petit mobile. */
@media (max-width: 420px) {
  .contact-label-keep { white-space: nowrap; }
}
