/* ══════════════════════════════════════════
   AIRFIT SIMULATOR — Design v3
   White · Barlow Semi Condensed · Gradient 70° 33%
   Profondeur ambiante · microinteractions · cascade
══════════════════════════════════════════ */
:root {
  --blue:         #01549d;
  --cyan:         #00a6bf;
  --navy:         #001231;
  --white:        #ffffff;
  --bg:           #f5f7fa;
  --border:       #e6e9ef;
  --border-hi:    #c5d8ef;
  --text:         #001231;
  --text-60:      #526070;
  --text-35:      #9aabb8;
  --grad:         linear-gradient(70deg, #01549d 33%, #00a6bf 100%);
  --grad-btn:     linear-gradient(70deg, #01549d 0%,  #00a6bf 100%);
  --glow:         rgba(1, 84, 157, .07);
  --shadow-sm:    0 1px 2px rgba(1,18,49,.05);
  --shadow-hover: 0 10px 30px rgba(1,84,157,.16);
  --shadow-card:  0 18px 50px rgba(1,84,157,.14);
  --ease:         cubic-bezier(.2,.8,.4,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Barlow', system-ui, -apple-system, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 560px at 102% -8%,  rgba(0,166,191,.12), transparent 60%),
    radial-gradient(960px 520px  at -8% 108%,  rgba(1,84,157,.12),  transparent 55%),
    #fbfcfe;
  background-attachment: fixed;
}
button, input { font: inherit; }

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ── TOP BAR ─────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(1,84,157,.08);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 0 36px; height: 64px; }
.logo-img { height: 34px; width: auto; display: block; }
.logo {
  font-family: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  font-size: 22px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.step-counter {
  font-size: 12px; font-weight: 800; color: var(--blue); letter-spacing: .08em;
  background: var(--glow); padding: 6px 13px; border-radius: 100px;
}
.progress-track { height: 4px; background: rgba(1,84,157,.08); }
.progress-fill {
  display: block; height: 100%; width: 20%;
  background: var(--grad); border-radius: 0 4px 4px 0;
  box-shadow: 0 0 14px rgba(0,166,191,.55);
  transition: width 460ms var(--ease);
}

/* ── SIM STAGE ───────────────────────────── */
.sim-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 56px 24px 76px; }
.sim-inner { width: 100%; max-width: 700px; }

/* ── STEPS ───────────────────────────────── */
fieldset { border: 0; }
.step { display: none; }
.step.active { display: block; animation: fadeUp 360ms var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.step-eyebrow {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 16px;
}

legend {
  font-family: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(38px, 5.8vw, 62px); font-weight: 900; line-height: .92;
  letter-spacing: -.01em; text-transform: uppercase; color: var(--navy); margin-bottom: 14px;
}
.step > p { font-size: 15px; color: var(--text-60); line-height: 1.6; margin-bottom: 32px; }

/* ── CHOICES ─────────────────────────────── */
.choices { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.choices label {
  position: relative;
  display: flex; align-items: center; gap: 15px; min-height: 76px; padding: 18px 22px;
  background: rgba(255,255,255,.72); border: 1.5px solid var(--border); border-radius: 16px;
  cursor: pointer; font-size: 14.5px; font-weight: 500; color: var(--text-60);
  box-shadow: var(--shadow-sm); user-select: none;
  transition: transform .18s var(--ease), border-color .18s, background .18s, box-shadow .18s, color .18s;
}
.choices label:hover {
  transform: translateY(-3px); border-color: var(--border-hi);
  background: #fff; color: var(--text); box-shadow: var(--shadow-hover);
}
.choices label:has(input:checked) {
  border-color: transparent; color: var(--navy); font-weight: 700;
  background: linear-gradient(#fff,#fff) padding-box, var(--grad) border-box;
  box-shadow: 0 10px 28px rgba(1,84,157,.20);
}
.choices input[type="radio"],
.choices input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.choices input[type="radio"]:focus-visible + .choice-dot,
.choices input[type="checkbox"]:focus-visible + .choice-dot { box-shadow: 0 0 0 4px rgba(1,84,157,.22); }

.choice-dot {
  position: relative; width: 22px; height: 22px; min-width: 22px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--white); flex-shrink: 0;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
/* Case à cocher (choix multiple) : coins arrondis plutôt que rond, pour signaler
   visuellement que plusieurs options peuvent être sélectionnées. */
.choices label:has(input[type="checkbox"]) .choice-dot { border-radius: 7px; }
.choice-dot::after {
  content: ''; position: absolute; left: 7px; top: 3px;
  width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0); transform-origin: center;
  transition: transform .22s cubic-bezier(.2,1.5,.5,1);
}
.choices label:has(input:checked) .choice-dot {
  border-color: transparent; background: var(--grad); box-shadow: 0 0 0 4px rgba(1,84,157,.12);
}
.choices label:has(input:checked) .choice-dot::after { transform: rotate(45deg) scale(1); }

/* Entrée en cascade des options / champs */
.step.active .choices label,
.step.active .fields input { animation: choiceIn .42s var(--ease) both; }
.step.active .choices label:nth-child(1), .step.active .fields input:nth-child(1) { animation-delay: .04s; }
.step.active .choices label:nth-child(2), .step.active .fields input:nth-child(2) { animation-delay: .09s; }
.step.active .choices label:nth-child(3), .step.active .fields input:nth-child(3) { animation-delay: .14s; }
.step.active .choices label:nth-child(4), .step.active .fields input:nth-child(4) { animation-delay: .19s; }
.step.active .choices label:nth-child(5) { animation-delay: .24s; }
.step.active .choices label:nth-child(6) { animation-delay: .29s; }
@keyframes choiceIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── CONTACT FIELDS ──────────────────────── */
.fields { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.fields input {
  width: 100%; height: 60px; padding: 0 20px; background: rgba(255,255,255,.8);
  border: 1.5px solid var(--border); border-radius: 14px; font-size: 15px; color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.fields input::placeholder { color: var(--text-35); }
.fields input:hover { border-color: var(--border-hi); background: #fff; }
.fields input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(1,84,157,.12); }

/* Honeypot anti-bot — invisible pour les humains, exclu de la tabulation */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ── NAV ─────────────────────────────────── */
.sim-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; }
.btn-back {
  height: 52px; padding: 0 24px; background: transparent; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--text-60); cursor: pointer;
  transition: border-color .14s, color .14s, background .14s, transform .14s;
}
.btn-back:hover { border-color: var(--border-hi); color: var(--text); background: var(--glow); transform: translateY(-1px); }
.btn-next, .btn-submit {
  position: relative; overflow: hidden;
  height: 52px; padding: 0 38px; background: var(--grad-btn); border: none; border-radius: 12px;
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .02em; cursor: pointer;
  box-shadow: 0 6px 18px rgba(1,84,157,.30); margin-left: auto;
  transition: transform .14s var(--ease), box-shadow .14s, opacity .14s;
}
.btn-next::after, .btn-submit::after, .btn-discover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s var(--ease);
}
.btn-next:hover, .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(1,84,157,.40); }
.btn-next:hover::after, .btn-submit:hover::after, .btn-discover:hover::after { transform: translateX(120%); }
.btn-next:active, .btn-submit:active { transform: translateY(0); }
.btn-next:focus-visible, .btn-submit:focus-visible, .btn-back:focus-visible, .btn-discover:focus-visible {
  outline: none; box-shadow: 0 0 0 4px rgba(1,84,157,.25);
}
.btn-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
button[hidden] { display: none !important; }

/* ── RESULT ──────────────────────────────── */
.result {
  background:
    radial-gradient(900px 460px at 100% 0%, rgba(0,166,191,.08), transparent 60%),
    var(--white);
}

.result-intro {
  max-width: 980px; margin: 0 auto; padding: 34px 40px 0; text-align: center;
  animation: fadeUp 480ms var(--ease) both;
}
.result-intro-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue); background: var(--glow); padding: 6px 14px; border-radius: 100px;
  margin-bottom: 12px;
}
.result-intro-title {
  font-family: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(23px, 3vw, 34px); font-weight: 900; line-height: 1;
  letter-spacing: -.01em; text-transform: uppercase; color: var(--navy);
  margin-bottom: 10px;
}
.result-intro-subtitle {
  font-size: clamp(14px, 1.6vw, 16.5px); font-weight: 600; color: var(--text-60);
  line-height: 1.5;
}

