/* ============================================================
   Reprise du ranch de Grapeseed — feuille de style
   Palette : terre, blé, rouge de grange, olive de champ
   ============================================================ */

:root {
  --soil-900: #14100a;
  --soil-800: #1c1710;
  --soil-700: #251e15;
  --soil-600: #33291c;

  --bone: #ece0c9;
  --bone-2: #b8a888;
  --bone-3: #8a7c62;

  --wheat: #d9a441;
  --wheat-hi: #f0c069;
  --barn: #a03a24;
  --field: #77843f;

  --rule: rgba(236, 224, 201, .14);
  --rule-strong: rgba(236, 224, 201, .3);

  --display: 'Big Shoulders Display', 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --body: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: 'Space Mono', ui-monospace, 'Courier New', monospace;

  --wrap: 1180px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --gap: clamp(1.5rem, 3vw, 2.75rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--soil-900);
  color: var(--bone);
  font-family: var(--body);
  font-size: clamp(1rem, .96rem + .2vw, 1.09rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

/* grain de papier kraft sur tout le fond */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  opacity: .35;
  mix-blend-mode: overlay;
  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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: .95;
  letter-spacing: .005em;
  margin: 0;
  text-transform: uppercase;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--wheat);
  color: var(--soil-900);
  padding: .6rem 1rem;
  font-family: var(--mono);
  font-size: .8rem;
}
.skip:focus { left: .5rem; top: .5rem; }

:focus-visible {
  outline: 2px solid var(--wheat-hi);
  outline-offset: 3px;
}

/* ---------- Barre de navigation ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem var(--pad);
  background: linear-gradient(to bottom, rgba(20, 16, 10, .92), rgba(20, 16, 10, 0));
  transition: background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.topbar.is-stuck {
  background: rgba(20, 16, 10, .96);
  border-bottom-color: var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
.brand-mark {
  width: 14px;
  height: 14px;
  background: var(--wheat);
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 2px var(--soil-900);
}
.brand-name {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.nav { display: flex; align-items: center; gap: clamp(.8rem, 1.6vw, 1.7rem); }
.nav a {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-2);
  padding: .35rem 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--bone); border-bottom-color: var(--wheat); }
.nav a.is-active { color: var(--bone); border-bottom-color: var(--wheat); }
.nav .nav-cta {
  color: var(--soil-900);
  background: var(--wheat);
  padding: .5rem .9rem;
  border-bottom: none;
}
.nav .nav-cta:hover { background: var(--wheat-hi); border-bottom-color: transparent; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: .5rem;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--bone);
  transition: transform .25s, opacity .2s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobilenav {
  position: fixed;
  inset: 58px 0 auto 0;
  z-index: 49;
  background: rgba(20, 16, 10, .98);
  border-bottom: 1px solid var(--rule);
  padding: .5rem var(--pad) 1.25rem;
  display: grid;
}
.mobilenav[hidden] { display: none; }
.mobilenav a {
  font-family: var(--display);
  font-size: 1.5rem;
  text-transform: uppercase;
  text-decoration: none;
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 7rem;
  overflow: hidden;
}

.scene { position: absolute; inset: 0; z-index: 0; }
.scene::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(115% 88% at 52% 46%, transparent 38%, rgba(12, 8, 4, .62) 100%);
}
.panorama {
  width: 100%;
  height: 100%;
  display: block;
  filter: saturate(1.06) contrast(1.04);
}

/* Photo de fond : activée seulement si assets/img/hero.jpg existe */
.scene-photo {
  display: none;
  position: absolute;
  inset: -4% 0 0;
  background-position: center 58%;
  background-size: cover;
  filter: saturate(.94) contrast(1.06) brightness(.82);
  will-change: transform;
}
.scene-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(20, 16, 10, .5) 0%, rgba(20, 16, 10, .15) 30%, rgba(20, 16, 10, .8) 100%),
    linear-gradient(to right, rgba(28, 18, 8, .55), rgba(28, 18, 8, 0) 55%);
}
.scene.has-photo .scene-photo { display: block; }
.scene.has-photo .panorama { display: none; }
.scene-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(20, 16, 10, 0), var(--soil-900) 88%);
}
.layer { will-change: transform; }

