/* ===== Page : transaction — composants spécifiques (au-dessus du design system styles.css) =====
   Genre : étude de cas / dossier d'expert. Le HÉROS est LE CHIFFRE (l'estimation).
   Mécaniques signature : .txn-hero (navy + chiffre + Marseille filigrane),
   .txn-gauge (réglette de valorisation), .txn-rail (frise horizontale scroll-snap + barre or),
   .txn-guarantee (bloc committed frais & délai & sécurité). */

/* =========================================================================
   1. HERO — aplat navy committed, vue Marseille en filigrane, LE CHIFFRE
   ========================================================================= */
.txn-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.82);
  padding-top: calc(var(--header-h) + clamp(3rem, 8vh, 5.5rem));
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}
/* vue Marseille en filigrane très léger : on cadre sur la ville (côté droit de
   hero-david.jpg), pas sur le visage, pour ne pas dédoubler le portrait. */
.txn-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../img/hero-david.jpg") right 18% / cover no-repeat;
  opacity: 0.06;
  filter: grayscale(100%) contrast(1.05);
  pointer-events: none;
}
/* aplat navy committed : la couleur domine, l'image n'est qu'une texture.
   Halo or discret côté chiffre. */
.txn-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 55% at 84% 26%, rgba(201, 160, 99, 0.18), transparent 62%),
    linear-gradient(105deg, var(--navy-900) 32%, rgba(14, 34, 51, 0.74) 100%);
  pointer-events: none;
}
.txn-hero .container { position: relative; z-index: 1; }
.txn-hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.txn-hero .breadcrumb {
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.4rem;
}
.txn-hero .breadcrumb a { color: rgba(255, 255, 255, 0.78); }
.txn-hero .breadcrumb a:hover { color: var(--gold-bright); }
.txn-hero .eyebrow { color: var(--gold-2); margin-bottom: 1.4rem; }
.txn-hero .eyebrow::before { background: var(--gold-2); }
.txn-hero h1 {
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 4.1rem);
  max-width: 16ch;
}
.txn-hero h1 .script {
  display: block;
  color: var(--gold-2);
  font-size: 0.56em;
  margin-top: 0.35rem;
}
.txn-hero .lead {
  margin-top: 1.6rem;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.74);
}
.txn-hero-actions {
  margin-top: 2.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
  align-items: center;
}
.txn-hero-actions .btn-ghost { color: #fff; }

/* panneau du CHIFFRE (l'estimation) — le héros visuel */
.txn-figure {
  position: relative;
  background: linear-gradient(165deg, rgba(27, 66, 95, 0.82), rgba(14, 34, 51, 0.6));
  border: 1px solid rgba(201, 160, 99, 0.42);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  box-shadow: var(--sh-lg);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.txn-figure .tf-eye {
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--gold-2);
}
.txn-figure .tf-num {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  line-height: 0.96;
  color: #fff;
  margin: 0.5rem 0 0.1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.12em;
}
.txn-figure .tf-num .tf-cur { color: var(--gold-bright); font-size: 0.62em; font-weight: 700; }
.txn-figure .tf-sub {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.5;
  max-width: 32ch;
}
.txn-figure .tf-sub b { color: #fff; font-weight: 700; }
/* mini-portrait David « votre estimateur » en retrait */
.txn-figure .tf-by {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.txn-figure .tf-by img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  filter: grayscale(100%);
  border: 1.5px solid var(--gold-soft);
  flex: none;
}
.txn-figure .tf-by .tf-by-name { font-family: var(--serif); font-weight: 700; color: #fff; font-size: 1rem; line-height: 1.2; }
.txn-figure .tf-by .tf-by-role { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.13em; font-size: 0.68rem; color: var(--gold-2); margin-top: 2px; }

@media (max-width: 900px) {
  .txn-hero-grid { grid-template-columns: 1fr; gap: clamp(1.8rem, 6vw, 2.6rem); }
  .txn-figure { order: -1; }
}

/* =========================================================================
   2. RÉGLETTE DE VALORISATION — jauge brut -> valorisé (remplissage or au reveal)
   ========================================================================= */
.txn-gauge-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: var(--sh-md);
}
.txn-gauge-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.txn-gauge-end { line-height: 1.2; }
.txn-gauge-end .tg-eye { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.68rem; color: var(--ink-mute); }
.txn-gauge-end .tg-val { font-family: var(--serif); font-weight: 800; font-size: clamp(1.6rem, 3.2vw, 2.3rem); color: var(--ink); line-height: 1; margin-top: 0.25rem; }
.txn-gauge-end--hi { text-align: right; }
.txn-gauge-end--hi .tg-eye { color: var(--gold-deep); }
.txn-gauge-end--hi .tg-val { color: var(--gold-deep); }

/* la jauge : piste grise + remplissage or animé au reveal */
.txn-gauge {
  position: relative;
  height: 18px;
  border-radius: 100px;
  background: var(--cream-3);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(14, 34, 51, 0.12);
}
.txn-gauge-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%; /* point de départ : prix brut */
  border-radius: 100px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 100%);
  box-shadow: 0 0 18px -2px rgba(201, 160, 99, 0.55);
  transition: width 1.5s var(--ease-expo);
}
/* l'animation se déclenche quand le conteneur .reveal reçoit .in */
.reveal.txn-gauge-wrap .txn-gauge-fill { width: 38%; }
.reveal.txn-gauge-wrap.in .txn-gauge-fill { width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .reveal.txn-gauge-wrap .txn-gauge-fill,
  .reveal.txn-gauge-wrap.in .txn-gauge-fill { width: 100%; transition: none; }
}
/* marqueur du point de départ « prix brut » sur la piste */
.txn-gauge-mark {
  position: absolute;
  top: 50%;
  left: 38%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--gold-deep);
  z-index: 2;
}
.txn-gauge-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.7rem;
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.66rem;
  color: var(--ink-mute);
}
.txn-gauge-note {
  margin-top: 1.3rem;
  font-size: 0.92rem;
  color: var(--ink-mute);
  max-width: 60ch;
}
.txn-gauge-note b { color: var(--ink); }

