/* ============================================================
   HUB Hôtellerie — Questionnaire (soumission.html)
   ============================================================ */

.form-page { background: var(--paper-alt); min-height: 100vh; }
.form-wrap { max-width: 1240px; margin: 0 auto; padding: 40px 24px 80px; }

/* ---------- Barre de progression ---------- */
.progress { margin-bottom: 36px; }
.progress__bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--hub-blue); width: 10%; transition: width .4s ease; border-radius: 999px; }
.progress__meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--slate); }
.progress__step-name { font-weight: 600; color: var(--hub-navy); }

/* ---------- Carte de l'étape ---------- */
.step-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 44px 52px; }
.step-card__head { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.step-card__num { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--hub-blue); margin-bottom: 8px; }
.step-card__title { font-size: 26px; color: var(--hub-navy); }
.step-card__desc { font-size: 14.5px; color: var(--slate); margin-top: 6px; }

.q-step { display: none; }
.q-step.active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Champs ---------- */
.field { margin-bottom: 20px; }
.field__label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field__hint { font-size: 12.5px; color: var(--slate); font-weight: 400; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=number], .field input[type=date], .field input[type=url], .field select, .field textarea {
    width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--ink);
    padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: var(--paper); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--hub-blue); box-shadow: 0 0 0 3px rgba(0,160,225,.12);
}
.field textarea { resize: vertical; min-height: 84px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ---------- Boutons radio / oui-non ---------- */
.yn { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.yn label { padding: 9px 20px; font-size: 14px; font-weight: 600; color: var(--slate); cursor: pointer; transition: all .15s; border-right: 1.5px solid var(--line); }
.yn label:last-child { border-right: none; }
.yn input { display: none; }
.yn input:checked + label { background: var(--hub-blue); color: #fff; }
.yn--danger input:checked + label { background: var(--err); }

/* ligne avec libellé + oui/non alignés */
.row-yn { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--paper-alt); }
.row-yn:last-child { border-bottom: none; }
.row-yn__q { font-size: 14.5px; color: var(--ink); flex: 1; }

/* sous-question révélée */
.subq { margin-top: 14px; padding: 16px 18px; background: var(--hub-blue-tint); border-radius: var(--radius-sm); border-left: 3px solid var(--hub-blue); }
.subq.hidden { display: none; }

/* chips à cocher (type d'entreprise, etc.) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label { padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--slate); cursor: pointer; transition: all .15s; }
.chips input { display: none; }
.chips input:checked + label, .chips label.checked { background: var(--hub-blue-soft); border-color: var(--hub-blue); color: var(--hub-blue-dark); }

/* ---------- Tableau dynamique (revenus, sinistres, créanciers) ---------- */
.dyn-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.dyn-table th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--slate); padding: 8px 10px; border-bottom: 2px solid var(--line); }
.dyn-table td { padding: 6px 8px; }
.dyn-table input { width: 100%; padding: 9px 11px; font-size: 14px; border: 1.5px solid var(--line); border-radius: 6px; font-family: var(--font-body); }
.dyn-table input:focus { outline: none; border-color: var(--hub-blue); }
.dyn-remove { background: none; border: none; color: var(--err); cursor: pointer; font-size: 18px; padding: 4px 8px; }
.dyn-add { margin-top: 12px; background: var(--hub-blue-soft); color: var(--hub-blue-dark); border: none; padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; cursor: pointer; font-family: var(--font-body); display: inline-flex; align-items: center; gap: 8px; }
.dyn-add:hover { background: #d4ecf9; }

/* ---------- Structure du bâtiment (matrice) ---------- */
.matrix { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.matrix__col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--hub-navy); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid var(--hub-blue-soft); }
.matrix__col label { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; color: var(--ink); cursor: pointer; }

/* upload zone (photos) */
.upload { border: 2px dashed var(--line); border-radius: var(--radius-md); padding: 32px; text-align: center; color: var(--slate); cursor: pointer; transition: all .2s; }
.upload:hover { border-color: var(--hub-blue); background: var(--hub-blue-tint); }
.upload i { font-size: 30px; color: var(--hub-blue); margin-bottom: 10px; }

/* ---------- Navigation entre étapes ---------- */
.step-nav { display: flex; justify-content: space-between; margin-top: 32px; }
.step-nav .btn--outline[disabled] { opacity: .4; cursor: not-allowed; }

