/* ============================================================
   THE EDITION — palette inversée de la maison
   La seule page du site à fond vert avec typographie crème.
   Mêmes teintes que style.css, converties en OKLCH (fallback hex).
   Contrastes vérifiés : crème sur sage-deep 6.30:1, stripe 5.56:1,
   flax 4.03:1 (réservé aux grands caractères), pine sur crème 10.18:1.
   ============================================================ */

.edition {
  /* hex fallbacks */
  --ed-bg: #4e5f45;         /* sage-deep */
  --ed-bg-soft: #5f7355;    /* sage */
  --ed-ink: #faf4ea;        /* cream */
  --ed-ink-strong: #fffdf8; /* white */
  --ed-muted: #f0e6d2;      /* stripe */
  --ed-flax: #d9c3a3;       /* large text / decorative only */
  --ed-cart-ink: #4a3826;   /* pine, on cream cartouche */
  --ed-cart-deep: #362817;  /* pine-deep */
  --ed-gold: #8d6845;
}
@supports (color: oklch(0.5 0.05 135)) {
  .edition {
    --ed-bg: oklch(0.463 0.0459 135.0);
    --ed-bg-soft: oklch(0.531 0.0515 135.4);
    --ed-ink: oklch(0.969 0.0147 80.7);
    --ed-ink-strong: oklch(0.994 0.0069 88.6);
    --ed-muted: oklch(0.928 0.0287 84.6);
    --ed-flax: oklch(0.827 0.0497 77.2);
    --ed-cart-ink: oklch(0.356 0.0386 66.0);
    --ed-cart-deep: oklch(0.288 0.0351 71.1);
    --ed-gold: oklch(0.547 0.0688 64.0);
  }
}

/* ---------- Inverted chrome ---------- */

body.edition { background: var(--ed-bg); color: var(--ed-ink); }

.edition .announce { background: var(--ed-ink); color: var(--ed-bg); }

.edition header.site {
  background: rgba(78, 95, 69, 0.94);
  border-bottom: 1px solid rgba(250, 244, 234, 0.22);
}
.edition header.site .brand .name { color: var(--ed-ink-strong); }
.edition header.site .brand .tag { color: var(--ed-flax); }
.edition nav.main a { color: var(--ed-muted); }
.edition nav.main a:hover,
.edition nav.main a.active { color: var(--ed-ink-strong); border-color: var(--ed-flax); }
/* bouton du menu dépliable sur l'entête sombre de l'Edition */
.edition .menu-toggle { color: var(--ed-ink-strong); }

.edition h1, .edition h2, .edition h3 { color: var(--ed-ink-strong); }
.edition p { color: var(--ed-ink); }
.edition .script-line, .edition .script { color: var(--ed-flax); }
.edition ::selection { background: var(--ed-flax); color: var(--ed-cart-deep); }

.edition .btn { border-color: var(--ed-ink); color: var(--ed-ink); background: transparent; }
.edition .btn:hover { background: var(--ed-ink); color: var(--ed-bg); }
.edition .btn.solid { background: var(--ed-ink); color: var(--ed-cart-deep); border-color: var(--ed-ink); }
.edition .btn.solid:hover { background: var(--ed-ink-strong); color: var(--ed-cart-deep); }

.edition a { color: inherit; }
.edition .article a, .edition .ed-prose a { border-bottom: 1px solid var(--ed-flax); }

.edition .stitch { border-top-color: var(--ed-flax); }

.edition :focus-visible { outline: 2px solid var(--ed-flax); outline-offset: 3px; }

/* ---------- The vault: the pieces section behind its curtain ---------- */

.ed-vault { position: relative; }
.ed-vault.curtained {
  height: min(92vh, 860px);
  overflow: hidden;
}
.ed-vault.curtained .ed-vault-inner { visibility: hidden; }

.ed-curtain {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  overflow: hidden;
}
.ed-curtain-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background: repeating-linear-gradient(
    90deg,
    var(--ed-bg) 0 44px,
    var(--ed-ink) 44px 88px
  );
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.ed-curtain-half.left { left: 0; }
.ed-curtain-half.right { right: 0; }

.ed-curtain.open .ed-curtain-half.left { transform: translateX(-102%); }
.ed-curtain.open .ed-curtain-half.right { transform: translateX(102%); }
.ed-curtain.open .ed-cartouche { opacity: 0; transition: opacity 0.35s ease-out; }
.ed-curtain.open { pointer-events: none; }