/* 3 leviers de valorisation intégrés sous la jauge */
.txn-levers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.8rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.txn-lever { display: flex; gap: 0.85rem; align-items: flex-start; }
.txn-lever .tl-ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, var(--cream-3), var(--cream));
  border: 1px solid var(--line-gold);
  color: var(--gold-deep);
  flex: none;
}
.txn-lever .tl-ic svg { width: 22px; height: 22px; }
.txn-lever h4 { font-family: var(--sans); font-weight: 700; color: var(--ink); font-size: 1rem; line-height: 1.25; margin-bottom: 0.2rem; }
.txn-lever p { font-size: 0.88rem; color: var(--ink-mute); line-height: 1.5; }
@media (max-width: 760px) {
  .txn-gauge-head { align-items: flex-start; }
  .txn-levers { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* =========================================================================
   3. PARCOURS DE VENTE HORIZONTAL — frise scroll-snap + barre or de progression
      (DISTINCTE de la timeline verticale .steps)
   ========================================================================= */
.txn-rail-outer { position: relative; }
/* barre or de progression sous la frise (desktop) */
.txn-rail-track {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.5rem;
  /* défilé horizontal : on tire un trait or qui relie les jalons */
}
.txn-rail-track::-webkit-scrollbar { display: none; }
.txn-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(248px, 1fr);
  gap: clamp(1rem, 2.2vw, 1.6rem);
  position: relative;
  padding-top: 2.6rem; /* place pour la ligne + pastilles au-dessus des cartes */
}
/* la ligne or horizontale qui traverse tous les jalons */
.txn-rail::before {
  content: "";
  position: absolute;
  top: 21px; /* centre des pastilles */
  left: calc(124px - 1px); /* part du centre du 1er jalon (demi-colonne min) */
  right: calc(124px - 1px);
  height: 2px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  opacity: 0.9;
  z-index: 0;
}
.txn-milestone {
  position: relative;
  scroll-snap-align: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem 1.6rem;
  box-shadow: var(--sh-sm);
  transition: transform 0.45s var(--ease-expo), box-shadow 0.45s var(--ease-expo), border-color 0.45s ease;
}
.txn-milestone:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: var(--line-gold); }
/* pastille numérotée perchée sur la ligne or */
.txn-milestone .tm-dot {
  position: absolute;
  top: -2.6rem;
  left: 1.4rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--gold-bright), var(--gold) 60%, var(--gold-deep));
  color: var(--navy-900);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 0 0 4px var(--cream-2), var(--sh-sm);
  z-index: 1;
}
.txn-milestone .tm-step { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.64rem; color: var(--gold-deep); }
.txn-milestone h3 { font-size: 1.18rem; margin: 0.3rem 0 0.5rem; line-height: 1.2; }
.txn-milestone p { font-size: 0.9rem; color: var(--ink-mute); line-height: 1.55; }
/* indice de défilement (mobile/desktop) */
.txn-rail-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.66rem;
  color: var(--ink-mute);
}
.txn-rail-hint svg { width: 16px; height: 16px; color: var(--gold-deep); }
.bg-navy .txn-milestone { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); }
.bg-navy .txn-milestone h3 { color: #fff; }
.bg-navy .txn-milestone p { color: rgba(255, 255, 255, 0.7); }
.bg-navy .txn-milestone .tm-dot { box-shadow: 0 0 0 4px var(--navy-900), var(--sh-sm); }
.bg-navy .txn-rail-hint { color: rgba(255, 255, 255, 0.6); }
.bg-navy .txn-rail-hint svg { color: var(--gold-2); }

/* Fallback vertical : si JS/scroll indisponible, la frise reste lisible.
   On garde le scroll-snap horizontal partout (robuste), mais on bascule en
   colonne sur très petit écran pour éviter des cartes trop étroites. */
@media (max-width: 520px) {
  .txn-rail {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    padding-top: 0.5rem;
    gap: 1.5rem;
  }
  .txn-rail::before { display: none; }
  .txn-milestone { padding-top: 1.5rem; }
  .txn-milestone .tm-dot { position: static; margin-bottom: 0.8rem; box-shadow: var(--sh-sm); }
  .txn-rail-hint { display: none; }
}

/* =========================================================================
   4. FRAIS & DÉLAI + SÉCURITÉ — bloc committed (pas des cards)
   ========================================================================= */
.txn-guarantee {
  position: relative;
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-900) 100%);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.4rem);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(1.8rem, 4vw, 3.2rem);
  align-items: center;
}
.txn-guarantee::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 160, 99, 0.18), transparent 70%);
  pointer-events: none;
}
.txn-guarantee > * { position: relative; z-index: 1; }
.txn-guarantee .tg-eye { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; color: var(--gold-2); }
.txn-guarantee h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0.7rem 0 1rem; }
.txn-guarantee h2 .script { color: var(--gold-2); font-size: 0.68em; }
.txn-guarantee p { color: rgba(255, 255, 255, 0.78); max-width: 52ch; }
.txn-guarantee p + p { margin-top: 0.9rem; }
.txn-guarantee p b { color: #fff; }
/* colonne de droite : 3 faits clés alignés */
.txn-facts { display: grid; gap: 1.1rem; }
.txn-fact {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 160, 99, 0.28);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.txn-fact .tf-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(201, 160, 99, 0.16); color: var(--gold-2); flex: none; }
.txn-fact .tf-ic svg { width: 20px; height: 20px; }
.txn-fact .tf-k { font-family: var(--serif); font-weight: 700; color: #fff; font-size: 1.15rem; line-height: 1.1; }
.txn-fact .tf-l { font-size: 0.82rem; color: rgba(255, 255, 255, 0.7); margin-top: 2px; }
@media (max-width: 860px) {
  .txn-guarantee { grid-template-columns: 1fr; }
}

/* =========================================================================
   5. MINI-BANDEAU OUTILS (sous les 3 avantages)
   ========================================================================= */
.txn-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: clamp(2rem, 4vw, 2.8rem);
}
.txn-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--ink-soft);
  background: var(--cream-2);
  border: 1px solid var(--line-gold);
  padding: 0.6rem 1rem;
  border-radius: 100px;
  box-shadow: var(--sh-sm);
}
.txn-tool svg { width: 17px; height: 17px; color: var(--gold-deep); flex: none; }

/* =========================================================================
   6. ANNONCE + AVIS VENDEUR (listing seule, centrée, + review-strip)
   ========================================================================= */
.txn-sale-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
.txn-sale-grid .listing-card { max-width: 420px; }
@media (max-width: 860px) {
  .txn-sale-grid { grid-template-columns: 1fr; }
  .txn-sale-grid .listing-card { max-width: 460px; margin-inline: auto; }
}