.hero-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: end;
  gap: var(--gap);
}

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--wheat);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  font-weight: 900;
  letter-spacing: -.01em;
  margin-bottom: 1.4rem;
  text-shadow: 0 10px 40px rgba(20, 16, 10, .55);
}
.hero-title span { display: block; }
.hero-title .line-2 {
  font-weight: 400;
  font-size: .46em;
  letter-spacing: .13em;
  color: #e3d2b0;
  padding-left: .3em;
  text-shadow: 0 3px 18px rgba(20, 16, 10, .9);
}
.hero-title .line-3 { color: var(--wheat); }

.hero-lede {
  max-width: min(46ch, 100%);
  color: var(--bone);
  font-size: 1.08rem;
  text-shadow: 0 2px 14px rgba(20, 16, 10, .8);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .85rem 1.5rem;
  border: 1px solid var(--wheat);
  transition: background .2s, color .2s, transform .2s;
}
.btn-solid { background: var(--wheat); color: var(--soil-900); font-weight: 700; }
.btn-solid:hover { background: var(--wheat-hi); border-color: var(--wheat-hi); }
.btn-ghost { color: var(--bone); background: rgba(20, 16, 10, .45); }
.btn-ghost:hover { background: rgba(217, 164, 65, .16); }

.hero-figure {
  position: relative;
  margin: 0;
  align-self: end;
  justify-self: center;
}
.hero-figure img {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 26px 40px rgba(10, 7, 3, .75)) contrast(1.04) saturate(1.02);
}
.hero-figure figcaption {
  position: absolute;
  left: 0;
  bottom: .5rem;
  background: rgba(20, 16, 10, .88);
  border-left: 3px solid var(--barn);
  padding: .5rem .85rem;
  display: grid;
}
.fig-name {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
}
.fig-role {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bone-3);
}

.ribbon {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--wrap);
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  padding: .9rem var(--pad);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 2.4rem;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  background: rgba(20, 16, 10, .5);
}
.ribbon > div { display: flex; gap: .5rem; align-items: baseline; }
.ribbon dt {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bone-3);
}
.ribbon dd {
  margin: 0;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- Sections ---------- */

.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section-alt { background: var(--soil-800); }

.head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.tag {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--wheat);
  margin: 0 0 .7rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.tag::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.head h2 {
  font-size: clamp(2.1rem, 5.4vw, 3.7rem);
  max-width: 20ch;
}

.col-lead p,
.bio p,
.pillar p,
.lot p,
.event p,
.role-line,
.phases li > p:last-child { color: var(--bone-2); }

p.lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--bone);
}

/* Le domaine */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--gap);
}
.facts { list-style: none; margin: 0; padding: 0; align-self: start; }
.facts li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--rule);
}
.facts li:first-child { border-top: 1px solid var(--rule); }
.facts-k {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bone-3);
  padding-top: .25rem;
}
.facts-v { font-size: .98rem; }

/* Le repreneur */
.portrait-block {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr);
  gap: var(--gap);
  align-items: start;
}
.id-card {
  border: 1px solid var(--rule-strong);
  background: var(--soil-700);
  padding: 1.4rem;
  box-shadow: 0 18px 40px rgba(8, 5, 2, .4);
}
.id-title {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--wheat);
  margin: 0 0 1rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--rule);
}
.id-card dl { margin: 0; }
.id-card dl > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: .5rem;
  padding: .5rem 0;
  border-bottom: 1px dashed var(--rule);
}
.id-card dl > div:last-child { border-bottom: 0; }
.id-card dt {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bone-3);
  padding-top: .2rem;
}
.id-card dd {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.6rem 0 0; padding: 0; }
.chips li {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bone-2);
  border: 1px solid var(--rule-strong);
  padding: .38rem .75rem;
}

