/* ==========================================================================
   Contact — template-parts/contact.php
   Titre à l'échelle du nom du Hero, en bas à gauche ; texte et coordonnées à droite.
   Sur ordinateur, le Contact et le pied de page forment le dernier écran.
   ========================================================================== */

.contact__layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--space-8);
  align-items: end;
}
.contact__title {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: min(var(--fs-signature), 13.5vw);   /* échelle de « marie lacombe », bornée : « convaincus ? » tient sur une ligne (tablette comprise) */
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  pointer-events: none;  /* la ligne « alors, » passe sous les liens : elle ne doit pas capter le survol */
}
.contact__title .line { padding-bottom: 0.08em; }
.contact__body { grid-column: 1 / -1; display: grid; gap: var(--space-6); max-width: 40rem; }
.contact__links { list-style: none; display: grid; }
.contact__links li { border-top: 1px solid var(--color-line); }
.contact__links li:last-child { border-bottom: 1px solid var(--color-line); }
.contact__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: var(--tracking-title);
  color: var(--color-text);
  /* soulignement vert forêt qui se dessine au survol */
  background: linear-gradient(var(--color-forest), var(--color-forest)) 0 100% / 0 2px no-repeat;
  transition: color var(--dur-fast), background-size var(--dur-base) var(--ease-out);
}
.contact__link .arrow { width: 0.7em; height: 0.7em; }
.contact__link:hover,
.contact__link:focus-visible { color: var(--color-forest); background-size: 100% 2px; }
.contact__link:hover .arrow,
.contact__link:focus-visible .arrow { translate: 3px -3px; }
.contact__link:hover .arrow--down,
.contact__link:focus-visible .arrow--down { translate: 0 3px; }  /* téléchargement du CV */

@media (max-width: 767px) {
  .contact__layout { row-gap: var(--space-7); }
}

/* Ordinateur : Contact + pied de page = un écran, calé par l'aimantation */
@media (min-width: 1024px) and (orientation: landscape) {
  .contact {
    --footer: 5.5rem;  /* hauteur du pied de page */
    min-height: calc(100svh - var(--footer));
    display: flex;
    flex-direction: column;
    padding-block: calc(var(--header-height) + var(--space-7)) var(--space-8);  /* marge basse généreuse sous le titre (le double du Hero) */
    scroll-margin-top: calc(var(--header-height) * -1);
  }
  .contact .section__title { margin-bottom: 0; }
  /* Titre à la taille du nom du Hero (borné par la largeur : « convaincus ? » ≈ 6,5 em) */
  .contact__layout {
    --t: clamp(4.25rem, min(16.5vw, 22svh, 14vw), 17rem);
    flex: 1;
    grid-template-rows: 1fr auto;
    row-gap: 0;
  }
  .contact__title { grid-column: 1 / -1; grid-row: 2; font-size: var(--t); }
  /* Texte et coordonnées à droite de « alors, », alignés sur le bas de cette première ligne */
  .contact__body {
    grid-column: 7 / 13;
    grid-row: 1 / 3;
    align-self: end;
    max-width: none;
    gap: var(--space-5);
    margin-bottom: calc(var(--t) * 1.02 + 4svh);  /* respiration entre les coordonnées et « convaincus ? » */
  }
  /* Tailles accordées au Hero : description comme son accroche, coordonnées un cran au-dessus */
  .contact__text { font-size: clamp(1.125rem, 1.6vw, 1.625rem); line-height: 1.3; max-width: 40ch; }  /* trois lignes */
  .contact__link { font-size: clamp(1.25rem, 1.9vw, 1.875rem); padding-block: var(--space-3); }
  main:has(> .contact) + .site-footer { margin-top: 0; height: 5.5rem; }
}

/* Écrans peu hauts : intitulé au même niveau que les autres sections */
@media (min-width: 1024px) and (orientation: landscape) and (max-height: 780px) {
  .contact { padding-top: calc(var(--header-height) + var(--space-5)); }
  /* Trois liens (e-mail, téléphone, CV) : colonne plus compacte */
  .contact__body { gap: var(--space-4); margin-bottom: calc(var(--t) * 1.02 + 2svh); }
  .contact__link { padding-block: 0.6rem; }
}