/* ---------- Mini-navigation latérale des sections ---------- */
.q-sidebar { position: sticky; top: 96px; }
.q-sidebar ol { list-style: none; }
.q-sidebar li { font-size: 13.5px; color: var(--slate); padding: 8px 0 8px 28px; position: relative; cursor: pointer; transition: color .2s; }
.q-sidebar li::before { content: ""; position: absolute; left: 6px; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: background .2s; }
.q-sidebar li.active { color: var(--hub-blue-dark); font-weight: 600; }
.q-sidebar li.active::before { background: var(--hub-blue); }
.q-sidebar li.done::before { background: var(--ok); }

.q-layout { display: grid; grid-template-columns: 240px 1fr; gap: 44px; align-items: start; }
@media (max-width: 1024px) {
    .q-layout { grid-template-columns: 1fr; }
    .q-sidebar { display: none; }
    .step-card { padding: 28px 22px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* écran de confirmation */
.done-screen { text-align: center; padding: 60px 30px; }
.done-screen__icon { width: 84px; height: 84px; border-radius: 50%; background: var(--hub-blue-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; font-size: 40px; margin: 0 auto 24px; }
.done-screen h2 { font-size: 30px; color: var(--hub-navy); margin-bottom: 12px; }
.done-screen p { color: var(--slate); max-width: 460px; margin: 0 auto 28px; }

/* ---------- Recherche Google Places ---------- */
.places-box { background: var(--hub-blue-tint); border: 1px solid var(--hub-blue-soft); border-radius: var(--radius-md); padding: 20px 22px; margin-bottom: 26px; }
.places-box__label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--hub-navy); margin-bottom: 6px; }
.places-box__label i { color: var(--hub-blue); }
.places-box__hint { font-size: 12.5px; color: var(--slate); margin-bottom: 10px; }
.places-box input.places-input { width: 100%; font-family: var(--font-body); font-size: 15px; padding: 12px 14px; border: 1.5px solid var(--hub-blue-soft); border-radius: var(--radius-sm); background: #fff; }
.places-box input.places-input:focus { outline: none; border-color: var(--hub-blue); box-shadow: 0 0 0 3px rgba(0,160,225,.12); }
.places-box__attr { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin-top: 8px; font-size: 11px; color: var(--slate); }
.places-box__manual { font-size: 12px; color: var(--slate); text-align: center; margin-top: 12px; font-style: italic; }
/* la liste deroulante Google (pac-container) passe au-dessus de tout */
.pac-container { z-index: 9999; border-radius: 8px; box-shadow: var(--shadow-md); border: 1px solid var(--line); font-family: var(--font-body); margin-top: 4px; }
.pac-item { padding: 8px 12px; cursor: pointer; }

/* liste d'autocompletion custom (alimentee par le proxy) */
.places-box { position: relative; }
.pac-list { position: absolute; left: 22px; right: 22px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-md); margin-top: 4px; z-index: 9999; max-height: 260px; overflow-y: auto; }
.pac-row { padding: 10px 14px; font-size: 14px; cursor: pointer; border-bottom: 1px solid var(--paper-alt); }
.pac-row:last-child { border-bottom: none; }
.pac-row:hover { background: var(--hub-blue-tint); color: var(--hub-blue-dark); }

/* ---------- Emplacements multiples (etape 5) ---------- */
.location-block{
  border:1px solid var(--line,#e2e8f0);
  border-radius:12px;
  padding:18px 20px;
  margin-bottom:18px;
  background:rgba(0,160,225,0.02);
}
.location-block__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line,#e2e8f0);
}
.location-block__title{
  font-weight:700;
  color:var(--brand,#064EA0);
  font-size:1.02rem;
}
.location-block__remove{
  background:none;
  border:1px solid #ef4444;
  color:#ef4444;
  border-radius:8px;
  padding:5px 12px;
  font-size:.85rem;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:all .15s;
}
.location-block__remove:hover{ background:#ef4444; color:#fff; }

/* ---------- Champs dans les sous-questions (.subq) ---------- */
.subq textarea,
.subq input[type=text],
.subq input[type=number],
.subq input[type=email],
.subq input[type=tel] {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  margin-top: 6px;
}
.subq textarea {
  resize: vertical;
  min-height: 110px;
}
.subq textarea:focus,
.subq input:focus {
  outline: none;
  border-color: var(--hub-blue);
}
/* Un peu plus de hauteur pour les textarea principaux aussi */
.field textarea { min-height: 110px; }