.result-confirmation {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; padding: 9px 18px;
  background: linear-gradient(#fff,#fff) padding-box, var(--grad) border-box;
  border: 1.5px solid transparent; border-radius: 100px;
  font-size: 13.5px; font-weight: 700; color: var(--navy);
  box-shadow: 0 6px 18px rgba(1,84,157,.14);
  animation: fadeUp 560ms var(--ease) both; animation-delay: .12s;
}

.result-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 40px 64px;
}

/* ── GRID DE RÉALISATIONS ─────────────────── */
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.result-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: cardIn 560ms var(--ease) both;
}
.result-tile:nth-child(1) { animation-delay: .04s; }
.result-tile:nth-child(2) { animation-delay: .12s; }
.result-tile:nth-child(3) { animation-delay: .2s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: none; } }

.result-tile-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid rgba(1,84,157,.10);
  box-shadow: var(--shadow-card);
}
.result-tile-img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}
.result-tile:hover .result-tile-img-wrap img { transform: scale(1.06); }

/* ── DISCOVER BUTTON ──────────────────────── */
.btn-discover {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; border-radius: 14px;
  background: var(--grad-btn); color: #fff;
  font-size: 13.5px; font-weight: 700; letter-spacing: .02em;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(1,84,157,.30);
  transition: transform .14s var(--ease), box-shadow .14s;
}
.btn-discover:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(1,84,157,.40); }
.btn-discover-disabled {
  background: var(--bg); color: var(--text-35);
  box-shadow: none; border: 1.5px dashed var(--border-hi); cursor: default;
}

