/* css/xp-coffrets.css — COFFRETS page, on css/xp-page.css (3D shell) + css/shop.css + css/shop-content.css. The charter: the
   page is the sage of the packaging (the slab's studio), the cards blanc cassé with a hairline, photos in arched niches.
   The coffrets are opaque paper cards (name, price, line, honest composition note, « Ajouter » + « Personnaliser »);
   the photo frozen in its ice slab is the 3D part (js/xp/pages/coffrets.js):
     html.xpp-3d, ≥ 1024 px : cards in the left column, the slab in the sticky .cof-stage on the right;
     html.xpp-3d, < 1024 px : each card's <figure> is the slab's stage (the photo is its poster until the slab is live);
     html.xpp-flat          : the figures are plain photo frames beside (desktop) / above (phones) the cards. */

.cof { --cof-gutter: var(--sc-gutter, 20px); }
.cof-seq { position: relative; max-width: 1440px; margin: 0 auto; padding: 0 var(--cof-gutter); box-sizing: border-box; }
.cof-col { min-width: 0; }
.cof-stage { display: none; }

/* ---------- head ---------- */
.cof-head { padding: calc(var(--top-h, 84px) + clamp(28px, 5vw, 72px)) 0 0; }
.cof-head .sc-kicker { margin-bottom: 12px; }
.cof-title { margin: 0; max-width: 13ch; font: 400 clamp(42px, 5vw, 78px)/1.03 var(--font-sans); letter-spacing: var(--tr-display); text-wrap: balance; }
.cof-title em, .cof-card__name em { font-style: normal; }
.cof-lead { margin: 20px 0 0; max-width: 44ch; font: 400 clamp(17px, 1rem + .3vw, 20px)/1.55 var(--font-sans); color: var(--ink-2); }
.cof-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0 0; }
.cof-jump__a { display: inline-flex; align-items: baseline; gap: 9px; min-height: 46px; padding: 13px 15px 12px; box-sizing: border-box; border-radius: var(--r-ctl);
  background: var(--paper); color: var(--ink); text-decoration: none; font: 400 12px/1.2 var(--font-sans); letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--ink); transition: background .2s ease-out, color .2s ease-out; }
.cof-jump__a:hover { background: var(--ink); color: var(--cta-ink); }
.cof-jump__a:hover .cof-jump__price { color: inherit; }
.cof-jump__price { color: var(--ink-2); font-size: 14.5px; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }

