/* ============================================================================
   ASSURANCES PARADIS — Styles communs des simulateurs de devis (wizard)
   Partagé par devis-auto.html, devis-habitation.html et tout futur module.
   Repose sur les variables et classes de base définies dans style.css
   (couleurs, boutons, reset).
   ============================================================================ */

.wiz-page { background: var(--gray-50); min-height: 100vh; padding-bottom: 80px; }

/* ------------------------------- EN-TÊTE / PROGRESSION ---------------------- */
.wiz-topbar {
  position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--gray-200);
}
.wiz-topbar-inner { display: flex; align-items: center; gap: 18px; padding: 16px 24px; max-width: 780px; margin: 0 auto; }
.wiz-back-btn {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--gray-50); color: var(--navy-900); flex: none; transition: background .2s;
}
.wiz-back-btn:hover { background: var(--gray-100); }
.wiz-back-btn svg { width: 18px; height: 18px; }
.wiz-progress-wrap { flex: 1; }
.wiz-progress-meta { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--navy-700); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .03em; }
.wiz-progress-track { height: 6px; border-radius: 99px; background: var(--gray-200); overflow: hidden; }
.wiz-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--cyan-500), var(--navy-800)); transition: width .4s ease; border-radius: 99px; }
.wiz-logo-mini { flex: none; height: 30px; }

/* --------------------------------- ÉCRAN ------------------------------------- */
.wiz-container { max-width: 780px; margin: 0 auto; padding: 0 24px; }
#wizard-root { padding-top: 48px; }
.wiz-screen { animation: wizFadeSlide .4s ease; }
@keyframes wizFadeSlide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
.wiz-screen-body { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-sm); }
.wiz-title { font-size: clamp(22px, 3vw, 28px); color: var(--navy-900); margin: 0 0 10px; }
.wiz-subtitle { color: var(--gray-600); font-size: 15px; margin: 0 0 28px; }
.wiz-hint { color: var(--gray-400); font-size: 13px; margin: 12px 0 0; }
.wiz-continue { margin-top: 24px; }

.wiz-shake { animation: wizShake .4s; }
@keyframes wizShake { 10%,90%{transform:translateX(-2px);} 20%,80%{transform:translateX(4px);} 30%,50%,70%{transform:translateX(-6px);} 40%,60%{transform:translateX(6px);} }

/* ---------------------------------- CHAMPS ----------------------------------- */
.wiz-field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.wiz-field { display: flex; flex-direction: column; gap: 6px; }
.wiz-field label { font-size: 13.5px; font-weight: 600; color: var(--navy-900); }
.wiz-field input, .wiz-select, .wiz-search {
  padding: 12px 14px; border: 1.5px solid var(--gray-200); border-radius: 10px; font-size: 14.5px;
  font-family: inherit; background: #fbfdfe; color: var(--gray-900); transition: border-color .2s, box-shadow .2s;
}
.wiz-field input:focus, .wiz-select:focus, .wiz-search:focus {
  outline: none; border-color: var(--cyan-500); box-shadow: 0 0 0 3px rgba(18,168,232,.15); background: #fff;
}
.wiz-search { width: 100%; margin-bottom: 18px; }
.wiz-input-row { display: flex; gap: 12px; flex-wrap: wrap; }
.wiz-input-row input { flex: 1; min-width: 180px; }
.wiz-skip { margin-top: 16px; font-size: 13.5px; text-decoration: underline; }
.wiz-unknown { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--gray-600); cursor: pointer; }
.wiz-unknown input { margin: 0; }
.wiz-field input:disabled { background: var(--gray-100); color: var(--gray-400); }
@media (max-width: 640px) { .wiz-field-grid { grid-template-columns: 1fr; } }

/* ------------------------------- CARTES DE CHOIX ------------------------------ */
.wiz-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.wiz-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
  padding: 20px; border-radius: var(--radius-md); border: 1.5px solid var(--gray-200); background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.wiz-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.wiz-card.selected { border-color: var(--cyan-500); box-shadow: 0 0 0 3px rgba(18,168,232,.15); background: var(--cyan-100); }
.wiz-card-icon { width: 30px; height: 30px; color: var(--cyan-500); }
.wiz-card-label { font-weight: 700; color: var(--navy-900); font-size: 15px; }
.wiz-card-desc { font-size: 13px; color: var(--gray-600); }

