/* ==========================================================================
   ASUÑA PARFUMERIE — Page Contact (sous le hero intérieur existant)
   Dépend de tokens.css. Formulaire : assets/js/contact.js
   >= 1024px : formulaire (50 %) | coordonnées + services (50 %)
   <  1024px : une colonne, formulaire en premier
   ========================================================================== */

.contact {
  --contact-pad-x: clamp(16px, 6vw, 96px);
  --contact-max: 1440px;
  --contact-bronze: #a87440;
  --contact-champagne: #f3e9dc;
  --contact-champagne-deep: #ecdcc8;
  --contact-circle: #ead9c4;
  --contact-line: #e6dbcd;
  --contact-error: #a2452c;
  --contact-success-bg: #eaf6ec;
  --contact-success-line: #b8dfc1;
  --contact-success-ink: #247a3d;

  padding-block: clamp(28px, 3.4vw, 48px) clamp(48px, 5vw, 72px);
  color: var(--asuna-brown);
  font-family: var(--asuna-font-ui);
}

.contact__inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 2.6vw, 40px);
  align-items: start;
  max-width: var(--contact-max);
  margin: 0 auto;
  padding-inline: var(--contact-pad-x);
}

/* Blocs ------------------------------------------------------------------ */
.contact-card {
  position: relative;
  padding: clamp(28px, 2.8vw, 44px);
  border-radius: 18px;
}

.contact-card--form {
  border: 1px solid #eee6dc;
  background: var(--asuna-ivory-light);
  box-shadow: 0 14px 40px rgba(59, 23, 12, 0.045);
}

.contact-card--details {
  overflow: hidden;
  background: var(--contact-champagne);
}

.contact__eyebrow {
  margin: 0 0 12px;
  color: var(--asuna-brown);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.contact__title {
  margin: 0;
  font-family: var(--asuna-font-display);
  font-size: clamp(30px, 2.7vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.008em;
}

.contact__rule {
  display: block;
  width: 46px;
  height: 1.5px;
  margin: 18px 0 22px;
  background: var(--contact-bronze);
}

.contact__intro {
  max-width: 520px;
  margin: 0 0 26px;
  color: var(--asuna-text-muted);
  font-size: 15px;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Formulaire
   -------------------------------------------------------------------------- */
.contact-form {
  display: grid;
  gap: 18px;
}

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

.contact-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.contact-field__label {
  color: var(--asuna-brown);
  font-size: 13.5px;
  font-weight: 500;
}

.contact-field__label abbr {
  margin-left: 2px;
  color: var(--contact-error);
  text-decoration: none;
}

.contact-field__control {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--asuna-border);
  border-radius: 10px;
  background: #fffdfa;
  color: var(--asuna-brown);
  font-family: var(--asuna-font-ui);
  font-size: 14.5px;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
}

.contact-field__control::placeholder {
  color: var(--asuna-placeholder);
}

.contact-field__control:hover {
  border-color: var(--asuna-sand-deep);
}

.contact-field__control:focus {
  border-color: var(--asuna-caramel);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 154, 82, 0.22);
}

select.contact-field__control {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%233b170c' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 16px;
  cursor: pointer;
}

select.contact-field__control:invalid {
  color: var(--asuna-placeholder);
}

select.contact-field__control option {
  color: var(--asuna-brown);
}

textarea.contact-field__control {
  min-height: 132px;
  resize: vertical;
}

.contact-field__control[aria-invalid="true"] {
  border-color: var(--contact-error);
}

.contact-field__control[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(162, 69, 44, 0.16);
}

.contact-field__error {
  min-height: 0;
  margin: 0;
  color: var(--contact-error);
  font-size: 12.5px;
  line-height: 1.4;
}

.contact-field__error:empty {
  display: none;
}

/* Champ piège antispam : invisible pour les visiteurs */
.contact-form__trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Message d'envoi (vert seulement après un envoi réussi) */
.contact-form__status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #ecc9be;
  border-radius: 10px;
  background: #fbeeea;
  color: #8e3a26;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  animation: contact-status-in 0.35s var(--asuna-ease) both;
}

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