/* ---------- one coffret ---------- */
.cof-item { position: relative; margin-top: clamp(28px, 4vw, 48px); scroll-margin-top: calc(var(--top-h, 84px) + 12px); }
.cof-item__media { position: relative; margin: 0; }
.cof-item__media img { display: block; width: 100%; height: auto; }
.cof-card { position: relative; box-sizing: border-box; max-width: 560px; padding: clamp(22px, 2.6vw, 38px); background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); font-family: var(--font-sans); }
.cof-card__name { margin: 0; font: 400 clamp(32px, 3.2vw, 48px)/1.06 var(--font-sans); letter-spacing: -.018em; }
.cof-card__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 14px 0 0; }
.cof-card__amount { font: 400 clamp(34px, 3.2vw, 46px)/1 var(--font-sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.cof-card__tax { font-size: 14.5px; color: var(--ink-2); }
.cof-card__line { margin: 16px 0 0; font: 400 clamp(18px, 1.3vw, 21px)/1.4 var(--font-sans); }
.cof-card__short { margin: 8px 0 0; max-width: 48ch; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.cof-card__facts { display: grid; gap: 6px; margin: 18px 0 0; padding: 16px 0 0; list-style: none; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.4; }
.cof-card__facts li { display: flex; align-items: baseline; gap: 10px; }
.cof-card__facts li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); transform: translateY(-2px); }
.cof-card__actions { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; margin-top: 22px; }
.cof-card__actions .step, .cof-card__actions .step__btn { height: 52px; }
.cof-card__actions .step__btn { min-width: 52px; font-size: 16.5px; }
.cof-card__actions .cta { min-height: 52px; padding: 0 18px; }
.cof-card__wa { grid-column: 1 / -1; }
.cof-card__wa .ico { width: 20px; height: 20px; }
@media (max-width: 379.98px) { .cof-card__actions { grid-template-columns: minmax(0, 1fr); } }
.cof-note { max-width: 62ch; margin: clamp(22px, 3vw, 36px) 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }

/* the photo frame (flat page; the poster on phones until the slab is live) */
/* the photo stands in an arched niche (the brand's arch) */
.cof-item__media img { border-radius: var(--r-niche); }
html:not(.xpp-3d) .cof-item__media, html.xpp-3d .cof-item__media { padding: 10px; background: var(--paper); border-radius: var(--r-niche); box-shadow: var(--shadow-card); }

/* ---------- after the sequence ---------- */
.cof-how, .cof-faq, .cof-ask { position: relative; }
.cof-ask .sc-band { margin-bottom: 0; }

/* ================= desktop ================= */
@media (min-width: 1024px) {
  /* 3D: cards in the left column, the sticky stage on the right */
  html.xpp-3d .cof-seq { display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); column-gap: clamp(24px, 3vw, 56px); }
  html.xpp-3d .cof-col { grid-column: 1; grid-row: 1; }
  html.xpp-3d .cof-stage { display: block; position: sticky; top: 0; grid-column: 2; grid-row: 1; align-self: start; height: 100vh; height: 100svh; }
  html.xpp-3d .cof-item { display: flex; align-items: center; min-height: 86vh; min-height: 86svh; margin-top: 0; padding: 6vh 0; box-sizing: border-box; scroll-margin-top: 0; }
  html.xpp-3d .cof-item:first-of-type { align-items: flex-start; min-height: 0; padding-top: clamp(28px, 4vh, 48px); padding-bottom: 14vh; }
  html.xpp-3d .cof-item__media { display: none; }
  html.xpp-3d .cof-card { width: 100%; }

  /* flat: photo frame and card side by side, alternating */
  html:not(.xpp-3d) .cof-item { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); align-items: center; margin-top: clamp(40px, 6vw, 88px); }
  html:not(.xpp-3d) .cof-item:nth-of-type(even) .cof-item__media { order: 2; }
  html:not(.xpp-3d) .cof-card { justify-self: start; width: 100%; }
}

/* ================= tablets & phones ================= */
@media (max-width: 1023.98px) {
  .cof-item { display: grid; gap: 14px; margin-top: clamp(36px, 7vw, 64px); }
  .cof-card { max-width: none; }
  /* 3D: the figure is the slab's stage — transparent (the canvas draws behind it), the photo its poster until live */
  html.xpp-3d .cof-item__media { display: grid; place-items: center; height: clamp(280px, 46svh, 540px); padding: 0; background: none; box-shadow: none; }
  html.xpp-3d .cof-item__media img { width: min(76%, 460px); padding: 8px; box-sizing: border-box; background: var(--paper); border-radius: var(--r-niche); box-shadow: var(--shadow-card);
    transition: opacity .9s var(--ease-out); }
  html.xpp-on .cof-item[data-live] .cof-item__media img { opacity: 0; }
}
@media (max-width: 599.98px) {
  .cof-title { font-size: clamp(38px, 10.5vw, 52px); }
  /* the three prices stay on one row: name over price */
  .cof-jump { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 22px; }
  .cof-jump__a { flex-direction: column; align-items: flex-start; gap: 4px; padding: 11px 12px; border-radius: 0; font-size: 11px; letter-spacing: .1em; }
  .cof-jump__price { font-size: 14px; }
  .cof-lead { font-size: 17px; }
  html.xpp-3d .cof-item__media { height: clamp(250px, 40svh, 380px); }
}
@media (max-width: 359.98px) { .cof-jump__a { padding: 10px 8px; font-size: 10.5px; } .cof-jump__price { font-size: 13.5px; } }
@media (prefers-reduced-motion: reduce) {
  .cof-jump__a, html.xpp-3d .cof-item__media img { transition: none; }
}
