/* Page de contact */
.contact-page {
  --contact-card: #fcfaf4;
  --contact-wash: #e8ede2;
  --contact-rule: #c4cfc2;
  --contact-ease: cubic-bezier(.2, .65, .25, 1);
}

.contact-hero {
  padding-block: clamp(3rem, 7vw, 6.75rem);
  background: var(--paper);
}

.contact-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.contact-kicker {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.2rem;
  color: var(--green);
  font: 500 .875rem/1.45 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.contact-kicker::before {
  flex: 0 0 1.5rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.contact-hero h1 {
  margin: 0;
  font: 400 clamp(2.85rem, 13.5vw, 5rem)/.87 var(--serif);
  letter-spacing: -.045em;
}

.contact-title__line, .contact-title__line > * { display: block; }
.contact-title__line em { color: var(--green); }

.contact-hero__intro {
  max-width: 39ch;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.65vw, 1.2rem);
  line-height: 1.55;
}

.contact-hero__actions, .contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1.125rem;
}

.contact-hero__actions {
  margin-top: 1.65rem;
}

.contact-page .contact-action {
  min-height: 3.125rem;
  white-space: normal;
  font-size: .9375rem;
}

.contact-phone {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 3.125rem;
  padding-block: .2rem;
  color: var(--ink);
  text-decoration: none;
}

.contact-phone__label {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.2;
}

.contact-phone__number {
  font-size: 1.0625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: text-decoration-color .2s ease;
}

.contact-phone:is(:hover, :focus-visible) .contact-phone__number {
  text-decoration-color: var(--green);
}

.contact-jump, .contact-agenda__link {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 2.75rem;
  font-size: .9375rem;
  font-weight: 600;
  text-underline-offset: .25em;
}

.contact-jump {
  margin-top: .55rem;
  color: var(--green);
}

.contact-jump span, .contact-agenda__link span {
  display: inline-block;
  transition: transform .25s var(--contact-ease);
}

.contact-photo {
  position: relative;
  isolation: isolate;
  min-width: 0;
  margin: 0;
  padding: 0 .625rem .625rem 0;
}

.contact-photo::before {
  position: absolute;
  z-index: -1;
  inset: .625rem 0 0 .625rem;
  border: 1px solid #a7b7a3;
  border-radius: .375rem 3rem .375rem .375rem;
  content: "";
}

.contact-photo__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.27;
  border-radius: .375rem 3rem .375rem .375rem;
  background: #c5cdbd;
}

.contact-photo__frame::after {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 1.4rem;
  aspect-ratio: 1;
  border-right: 1px solid var(--lime);
  border-bottom: 1px solid var(--lime);
  content: "";
}

.contact-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 45%;
  transition: transform .8s var(--contact-ease);
}

.contact-request {
  padding-block: clamp(2.75rem, 6vw, 6rem);
  border-block: 1px solid var(--contact-rule);
  background: var(--contact-wash);
}

.contact-request__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

.contact-form-card, .contact-agenda {
  min-width: 0;
  padding: clamp(1.2rem, 4vw, 3rem);
  border-radius: .5rem;
}

.contact-form-card {
  border: 1px solid var(--contact-rule);
  background: var(--contact-card);
}

.contact-form-card h2, .contact-agenda h2 {
  margin: 0;
  font: 400 clamp(2.5rem, 5.75vw, 4rem)/.94 var(--serif);
  letter-spacing: -.035em;
}

.contact-form-card__intro {
  margin-block: .95rem 1.65rem;
  color: var(--muted);
}

.contact-form, .contact-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 1.15rem;
}

.contact-form {
  position: relative;
}

.contact-field {
  display: grid;
  gap: .4rem;
  align-content: start;
  min-width: 0;
}

.contact-field label {
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 700;
}

.contact-field__optional {
  color: var(--muted);
  font-weight: 400;
}

.contact-field input, .contact-field select, .contact-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: .65rem .75rem;
  border: 1px solid #a7b6a7;
  border-radius: .3rem;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color .2s ease, background-color .2s ease;
}