/* -------------------------------- GRILLE MARQUES ------------------------------- */
.wiz-brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.wiz-brand-card {
  padding: 16px 10px; border-radius: 12px; border: 1.5px solid var(--gray-200); background: #fff;
  font-weight: 700; font-size: 14px; color: var(--navy-900); text-align: center; transition: border-color .2s, transform .2s;
}
.wiz-brand-card:hover { transform: translateY(-2px); border-color: var(--cyan-400); }
#brand-other-wrap { margin-top: 18px; }

/* ------------------------------- LISTES SWITCH -------------------------------- */
.wiz-switch-list { display: grid; gap: 10px; }
.wiz-switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; border-radius: 12px; border: 1.5px solid var(--gray-200); cursor: pointer; transition: border-color .2s, background .2s;
}
.wiz-switch-row.on { border-color: var(--green-500); background: var(--green-100); }
.wiz-switch-text { display: flex; flex-direction: column; gap: 2px; }
.wiz-switch-text strong { color: var(--navy-900); font-size: 14.5px; }
.wiz-switch-text small { color: var(--gray-600); font-size: 12.5px; }
.wiz-switch-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.wiz-switch-track { display: inline-block; width: 44px; height: 26px; border-radius: 99px; background: var(--gray-200); position: relative; transition: background .2s; flex: none; }
.wiz-switch-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.wiz-switch-row.on .wiz-switch-track { background: var(--green-500); }
.wiz-switch-row.on .wiz-switch-thumb { transform: translateX(18px); }

/* -------------------------------- FORMULES ------------------------------------ */
.wiz-formule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wiz-formule-card {
  position: relative; text-align: left; padding: 24px 20px; border-radius: var(--radius-md); border: 1.5px solid var(--gray-200);
  background: #fff; display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.wiz-formule-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.wiz-formule-card.selected { border-color: var(--cyan-500); box-shadow: 0 0 0 3px rgba(18,168,232,.15); }
.wiz-formule-card.highlight { border-color: var(--navy-700); }
.wiz-formule-badge { position: absolute; top: -11px; right: 16px; background: var(--navy-900); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.wiz-formule-card h4 { margin: 0; color: var(--navy-900); font-size: 17px; }
.wiz-formule-subtitle { margin: 0; font-size: 13px; color: var(--gray-600); }
.wiz-formule-card ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.wiz-formule-card li { font-size: 12.5px; color: var(--gray-600); }
@media (max-width: 860px) { .wiz-formule-grid { grid-template-columns: 1fr; } }

/* ------------------------------- RÉCAPITULATIF -------------------------------- */
.wiz-recap-block { border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 18px 20px; margin-bottom: 14px; }
.wiz-recap-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.wiz-recap-head h4 { margin: 0; color: var(--navy-900); font-size: 15px; }
.wiz-recap-edit { font-size: 12.5px; font-weight: 700; color: var(--cyan-500); text-decoration: underline; }
.wiz-recap-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13.5px; border-top: 1px dashed var(--gray-200); }
.wiz-recap-row:first-of-type { border-top: none; }
.wiz-recap-row span { color: var(--gray-600); }
.wiz-recap-row strong { color: var(--navy-900); text-align: right; }

/* ------------------------------- CONFIRMATION --------------------------------- */
.wiz-confirmation { text-align: center; padding: 20px 0; }
.wiz-confirmation-icon { width: 64px; height: 64px; margin: 0 auto 20px; color: var(--cyan-500); }
.wiz-confirmation p { font-size: 16px; color: var(--gray-600); margin: 0 0 24px; }

/* ------------------------------ COMPTEURS +/- --------------------------------- */
.wiz-counters { display: grid; gap: 10px; }
.wiz-counter-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; border-radius: 12px; border: 1.5px solid var(--gray-200); transition: border-color .2s;
}
.wiz-counter-row.active { border-color: var(--cyan-400); }
.wiz-counter-text { display: flex; flex-direction: column; gap: 2px; }
.wiz-counter-text strong { color: var(--navy-900); font-size: 14.5px; }
.wiz-counter-text small { color: var(--gray-600); font-size: 12.5px; }
.wiz-counter-controls { display: flex; align-items: center; gap: 14px; flex: none; }
.wiz-counter-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--gray-200); background: #fff;
  color: var(--navy-900); font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s, color .2s;
}
.wiz-counter-btn:hover:not(:disabled) { border-color: var(--cyan-500); color: var(--cyan-500); }
.wiz-counter-btn:disabled { opacity: .35; cursor: not-allowed; }
.wiz-counter-value { min-width: 24px; text-align: center; font-weight: 700; color: var(--navy-900); font-size: 16px; }
