/* =====================================================================
   PRÉMICES · Notre Histoire — Preview v3 « Le Manifeste en Actes »
   Additif chargé APRES newhome/styles.css (tokens réutilisés).
   Préfixe `.hv3-` — aucune collision avec .hv2- (v2) ni .hero/.mib/.concept/
   .plating/.chefs/.lieux/.club/.table/.pex2- (autres previews).
   Scrollytelling typographique : succession d'écrans plein viewport
   alternant crème et noir profond, avec scroll-snap doux desktop.
   ===================================================================== */

/* Isolation du gabarit : override propre du fond body pour éviter
   toute pollution du #top parent. */
body.histoire-v3 { background: var(--creme); }
main.hv3 { position: relative; }

/* Progression latérale : petits actes cliquables (bord droit desktop) */
.hv3-progress {
  position: fixed;
  right: clamp(14px, 2vw, 26px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 10px;
  background: rgba(246, 241, 233, .78);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity .5s var(--ease);
}
.hv3-progress__dot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
  background: none;
  border: 0;
  color: var(--text-soft);
  font-family: var(--f-title);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .35s var(--ease);
}
.hv3-progress__dot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--gold-ink);
  transition: background .35s var(--ease), transform .35s var(--ease);
}
.hv3-progress__dot[aria-current="true"] { color: var(--sig); }
.hv3-progress__dot[aria-current="true"]::before {
  background: var(--sig);
  border-color: var(--sig);
  transform: scale(1.35);
}
.hv3-progress__label { display: none; }
.hv3-progress__dot:hover .hv3-progress__label,
.hv3-progress__dot:focus-visible .hv3-progress__label { display: inline; }
@media (max-width: 900px) {
  .hv3-progress { display: none; } /* pas de rail sur mobile */
}

/* =====================================================================
   ACTE — écran plein viewport (100svh). Snap doux sur desktop ; en
   mobile on relâche pour ne pas bloquer le scroll (leçon).
   ===================================================================== */
.hv3-act {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(90px, 12vh, 140px) var(--pad);
  position: relative;
  overflow: hidden;
}

/* Snap-container = <main> desktop uniquement */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  main.hv3 {
    scroll-snap-type: y proximity;   /* proximity : n'accroche pas dur */
  }
  .hv3-act { scroll-snap-align: start; }
}

/* Fonds alternés */
.hv3-act--creme { background: var(--creme); color: var(--text); }
.hv3-act--nuit  { background: #0a0908;    color: #f3ece0; }
.hv3-act--nuit .hv3-eyebrow { color: var(--gold); }
.hv3-act--nuit .hv3-em      { color: var(--gold); }
.hv3-act--creme .hv3-em     { color: var(--sig); font-style: italic; }

/* Filet or, séparateur récurrent */
.hv3-filet {
  display: inline-block;
  width: 60px;
  height: 1px;
  background: var(--gold-ink);
  vertical-align: middle;
  margin: 0 14px;
}
.hv3-act--nuit .hv3-filet { background: var(--gold); }

/* Petites capitales : numéro d'acte */
.hv3-eyebrow {
  display: block;
  font-family: var(--f-title);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--sig);
  margin-bottom: clamp(26px, 4vh, 42px);
}
.hv3-eyebrow small {
  font-size: .72em;
  letter-spacing: .28em;
  color: var(--gold-ink);
  font-weight: 500;
  margin-left: 8px;
}
.hv3-act--nuit .hv3-eyebrow small { color: var(--gold); }

/* Reveals doux */
.hv3-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .9s cubic-bezier(.19,1,.22,1),
    transform .9s cubic-bezier(.19,1,.22,1);
  transition-delay: var(--d, 0s);
}
.hv3-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .hv3-reveal { opacity: 1; transform: none; transition: none; }
}

/* =====================================================================
   ACTE I — L'agence
   Trois phrases fortes plein écran, très grande typographie.
   ===================================================================== */
