/* ==========================================================================
   Chocolata Graphics — contact page
   Fond blanc, marquee géant noir, formulaire à largeur variable
   ========================================================================== */

.page-contact,
.page-contact main {
  background: var(--paper);
}

.contact-page {
  overflow: hidden;
  padding-bottom: 6rem;
}

/* ---------- Marquee géant noir, calé sous le header ----------
   Taille et calage : .marquee--giant dans components.css */
.contact-page .marquee--giant {
  color: #111;
}

/* ---------- Formulaire : deux colonnes asymétriques ---------- */
.contact-form {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.3rem, 0.75vw, 1rem);
  margin-top: clamp(2rem, 6vw, 4rem);
}

/* ---------- Desktop : groupe décalé à gauche + filet vertical noir,
   bord droit du filet aligné avec le bord droit du bloc message ---------- */
@media (min-width: 641px) {
  .form-fields {
    --fields-shift: clamp(0.3rem, 0.75vw, 1rem);
    position: relative;
    margin-right: var(--fields-shift);
  }

  .form-fields::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: calc(-1 * var(--fields-shift));
    width: 1px;
    background: #111;
  }
}

/* ---------- Champs : label + rangée (chevron + input) ---------- */
.form-fields {
  display: flex;
  flex-direction: column;
  gap: clamp(0.3rem, 0.75vw, 1rem);
}

.form-field {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0;
}

.form-field label {
  font-family: var(--font-serif);
  font-size: clamp(1.32rem, 2.52vw, 2.4rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: #111;
}

/* Rangée : chevron + conteneur à largeur variable */
.form-field__row {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ---------- Chevron : invisible, apparaît au focus ou si rempli ---------- */
.form-field__arrow {
  display: none;
  color: #999;
  font-size: 2rem;
  line-height: 1;
  flex: none;
  align-self: center;
  padding-inline: 0.15rem;
  transition: color 0.2s ease;
}

.form-field:focus-within .form-field__arrow,
.form-field__arrow.is-visible {
  display: inline;
}

.form-field:focus-within .form-field__arrow {
  color: #111;
}

/* ---------- Conteneur à largeur automatique ----------
   Le pseudo-élément ::after porte la largeur (via data-value) ;
   l'input est positionné en absolu pour remplir exactement. */
.form-field__input-wrap {
  display: inline-block;
  position: relative;
  min-width: 0;
  vertical-align: bottom;
}

.form-field__input-wrap::after {
  content: attr(data-value);
  visibility: hidden;
  white-space: pre;
  display: block;
  padding: 0.1rem 0.5rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  box-sizing: border-box;
}

.form-field__input-wrap input {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0.5rem 0.6rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: none;
  background: #ececec;
  border-radius: 0;
  color: #111;
  min-width: 0;
  text-align: left;
  transition: background 0.2s ease;
}

.form-field__input-wrap input::placeholder {
  color: #bbb;
}

.form-field__input-wrap input:focus {
  outline: 0 solid #111;
  outline-offset: 2px;
  background: #e3e3e3;
}

/* ---------- Bloc message ---------- */
.form-field--message {
  align-items: stretch;
  text-align: left;
  gap: 0;
  position: relative;
  padding-bottom: 0;
  margin-top: clamp(2rem, 4vw, 3.5rem);
}

.form-field--message .marquee {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 4vw, 2rem);
  color: #111;
  line-height: 1;
}

.form-field--message textarea {
  background: #ececec;
  border: none;
  border-radius: 0;
  padding: 0.25rem;
  min-height: 30rem;
  resize: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: #111;
  overflow: hidden;
  box-sizing: border-box;
}

.form-field--message textarea::placeholder {
  color: #bbb;
}

.form-field--message textarea:focus {
  outline: 0 solid #111;
  outline-offset: 2px;
  background: #e3e3e3;
}

/* ---------- Bouton picto (même forme que le picto Chocolata Graphics) ---------- */
.btn-submit {
  position: absolute;
  bottom: -42px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 82px;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-submit:hover {
  transform: translateX(-50%) scale(1.08);
}

.btn-submit:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

.btn-submit__shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: #111;
  transition: fill 0.3s ease;
}

.btn-submit:hover .btn-submit__shape {
  fill: #333;
}

.btn-submit__text {
  position: relative;
  z-index: 1;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--paper);
  line-height: 1.2;
  text-align: center;
  max-width: 70%;
  margin-top: -5px;
}

/* ---------- Message de statut (succès / erreur) ---------- */
.contact-form__status {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  line-height: 1.7;
  margin-top: 3rem;
}

.contact-form__status.is-error {
  color: var(--red);
}

.contact-form__status.is-success {
  color: #4a7c59;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .form-field {
    align-items: stretch;
    text-align: left;
  }

  .form-field label {
    font-size: clamp(0.96rem, 4.8vw, 1.44rem);
  }

  .form-field__row {
    display: flex;
    width: 100%;
  }

  .form-field__input-wrap {
    display: block;
    flex: 1;
  }

  .form-field__input-wrap input {
    padding: 0.5rem 0.6rem;
  }

  .form-field--message textarea {
    padding: 0.5rem 0.6rem;
  }

  .btn-submit {
    width: 70px;
    height: 72px;
    bottom: -36px;
  }
}
