/* ============================================================
   style.css — Valroya Conciergerie QCM
   Palette : blanc cassé / or doux / vert foncé (luxe discret)
   ============================================================ */

/* ── Variables globales ── */
:root {
  --primary: #284f5c; /* bleu-vert foncé principal */
  --secondary: #465244; /* vert kaki secondaire */
  --accent: #e1ab3d; /* or/ambre accent */
  --accent-dark: #bf8838; /* or foncé hover */
  --dark: #1a2e35; /* fond très foncé header/footer */
  --cream: #faf8f3; /* fond général */
  --white: #ffffff;
  --text: #2c2c2c; /* texte principal */
  --muted: #6b6b6b; /* texte secondaire */
  --border: #dde5e7; /* bordures */
  --error: #c0392b;
  --success: #27ae60;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ── Reset de base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "DM Sans", sans-serif;
  background-color: var(--cream);
  color: var(--text);
  line-height: 1.6;
  /* Grain subtil en fond pour un effet premium */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
}

/* ── Utilitaire : cacher un élément ── */
.hidden {
  display: none !important;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background-color: var(--dark);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Groupe logo image + texte côte à côte */
.logo-group {
  display: flex;
  align-items: center; /* centre verticalement l'image et le texte */
  gap: 14px; /* espace entre l'image et le texte */
}

/* Image du logo — si le fichier logo.png n'existe pas, rien ne casse */
.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  /* Si l'image ne charge pas, elle est invisible mais le texte reste */
}

/* Texte logo */
.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1; /* évite que le line-height décale le centrage vertical */
}

.logo span {
  color: var(--accent);
}

.header-nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--white);
}

/* ============================================================
   HERO (section d'introduction)
   ============================================================ */
.hero {
  background: linear-gradient(
    135deg,
    var(--dark) 0%,
    var(--primary) 60%,
    var(--secondary) 100%
  );
  color: var(--white);
  padding: 64px 24px 56px;
  text-align: center;
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-cta-line {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  background: var(--accent);
  color: var(--dark);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ============================================================
   FORMULAIRE WRAPPER
   ============================================================ */
.form-wrapper {
  max-width: 780px;
  margin: 40px auto 60px;
  padding: 0 20px;
}

/* Chaque grande section du formulaire (coordonnées, bien, etc.) */
.form-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 40px;
  margin-bottom: 28px;
  border-top: 3px solid var(--primary); /* liseré primary en haut */
}

/* ── En-tête de section (numéro + titre) ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.section-number {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  min-width: 36px;
}

.section-header h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary);
}

/* ── Grille 2 colonnes sur desktop, 1 colonne sur mobile ── */
.field-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.field-grid.two-col {
  grid-template-columns: 1fr 1fr;
}

/* ── Champ individuel ── */
.field {
  margin-bottom: 20px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-small input {
  max-width: 160px;
}

/* Labels */
.field > label,
.field > label:first-child {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.req {
  color: var(--error);
}

/* Inputs texte / email / tel / number */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(40, 79, 92, 0.15);
}

/* ── Groupes radio ── */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Chaque option radio ou checkbox */
.radio-option,
.checkbox-option {
  display: flex;
  align-items: center; /* ← CORRIGÉ : centre verticalement le bouton et le texte */
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  font-size: 0.92rem;
  line-height: 1.4;
}

.radio-option:hover,
.checkbox-option:hover {
  border-color: var(--primary);
  background: #eef3f5;
}

/* Quand l'option est sélectionnée */
.radio-option.selected,
.checkbox-option.selected {
  border-color: var(--primary);
  background: #eef3f5;
}

.radio-option input,
.checkbox-option input {
  /* On fixe une taille et on empêche le shrink pour l'alignement */
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--primary); /* couleur du bouton radio/checkbox natif */
  cursor: pointer;
}

/* ── Champ conditionnel (apparaît si "Autres" est coché) ── */
.conditional-field {
  padding: 10px 16px 4px;
}

.conditional-field input {
  background: var(--white);
}

/* ============================================================
   MESSAGES D'ERREUR / SUCCÈS
   ============================================================ */
.form-error {
  background: #fdf0ef;
  border: 1.5px solid var(--error);
  border-radius: var(--radius);
  color: var(--error);
  padding: 14px 20px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.success-block {
  text-align: center;
  padding: 60px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-block h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.success-block p {
  color: var(--muted);
  font-size: 1rem;
}

/* ============================================================
   BOUTON SUBMIT
   ============================================================ */
.submit-wrapper {
  text-align: center;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--dark);
  border: none;
  border-radius: var(--radius);
  padding: 16px 48px;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
  box-shadow: 0 4px 16px rgba(225, 171, 61, 0.35);
}

.btn-submit:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.btn-submit:active {
  transform: translateY(0);
}

/* Spinner de chargement */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--dark);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.submit-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 24px;
  font-size: 0.82rem;
  line-height: 1.8;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ============================================================
   RESPONSIVE — Mobile (< 600px)
   ============================================================ */
@media (max-width: 600px) {
  .field-grid.two-col {
    grid-template-columns: 1fr; /* passe en 1 colonne sur mobile */
  }

  .form-section {
    padding: 24px 20px;
  }

  .hero {
    padding: 44px 20px 36px;
  }

  .btn-submit {
    width: 100%;
    justify-content: center;
  }

  .field-small input {
    max-width: 100%;
  }
}