/* Le projet */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}
.pillar {
  padding: 1.9rem 1.6rem 1.9rem 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.pillar:last-child { border-right: 0; }
.pillar h3 {
  font-size: 1.6rem;
  color: var(--bone);
  margin-bottom: .7rem;
}
.pillar p { font-size: .97rem; margin: 0; }
@media (min-width: 720px) {
  .pillar { padding-left: 1.6rem; }
  .pillar:first-child { padding-left: 0; }
}

/* Les filières */
.lots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.lot {
  background: var(--soil-800);
  padding: 1.7rem 1.5rem;
  transition: background .25s ease, transform .25s ease;
}
.lot:hover { background: var(--soil-700); }
.lot-tag {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wheat);
  margin-bottom: .55rem;
}
.lot h3 { font-size: 1.9rem; margin-bottom: .6rem; }
.lot p { font-size: .95rem; }
.lot-out {
  margin: 1rem 0 0;
  padding-top: .8rem;
  border-top: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bone-3);
}
.note {
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.7;
  color: var(--bone-3);
  border-left: 2px solid var(--barn);
  padding-left: .9rem;
}

/* L'équipe */
.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--gap);
}
.role { border-top: 2px solid var(--wheat); padding-top: 1.1rem; }
.role h3 { font-size: 1.75rem; margin-bottom: .5rem; }
.role-line { font-size: .95rem; margin-bottom: .8rem; }
.role-n {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--wheat);
  margin: 0;
}

/* La reprise */
.phases {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  position: relative;
}
.phases li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.7rem 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.phases li:last-child { border-bottom: 1px solid var(--rule); }
.phase-k {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wheat);
  margin: 0;
}
.phases h3 { grid-column: 2; font-size: 1.7rem; margin-bottom: .5rem; }
.phases li > p:last-child { grid-column: 2; margin: 0; font-size: .97rem; }
@media (max-width: 620px) {
  .phases h3, .phases li > p:last-child { grid-column: 1; }
}

/* Animations RP */
.events {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: var(--gap);
}
.event {
  background: var(--soil-800);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--barn);
  padding: 1.5rem;
}
.event h3 { font-size: 1.6rem; margin-bottom: .6rem; }
.event p { font-size: .95rem; margin: 0; }

/* Contact */
.section-contact {
  background:
    linear-gradient(rgba(20, 16, 10, .82), rgba(20, 16, 10, .95)),
    repeating-linear-gradient(135deg, var(--soil-700) 0 22px, var(--soil-800) 22px 44px);
  border-top: 1px solid var(--rule-strong);
}
.contact-lede { max-width: 48ch; margin-bottom: 2rem; }
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.ccard {
  background: var(--soil-800);
  padding: 1.4rem 1.5rem;
  display: grid;
  gap: .4rem;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.ccard:hover { background: var(--wheat); color: var(--soil-900); }
.ccard-k {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bone-3);
}
.ccard:hover .ccard-k { color: rgba(20, 16, 10, .7); }
.ccard-v {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
}

/* Pied de page */
.footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  background: var(--soil-900);
}
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.footer p {
  margin: 0;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bone-3);
}

/* ---------- Apparition au défilement ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .layer { transform: none !important; }
}

/* ============================================================
   Pli d'entrée — l'enveloppe qu'on ouvre pour accéder au site
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body.gate-on { overflow: hidden; }

.gate-on .hero-copy > *,
.gate-on .hero-figure,
.gate-on .ribbon { opacity: 0; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(120% 90% at 50% 40%, #33261a 0%, #100c07 62%, #080603 100%);
  perspective: 1400px;
}
.gate[hidden] { display: none; }

.gate-inner { text-align: center; width: 100%; max-width: 520px; }

.gate-kicker {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--wheat);
  margin-bottom: .8rem;
  animation: gateFade .8s .1s backwards;
}
.gate-title {
  font-size: clamp(1.9rem, 5.5vw, 3rem);
  margin-bottom: clamp(1.8rem, 5vw, 2.8rem);
  animation: gateFade .8s .2s backwards;
}

/* --- l'enveloppe --- */

.envelope {
  position: relative;
  width: 100%;
  aspect-ratio: 1.58;
  margin-inline: auto;
  transform-style: preserve-3d;
  animation: gateFade .9s .3s backwards, envFloat 7s 1.2s ease-in-out infinite;
  filter: drop-shadow(0 34px 44px rgba(0, 0, 0, .6));
}

.env-back,
.env-front,
.env-flap {
  position: absolute;
  border-radius: 3px;
  transition: opacity .5s 1.15s ease;
}

