/* ══════════════════════════════════════════
   PARCOURS D'ANALYSE — overlay plein écran
   ══════════════════════════════════════════ */

.af {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.af.open {
  opacity: 1;
  visibility: visible;
}

/* Cercle décoratif discret (cohérent avec le hero) */
.af::before {
  content: '';
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.035;
  top: -240px;
  right: -200px;
  pointer-events: none;
}

/* ── BARRE SUPÉRIEURE ── */
.af__bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(244, 243, 240, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.af__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--green);
}

.af__bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.af__ref {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.af__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.af__close:hover {
  color: var(--green);
  border-color: var(--green);
}

/* ── BARRE DE PROGRESSION ── */
.af__progress {
  position: relative;
  height: 3px;
  background: var(--border);
  z-index: 1;
}

.af__progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 25%;
  background: var(--green);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── ZONE DE CONTENU (scroll) ── */
.af__stage {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 2.75rem 1.5rem;
}

.af__panel {
  width: 100%;
  max-width: 560px;
}

/* ── ÉTAPES ── */
.af-step { display: none; }

.af-step.active {
  display: block;
  animation: afStepIn 0.45s ease;
}

@keyframes afStepIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.af-step__title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 0.3rem 0 0.5rem;
}

.af-step__sub {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.85rem;
}

/* ── CHOIX (cartes sélectionnables) ── */
.af-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.af-choice {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.af-choice:hover { border-color: var(--green-mid); }

.af-choice.selected {
  border-color: var(--green);
  background: var(--green-lt);
}

.af-choice__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--green-lt);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.af-choice.selected .af-choice__icon {
  background: var(--green);
  color: var(--white);
}

.af-choice__label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

/* ── CHAMPS GROUPÉS (chips) ── */
.af-field { margin-bottom: 1.65rem; }

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

.af-field__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.65rem;
}

.af-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.af-chip {
  padding: 0.55rem 1.05rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}

.af-chip:hover { border-color: var(--green-mid); }

.af-chip.selected {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

/* ── CHAMPS TEXTE ── */
.af-input-group { margin-bottom: 1.1rem; }

.af-input-group:last-child { margin-bottom: 0; }

.af-input-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.af-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text);
  transition: var(--transition);
}

.af-input::placeholder { color: #b3b0aa; }

.af-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 79, 74, 0.1);
}

.af-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ── UPLOAD PHOTOS ── */
.af-upload {
  display: block;
  width: 100%;
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--white);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
}

.af-upload:hover,
.af-upload.drag {
  border-color: var(--green);
  background: var(--green-lt);
}

.af-upload__icon {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--green-lt);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.af-upload__title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin: 0.85rem 0 0.25rem;
}

.af-upload__hint {
  font-size: 0.82rem;
  color: var(--muted);
}

.af-upload__browse { color: var(--green); text-decoration: underline; }

.af-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.af-thumb {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.af-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.af-thumb__remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── NOTE DE CONFIANCE ── */
.af-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.35rem;
  padding: 0.85rem 1rem;
  background: var(--green-lt);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--green);
}

.af-note svg { flex-shrink: 0; margin-top: 1px; }

/* ── RÉCAP PRIX ── */
.af-recap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.af-recap__name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

.af-recap__sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.af-recap__price {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}

.af-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.5rem 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.af-divider::before,
.af-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── ZONE NAVIGATION (bas) ── */
.af__nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.af__nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.af__back {
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
}

.af__back[hidden] { visibility: hidden; }

.af__next {
  flex: 1;
  max-width: 280px;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* L'attribut [hidden] doit l'emporter sur .btn{display:inline-flex} */
.af__nav .btn[hidden] { display: none; }

.af__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.af__refund {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 500;
}

/* ── ÉCRAN DE TRAITEMENT / SUCCÈS ── */
.af-done {
  display: none;
  text-align: center;
  max-width: 440px;
  margin: 0 auto;
  padding-top: 1.5rem;
}

.af-done.active {
  display: block;
  animation: afStepIn 0.45s ease;
}

.af-loader {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 1.75rem;
}

.af-loader span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: 0;
  animation: afPulse 1.8s ease-out infinite;
}

.af-loader span:nth-child(2) { animation-delay: 0.6s; }
.af-loader span:nth-child(3) { animation-delay: 1.2s; }

.af-loader__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--green);
}

@keyframes afPulse {
  0%   { transform: scale(0.3); opacity: 0.9; }
  100% { transform: scale(1);   opacity: 0; }
}

.af-check {
  width: 84px;
  height: 84px;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  background: var(--green-lt);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: afPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes afPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.af-done__title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 500;
  margin-bottom: 0.65rem;
}