.hv3-i__inner {
  max-width: 1080px;
  text-align: center;
}
.hv3-i__phrase {
  font-family: var(--f-title);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -.005em;
  margin-bottom: clamp(28px, 4vh, 46px);
}
.hv3-i__phrase:last-child { margin-bottom: 0; }
.hv3-i__phrase--sm {
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  color: var(--text-soft);
  font-family: var(--f-detail);
  font-style: italic;
  line-height: 1.35;
}

/* =====================================================================
   ACTE II — Les tables dressées : rail horizontal snap
   ===================================================================== */
.hv3-ii { padding-top: clamp(80px, 10vh, 120px); padding-bottom: 0; flex-direction: column; align-items: stretch; justify-content: flex-start; }
.hv3-ii__head { max-width: 900px; text-align: center; margin: 0 auto clamp(30px, 4vh, 46px); }
.hv3-h2 {
  font-family: var(--f-title);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -.003em;
  margin-bottom: 18px;
}
.hv3-lead {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 640px;
  margin: 0 auto;
}
.hv3-act--nuit .hv3-lead { color: rgba(243, 236, 224, .72); }

.hv3-rail {
  display: flex;
  gap: clamp(18px, 2vw, 32px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 20px calc(var(--pad) - 12px) 60px;
  margin: 0 calc(var(--pad) * -1);
  scrollbar-width: thin;
  scrollbar-color: var(--gold-ink) transparent;
  -webkit-overflow-scrolling: touch;
  width: 100vw;
  align-self: stretch;
}
.hv3-rail::-webkit-scrollbar { height: 6px; }
.hv3-rail::-webkit-scrollbar-track { background: transparent; }
.hv3-rail::-webkit-scrollbar-thumb { background: var(--gold-ink); border-radius: 3px; }

.hv3-table {
  flex: 0 0 clamp(280px, 42vw, 460px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.hv3-table:hover { transform: translateY(-4px); box-shadow: 0 22px 60px -30px rgba(10,9,8,.35); }
.hv3-table__media {
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  background: #efe8dc;
}
.hv3-table__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.4s var(--ease);
}
.hv3-table:hover .hv3-table__media img { transform: scale(1.04); }
.hv3-table__body {
  padding: clamp(20px, 2vw, 28px) clamp(20px, 2vw, 28px) clamp(24px, 3vw, 34px);
}
.hv3-table__num {
  font-family: var(--f-title);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .3em;
  color: var(--gold-ink);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.hv3-table__t {
  font-family: var(--f-title);
  font-size: clamp(1.35rem, 1.8vw, 1.7rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 12px;
}
.hv3-table__p {
  font-family: var(--f-detail);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.hv3-railhint {
  text-align: center;
  font-family: var(--f-title);
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-ink);
  padding-bottom: 24px;
}

/* =====================================================================
   ACTE III — Des équipes éprouvées (écran noir, 2 colonnes)
   ===================================================================== */
.hv3-iii__inner { max-width: 1200px; width: 100%; }
.hv3-iii__intro {
  max-width: 780px;
  margin: 0 auto clamp(40px, 6vh, 70px);
  text-align: center;
}
.hv3-iii__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
}
.hv3-iii__col { padding: 0 clamp(6px, 1vw, 14px); }
.hv3-iii__sep {
  align-self: stretch;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--gold) 20%, var(--gold) 80%, transparent 100%);
  min-height: 260px;
}
.hv3-iii__t {
  font-family: var(--f-title);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 26px;
  letter-spacing: -.002em;
}
.hv3-iii__t em { font-style: italic; color: #f3ece0; }
.hv3-iii__list { list-style: none; padding: 0; margin: 0; }
.hv3-iii__list li {
  font-family: var(--f-detail);
  font-size: clamp(1.02rem, 1.15vw, 1.14rem);
  font-style: italic;
  line-height: 1.55;
  color: rgba(243, 236, 224, .82);
  padding: 14px 0;
  border-bottom: 1px solid rgba(235, 207, 149, .14);
}
.hv3-iii__list li:last-child { border-bottom: 0; }
.hv3-iii__list li strong {
  font-family: var(--f-title);
  font-style: normal;
  font-weight: 500;
  color: #f3ece0;
  display: block;
  font-size: .95em;
  letter-spacing: -.002em;
  margin-bottom: 2px;
}
@media (max-width: 720px) {
  .hv3-iii__grid { grid-template-columns: 1fr; gap: 40px; }
  .hv3-iii__sep { width: 60%; height: 1px; margin: 0 auto; min-height: 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
}

.hv3-iii__foot {
  margin-top: clamp(50px, 8vh, 80px);
  text-align: center;
  font-family: var(--f-detail);
  font-style: italic;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  color: rgba(243, 236, 224, .7);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.hv3-iii__foot strong {
  font-family: var(--f-title);
  font-style: normal;
  color: var(--gold);
  font-weight: 500;
}

/* =====================================================================
   ACTE IV — Frise verticale (2022 · 2023 · 2024)
   ===================================================================== */
.hv3-iv__inner { max-width: 780px; width: 100%; margin: 0 auto; }
.hv3-iv__intro { text-align: center; margin-bottom: clamp(50px, 7vh, 80px); }
.hv3-frise {
  position: relative;
  padding-left: clamp(70px, 8vw, 100px);
}
.hv3-frise::before {
  content: "";
  position: absolute;
  left: clamp(24px, 2.8vw, 34px);
  top: 20px;
  bottom: 20px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--gold-ink) 12%, var(--gold-ink) 88%, transparent 100%);
}
.hv3-milestone {
  position: relative;
  padding: clamp(22px, 3vh, 34px) 0;
}
.hv3-milestone::before {
  content: "";
  position: absolute;
  left: calc(clamp(24px, 2.8vw, 34px) - clamp(70px, 8vw, 100px) + 1px);
  top: calc(clamp(22px, 3vh, 34px) + 10px);
  width: 11px; height: 11px;
  transform: translateX(-5px);
  border-radius: 999px;
  background: var(--sig);
  border: 3px solid var(--creme);
  box-shadow: 0 0 0 1px var(--sig);
}
.hv3-milestone__year {
  display: inline-block;
  font-family: var(--f-title);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .28em;
  color: var(--sig);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.hv3-milestone__t {
  font-family: var(--f-title);
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -.003em;
}
.hv3-milestone__p {
  font-family: var(--f-detail);
  font-style: italic;
  font-size: clamp(1.02rem, 1.2vw, 1.12rem);
  line-height: 1.5;
  color: var(--text-soft);
}

.hv3-iv__signature {
  margin-top: clamp(56px, 8vh, 90px);
  text-align: center;
  padding-top: clamp(28px, 4vh, 46px);
  border-top: 1px solid var(--line);
}
.hv3-iv__signature p {
  font-family: var(--f-detail);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-soft);
  margin-bottom: 10px;
}
.hv3-iv__signature strong {
  display: block;
  font-family: var(--f-title);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  color: var(--text);
  letter-spacing: -.003em;
}

/* =====================================================================
   FINAL — CTA « Écrivons le prochain acte. »
   ===================================================================== */
.hv3-final__inner { max-width: 900px; text-align: center; }
.hv3-final__title {
  font-family: var(--f-title);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.08;
  letter-spacing: -.006em;
  margin-bottom: clamp(38px, 5vh, 58px);
  color: var(--gold);
}
.hv3-final__title em { font-style: italic; color: #f3ece0; }
.hv3-final__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
}
.hv3-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--f-title);
  font-weight: 500;
  font-size: .88rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
  border: 1px solid transparent;
}
.hv3-btn--sig {
  background: var(--sig);
  color: var(--sig-ink);
}
.hv3-btn--sig:hover { transform: translateY(-2px); background: #a91a13; }
.hv3-btn--ghost {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.hv3-btn--ghost:hover { background: var(--gold); color: #0a0908; transform: translateY(-2px); }

/* =====================================================================
   Grain léger façon Ouverture, sur les écrans crème uniquement
   ===================================================================== */
.hv3-act--creme::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .05;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
