/* ============================================================
   CONTACT 6 — DEUX COLONNES CALMES
   Page contact sans hero : la section porte le H1 et reserve la hauteur du
   header. A gauche, qui nous sommes et comment nous joindre — le telephone en
   premier et en grand, parce que beaucoup preferent appeler. A droite, le
   formulaire, pose a meme la page ivoire. Un filet fin les separe.

   REGISTRE BIEN-ETRE, aligne sur les heros 11 a 15 :
     * ivoire et sable DERIVES de --secondary (7 % et 24 %), jamais ecrits ;
     * titre en 400, interligne serre, accent ((…)) en italique ;
     * boutons en pilule, transitions a 0.4 s, rayons larges.

   Signature : les deux colonnes entrent avec 120 ms d'ecart, le filet se
   dessine de haut en bas. Etat de repos = etat final : sans animation (ou en
   mouvement reduit), tout est deja la.
   ============================================================ */

.contact-6 {
  --contact-6-ivoire: color-mix(in srgb, var(--secondary) 7%, var(--white));
  --contact-6-sable: color-mix(in srgb, var(--secondary) 24%, var(--white));
  --contact-6-filet: color-mix(in srgb, var(--black) 14%, transparent);
  --contact-6-rayon: clamp(16px, 2vw, 26px);
  /* Rouge d'ERREUR : couleur de sens, pas de charte (§4.1) — un champ
     manquant reste rouge sur tous les sites. Jamais seul : icone et texte. */
  --contact-6-erreur: #9f2f24;

  padding: calc(var(--header-height) + clamp(2.5rem, 5vw, 4.5rem)) 5% clamp(3.5rem, 6vw, 5.5rem);
  background: var(--contact-6-ivoire);
  color: var(--black);
}

.contact-6__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) 1px minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 1320px;
  margin: 0 auto;
}

/* ---- Colonne coordonnees ------------------------------------ */
.contact-6__infos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 1.6vw, 1.35rem);
}

.contact-6__surtitre {
  margin: 0;
  color: var(--gray-dark);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  line-height: 1.4;
  text-transform: uppercase;
}

.contact-6__titre,
.contact-6__titre:hover {
  margin: 0;
  color: var(--black);
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.2vw, 3.6rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.contact-6__titre .mcl-accent {
  color: inherit;
  font-style: italic;
}

.contact-6__intro {
  max-width: 34rem;
  margin: 0;
  color: var(--gray-dark);
  font-family: var(--font-body);
  font-size: clamp(0.975rem, 1.05vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.8;
}

.contact-6__intitule,
.contact-6__intitule:hover {
  margin: clamp(0.75rem, 2vw, 1.5rem) 0 0;
  color: var(--gray-dark);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  line-height: 1.4;
  text-transform: uppercase;
}

.contact-6__coordonnees {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--contact-6-filet);
}

.contact-6__coordonnee {
  display: grid;
  grid-template-columns: minmax(6.5rem, 0.32fr) 1fr;
  align-items: baseline;
  gap: 1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--contact-6-filet);
}

.contact-6__coordonnee-libelle {
  color: var(--gray-dark);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
}

.contact-6__valeur {
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  /* Une adresse longue passe a la ligne, elle ne deborde jamais. */
  overflow-wrap: anywhere;
}

/* Le telephone : immediatement lisible, cliquable, en tete de liste. */
.contact-6__telephone {
  color: var(--black);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s ease, color 0.4s ease;
}

.contact-6__lien {
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  text-decoration: underline;
  text-decoration-color: var(--contact-6-filet);
  text-underline-offset: 4px;
  background: none;
  border: 0;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: text-decoration-color 0.4s ease, color 0.4s ease;
}

.contact-6__telephone:hover,
.contact-6__telephone:focus-visible {
  color: var(--black);
  background-size: 100% 1px;
}

.contact-6__lien:hover,
.contact-6__lien:focus-visible {
  color: var(--black);
  text-decoration-color: currentColor;
}

.contact-6__telephone:focus-visible,
.contact-6__lien:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---- Boutons ------------------------------------------------ */
.contact-6__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 1rem 2.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: inherit;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

.contact-6__btn--envoyer {
  background: var(--primary);
  color: var(--on-primary);
}

.contact-6__btn--envoyer:hover,
.contact-6__btn--envoyer:focus-visible {
  background: var(--secondary);
  color: var(--on-secondary);
}

.contact-6__btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.contact-6__btn--envoyer {
  width: 100%;
  margin-top: 0.5rem;
}

.contact-6__btn--envoyer[aria-busy="true"] {
  cursor: progress;
  opacity: 0.75;
}