.contact-form__status[data-tone="success"] {
  border-color: var(--contact-success-line);
  background: var(--contact-success-bg);
  color: var(--contact-success-ink);
}

.contact-form__status svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.contact-form__status a {
  color: inherit;
  font-weight: 500;
}

.contact-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 54px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: var(--asuna-brown);
  color: var(--asuna-on-dark);
  font-family: var(--asuna-font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.contact-form__submit svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--asuna-ease);
}

.contact-form__submit:hover:not(:disabled) {
  background: var(--asuna-brown-2);
}

.contact-form__submit:hover:not(:disabled) svg {
  transform: translateX(3px);
}

.contact-form__submit:disabled {
  opacity: 0.8;
  cursor: progress;
}

.contact-form__spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: contact-spin 0.7s linear infinite;
}

.contact-form__submit[data-state="loading"] .contact-form__spinner {
  display: block;
}

.contact-form__submit[data-state="loading"] .contact-form__arrow {
  display: none;
}

/* --------------------------------------------------------------------------
   Coordonnées WhatsApp
   -------------------------------------------------------------------------- */
.contact-wa {
  scroll-margin-top: 120px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-wa__item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
}

.contact-wa__item:first-child {
  padding-top: 4px;
}

.contact-wa__item + .contact-wa__item {
  border-top: 1px solid var(--contact-line);
}

.contact-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--contact-circle);
  color: var(--asuna-brown);
}

.contact-icon svg {
  width: 28px;
  height: 28px;
}

.contact-wa__label {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
}

.contact-wa__number {
  display: block;
  margin-top: 3px;
  color: var(--asuna-brown);
  font-size: clamp(18px, 1.45vw, 21px);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.contact-wa__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px 0 14px;
  border: 1px solid var(--asuna-brown);
  border-radius: 10px;
  color: var(--asuna-brown);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-wa__btn svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.contact-wa__btn .contact-wa__arrow {
  width: 15px;
  height: 15px;
  transition: transform 0.3s var(--asuna-ease);
}

.contact-wa__btn:hover {
  background: var(--asuna-brown);
  color: var(--asuna-on-dark);
}

.contact-wa__btn:hover .contact-wa__arrow {
  transform: translateX(3px);
}

/* Bloc d'accompagnement */
.contact-help {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  margin-top: 18px;
  padding: 24px 24px 26px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--contact-champagne-deep);
}

