/* ===================================================
   QUIZ.CSS — Quiz 7 étapes Giovanni Riboli
   Extrait de quiz.html (chantier CSS harmonisation)
   =================================================== */

/* === intl-tel-input overrides === */
.iti { width: 100%; display: block; }
.iti__tel-input {
  width: 100% !important;
  padding: 14px 14px 14px 90px !important;
  border: 1.5px solid #e0ddd8 !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 16px !important;
  color: #253a4c !important;
  outline: none !important;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  background: #fff !important;
  box-sizing: border-box !important;
  border-radius: 0 !important;
}
.iti__tel-input:focus { border-color: #c7a260 !important; }
.iti__country-container { position: absolute; top: 0; bottom: 0; left: 0; display: flex; align-items: center; }
.iti--separate-dial-code .iti__selected-flag { height: 100%; padding: 0 8px 0 10px; background: transparent; }
.iti--separate-dial-code .iti__selected-dial-code { font-size: 13px; color: #253a4c; margin-left: 4px; }
.iti__dropdown-content { z-index: 9999; }

/* === Quiz principal === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #f8f6f2; min-height: 100vh; }

.progress-bar {
    height: 3px;
    background: #e8e6e2;
    position: sticky;
    top: 0;
    z-index: 10;
}
.progress-bar .fill {
    height: 100%;
    background: #c7a260;
    transition: width 0.5s ease;
    width: 14%;
}

.quiz-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px 120px;
    padding-top: calc(var(--nav-h) + var(--offre-bar-h) + 80px);
    transition: padding-top 0.3s ease;
}

/* Header quiz */
.quiz-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c7a260;
    margin-bottom: 10px;
}

.step { display: none; }
.step.active { display: block; animation: fadeUp 0.35s ease; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.step h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 400;
    color: #253a4c;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.step .subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: #999;
    margin-bottom: 44px;
}

/* Grilles de choix */
.options {
    display: grid;
    gap: 14px;
}
.options.cols-2 { grid-template-columns: 1fr 1fr; }
.options.cols-3 { grid-template-columns: repeat(3, 1fr); }

.option-card {
    font-family: 'Inter', sans-serif;
    background: #fff;
    border: 1.5px solid #e0ddd8;
    padding: 22px 20px;
    cursor: pointer;
    transition: all 0.25s;
    user-select: none;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.option-card:hover { border-color: #c7a260; background: #fdf9f3; }
.option-card.selected {
    background: #253a4c;
    border-color: #253a4c;
    color: #fff;
}
.option-card.selected .option-sub { color: rgba(255,255,255,0.6); }

.option-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.option-label { display: flex; flex-direction: column; gap: 3px; }
.option-title { font-size: 0.92rem; font-weight: 600; color: #253a4c; }
.option-card.selected .option-title { color: #fff; }
.option-sub { font-size: 0.78rem; color: #999; }

/* Boutons de navigation */
.quiz-nav-btns {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 44px;
}

.btn-back {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #bbb;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}
.btn-back:hover { color: #253a4c; }

.btn-continue {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: #253a4c;
    color: #fff;
    border: none;
    padding: 16px 40px;
    cursor: pointer;
    transition: background 0.25s, opacity 0.25s;
    opacity: 0.3;
    pointer-events: none;
}
.btn-continue.enabled { opacity: 1; pointer-events: auto; }
.btn-continue:hover { background: #1a2c3a; }

/* Formulaire contact */
.form-fields { display: flex; flex-direction: column; gap: 14px; margin-bottom: 0; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #253a4c;
}
.form-group input {
    padding: 14px 16px;
    border: 1.5px solid #e0ddd8;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 16px !important;
    color: #253a4c;
    outline: none;
    transition: border-color 0.2s;
    border-radius: 0;
    -webkit-appearance: none;
}
.form-group input:focus { border-color: #c7a260; }
.form-group input::placeholder { color: #bbb; }

.trust-line {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #bbb;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Loading */
.quiz-loading {
    display: none;
    text-align: center;
    padding: 60px 0;
}
.quiz-loading .spinner {
    width: 36px;
    height: 36px;
    border: 2px solid #e0ddd8;
    border-top-color: #c7a260;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.quiz-loading p {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: #999;
}

/* Résultats */
.quiz-result { display: none; }
.quiz-result.active { display: block; animation: fadeUp 0.4s ease; }

.result-intro { margin-bottom: 40px; }
.result-intro .eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c7a260;
    margin-bottom: 10px;
}
.result-intro h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 400;
    color: #253a4c;
    margin-bottom: 8px;
}
.result-intro p {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: #999;
}

.product-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

.product-card {
    background: #fff;
    border: 1.5px solid #e0ddd8;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: border-color 0.25s;
}
.product-card:hover, .product-card.featured { border-color: #c7a260; }
.product-card.featured { background: #fdf9f3; }

.product-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: #c7a260;
    color: #fff;
    padding: 3px 8px;
    margin-bottom: 6px;
    display: inline-block;
}
.product-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: #253a4c;
    display: block;
}
.product-gamme {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #c7a260;
    margin-bottom: 4px;
    display: block;
}
.product-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: #999;
    margin-top: 3px;
}
.product-price {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: #253a4c;
    font-weight: 600;
    white-space: nowrap;
    margin-left: auto;
}
.product-arrow { color: #c7a260; font-size: 1.2rem; flex-shrink: 0; }

.result-showroom {
    background: #253a4c;
    color: #fff;
    padding: 24px 28px;
    margin-bottom: 16px;
}
.result-showroom .sh-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 6px;
}
.result-showroom .sh-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 4px;
}
.result-showroom .sh-info {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
}
.result-showroom .sh-tel {
    color: #c7a260;
    font-weight: 600;
}

.btn-result-cta {
    display: block;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: #253a4c;
    color: #fff;
    border: none;
    padding: 16px;
    cursor: pointer;
    transition: background 0.25s;
    text-align: center;
    text-decoration: none;
}
.btn-result-cta:hover { background: #1a2c3a; }

.btn-restart {
    display: block;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #bbb;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    margin-top: 20px;
    width: 100%;
}
.btn-restart:hover { color: #253a4c; }

/* Responsive */
@media (max-width: 560px) {
    .options.cols-2, .options.cols-3 { grid-template-columns: 1fr; }
    .quiz-container { padding: 0 16px 80px; padding-top: calc(var(--nav-h) + var(--offre-bar-h) + 60px); }
    .product-card { flex-direction: column; }
}

/* === Sauvegarde abandon quiz === */
.quiz-save-progress {
  margin-top: 20px;
  padding: 24px 28px;
  background: #253a4c;
  border-radius: 12px;
  border-top: 3px solid #c7a260;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.quiz-save-progress label {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.quiz-save-progress input {
  flex: 1;
  min-width: 200px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 11px 14px;
  color: #fff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  min-height: 44px;
}
.quiz-save-progress input::placeholder { color: rgba(255,255,255,.35); }
.quiz-save-progress input:focus { border-color: #c7a260; }
.quiz-save-note { font-size: 11px; color: #8aafc8; width: 100%; margin-top: 4px; }
.quiz-save-ok { font-size: 13px; color: #10b981; display: none; font-weight: 600; }
.btn-save-quiz {
  background: #c7a260;
  color: #1a2d3e;
  border: none;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  min-height: 44px;
  white-space: nowrap;
  transition: opacity .2s;
}
.btn-save-quiz:hover { opacity: .9; }
