/* ═══════════════════════════════════════════════════════════════════════════
   CLEARZI — Page « Contact »
   Styles propres à la page. Consomme exclusivement les tokens var(--cz-*)
   définis dans styles.css (les #000 sont des masques d'alpha, pas des couleurs).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ══ Hero — bandeau clair centré ══ */
.ct-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(42% 60% at 12% 0%, rgba(124, 247, 212, 0.2), transparent 62%),
    radial-gradient(48% 66% at 88% 16%, rgba(124, 247, 212, 0.14), transparent 68%),
    linear-gradient(180deg, var(--cz-azure) 0%, var(--cz-bg-base) 94%);
}

.ct-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--cz-dots-ink);
  background-size: 26px 26px;
  -webkit-mask: linear-gradient(#000 45%, transparent 92%);
  mask: linear-gradient(#000 45%, transparent 92%);
  opacity: 0.5;
  pointer-events: none;
}

.ct-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 158px var(--cz-margin) 60px;
  text-align: center;
}

.ct-hero .section-tag {
  margin-bottom: 20px;
}

.ct-hero h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  letter-spacing: -0.03em;
}

.ct-hero-sub {
  margin: 16px auto 0;
  max-width: 34em;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--cz-text-soft);
}

/* ══ Formulaire ══ */
.ct-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--cz-margin) 96px;
}

.ct-form {
  position: relative;
  background: var(--cz-white);
  border: 1px solid var(--cz-border-medium);
  border-radius: var(--cz-radius-panel);
  padding: 40px;
  box-shadow: var(--cz-shadow-card);
}

.ct-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.ct-row:first-of-type {
  margin-top: 0;
}

.ct-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ct-field--full {
  margin-top: 18px;
}

.ct-field label {
  margin-bottom: 6px;
  font-family: var(--cz-font-medium);
  font-weight: 500;
  font-size: 13px;
  color: var(--cz-text-soft);
}

.ct-optional {
  margin-left: 5px;
  font-family: var(--cz-font-regular);
  color: var(--cz-neutral-bolder);
}

.ct-input,
.ct-textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--cz-radius-sm);
  background: var(--cz-white);
  border: 1px solid var(--cz-border-moderate);
  font-family: var(--cz-font-regular);
  font-size: 14.5px;
  color: var(--cz-ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.ct-textarea {
  height: auto;
  min-height: 148px;
  padding: 12px 14px;
  line-height: 1.6;
  resize: vertical;
}

.ct-input::placeholder,
.ct-textarea::placeholder {
  color: var(--cz-neutral-bolder);
}

.ct-input:focus,
.ct-textarea:focus {
  outline: none;
  border-color: var(--cz-brand-400);
  box-shadow: var(--cz-focus-brand);
}

/* pied du formulaire : bouton d'envoi + note discrète */
.ct-form-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.ct-submit {
  cursor: pointer;
}

.ct-submit:disabled {
  opacity: 0.7;
  cursor: default;
}

.ct-note {
  font-size: 13.5px;
  color: var(--cz-text-moderate);
}

/* petit indicateur de chargement pendant l'envoi */
.ct-spinner {
  width: 17px;
  height: 17px;
  border-radius: var(--cz-radius-full);
  border: 2px solid rgba(10, 33, 38, 0.25);
  border-top-color: var(--cz-ink);
  animation: ct-spin 0.7s linear infinite;
}

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

/* ══ Écran de confirmation ══ */
.ct-success {
  text-align: center;
  padding: 16px 0 8px;
}

.ct-success[hidden] {
  display: none;
}

.ct-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  border-radius: var(--cz-radius-full);
  background: var(--cz-bg-selected);
  box-shadow: inset 0 0 0 1px var(--cz-brand-border);
}

.ct-check svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--cz-brand-700);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ct-success h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  letter-spacing: -0.02em;
  color: var(--cz-ink);
}

.ct-success p {
  margin: 12px auto 0;
  max-width: 30em;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--cz-text-moderate);
}

.ct-success .btn {
  margin-top: 26px;
}

/* message d'erreur */
.ct-error {
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--cz-negative);
}

.ct-error[hidden] {
  display: none;
}

.ct-error a {
  color: var(--cz-negative);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ══ Responsive ══ */
@media (max-width: 640px) {
  .ct-hero-inner {
    padding: 128px 20px 48px;
  }

  .ct-section {
    padding: 0 20px 72px;
  }

  .ct-form {
    padding: 26px 22px;
  }

  .ct-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-spinner {
    animation-duration: 1.6s;
  }
}