/* ---- Le filet ------------------------------------------------ */
.contact-6__filet {
  display: block;
  width: 1px;
  background: var(--contact-6-filet);
  transform-origin: top;
}

/* ---- Colonne formulaire ------------------------------------- */
.contact-6__formulaire {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
}

.contact-6__form-titre,
.contact-6__form-titre:hover {
  margin: 0;
  color: var(--black);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 400;
  line-height: 1.15;
}

.contact-6__delai {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--gray-dark);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
}

.contact-6__delai-icone {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
}

.contact-6__delai-texte {
  color: var(--gray-dark);
}

.contact-6__motifs {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.1rem 0 0.4rem;
}

.contact-6__motifs-titre {
  margin: 0;
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
}

.contact-6__motifs-liste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/*
   Une liste, pas des pastilles : un contour arrondi autour de chaque motif
   promettait un choix a cliquer (§4.18). Ce n'est qu'une information — le
   choix, lui, se fait dans le formulaire.
*/
.contact-6__motif {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
}

.contact-6__motif::before {
  content: "";
  flex-shrink: 0;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--primary);
  transform: translateY(-0.1rem);
}

.contact-6__form {
  /* Les sous-composants lisent ces variables (mention-donnees) : le lien de
     la mention passe en brun, le tan de --secondary est trop pale ici. */
  --mention-donnees-lien: var(--black);
  --suivi-formulaire-texte: var(--black);

  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin-top: 0.75rem;
}

.contact-6__rangee {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.35rem;
}

.contact-6__champ {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.contact-6__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}

.contact-6__label-texte {
  color: var(--black);
}

/* « obligatoire » en toutes lettres : se lit sans couleur ni symbole. */
.contact-6__requis {
  color: var(--gray-dark);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
}

.contact-6__input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--black) 22%, transparent);
  border-radius: 12px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  /* 1rem pleins : sous 16 px, iOS zoome sur le champ a la saisie. */
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  box-shadow: none;
  appearance: none;
  cursor: text;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.contact-6__input--texte {
  min-height: 9rem;
  resize: vertical;
}

.contact-6__input::placeholder {
  color: color-mix(in srgb, var(--gray-dark) 75%, transparent);
  opacity: 1;
}

.contact-6__input:hover {
  border-color: color-mix(in srgb, var(--black) 45%, transparent);
}

/* Focus : bord de charte + halo. `outline` transparent et non `none` : en
   mode contraste eleve, c'est lui qui reste visible. */
.contact-6__input:focus,
.contact-6__input:focus-visible {
  outline: 2px solid transparent;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
}

.contact-6__input[aria-invalid="true"] {
  border-width: 2px;
  border-color: var(--contact-6-erreur);
}

.contact-6__erreur {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  color: var(--contact-6-erreur);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
}

.contact-6__erreur[hidden] {
  display: none;
}

.contact-6__erreur-icone {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
}

.contact-6__erreur-texte {
  color: var(--contact-6-erreur);
}

/*
   Le libelle de la grille de prestations vient du sous-composant
   `services-grid`, qui l'emet sous la classe partagee `.form-label` — son
   contrat avec les freres. On l'aligne sur nos libelles, et seulement lui :
   le selecteur se termine sur cette classe, jamais sur une balise nue.
*/
.contact-6 .contact-6__bloc .form-label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ---- Signature ---------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .contact-6__infos {
    animation: contact6Entree 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  .contact-6__formulaire {
    animation: contact6Entree 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.12s both;
  }

  .contact-6__filet {
    animation: contact6Filet 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s both;
  }
}

@keyframes contact6Entree {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes contact6Filet {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

/* ---- Modale : ni offset de header, ni animation d'entree ---- */
.contact-6--modale {
  padding: clamp(2rem, 4vw, 3rem);
}

.contact-6--modale .contact-6__inner {
  grid-template-columns: 1fr;
}

.contact-6--modale .contact-6__filet {
  display: none;
}

.contact-6--modale .contact-6__titre {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

/* ---- Responsive --------------------------------------------- */
@media (max-width: 1024px) {
  .contact-6__inner {
    grid-template-columns: 1fr;
  }

  /* Empile, le filet devient horizontal et se dessine de gauche a droite. */
  .contact-6__filet {
    width: 100%;
    height: 1px;
    transform-origin: left;
  }

  @media (prefers-reduced-motion: no-preference) {
    .contact-6__filet {
      animation-name: contact6FiletHorizontal;
    }
  }
}

@keyframes contact6FiletHorizontal {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 768px) {
  .contact-6__rangee {
    grid-template-columns: 1fr;
  }

  .contact-6__coordonnee {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}