/* ── NOTE EXPLICATIVE ─────────────────────── */
.result-note {
  position: relative;
  overflow: hidden;
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(0,166,191,.10), rgba(1,84,157,.04)), #fff;
  border: 1px solid rgba(1,84,157,.14);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  animation: fadeUp 560ms var(--ease) both;
  animation-delay: .22s;
}
.result-note::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad);
}
.result-note-title {
  font-family: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  font-size: 20px; font-weight: 900; letter-spacing: -.005em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 16px;
}
.result-note-list {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px;
}
.result-note-list li {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px 9px 10px; background: #fff; border: 1px solid rgba(1,84,157,.12);
  border-radius: 100px; font-size: 13.5px; font-weight: 700; color: var(--navy);
  box-shadow: 0 4px 14px rgba(1,84,157,.08);
  transition: transform .18s var(--ease), box-shadow .18s;
  animation: choiceIn .42s var(--ease) both;
}
.result-note-list li:nth-child(1) { animation-delay: .05s; }
.result-note-list li:nth-child(2) { animation-delay: .10s; }
.result-note-list li:nth-child(3) { animation-delay: .15s; }
.result-note-list li:nth-child(4) { animation-delay: .20s; }
.result-note-list li:nth-child(5) { animation-delay: .25s; }
.result-note-list li:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(1,84,157,.18); }
.result-note-check {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 11px; font-weight: 900;
  box-shadow: 0 0 0 3px rgba(0,166,191,.14);
}

.result-feedback {
  margin-top: 20px; padding: 18px 20px; border: 1px solid var(--border);
  border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm);
}
.result-feedback label { display: block; font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.result-feedback p { font-size: 13px; line-height: 1.5; color: var(--text-60); margin-bottom: 12px; }
.choice-history {
  margin: 0 0 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--glow); border: 1px solid rgba(1,84,157,.12);
}
.choice-history-title { display: block; margin-bottom: 7px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.choice-history ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; list-style: none; }
.choice-history li { display: flex; gap: 4px; min-width: 0; font-size: 12.5px; line-height: 1.35; color: var(--text-60); }
.choice-history strong { flex: none; color: var(--navy); }
.choice-history span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-feedback textarea {
  display: block; width: 100%; resize: vertical; min-height: 94px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px; color: var(--text); font: inherit;
  font-size: 14px; line-height: 1.45; transition: border-color .16s, box-shadow .16s;
}
.result-feedback textarea::placeholder { color: var(--text-35); }
.result-feedback textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(1,84,157,.12); }
.feedback-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.btn-feedback {
  padding: 10px 16px; border: 0; border-radius: 10px; background: var(--navy); color: #fff;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .14s, opacity .14s;
}
.btn-feedback:hover { transform: translateY(-1px); }
.btn-feedback:disabled { opacity: .55; cursor: not-allowed; }
.feedback-status { font-size: 12.5px; font-weight: 600; color: var(--blue); }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 860px) {
  .result-intro { padding: 44px 20px 0; }
  .result-layout { padding: 28px 20px 60px; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar-inner { padding: 0 20px; }
  .sim-stage { padding: 34px 20px 52px; }
  legend { font-size: clamp(30px, 8vw, 44px); }
  .choices { grid-template-columns: 1fr; }
  .fields  { grid-template-columns: 1fr; }
  .sim-nav { flex-wrap: wrap; }
  .btn-next, .btn-submit { width: 100%; }
  .choice-history ul { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
}

/* ── ACCESSIBILITÉ : mouvement réduit ─────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
