/* ============================================================
   SARGAWATT – Page /sargasses/demande
   Extends styles.css + sargasses.css (Direction A)
   ============================================================ */

/* ---------- Hero reassurance line ---------- */
.hero-reassure {
  margin-top: 18px;
  font-size: 14.5px; color: var(--ink-soft); line-height: 1.55;
  max-width: 560px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-600); margin-bottom: 16px;
}
.hero-eyebrow svg { width: 15px; height: 15px; }

/* ============================================================
   FORM SECTION LAYOUT
   ============================================================ */
.demande { background: var(--surface); border-block: 1px solid var(--line); }
.demande-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.95fr;
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}

.form-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(26px, 3vw, 40px);
}
.form-card h2 {
  font-size: clamp(22px, 2.4vw, 30px);
}
.form-card .form-intro {
  margin-top: 10px; font-size: 15px; color: var(--ink-soft);
}

/* ---------- Fields ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  margin-top: 28px;
}
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--font-body); font-weight: 700; font-size: 13px;
  color: var(--ink); letter-spacing: 0.01em;
}
.form-field label .opt { color: var(--gray); font-weight: 600; letter-spacing: 0; }
.form-field label .req { color: var(--teal-600); margin-left: 2px; }

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.form-field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--gray); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(0,151,157,0.14);
}
/* select chevron */
.form-field.has-select { position: relative; }
.form-field select { padding-right: 40px; cursor: pointer; }
.form-field .sel-chevron {
  position: absolute; right: 14px; bottom: 14px;
  width: 16px; height: 16px; color: var(--gray); pointer-events: none;
}
.form-field select:invalid { color: var(--gray); }
.phone-combo {
  /* Select indicatif + numero sur une seule ligne pour les formulaires internationaux. */
  display: grid;
  grid-template-columns: minmax(155px, 0.78fr) minmax(0, 1fr);
  gap: 8px;
}
.phone-combo select {
  -webkit-appearance: auto;
  appearance: auto;
  padding-right: 10px;
}
.phone-combo input {
  min-width: 0;
}

/* invalid state on submit */
.form-field.error input,
.form-field.error select { border-color: #c4453f; box-shadow: 0 0 0 3px rgba(196,69,63,0.12); }
.form-field .field-error {
  font-size: 12px; color: #c4453f; font-weight: 600; display: none;
}
.form-field.error .field-error { display: block; }

.form-privacy {
  margin-top: 22px;
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--ink-soft); line-height: 1.5;
}
.form-privacy svg { flex: none; width: 16px; height: 16px; color: var(--teal-700); margin-top: 1px; }

.form-actions { margin-top: 22px; }
.form-actions .btn { width: 100%; justify-content: center; padding-block: 16px; font-size: 16px; }

/* ---------- Success state ---------- */
.form-success { display: none; text-align: center; padding: clamp(20px, 4vw, 48px) 8px; }
.form-card.sent .form-body { display: none; }
.form-card.sent .form-success { display: block; }
.form-success .fs-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--teal-tint); color: var(--teal-700);
  display: grid; place-items: center; margin: 0 auto 22px;
  animation: fs-pop 0.5s var(--ease) both;
}
.form-success .fs-check svg { width: 32px; height: 32px; }
@keyframes fs-pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.form-success h3 { font-size: clamp(22px, 2.6vw, 28px); }
.form-success p {
  margin: 16px auto 0; max-width: 460px;
  font-size: 16px; color: var(--ink-soft); line-height: 1.6;
}
@media (prefers-reduced-motion: reduce) {
  .form-success .fs-check { animation: none; }
}

/* ============================================================
   ASIDE – reassurance blocks
   ============================================================ */
.demande-aside {
  display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 148px;
}
.aside-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.aside-card h3 {
  font-size: 17px; font-family: var(--font-display); font-weight: 600;
  margin-bottom: 16px;
}
.aside-list { display: flex; flex-direction: column; gap: 13px; }
.aside-list li { display: flex; gap: 11px; font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
.aside-list li svg { flex: none; width: 18px; height: 18px; color: var(--teal); margin-top: 1px; }

.aside-steps { display: flex; flex-direction: column; gap: 16px; counter-reset: astep; }
.aside-step { display: flex; gap: 14px; align-items: flex-start; }
.aside-step .as-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  display: grid; place-items: center;
}
.aside-step p { font-size: 14px; color: var(--ink); line-height: 1.4; }

/* ============================================================
   POURQUOI – 3 cartes
   ============================================================ */
.reasons-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: clamp(30px, 4vw, 44px);
}
.reason {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.reason:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--teal); }
.reason .reason-ico {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--teal-tint); color: var(--teal-700);
  display: grid; place-items: center; margin-bottom: 18px;
}
.reason .reason-ico svg { width: 24px; height: 24px; }
.reason h3 { font-size: 18.5px; font-family: var(--font-display); font-weight: 600; }
.reason p { margin-top: 10px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .demande-layout { grid-template-columns: 1fr; }
  .demande-aside { position: static; }
}
@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
  .phone-combo { grid-template-columns: 1fr; }
  .reasons-grid { grid-template-columns: 1fr; }
}

/* ---------- Etats d'envoi des formulaires (Web3Forms) ---------- */
.form-error-msg { display: none; margin-top: 14px; color: #c4453f; font-weight: 500; }
.btn.is-loading { opacity: 0.65; pointer-events: none; }