/* cream cartouche resting on the curtain */
.ed-cartouche {
  position: relative;
  z-index: 2;
  background: var(--ed-ink);
  border: 1px solid var(--ed-flax);
  outline: 1.5px dashed var(--ed-gold);
  outline-offset: -10px;
  box-shadow: 0 24px 70px rgba(30, 38, 26, 0.45);
  max-width: 480px;
  width: 100%;
  margin: auto;
  padding: 2.6rem clamp(1.6rem, 5vw, 3rem) 2.2rem;
  text-align: center;
  color: var(--ed-cart-ink);
}
.ed-cartouche p { color: var(--ed-cart-ink); }
.ed-cartouche img.seal { width: 92px; margin: 0 auto 0.8rem; }
.ed-cartouche .ed-title {
  font-family: var(--serif);
  font-size: 2rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ed-cart-deep);
}
.ed-cartouche .ed-motto {
  font-family: var(--script);
  font-size: 1.7rem;
  color: var(--ed-gold);
  margin: 0.15rem 0 1rem;
}
.ed-cartouche .ed-sub {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ed-cart-ink);
  margin-bottom: 1.7rem;
}
.ed-cartouche form { margin: 0 0 0.4rem; }
.ed-cartouche label { display: none; }
.ed-cartouche input {
  width: 100%;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ed-flax);
  border-radius: 999px;
  background: var(--ed-ink-strong);
  color: var(--ed-cart-deep);
  margin-bottom: 0.9rem;
}
.ed-cartouche input::placeholder { color: var(--ed-gold); letter-spacing: 0.18em; }
.ed-cartouche .btn { border-color: var(--ed-cart-deep); color: var(--ed-cart-deep); }
.ed-cartouche .btn:hover { background: var(--ed-cart-deep); color: var(--ed-ink); }
.ed-code-msg {
  display: none;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ed-gold);
  margin-top: 0.9rem;
}
.ed-circle-invite {
  border-top: 1px solid rgba(141, 104, 69, 0.35);
  margin-top: 1.6rem;
  padding-top: 1.3rem;
  font-size: 0.95rem;
}
.ed-circle-invite a { border-bottom: 1px solid currentColor; }

/* ---------- Circle signup forms (Flodesk placeholder) ---------- */

.ed-signup-mini input {
  width: 100%;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 0.7rem 1rem;
  border: 1px solid var(--ed-flax);
  border-radius: 999px;
  background: var(--ed-ink-strong);
  color: var(--ed-cart-deep);
  margin: 0.6rem 0 0;
}
.ed-signup-mini .btn { margin-top: 0.9rem; }

.ed-signup-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}
.ed-signup-row input {
  flex: 1 1 180px;
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid rgba(250, 244, 234, 0.5);
  border-radius: 999px;
  background: var(--ed-ink-strong);
  color: var(--ed-cart-deep);
}
.ed-signup-row input::placeholder { color: var(--ed-gold); }
.ed-signup-done { color: var(--ed-flax); font-style: italic; flex-basis: 100%; }
.ed-cartouche .ed-signup-done { color: var(--ed-gold); }
.ed-signup-error { flex-basis: 100%; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  .ed-curtain-half { transition: opacity 0.4s ease-out; }
  .ed-curtain.open .ed-curtain-half { transform: none; opacity: 0; }
}

/* ---------- Revealed content ---------- */

.ed-hero {
  text-align: center;
  padding: clamp(3rem, 8vw, 5.5rem) 1.4rem clamp(2.4rem, 6vw, 4rem);
  max-width: 860px;
  margin: 0 auto;
}
.ed-hero .seal {
  width: 130px;
  filter: brightness(0) invert(0.94) sepia(0.15);
  opacity: 0.92;
  margin-bottom: 1.4rem;
}
.ed-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.1;
  text-wrap: balance;
}
.ed-hero .ed-motto-line {
  display: block;
  font-family: var(--script);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ed-flax);
  line-height: 1.1;
  margin-top: 0.4rem;
}
.ed-edition-name {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ed-muted);
  margin-top: 1.6rem;
}
.ed-manifesto {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.55;
  color: var(--ed-ink-strong);
  max-width: 640px;
  margin: 1.8rem auto 0;
  text-wrap: pretty;
}
.ed-meta-line {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ed-muted);
  margin-top: 1.6rem;
}

/* Hero visual: the image carries its own staging — no frame, no shadow */
.ed-hero-visual {
  max-width: 620px;
  margin: 2.6rem auto 0;
}
.ed-hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
}

/* thin striped rule, a quiet echo of the curtain */
.ed-rule {
  height: 10px;
  max-width: 300px;
  margin: 0 auto;
  background: repeating-linear-gradient(
    90deg,
    var(--ed-flax) 0 14px,
    transparent 14px 28px
  );
  opacity: 0.55;
}

/* Circle preview banner (early state, inside the vault) */
.ed-banner {
  display: none;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ed-cart-deep);
  background: var(--ed-flax);
  padding: 0.55rem 1rem;
  margin-bottom: 2rem;
}
.ed-state-early .ed-banner { display: block; }

/* "Opening September 2026" per piece (closed state only) */
.ed-opening-note {
  display: none;
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ed-muted);
  margin-top: 1rem;
}
.ed-state-closed .ed-opening-note { display: block; }

/* colorway line under each piece name */
.ed-colorway {
  font-family: var(--script);
  font-size: 1.15rem;
  color: var(--ed-flax);
  margin-top: 0.3rem;
}