.env-back {
  inset: 0;
  background: linear-gradient(160deg, #a98452, #7c5f38);
}

.env-front {
  inset: 0;
  z-index: 3;
  background: linear-gradient(200deg, #d0aa73, #b28a55 62%, #9c7745);
  clip-path: polygon(0 0, 50% 43%, 100% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 -2px 3px rgba(70, 45, 15, .4));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(.9rem, 3vw, 1.5rem);
  text-align: left;
}

.env-addr {
  display: grid;
  gap: .12rem;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(.52rem, 1.5vw, .68rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #4a3418;
}
.env-addr span:first-child { font-weight: 700; }

.env-stamp {
  margin: 0;
  flex: none;
  font-family: var(--display);
  font-size: clamp(.7rem, 2vw, .95rem);
  font-weight: 800;
  line-height: .95;
  text-transform: uppercase;
  color: #8d3020;
  border: 2px solid #8d3020;
  border-radius: 2px;
  padding: .3rem .5rem;
  transform: rotate(-8deg);
  opacity: .78;
}

.env-flap {
  top: 0; left: 0;
  width: 100%;
  height: 43%;
  z-index: 4;
  background: linear-gradient(180deg, #dcb87e 0%, #b98f52 58%, #9a7340 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform .8s .25s cubic-bezier(.6, .04, .2, 1), opacity .5s 1.15s ease;
  filter: drop-shadow(0 5px 7px rgba(52, 30, 8, .45));
}

/* --- la lettre --- */

.letter {
  position: absolute;
  left: 6%;
  bottom: 6%;
  width: 88%;
  height: 84%;
  z-index: 2;
  background: linear-gradient(175deg, #f3ead6, #ddd0b4);
  border-radius: 2px;
  padding: clamp(.7rem, 2.6vw, 1.3rem);
  text-align: left;
  color: #4a3a22;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, .28);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.letter p { margin: 0; }
.letter-head {
  font-family: var(--display);
  font-size: clamp(.95rem, 3vw, 1.35rem);
  font-weight: 800;
  text-transform: uppercase;
  color: #7a3a22;
  line-height: 1;
}
.letter-to,
.letter-sign {
  font-family: var(--mono);
  font-size: clamp(.47rem, 1.4vw, .6rem);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8a7148;
}
.letter-body {
  font-family: var(--body);
  font-size: clamp(.62rem, 1.9vw, .85rem);
  line-height: 1.45;
}
.letter-sign { margin-top: auto; text-align: right; }

/* --- le cachet de cire --- */

.seal {
  position: absolute;
  top: 43%;
  left: 50%;
  z-index: 6;
  translate: -50% -50%;
  width: clamp(58px, 15%, 86px);
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 49% 51% 43% 57% / 57% 41% 59% 43%;
  background: radial-gradient(circle at 34% 28%, #c04a34, #8a2917 60%, #5e160b);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, .5),
    inset 0 -4px 7px rgba(0, 0, 0, .5),
    inset 0 3px 6px rgba(255, 170, 140, .3),
    inset 0 0 0 4px rgba(0, 0, 0, .16);
  display: grid;
  place-items: center;
  transition: transform .35s ease, opacity .35s ease, box-shadow .3s ease;
  animation: sealPulse 2.6s 1.4s ease-in-out infinite;
}
.seal:hover { transform: scale(1.06); }
.seal:active { transform: scale(.97); }
.seal-mark {
  font-family: var(--display);
  font-size: clamp(.9rem, 3.4vw, 1.4rem);
  font-weight: 900;
  letter-spacing: .04em;
  color: rgba(255, 216, 196, .82);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .5);
}

.gate-hint {
  margin: clamp(1.6rem, 4vw, 2.4rem) 0 0;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bone-3);
  animation: gateFade .8s .6s backwards;
}

.gate-skip {
  margin-top: 1rem;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bone-3);
  border-bottom: 1px solid var(--rule);
  padding: .3rem .1rem;
  transition: color .2s, border-color .2s;
  animation: gateFade .8s .7s backwards;
}
.gate-skip:hover { color: var(--bone); border-bottom-color: var(--wheat); }

/* --- séquence d'ouverture --- */

.gate.is-opening {
  opacity: 0;
  transition: opacity .55s 1.65s ease;
  pointer-events: none;
}
.is-opening .envelope { animation-play-state: paused; }
.is-opening .seal {
  transform: translate(-8px, 26px) rotate(-28deg) scale(.72);
  opacity: 0;
  animation: none;
}
.is-opening .env-flap { transform: rotateX(-168deg); z-index: 1; opacity: 0; }
.is-opening .env-back,
.is-opening .env-front { opacity: 0; }
.is-opening .letter { animation: letterOut 1.35s .7s cubic-bezier(.32, .7, .3, 1) forwards; }
.is-opening .gate-kicker,
.is-opening .gate-title,
.is-opening .gate-hint,
.is-opening .gate-skip {
  opacity: 0;
  transition: opacity .4s ease;
  animation: none;
}

@keyframes letterOut {
  0%   { transform: translateY(0) scale(1); }
  46%  { transform: translateY(-52%) scale(1); z-index: 6; }
  100% { transform: translateY(-58%) scale(1.7); opacity: 0; z-index: 6; }
}
@keyframes gateFade {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes envFloat {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50%      { transform: translateY(-10px) rotateX(2.5deg); }
}
@keyframes sealPulse {
  0%, 92%, 100% { box-shadow: 0 6px 14px rgba(0,0,0,.5), inset 0 -3px 6px rgba(0,0,0,.45), inset 0 3px 6px rgba(255,180,150,.35), 0 0 0 0 rgba(217,164,65,.5); }
  96%           { box-shadow: 0 6px 14px rgba(0,0,0,.5), inset 0 -3px 6px rgba(0,0,0,.45), inset 0 3px 6px rgba(255,180,150,.35), 0 0 0 16px rgba(217,164,65,0); }
}

/* --- entrée du site une fois le pli ouvert --- */

.gate-done .hero-copy > *,
.gate-done .hero-figure,
.gate-done .ribbon {
  animation: riseIn .85s cubic-bezier(.2, .7, .3, 1) backwards;
}
.gate-done .hero-copy > *:nth-child(1) { animation-delay: .05s; }
.gate-done .hero-copy > *:nth-child(2) { animation-delay: .15s; }
.gate-done .hero-copy > *:nth-child(3) { animation-delay: .3s; }
.gate-done .hero-copy > *:nth-child(4) { animation-delay: .4s; }
.gate-done .hero-figure { animation-delay: .2s; }
.gate-done .ribbon { animation-delay: .5s; }

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

@media (prefers-reduced-motion: reduce) {
  .gate-kicker, .gate-title, .envelope, .gate-hint, .gate-skip, .seal { animation: none; }
  .env-flap, .env-back, .env-front, .letter, .seal { transition: none; }
  .gate.is-opening { opacity: 0; transition: none; }
  .is-opening .letter { animation: none; }
  .gate-done .hero-copy > *, .gate-done .hero-figure, .gate-done .ribbon { animation: none; }
  .gate-on .hero-copy > *, .gate-on .hero-figure, .gate-on .ribbon { opacity: 1; }
}

@media (max-width: 620px) {
  .env-stamp { display: none; }
  .letter-body { display: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .nav { display: none; }
  .burger { display: flex; }
  .scene::after {
    background:
      linear-gradient(to bottom, rgba(16, 12, 7, .72) 0%, rgba(16, 12, 7, .34) 44%, rgba(16, 12, 7, .82) 100%),
      radial-gradient(115% 88% at 52% 46%, transparent 38%, rgba(12, 8, 4, .62) 100%);
  }
  .cols, .portrait-block { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { justify-self: start; }
  .hero-figure img { max-width: 300px; }
  .hero-figure figcaption { position: static; margin-top: .6rem; }
}

@media (max-width: 620px) {
  .hero { padding-top: 5.5rem; min-height: auto; padding-bottom: 2rem; }
  .eyebrow { letter-spacing: .1em; font-size: .66rem; }
  .hero-figure img { max-width: 230px; }
  .ribbon { flex-direction: column; gap: .45rem; }
  .ribbon > div { justify-content: space-between; width: 100%; }
  .hero-title { font-size: clamp(2.9rem, 15vw, 4.4rem); }
  .ribbon { gap: .6rem 1.4rem; }
  .phases li { grid-template-columns: 1fr; gap: .4rem; }
  .facts li { grid-template-columns: 1fr; gap: .15rem; }
  .id-card dl > div { grid-template-columns: 1fr; gap: .1rem; }
  .pillar { padding: 1.5rem 0; border-right: 0; }
}