.contact-field select {
  padding-right: 1.5rem;
}

.contact-field textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.contact-field input:focus, .contact-field select:focus, .contact-field textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-color: var(--green);
  background: #fff;
}

.contact-field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.contact-field [aria-invalid="true"] {
  border-color: #9e3529;
  background: #fff4ef;
}

.contact-hint, .contact-error, .contact-consent {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.45;
}

.contact-error { color: #922d22; }

.contact-honeypot, .contact-error:empty, .contact-form .form-status:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.contact-consent { margin: .2rem 0 0; }

.contact-consent a, .contact-no-js a {
  color: var(--green);
  text-underline-offset: .2em;
}

.contact-form .form-status {
  display: block;
  padding: .85rem 1rem;
  border: 1px solid var(--contact-rule);
  border-radius: .3rem;
  background: var(--contact-wash);
  color: var(--ink);
  font-size: .9375rem;
}

.contact-form .form-status:empty {
  padding: 0;
  border: 0;
}

.contact-form .form-status--error {
  border-color: #d9a99a;
  background: #fff4ef;
  color: #842d24;
}

.contact-form .form-status--ok {
  border-color: #a4c7a5;
  background: #e9f3e4;
  color: var(--ink);
}

.contact-no-js { margin: 0; }

.contact-submit .spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 1px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.contact-submit[aria-busy="true"] .spinner {
  display: inline-block;
}

.contact-submit[aria-busy="true"] .arrow { display: none; }
.contact-submit:disabled { cursor: wait; }

.contact-agenda {
  background: var(--forest);
  color: var(--paper);
}

.contact-agenda h2 em {
  color: var(--lime);
  white-space: nowrap;
}

.contact-agenda__steps {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: contact-step;
}

.contact-agenda__steps li {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: .35rem .8rem;
  padding-block: 1rem;
  border-top: 1px solid rgba(245, 241, 232, .25);
  counter-increment: contact-step;
}

.contact-agenda__steps li::before {
  align-self: start;
  grid-row: span 2;
  padding-top: .15rem;
  color: var(--lime);
  font: 500 .875rem/1.45 var(--mono);
  content: counter(contact-step, decimal-leading-zero) / "";
}

.contact-agenda__steps h3 {
  margin: 0;
  font: 700 1.03rem/1.35 var(--sans);
  letter-spacing: 0;
}

.contact-agenda__steps p {
  grid-column: 2;
  margin: 0;
  color: #d9e4d5;
  font-size: .95rem;
  line-height: 1.55;
}

.contact-agenda__link {
  margin-top: .35rem;
  color: var(--lime);
}

@media (min-width: 40rem) {
  .contact-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-photo__frame { aspect-ratio: 1.55; }
}

@media (min-width: 56.25rem) {
  .contact-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); }
  .contact-hero h1 { font-size: clamp(3.8rem, 7.7vw, 7.125rem); }
  .contact-request__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .contact-form-card h2, .contact-agenda h2 { font-size: clamp(2.5rem, 4vw, 4rem); }
  .contact-photo::before, .contact-photo__frame { border-top-right-radius: 4.5rem; }
  .contact-photo__frame { aspect-ratio: 1.27; }
}