.af-done__text {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.af-done__text strong { color: var(--green); }

/* ════════════════════════════════════════════
   PHASES (quiz · email · loading · result · payment · success)
   ════════════════════════════════════════════ */
.af-phase { display: none; }

.af-phase.active {
  display: block;
  animation: afStepIn 0.45s ease;
}

/* ── SÉLECTEUR VISUEL (stades) ── */
.af-visual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.af-visual {
  padding: 0.55rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
}

.af-visual:hover { border-color: var(--green-mid); }

.af-visual.selected {
  border-color: var(--green);
  background: var(--green-lt);
}

.af-visual__art {
  display: block;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.af-visual__art svg { width: 100%; height: auto; display: block; }

.af-visual__label {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

/* ── CHIPS empilées (1 question / écran) ── */
.af-chips--stack {
  flex-direction: column;
  gap: 0.6rem;
}

.af-chips--stack .af-chip {
  width: 100%;
  text-align: left;
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

/* ── ÉCRAN CENTRÉ (loading / success) ── */
.af-finish {
  text-align: center;
  max-width: 440px;
  margin: 0 auto;
  padding-top: 1.5rem;
}

/* ── LISTE D'ANALYSE PROGRESSIVE ── */
.af-anlist {
  list-style: none;
  max-width: 320px;
  margin: 1.75rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.af-anitem {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
  opacity: 0.4;
  transition: opacity 0.35s ease, color 0.35s ease;
}

.af-anitem.done { opacity: 1; color: var(--text); }

.af-anitem__check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.af-anitem.done .af-anitem__check {
  background: var(--green);
  color: var(--white);
}

/* ── CARTE RÉSULTAT ── */
.af-result-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.af-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.af-result-card__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.af-result-card__val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--green);
}

.af-sev {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.af-sev__bar {
  width: 22px;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
}

.af-sev__bar.on { background: var(--gold); }

.af-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.af-result-kpi {
  background: var(--bg);
  border-radius: 8px;
  padding: 0.65rem 0.5rem;
  text-align: center;
}

.af-result-kpi span {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.af-result-kpi strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* ── EXTRAIT GRATUIT · ANALYSE DU PROFIL ── */
.af-synth {
  border-left: 3px solid var(--green);
  background: var(--green-lt);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
}

.af-synth__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.af-synth__icon { color: var(--green); display: flex; }

.af-synth__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green);
}

.af-synth__text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
}

.af-synth__text strong { color: var(--green); font-weight: 600; }

/* ── PRONOSTIC À 3 MOIS ── */
.af-prog { margin-bottom: 1.5rem; }

.af-prog__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.af-prog__icon { color: var(--gold); display: flex; }

.af-prog__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.af-prog__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.82rem;
}

.af-prog__table th,
.af-prog__table td {
  padding: 0.6rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.af-prog__table thead th {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  background: var(--bg);
}

.af-prog__col-bad { color: var(--danger); }
.af-prog__col-good { color: var(--green); }

.af-prog__table tbody tr:last-child td { border-bottom: none; }

.af-prog__rowlabel { font-weight: 500; color: var(--muted); }

.af-prog__bad {
  color: var(--danger);
  font-weight: 600;
  background: var(--danger-bg);
}

.af-prog__good {
  color: var(--green);
  font-weight: 600;
  background: var(--ok-bg);
}

.af-prog__note {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 0.7rem;
}

/* ── APERÇU DU RAPPORT (thumbnails verrouillés) ── */
.af-preview { margin-bottom: 1.5rem; }

.af-preview__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.7rem;
}

.af-preview__thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

.af-thumb {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--white);
  padding: 0.4rem 0.35rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow: hidden;
}

.af-thumb__bar {
  height: 5px;
  border-radius: 3px;
  background: var(--green);
  opacity: 0.85;
}

.af-thumb__lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  filter: blur(1.1px);
}

.af-thumb__lines i {
  height: 3px;
  border-radius: 2px;
  background: var(--border);
}

.af-thumb__lines i:nth-child(2) { width: 80%; }
.af-thumb__lines i:nth-child(3) { width: 92%; }
.af-thumb__lines i:nth-child(4) { width: 68%; }

.af-thumb__label {
  font-size: 0.56rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── BOUTONS ÉCRAN SUCCÈS ── */
.af-report-link {
  display: inline-flex;
  width: 100%;
  max-width: 320px;
  justify-content: center;
  margin: 0.5rem auto 0;
}

.af-done__later {
  display: block;
  margin: 0.7rem auto 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
}

/* ── PLAN VERROUILLÉ (paywall) ── */
.af-plan__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.9rem;
}

.af-plan__locked {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.af-plan__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  min-height: 200px;
}

.af-plan__items li {
  font-size: 0.92rem;
  color: var(--text);
  padding-left: 1.4rem;
  position: relative;
}

.af-plan__items li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.af-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.55rem;
  padding: 1.25rem;
  background: linear-gradient(180deg, rgba(244, 243, 240, 0.55) 0%, rgba(244, 243, 240, 0.96) 45%);
}

.af-lock__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.af-lock__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}

.af-lock__sub {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 300px;
}

.af-timer {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gold);
  margin-top: 0.2rem;
}

.af-timer span { font-variant-numeric: tabular-nums; }

.af-unlock {
  width: 100%;
  max-width: 320px;
  justify-content: center;
  margin-top: 0.25rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 540px) {
  .af-choices { grid-template-columns: 1fr; }
  .af__ref { display: none; }
  .af__stage { padding: 2rem 1.25rem; }
  .af__next { max-width: none; }
  .af-preview__thumbs { grid-template-columns: repeat(3, 1fr); }
  .af-prog__table { font-size: 0.76rem; }
  .af-prog__table th,
  .af-prog__table td { padding: 0.5rem 0.5rem; }
}
