/* ============================================================
   form.css — Styles du formulaire client (index.php)
   ============================================================ */

/* ── Header ── */
.site-header {
  background: var(--red);
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 320px; height: 320px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  pointer-events: none;
}
.site-header::after {
  content: '';
  position: absolute;
  left: -40px; bottom: -60px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  pointer-events: none;
}
.header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}
.header-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--white);
}
.header-logo img { width: 100%; height: 100%; object-fit: cover; }
.header-title h1 {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
}
.header-title p { color: rgba(255,255,255,.72); font-size: 14px; margin-top: 4px; }

/* ── Bannière de succès ── */
.success-banner {
  background: linear-gradient(135deg, #145a32 0%, #1e8449 100%);
  color: var(--white);
  text-align: center;
  padding: 48px 24px;
}
.success-banner .icon { font-size: 56px; margin-bottom: 16px; }
.success-banner h2 { font-family: var(--font-display); font-size: 26px; margin-bottom: 10px; }
.success-banner p  { opacity: .82; font-size: 15px; max-width: 420px; margin: 0 auto; }

/* ── Conteneur principal ── */
.form-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}

/* ── Cartes de section ── */
.form-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 24px;
}
.form-card-header {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dk) 100%);
  padding: 16px 26px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.form-card-header .step-num {
  width: 30px; height: 30px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--white);
  flex-shrink: 0;
}
.form-card-header h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}
.form-card-body { padding: 26px; }

/* ── Grilles ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── Champs ── */
.field { display: flex; flex-direction: column; }
.field + .field { margin-top: 18px; }
.field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--gray);
  margin-bottom: 7px;
}
.field label .req { color: var(--red); margin-left: 2px; }
.field input,
.field select,
.field textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 15px;
  background: var(--white);
  color: var(--text);
  transition: border .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B6B6B' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,.10);
}
.field input.invalid,
.field select.invalid,
.field textarea.invalid {
  border-color: var(--red);
}
.field textarea { resize: vertical; min-height: 90px; }
.field .hint { font-size: 11px; color: #aaa; margin-top: 5px; line-height: 1.4; }

/* ── Groupes radio/checkbox ── */
.radio-group,
.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 2px;
}
.radio-group label,
.check-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 500;
  transition: all .18s;
  background: var(--white);
  user-select: none;
}
.radio-group label:hover,
.check-group label:hover {
  border-color: var(--red);
  background: var(--red-xlt);
}
.radio-group input[type="radio"],
.check-group input[type="checkbox"] { display: none; }

.radio-group label:has(input:checked),
.check-group label:has(input:checked) {
  border-color: var(--red);
  background: var(--red-lt);
  color: var(--red-dk);
}
.radio-dot {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: all .18s;
  background: var(--white);
}
.radio-group label:has(input:checked) .radio-dot {
  border-color: var(--red);
  background: var(--red);
  box-shadow: inset 0 0 0 3px var(--white);
}

/* ── Prix badges ── */
.price-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  margin-left: 4px;
  vertical-align: middle;
}
.price-badge-red { background: var(--red); color: var(--white); }
.price-badge-gray { background: #E0DADA; color: var(--gray-dk); }

/* ── Blocs conditionnels ── */
.conditional {
  display: none;
  margin-top: 16px;
  padding: 18px;
  background: var(--red-xlt);
  border-radius: var(--radius-md);
  border: 1.5px dashed #e8aab5;
  animation: fadeIn .2s ease;
}
.conditional.show { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Upload fichier ── */
.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  background: var(--off);
}
.file-drop:hover, .file-drop.dragover {
  border-color: var(--red);
  background: var(--red-lt);
}
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.file-drop .drop-icon  { font-size: 36px; margin-bottom: 10px; }
.file-drop p           { font-size: 14px; color: var(--gray); line-height: 1.5; }
.file-drop strong      { color: var(--red); }
.file-drop .file-types { font-size: 11px; color: #bbb; margin-top: 6px; }
.file-name-display     { margin-top: 10px; font-size: 13px; color: var(--red); font-weight: 500; }

/* ── Bouton de soumission ── */
.submit-wrap { margin-top: 8px; }
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dk) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  padding: 17px;
  font-size: 17px;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .3px;
  transition: all .2s;
  box-shadow: var(--shadow-red);
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200,16,46,.45);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* ── Map preview ── */
#map-preview {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-md);
  margin-top: 10px;
  border: 1.5px solid var(--border);
  display: none;
}
#map-preview.show { display: block; }

/* ── Progress steps ── */
.form-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.progress-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  white-space: nowrap;
}
.progress-step .p-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--border);
  color: var(--gray);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.progress-step.done .p-num  { background: var(--red); color: #fff; }
.progress-step.done         { color: var(--red); }
.progress-sep { flex: 1; height: 1.5px; background: var(--border); min-width: 16px; }
.progress-sep.done { background: var(--red); }