@media (prefers-reduced-motion: no-preference) {
  .contact-kicker::before {
    transform-origin: left center;
    animation: contact-rule-grow .65s var(--contact-ease) backwards;
  }

  .contact-title__line {
    --contact-title-delay: .08s;
    animation: contact-title-mask .85s var(--contact-title-delay) var(--contact-ease) backwards;
  }

  .contact-title__line + .contact-title__line { --contact-title-delay: .22s; }

  .contact-title__line > * {
    animation: contact-title-rise .85s var(--contact-title-delay) var(--contact-ease) backwards;
  }

  .contact-hero__intro { animation: contact-arrive .6s .26s var(--contact-ease) backwards; }
  .contact-hero__actions { animation: contact-control-rise .64s .2s var(--contact-ease) backwards; }
  .contact-jump { animation: contact-control-rise .64s .36s var(--contact-ease) backwards; }

  .contact-hero__actions .contact-action {
    position: relative;
    overflow: hidden;
  }

  .contact-hero__actions .contact-action::after {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3.5rem;
    background: linear-gradient(90deg, transparent, #fffdf7a3, transparent);
    opacity: 0;
    pointer-events: none;
    content: "";
    animation: contact-whatsapp-glint .78s .9s ease-out;
  }

  .contact-jump:is(:hover, :focus-visible) span { transform: translateY(.25rem); }
  .contact-agenda__link:is(:hover, :focus-visible) span { transform: translate(.2rem, -.2rem); }

  .contact-photo:is(:not(.will-reveal), .is-in)::before {
    animation: contact-photo-border .8s .36s var(--contact-ease) backwards;
  }

  .contact-photo:is(:not(.will-reveal), .is-in) .contact-photo__frame {
    animation: contact-photo-mask 1.2s .12s var(--contact-ease) backwards;
  }

  .contact-photo:is(:not(.will-reveal), .is-in) img {
    animation: contact-photo-settle 1.45s .12s var(--contact-ease) backwards;
  }

  .contact-photo:is(:not(.will-reveal), .is-in) .contact-photo__frame::after {
    transform-origin: right bottom;
    animation: contact-corner-mark .48s .92s var(--contact-ease) backwards;
  }

  .contact-form-card.will-reveal:focus-within, .contact-agenda.will-reveal:focus-within {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .contact-agenda__steps li {
    --contact-step-delay: .18s;
    position: relative;
  }

  .contact-agenda__steps li:nth-child(2) { --contact-step-delay: .29s; }
  .contact-agenda__steps li:nth-child(3) { --contact-step-delay: .4s; }

  .contact-agenda.will-reveal.is-in .contact-agenda__steps li::after {
    position: absolute;
    inset: -1px 0 auto;
    height: 1px;
    background: linear-gradient(90deg, var(--lime), transparent);
    transform-origin: left center;
    pointer-events: none;
    content: "";
    animation: contact-agenda-rule .8s var(--contact-step-delay) var(--contact-ease) both;
  }

  .contact-form .form-status.is-visible { animation: contact-arrive .28s var(--contact-ease) backwards; }
  .contact-submit[aria-busy="true"] .spinner { animation: contact-spin .75s linear infinite; }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .contact-photo:hover img { transform: scale(1.035); }
}

@keyframes contact-rule-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes contact-title-mask {
  from { clip-path: inset(100% -.18em -.25em); }
  to { clip-path: inset(-.25em -.18em -.25em); }
}

@keyframes contact-title-rise {
  from { transform: translateY(55%); }
  to { transform: translateY(0); }
}

@keyframes contact-arrive {
  from { opacity: .1; transform: translateY(.65rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes contact-control-rise {
  from { transform: translateY(.65rem); }
  to { transform: translateY(0); }
}

@keyframes contact-whatsapp-glint {
  from { opacity: .8; transform: translateX(-130%) skewX(-22deg); }
  to { opacity: 0; transform: translateX(22rem) skewX(-22deg); }
}

@keyframes contact-photo-mask {
  from { clip-path: inset(0 0 0 62%); opacity: .3; }
  to { clip-path: inset(0); opacity: 1; }
}

@keyframes contact-photo-border {
  from { opacity: 0; transform: translate(-.55rem, -.55rem); }
  to { opacity: 1; transform: translate(0); }
}

@keyframes contact-photo-settle {
  from { scale: 1.12; }
  to { scale: 1; }
}

@keyframes contact-corner-mark {
  from { opacity: 0; scale: .25; }
  to { opacity: 1; scale: 1; }
}

@keyframes contact-agenda-rule {
  0% { opacity: 0; transform: scaleX(0); }
  40% { opacity: .8; }
  100% { opacity: 0; transform: scaleX(1); }
}

@keyframes contact-spin { to { transform: rotate(360deg); } }