.contact-help__title {
  margin: 4px 0 6px;
  font-family: var(--asuna-font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
}

.contact-help .contact-icon {
  background: #f6eee4;
}

.contact-help__text {
  position: relative;
  z-index: 1;
  max-width: 370px;
  margin: 0;
  color: var(--asuna-brown-2);
  font-size: 14px;
  line-height: 1.6;
}

/* Motif floral très fin, presque transparent */
.contact-help__flower {
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 124px;
  height: 124px;
  color: var(--contact-bronze);
  opacity: 0.16;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Bande des services
   -------------------------------------------------------------------------- */
.contact-services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.contact-service {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 12px;
  text-align: center;
}

.contact-service + .contact-service {
  border-left: 1px solid var(--contact-line);
}

.contact-service .contact-icon {
  width: 56px;
  height: 56px;
  background: #efe3d4;
}

.contact-service .contact-icon svg {
  width: 25px;
  height: 25px;
}

.contact-service__title {
  margin: 14px 0 6px;
  font-family: var(--asuna-font-display);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.2;
}

.contact-service__text {
  margin: 0;
  color: var(--asuna-text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Bande de conclusion (marron chocolat, texture subtile en CSS)
   -------------------------------------------------------------------------- */
.contact-outro {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(70% 160% at 0% 100%, rgba(116, 70, 42, 0.5) 0%, rgba(116, 70, 42, 0) 60%),
    radial-gradient(55% 140% at 100% 0%, rgba(201, 154, 82, 0.13) 0%, rgba(201, 154, 82, 0) 55%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.011) 0 2px, rgba(255, 255, 255, 0) 2px 9px),
    var(--asuna-brown);
  color: var(--asuna-on-dark);
}

.contact-outro__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(36px, 3.6vw, 52px) clamp(16px, 6vw, 96px);
}

.contact-outro__title {
  margin: 0;
  color: var(--asuna-on-dark);
  font-family: var(--asuna-font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 400;
  line-height: 1.12;
}

.contact-outro__rule {
  display: block;
  width: 46px;
  height: 1.5px;
  margin-top: 14px;
  background: var(--asuna-champagne);
}

.contact-outro__btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 12px;
  height: 50px;
  padding: 0 26px 0 28px;
  border: 1px solid var(--asuna-champagne);
  border-radius: var(--asuna-radius-pill);
  color: var(--asuna-on-dark);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.contact-outro__btn svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s var(--asuna-ease);
}

.contact-outro__btn:hover {
  background: var(--asuna-champagne);
  color: var(--asuna-brown);
}

.contact-outro__btn:hover svg {
  transform: translateX(3px);
}

/* Focus clavier */
.contact-form__submit:focus-visible,
.contact-wa__btn:focus-visible,
.contact-wa__number:focus-visible,
.contact-outro__btn:focus-visible {
  outline: 2px solid var(--asuna-champagne);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Grand ordinateur compact : boutons WhatsApp sous le numéro si la colonne est étroite
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .contact-wa__item {
    grid-template-columns: 56px minmax(0, 1fr);
    row-gap: 12px;
  }

  .contact-wa__item .contact-icon {
    width: 56px;
    height: 56px;
  }

  .contact-wa__btn {
    grid-column: 2;
    justify-self: start;
  }

  .contact-services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
  }

  .contact-service:nth-child(3) {
    border-left: 0;
  }
}

/* --------------------------------------------------------------------------
   Tablette et mobile : une colonne, formulaire en premier
   -------------------------------------------------------------------------- */
@media (max-width: 1023.98px) {
  .contact__inner {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
  }
}

@media (max-width: 767.98px) {
  .contact {
    --contact-pad-x: 16px;
  }

  .contact-card {
    padding: 26px 20px;
    border-radius: 16px;
  }

  .contact__eyebrow {
    font-size: 10px;
  }

  .contact__title {
    font-size: clamp(27px, 7.4vw, 32px);
  }

  .contact__rule {
    margin: 14px 0 18px;
  }

  .contact__intro {
    margin-bottom: 22px;
    font-size: 14.5px;
  }

  .contact-form {
    gap: 16px;
  }

  .contact-form__row {
    gap: 16px;
  }

  /* 16px : pas de zoom automatique à la saisie sur iPhone */
  .contact-field__control {
    font-size: 16px;
  }

  .contact-wa__item {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    row-gap: 12px;
  }

  .contact-wa__item .contact-icon,
  .contact-help .contact-icon {
    width: 52px;
    height: 52px;
  }

  .contact-icon svg {
    width: 24px;
    height: 24px;
  }

  .contact-wa__btn {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
    height: 48px;
  }

  .contact-help {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    padding: 20px 18px 22px;
  }

  .contact-help__title {
    font-size: 20px;
  }

  .contact-services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }

  .contact-service + .contact-service {
    border-left: 0;
  }

  .contact-outro__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-outro__btn {
    height: 48px;
    padding: 0 22px 0 24px;
    font-size: 12px;
  }
}

@media (max-width: 359.98px) {
  .contact-form__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@keyframes contact-status-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

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

@media (prefers-reduced-motion: reduce) {
  .contact-form__status {
    animation: none;
  }
}
