/* ==========================================================================
   Page Contact — styles spécifiques (préfixe .contact-)
   Sommaire : héro · scène « lettre & enveloppe » (moment fort) · formulaire
   (carte, récapitulatif, envoi) · coordonnées · questions rapides · CTA
   ========================================================================== */

/* --- HÉRO ---------------------------------------------------------------- */
/* padding-top et taille du H1 : échelle commune .page-hero (main.css) */
.contact-hero {
  padding-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
  background:
    radial-gradient(65% 55% at 100% 0%, rgba(255, 211, 219, .75), transparent 65%),
    linear-gradient(180deg, var(--blush-100) 0%, var(--blush-50) 58%, var(--paper) 100%);
}
.contact-hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  align-items: center;
}
@media (min-width: 1000px) {
  .contact-hero__grid { grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); }
}
.contact-hero .page-hero__inner { gap: 1.2rem; justify-items: start; }
.contact-hero h1 {
  line-height: 1;
  letter-spacing: -.02em;
  max-width: 14ch;
}
/* Mot surligné sur plusieurs lignes : le trait suit chaque ligne */
.contact-hero h1 .hl {
  display: inline;
  white-space: normal;
  padding-bottom: .02em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 13 C 40 5, 80 4, 120 8 S 180 13, 197 7' fill='none' stroke='%23f98f9c' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 100% / calc(var(--hl-p) * 100%) .3em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.contact-hero h1 .hl::after { content: none; }
.contact-hero .lead { max-width: 44ch; }
.contact-hero__ctas { --cluster-gap: .8rem; margin-top: .3rem; }
@media (max-width: 560px) {
  .contact-hero__ctas { width: 100%; }
  .contact-hero__ctas .btn { width: 100%; white-space: normal; }
}

/* --- SCÈNE : la lettre sort de l’enveloppe (décorative) ------------------ */
.contact-hero__visual {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  margin-inline: auto;
  container-type: inline-size;
}
.contact-scene {
  position: relative;
  aspect-ratio: 100 / 88;
  font-size: 12px;
  font-size: 2.3cqw;
}
.contact-scene > * { position: absolute; }

/* Avant animation (JS + GSAP) : les éléments attendent l’intro */
.js.has-gsap .contact-scene:not(.is-played) [data-anim] { opacity: 0; }
.js.has-gsap:not(.anim-ready) .contact-scene [data-anim] { animation: failsafeShow .6s 3.5s forwards; }

/* Enveloppe (dos + rabat / poche avant) */
.contact-env { left: 4%; bottom: 1%; z-index: 1; width: 92%; height: auto; overflow: visible; }
.contact-env--front { z-index: 3; }
.contact-env * { vector-effect: non-scaling-stroke; }
.contact-env__flap { fill: var(--pink-300); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.contact-env__inside { fill: #f27a90; stroke: var(--ink); stroke-width: 2; }
.contact-env__pocket { fill: var(--pink-400); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.contact-env__fold { fill: none; stroke: rgba(42, 26, 32, .2); stroke-width: 2; stroke-linecap: round; }
.contact-env__seal { fill: var(--brand); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.contact-env__shine { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }

/* Lettre */
.contact-letter-slot {
  left: 8%;
  right: 8%;
  top: 0;
  bottom: 2.5%;
  z-index: 2;
  overflow: hidden;
  overflow: clip;
}
.contact-letter-anim { position: absolute; left: 7%; right: 7%; top: 4%; height: 84%; }
.contact-letter {
  height: 100%;
  padding: 1.25em 1.4em 1em 3.2em;
  border: 2px solid var(--ink);
  border-radius: 1.1em;
  background:
    linear-gradient(90deg, transparent 2.35em, rgba(225, 68, 104, .32) 2.35em, rgba(225, 68, 104, .32) calc(2.35em + 1.5px), transparent calc(2.35em + 1.5px)),
    var(--white);
  box-shadow: 0 .45em 0 rgba(42, 26, 32, .16);
  transform: rotate(-3deg);
}
.contact-letter__head {
  display: flex;
  align-items: center;
  gap: .7em;
  margin: 0 0 .7em -1.9em;
  padding-bottom: .75em;
  border-bottom: 2px dashed rgba(42, 26, 32, .14);
}
.contact-letter__head img { width: 3.3em; height: 3.3em; flex: none; }
.contact-letter__head span { display: grid; gap: .15em; line-height: 1.1; }
.contact-letter__head b { font-family: var(--font-display); font-size: 1.45em; font-weight: 700; }
.contact-letter__head small { font-size: 1em; font-weight: 700; color: var(--ink-2); }
.contact-letter__list { display: grid; list-style: none; }
.contact-letter__list li {
  position: relative;
  padding-left: 1.25em;
  font-family: var(--font-hand);
  font-size: 1.95em;
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
}
.contact-letter__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .18em;
  width: .9em;
  height: .9em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cf3a60' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 13.5c2.2 1.4 3.8 3.3 5.2 5.6C11.9 12.6 15.6 8 20.8 4.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.contact-letter__ps {
  margin-top: .1em;
  font-family: var(--font-hand);
  font-size: 2em;
  font-weight: 700;
  line-height: 1.1;
  color: var(--brand);
  transform: rotate(-3deg);
  transform-origin: left center;
}

/* Timbres dentelés */
.contact-stamp {
  z-index: 6;
  width: 19%;
  transform: rotate(var(--r, 0deg));
  filter:
    drop-shadow(1.5px 0 0 var(--ink)) drop-shadow(-1.5px 0 0 var(--ink))
    drop-shadow(0 1.5px 0 var(--ink)) drop-shadow(0 -1.5px 0 var(--ink))
    drop-shadow(0 .3em 0 rgba(42, 26, 32, .85));
}
.contact-stamp--24 { right: 2%; top: 4%; --r: 9deg; }
.contact-stamp--free { left: 0; top: 46%; width: 17%; --r: -11deg; }
.contact-stamp__paper {
  --hole: .34em;
  --gap: 1.1em;
  padding: .6em;
  background: var(--white);
  -webkit-mask:
    linear-gradient(#000 0 0) center / calc(100% - var(--gap)) calc(100% - var(--gap)) no-repeat,
    radial-gradient(circle at center, transparent var(--hole), #000 calc(var(--hole) + .5px)) calc(var(--gap) / -2) calc(var(--gap) / -2) / var(--gap) var(--gap) round;
  mask:
    linear-gradient(#000 0 0) center / calc(100% - var(--gap)) calc(100% - var(--gap)) no-repeat,
    radial-gradient(circle at center, transparent var(--hole), #000 calc(var(--hole) + .5px)) calc(var(--gap) / -2) calc(var(--gap) / -2) / var(--gap) var(--gap) round;
}
.contact-stamp__in {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .25em;
  aspect-ratio: 4 / 4.7;
  border: 2px solid var(--ink);
  border-radius: .3em;
  background: var(--blush-100);
  text-align: center;
}
.contact-stamp--free .contact-stamp__in { background: var(--mint); }
.contact-stamp__big {
  font-family: var(--font-display);
  font-size: 2.55em;
  font-weight: 700;
  line-height: .9;
  white-space: nowrap;
  color: var(--pink-400);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
}
.contact-stamp--free .contact-stamp__big { color: var(--white); }
.contact-stamp__small { font-size: .82em; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
@keyframes contactSpin { to { transform: rotate(360deg); } }

/* --- SECTION PRINCIPALE : formulaire + coordonnées ------------------------ */
.contact-main { padding-top: 0; }
.contact-main__grid { display: grid; gap: clamp(2.5rem, 1.5rem + 3vw, 3.5rem); align-items: start; }
@media (min-width: 1000px) {
  .contact-main__grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); column-gap: clamp(2rem, 1rem + 2.5vw, 4rem); }
}
/* Colonne collante seulement si elle tient entièrement dans la fenêtre */
@media (min-width: 1000px) and (min-height: 760px) {
  .contact-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

/* Carte du formulaire */
.contact-form-card {
  padding: clamp(1.35rem, .7rem + 2.6vw, 3rem);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sticker-lg);
  outline: none;
}
.contact-form-card__head { display: grid; gap: .6rem; margin-bottom: clamp(1.4rem, 1rem + 1vw, 2rem); }
.contact-form-card__title { font-size: var(--step-3); max-width: 20ch; }
.contact-form-card__intro { color: var(--ink-2); }
.contact-form-card__req { display: flex; gap: .3rem; align-items: baseline; font-size: var(--step--1); font-weight: 650; color: var(--ink-2); }
.contact-form-card__req .req { color: var(--brand); font-weight: 800; }

/* Récapitulatif des erreurs (rempli par contact.js) */
.contact-summary.is-visible {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  border: var(--bw) solid var(--danger);
  border-radius: var(--r-md);
  background: #fff2f4;
  box-shadow: 0 4px 0 var(--danger);
}
.contact-summary > .icon { width: 24px; height: 24px; margin-top: .05rem; color: var(--danger); }
.contact-summary__title { font-weight: 700; line-height: 1.45; }
.contact-summary__list { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; list-style: none; }
.contact-summary__list a {
  display: inline-flex;
  padding: .3rem .75rem;
  border: 1.5px solid var(--danger);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: .86rem;
  font-weight: 750;
  line-height: 1.3;
  color: var(--danger);
  text-decoration: none;
  transition: background-color .25s, color .25s;
}
.contact-summary__list a:hover { background: var(--danger); color: var(--white); }

/* Champs */
.contact-form { gap: 1.25rem; }
/* Dans une rangée à 2 colonnes, les champs ne s’étirent pas : les saisies restent alignées */
.contact-form .field { align-content: start; }
/* 2 colonnes selon la largeur du formulaire (et non de la fenêtre) */
.contact-form .form__row--2 { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 480px) {
  .contact-form .form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.contact-form .field__help { line-height: 1.45; }
.contact-form .field__error::before {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: .35em;
  vertical-align: -.17em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
.contact-form textarea.field__input { min-height: 160px; }

/* Envoi (mise en page selon la largeur réelle du formulaire) */
.contact-form { container-type: inline-size; }
.contact-form__actions { display: grid; gap: 1rem; align-items: center; margin-top: .3rem; }
.contact-submit { width: 100%; }
@container (min-width: 600px) {
  .contact-form__actions { grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem; }
  .contact-submit { width: auto; }
}
.contact-submit__busy { display: none; }
.contact-submit.is-loading .contact-submit__label { display: none; }
.contact-submit.is-loading .contact-submit__busy { display: inline; }
.contact-submit.is-loading .icon { animation: contactSpin 1s linear infinite; }
.contact-form__privacy { display: flex; gap: .6rem; align-items: flex-start; font-size: .84rem; line-height: 1.5; color: var(--ink-2); }
.contact-form__privacy .icon { flex: none; width: 18px; height: 18px; margin-top: .12rem; color: var(--mint-dark); }
.contact-form__privacy a { color: var(--brand-dark); font-weight: 750; }

/* Messages après envoi (contenu enrichi par contact.js) */
.contact-form .form__status { align-items: flex-start; }
.contact-form .form__status > .icon { flex: none; }
.form__status-body { display: grid; gap: .45rem; }
.form__status-title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; line-height: 1.2; }
.form__status-body p { font-weight: 600; }
.form__status-hint { font-size: .9rem; color: var(--ink-2); }
.form__status-hint a { color: var(--brand-dark); font-weight: 750; }
.form__status-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .35rem; }

/* --- COORDONNÉES (colonne de droite) -------------------------------------- */
.contact-aside { display: grid; gap: 1.1rem; }
.contact-aside__title {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--brand-dark);
}
.contact-aside__title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(42, 26, 32, .22) 0 6px, transparent 6px 12px);
}

.contact-channels { display: grid; padding: .45rem; list-style: none; }
.contact-channel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .95rem;
  align-items: center;
  padding: 1rem .9rem;
  border-radius: calc(var(--r-lg) - 8px);
  transition: background-color .3s;
}
.contact-channel + .contact-channel::before {
  content: "";
  position: absolute;
  left: .9rem;
  right: .9rem;
  top: 0;
  height: 0;
  border-top: var(--bw) dashed var(--line);
}
.contact-channel:hover { background: var(--blush-50); }
.contact-channel__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: var(--border);
  border-radius: 16px;
  background: var(--blush-100);
  color: var(--brand);
  box-shadow: 0 3px 0 var(--ink);
  transition: transform .5s var(--ease-bounce), background-color .3s;
}
.contact-channel__icon .icon { width: 24px; height: 24px; }
.contact-channel--wa .contact-channel__icon { background: var(--mint); color: var(--ink); }
.contact-channel--mail .contact-channel__icon { background: var(--lilac); color: var(--ink); }
.contact-channel:hover .contact-channel__icon { transform: rotate(-8deg) scale(1.05); }
.contact-channel__body { display: grid; justify-items: start; }
.contact-channel__title,
.contact-channel__value,
.contact-channel__text { padding-right: 2.9rem; }
.contact-channel__title {
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ink-2);
}
.contact-channel__value {
  margin-top: .1rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-channel__value::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.contact-channel:hover .contact-channel__value { color: var(--brand-dark); }
.contact-channel__text { margin-top: .3rem; font-size: .88rem; line-height: 1.5; color: var(--ink-2); }
.contact-channel__go {
  position: absolute;
  top: 50%;
  right: .9rem;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  border: var(--border);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  transition: transform .45s var(--ease-bounce), background-color .3s;
}
.contact-channel__go .icon { width: 18px; height: 18px; }
.contact-channel:hover .contact-channel__go { background: var(--pink-400); transform: rotate(-12deg) scale(1.06); }
@supports selector(:has(a)) {
  .contact-channel__value:focus-visible { outline: none; }
  .contact-channel:has(.contact-channel__value:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; background: var(--blush-50); }
}

.contact-aside__zone {
  display: flex;
  gap: .6rem;
  align-items: center;
  padding-inline: .4rem;
  font-size: .93rem;
  font-weight: 650;
  line-height: 1.45;
  color: var(--ink-2);
}
.contact-aside__zone .icon { flex: none; width: 20px; height: 20px; color: var(--brand); }

/* --- QUESTIONS RAPIDES ------------------------------------------------------ */
.contact-faq__grid { display: grid; gap: clamp(1.6rem, 1rem + 2vw, 2.5rem); align-items: start; }
@media (min-width: 900px) {
  .contact-faq__grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: clamp(2rem, 1rem + 4vw, 5rem); }
}
.contact-faq__head { display: grid; gap: 1rem; justify-items: start; }
.contact-faq__head .title { font-size: var(--step-4); }

/* --- BANDEAU CTA (mobile : règles communes de .cta-band dans main.css) ------- */
.contact-cta .lead { max-width: 46ch; }

/* --- RESPONSIVE ------------------------------------------------------------- */
@media (max-width: 999px) {
  .contact-hero__visual { width: min(100%, 440px); }
}
@media (max-width: 599px) {
  .contact-channel { padding: .9rem .6rem; gap: .8rem; }
  .contact-channel__go { display: none; }
  .contact-channel__title, .contact-channel__value, .contact-channel__text { padding-right: 0; }
  .contact-channel__icon { width: 46px; height: 46px; border-radius: 14px; }
}
