/* ==========================================================================
   Wanaka Van — Configurateur
   Charte graphique officielle : fond blanc, texte noir, touches de doré
   (#D0C07A) et de gris clair (#F1F1F1). Titres en Lora (sans graisse),
   texte courant en Montserrat. Tout est piloté par les variables ci-dessous,
   aucune couleur en dur ailleurs dans ce fichier.
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #000000;
  --color-text-muted: #767676;
  --color-primary: #000000;
  --color-primary-dark: #000000;
  --color-accent: #d0c07a;
  --color-accent-dark: #b3a15a;
  --color-border: #e4e2d8;
  --color-error: #b0402b;
  --color-error-bg: #fbeae5;
  --color-info-bg: #f1f1f1;

  --font-heading: "Lora", Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --max-width: 720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

.hidden { display: none !important; }

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: 28px;
}
.brand {
  display: inline-block;
}
.brand-logo {
  height: 84px;
  width: auto;
  max-width: 100%;
}
.brand-tagline {
  margin: 10px 0 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Progress bar */
.progress-wrap { margin-bottom: 28px; }
.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  transition: width 0.35s ease;
}
.progress-label {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: right;
}

/* Banners */
.banner {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.banner p { margin: 0; }
.banner--info { background: var(--color-info-bg); color: var(--color-text); }
.banner--error { background: var(--color-error-bg); color: var(--color-error); flex-direction: column; align-items: flex-start; }
.banner-actions { display: flex; gap: 8px; }

/* Form shell */
.form-root {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.step-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--color-primary-dark);
  margin: 0 0 6px;
}
.step-description {
  color: var(--color-text-muted);
  margin: 0 0 28px;
}

/* Signature block (page "Votre aménagement") */
.step-signature {
  margin: 0 0 32px;
  padding: 20px 24px;
  background: var(--color-info-bg);
  border-radius: var(--radius);
}
.step-signature-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-primary-dark);
  margin: 0 0 10px;
}
.step-signature ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 1rem;
  color: var(--color-text);
}
.step-signature strong { font-weight: 600; }

/* Section content blocks (title/subtitle/paragraph/tip/callout) interleaved between fields */
.section-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-primary-dark);
  margin: 64px 0 10px;
}
.section-title:first-child { margin-top: 0; }
.section-divider {
  border: none;
  height: 1px;
  background: var(--color-info-bg);
  margin: 0 0 16px;
}
.section-subtitle {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  margin: 56px 0 8px;
}
.section-paragraph {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 0.875rem;
  margin: 0 0 18px;
  white-space: pre-line;
}
.section-tip {
  background: var(--color-info-bg);
  border-left: 3px solid var(--color-accent);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 14px 0 20px;
  font-size: 1rem;
  white-space: pre-line;
}
.section-callout {
  background: var(--color-info-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 14px 0 20px;
}
.section-callout-title {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 10px;
  color: var(--color-text);
}
.section-callout-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--color-text);
  font-size: 1rem;
}
.section-callout-list strong { font-weight: 600; }

/* Fields */
.field { margin-bottom: 28px; }
.field:last-child { margin-bottom: 0; }

.field-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text);
}
.field-label .required-mark {
  color: var(--color-accent-dark);
  margin-left: 2px;
}
.field-helper {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: -4px 0 8px;
}
.field-note {
  font-style: italic;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: -4px 0 8px;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%;
  font: inherit;
  padding: 11px 13px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 100px; resize: vertical; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(208, 192, 122, 0.3);
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--color-error);
}
.field-error {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 6px;
}

/* Choice groups (radio / checkbox) */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.choice-option {
  position: relative;
}
.choice-option input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.choice-option label {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s ease;
  user-select: none;
}
.choice-option input:checked + label {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #000;
}
.choice-option input:focus-visible + label {
  outline: 2px solid var(--color-accent-dark);
  outline-offset: 2px;
}

.other-detail {
  margin-top: 10px;
  max-width: 320px;
}

/* File upload */
.file-dropzone {
  margin-top: 14px;
}
.file-drop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1.5px dashed var(--color-accent);
  border-radius: var(--radius);
  padding: 14px 20px;
  text-align: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.file-drop-btn:hover, .file-drop-btn.dragover {
  border-color: var(--color-accent-dark);
  background: var(--color-info-bg);
}
.file-drop-btn input { display: none; }
.file-hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 8px 0 0;
}
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--color-info-bg);
  border-radius: 8px;
  font-size: 0.85rem;
}
.file-item .file-status--uploading { color: var(--color-text-muted); }
.file-item .file-status--error { color: var(--color-error); }
.file-item .file-status--done { color: var(--color-text); }
.file-remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

/* Navigation buttons */
.step-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  gap: 12px;
}
.btn {
  font: inherit;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn--primary {
  background: var(--color-accent);
  color: #000;
}
.btn--primary:hover { background: var(--color-accent-dark); }
.btn--primary:disabled {
  background: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
}
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--ghost:hover { border-color: var(--color-accent); }

/* Confirmation screen */
.confirmation {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 48px 32px;
  text-align: center;
}
.confirmation h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-primary-dark);
  font-size: 1.5rem;
}
.confirmation a { color: var(--color-accent-dark); }

/* Footer */
.site-footer {
  text-align: center;
  margin-top: 36px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Mobile : la page elle-même n'a plus de marge latérale, donc l'encadré
   blanc du formulaire (--color-surface == --color-bg, déjà blanc sur blanc)
   touche directement les bords de l'écran — seul son propre padding interne
   sépare le texte du bord. Les éléments qui ont besoin de rester en retrait
   (logo/tagline centrés, bandeaux, pied de page) reçoivent leur propre
   padding horizontal. Ce bloc reste en toute fin de fichier pour être sûr
   qu'il l'emporte sur les règles de base ci-dessus (même spécificité, donc
   l'ordre dans le fichier tranche). */
@media (max-width: 640px) {
  .page { padding: 20px 0 40px; }
  .site-header { margin-bottom: 20px; padding: 0 16px; }
  .brand-logo { height: 60px; }
  .progress-wrap { padding: 0 16px; }
  .banner { margin-left: 16px; margin-right: 16px; }
  .form-root {
    padding: 20px 16px;
    border-radius: 0;
    box-shadow: none;
  }
  .confirmation {
    padding: 32px 20px;
    border-radius: 0;
    box-shadow: none;
  }
  .site-footer { padding: 0 16px; }
}