/* Sold-out lead block */
.ed-next {
  display: none;
  max-width: 620px;
  margin: 0 auto;
  padding: 2.2rem clamp(1.4rem, 4vw, 2.6rem);
  text-align: center;
  border: 1px solid rgba(250, 244, 234, 0.35);
  outline: 1.5px dashed var(--ed-flax);
  outline-offset: -10px;
}
.ed-state-soldout .ed-next { display: block; }
.ed-next h2 { font-style: italic; font-family: var(--serif); font-size: 1.7rem; }
.ed-next p { margin: 0.8rem 0 1.4rem; }

/* ---------- Prose blocks ---------- */

.ed-prose {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(2.2rem, 5vw, 3.4rem) 1.4rem;
}
.ed-prose h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-bottom: 1.1rem;
  text-wrap: balance;
}
.ed-prose p { line-height: 1.85; margin-bottom: 1.05rem; text-wrap: pretty; }
.ed-prose p:last-child { margin-bottom: 0; }

/* ---------- The pieces: varied editorial grid ---------- */

.ed-vault-inner { padding-top: clamp(1.5rem, 4vw, 2.5rem); }

.ed-pieces {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.4rem clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(1.4rem, 3vw, 2.4rem);
}
.ed-piece { grid-column: span 3; display: flex; flex-direction: column; }
.ed-piece--feature {
  grid-column: span 6;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: 0.6rem;
}
.ed-piece--wide { grid-column: span 4; }
.ed-piece--slim { grid-column: span 2; }
.ed-piece--reverse .photo { order: 2; }
@media (max-width: 760px) {
  .ed-piece--reverse .photo { order: 0; }
}

.ed-piece .photo {
  border: 1px solid rgba(250, 244, 234, 0.4);
  padding: 8px;
  background: rgba(250, 244, 234, 0.06);
}
.ed-piece .photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ed-piece .photo { aspect-ratio: 4 / 5; }
.ed-piece--feature .photo { aspect-ratio: 4 / 3; }
.ed-piece--wide .photo { aspect-ratio: 3 / 2; }
.ed-piece--slim .photo { aspect-ratio: 3 / 4; }

.ed-piece h3 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  margin-top: 1.1rem;
}
.ed-piece--feature h3 { font-size: clamp(1.6rem, 3vw, 2rem); margin-top: 0; }
.ed-piece .ed-dims {
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ed-muted);
  margin: 0.45rem 0 0.6rem;
}
.ed-piece .ed-desc { font-size: 0.95rem; line-height: 1.7; }
.ed-piece .ed-price {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ed-ink-strong);
  margin-top: 0.9rem;
}
.ed-piece .ed-price small {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ed-muted);
}
.ed-remain {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ed-flax);
  margin-top: 0.4rem;
}

/* Buy Button slots: shown only when acquiring is open */
.buy-slot { display: none; margin-top: 1.1rem; }
.ed-state-early .buy-slot,
.ed-state-public .buy-slot { display: block; }
.buy-slot:empty::after {
  content: "Acquisition opens shortly.";
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ed-muted);
}

/* Sold-out state */
.ed-soldout-tag {
  display: none;
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ed-cart-deep);
  background: var(--ed-flax);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  margin-top: 1rem;
  align-self: flex-start;
}
.ed-state-soldout .ed-soldout-tag { display: inline-block; }
.ed-state-soldout .ed-remain { display: none; }

/* ---------- FAQ accordion, with the quiet stripe echo ---------- */

.ed-faq {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(2.2rem, 5vw, 3.4rem) 1.4rem;
}
.ed-faq h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  text-align: center;
  margin-bottom: 1.8rem;
}
.ed-faq details {
  border-top: 1px solid rgba(250, 244, 234, 0.3);
  padding: 1.1rem 0.2rem;
}
.ed-faq details:last-of-type { border-bottom: 1px solid rgba(250, 244, 234, 0.3); }
.ed-faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.12rem;
  color: var(--ed-ink-strong);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.ed-faq summary::-webkit-details-marker { display: none; }
.ed-faq summary::after { content: "+"; font-family: var(--sans); color: var(--ed-flax); }
.ed-faq details[open] summary::after { content: "−"; }
.ed-faq details p { padding: 0.9rem 0 0.3rem; line-height: 1.8; font-size: 0.97rem; }

/* ---------- Circle footer block ---------- */

.ed-circle-foot {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 1.4rem clamp(3rem, 7vw, 4.5rem);
  text-align: center;
}
.ed-circle-foot h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-bottom: 0.7rem;
}
.ed-circle-foot p { margin-bottom: 1.5rem; }

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

@media (max-width: 760px) {
  .ed-piece,
  .ed-piece--wide,
  .ed-piece--slim { grid-column: span 6; }
  .ed-piece--feature { grid-template-columns: 1fr; }
  .ed-piece--slim .photo, .ed-piece .photo { aspect-ratio: 4 / 3; }
  .ed-curtain-half { width: 51%; }
  .ed-cartouche { padding: 2rem 1.3rem 1.8rem; }
}
