/* LècheBox — composer sa box. S'appuie sur styles.css (couleurs, titres, bouton, ticket, barre du bas). */
.composer .top-link { font-size: 14px; font-weight: 600; text-underline-offset: 4px; padding: 8px 0; }
.composer .view.narrow { max-width: 680px; padding-top: 22px; padding-bottom: 60px; }
.composer .lede { font-size: 17px; }
.composer .dock { animation: none; }

/* pourquoi c'est moins cher : l'argument, dit une fois, sur fond chair */
.c-why { margin-top: 26px; padding: 20px; background: var(--blush); color: var(--ink); border-radius: 8px; }
.c-why h2 { font-size: 25px; font-style: italic; }
.c-why ul { margin-top: 12px; display: grid; gap: 10px; font-size: 15px; line-height: 1.4; }
.c-why li { position: relative; padding-left: 18px; }
.c-why li::before { content: ''; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--lip-deep); }

/* progression : cinq segments, un par choix */
.c-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 30px; position: sticky; top: 53px; z-index: 5; padding: 10px 0; background: var(--velvet); }
.c-progress li { height: 4px; border-radius: 4px; background: var(--line); transition: background .4s ease; }
.c-progress .done { background: var(--kraft); }
.c-progress .current { background: var(--lip); }

/* une étape : une ligne quand elle est repliée, ses choix quand elle est ouverte */
.c-step { border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.c-head { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 18px 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.c-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--cream); font: 600 17px/1 var(--display); }
.c-step.open .c-num { background: var(--lip); border-color: var(--lip); color: #fff; }
.c-step.done .c-num { background: var(--kraft); border-color: var(--kraft); color: var(--ink); font-family: var(--body); font-size: 15px; }
.c-title { font: 600 23px/1.15 var(--display); letter-spacing: -.015em; }
.c-title > span { display: block; margin-top: 4px; font: 400 14px/1.3 var(--body); letter-spacing: 0; color: var(--soft); }
.c-title .c-picked { color: var(--cream); font-weight: 600; }
.c-edit { font-size: 13.5px; color: var(--soft); text-decoration: underline; text-underline-offset: 4px; }
.c-step:not(.open):not(.done) .c-head { opacity: .72; }
.c-body { padding: 0 0 26px; animation: open .35s ease both; }
.c-desc { font-size: 15px; color: var(--soft); max-width: 34em; }

/* les choix : des photos à toucher, deux par ligne */
.c-grid { border: 0; margin: 18px 0 0; padding: 0; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 12px; }
.c-item { display: flex; flex-direction: column; cursor: pointer; }
.c-photo { position: relative; display: block; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--night); outline: 0 solid var(--lip); transition: outline-width .15s ease; }
.c-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.c-photo::after { content: '✓'; position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--lip); color: #fff; font-weight: 700; font-size: 15px; transform: scale(0); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.c-item.on .c-photo { outline-width: 4px; }
.c-item.on .c-photo img { transform: scale(1.06); }
.c-item.on .c-photo::after { transform: scale(1); }
.c-item input:focus-visible ~ .c-photo { outline: 3px solid var(--cream); outline-offset: 3px; }
.c-item:active .c-photo img { transform: scale(.97); }
.c-name { margin-top: 10px; font: 600 19px/1.15 var(--display); letter-spacing: -.01em; }
.c-note { margin-top: 4px; font-size: 13.5px; line-height: 1.35; color: var(--soft); }
.c-price { margin-top: 6px; font-weight: 700; font-size: 16px; }
.c-badge { align-self: flex-start; margin-top: 6px; background: var(--kraft); color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.3; padding: 4px 8px; border-radius: 4px; }
.c-hint { margin-top: 18px; padding: 12px 14px; border: 1px dashed var(--kraft); border-radius: 6px; font-size: 14.5px; line-height: 1.4; }
.c-foot { margin-top: 22px; display: grid; gap: 10px; }
.as-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* récapitulatif */
.c-recap-title { margin-top: 44px; font-size: clamp(38px, 11vw, 60px); }
.c-recap-title:focus { outline: none; }
.composer .ticket { margin-top: 22px; }
.c-lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 0; border-bottom: 1px solid #2a071026; }
.c-lines span { font-weight: 600; }
.c-lines small { display: block; font-weight: 400; font-size: 13px; opacity: .7; }
.c-lines b { white-space: nowrap; }
.btn:disabled { background: #b89aa0; cursor: default; animation: none; }

/* barre du bas : les vignettes de la box, le total qui monte, la suite */
.c-tray { display: flex; flex: none; padding-left: 14px; }
.c-tray img, .c-more { width: 38px; height: 38px; margin-left: -14px; border-radius: 50%; border: 2px solid var(--night); object-fit: cover; background: var(--velvet); }
.c-more { display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--cream); }
.c-tray .pop { animation: drop .5s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes drop { from { transform: translateY(-34px) scale(.4); opacity: 0; } }
.c-empty { display: block; width: 38px; height: 38px; margin-left: -14px; border-radius: 50%; border: 2px dashed var(--line); }
.composer .dock-info b { font-size: 18px; font-variant-numeric: tabular-nums; }

@media (min-width: 620px) { .c-grid { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { .c-tray .pop, .c-body { animation: none; } }
.composer .dock { gap: 10px; }
.composer .dock .btn { padding-inline: 20px; }

/* ════════ effets : la page prend vie (tout est coupé si l'appareil demande moins d'animations) ════════ */
/* une lueur lente derrière toute la page */
.composer { position: relative; }
.composer::before { content: ''; position: fixed; inset: -20% -40% auto; height: 90vh; z-index: -1; background: radial-gradient(closest-side, #f0284a33, transparent 70%); animation: ember 14s ease-in-out infinite alternate; pointer-events: none; }
.composer::after { content: ''; position: fixed; inset: auto -40% -30%; height: 70vh; z-index: -1; background: radial-gradient(closest-side, #c9a37622, transparent 70%); animation: ember 18s ease-in-out infinite alternate-reverse; pointer-events: none; }
body.composer { background: var(--velvet); isolation: isolate; }

/* le titre arrive mot par mot */
.c-h1 span { display: inline-block; animation: wordIn .8s cubic-bezier(.2, .8, .2, 1) both; }
.c-h1 span:nth-child(2) { animation-delay: .12s; }
.c-h1 span:nth-child(3) { animation-delay: .24s; color: var(--blush); }
@keyframes wordIn { from { opacity: 0; transform: translateY(.6em) rotate(4deg); } }
.composer .lede { animation: riseIn .7s .4s ease both; }
.c-why { animation: riseIn .7s .55s ease both; box-shadow: 0 20px 50px #0005; }
.c-why li { animation: riseIn .5s ease both; }
.c-why li:nth-child(1) { animation-delay: .75s; }
.c-why li:nth-child(2) { animation-delay: .87s; }
.c-why li:nth-child(3) { animation-delay: .99s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } }

/* la progression : le segment en cours scintille */
.c-progress { background: linear-gradient(var(--velvet) 70%, transparent); }
.c-progress li { height: 5px; position: relative; overflow: hidden; }
.c-progress .current::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #fff9, transparent); animation: sweep 1.6s ease-in-out infinite; }
.c-progress .done { animation: fillIn .5s ease both; transform-origin: left; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes fillIn { from { transform: scaleX(0); } }

/* une étape s'ouvre : ses vignettes entrent en cascade */
.c-body.fresh .c-item { animation: tileIn .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 70ms + 80ms); }
@keyframes tileIn { from { opacity: 0; transform: translateY(26px) scale(.94); } }
.c-step.done .c-num { animation: stamp .45s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes stamp { from { transform: scale(.3) rotate(-30deg); } }
.c-step.open .c-num { box-shadow: 0 0 0 0 #f0284a80; animation: ring 2s ease-out infinite; }
@keyframes ring { to { box-shadow: 0 0 0 14px #f0284a00; } }

/* une vignette : elle s'enfonce sous le doigt, s'illumine quand elle est choisie */
.c-item { transition: transform .18s ease; }
.c-item:active { transform: scale(.96); }
.c-photo { box-shadow: 0 10px 26px #0006; }
.c-photo::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(115deg, transparent 35%, #fff8 50%, transparent 65%); transform: translateX(-120%); pointer-events: none; }
.c-item.on .c-photo::before { animation: shine .8s ease-out both; }
@keyframes shine { to { transform: translateX(120%); } }
.c-item.on .c-photo { box-shadow: 0 0 0 4px var(--lip), 0 16px 44px #f0284a73; }
.c-item.on .c-name { color: var(--blush); }
.c-price { transition: color .2s ease; }
.c-badge { animation: badgeIn .5s .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes badgeIn { from { transform: scale(.5); opacity: 0; } }
.c-hint { animation: riseIn .4s ease both; background: #c9a37614; }

/* l'article qui vole vers la box, et la gerbe de cœurs à la fin */
.c-fly { position: fixed; z-index: 60; background-size: cover; background-position: center; pointer-events: none; box-shadow: 0 14px 40px #0009; will-change: transform; }
.c-spark { position: fixed; bottom: 70px; z-index: 55; pointer-events: none; line-height: 1; will-change: transform, opacity; }

/* la barre du bas : verre dépoli, total qui sursaute, bouton qui respire quand on peut avancer */
.composer .dock { background: #22040ccc; backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 -12px 40px #0008; }
#cSum.bump { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); display: inline-block; }
@keyframes bump { 40% { transform: scale(1.22); color: var(--blush); } }
#cNext:not(.waiting) { animation: breathe 2.8s ease-in-out infinite; }
.c-tray img { box-shadow: 0 4px 12px #0008; }

/* le récapitulatif entre en scène : éventail des articles, ticket qui monte, lignes en cascade */
.c-fan { position: relative; height: 150px; margin-top: 26px; }
.c-fan img { position: absolute; left: 50%; top: 14px; width: 112px; height: 112px; margin-left: -56px; border-radius: 10px; object-fit: cover; border: 3px solid var(--cream); box-shadow: 0 14px 34px #0009; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
#cRecap.fresh .c-fan img { animation: fanOut .8s cubic-bezier(.2, .9, .2, 1) both; animation-delay: calc(var(--i) * 90ms + 250ms); }
@keyframes fanOut { from { transform: translate(0, 60px) rotate(0deg) scale(.5); opacity: 0; } }
#cRecap.fresh .c-recap-title { animation: wordIn .8s cubic-bezier(.2, .8, .2, 1) both; }
#cRecap.fresh .ticket { animation: riseIn .8s .5s cubic-bezier(.2, .8, .2, 1) both; }
#cRecap.fresh .c-lines li { animation: riseIn .45s ease both; animation-delay: calc(.8s + var(--n, 0) * 60ms); }
#cRecap.fresh .saving { animation: badgeIn .6s 1.3s cubic-bezier(.3, 1.6, .5, 1) both; }
.composer .ticket { box-shadow: 0 30px 70px #000a; }
.saving { position: relative; overflow: hidden; }
.saving::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, #fff7 50%, transparent 60%); animation: sweep 3s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .composer::before, .composer::after, .c-h1 span, .composer .lede, .c-why, .c-why li, .c-progress .current::after, .c-progress .done,
  .c-body.fresh .c-item, .c-step .c-num, .c-item.on .c-photo::before, .c-badge, .c-hint, #cSum.bump, #cNext, .c-fan img, .saving::after,
  #cRecap.fresh .c-recap-title, #cRecap.fresh .ticket, #cRecap.fresh .c-lines li, #cRecap.fresh .saving { animation: none !important; }
}

/* ════════ box toutes faites, avantages, partage ════════ */
.c-presets { margin-top: 40px; }
.c-presets h2, .c-own { font-size: clamp(30px, 8.6vw, 44px); }
.c-own { margin-top: 44px; }
.c-preset-rail { margin: 18px calc(-1 * var(--gutter)) 0; padding-bottom: 14px; align-items: stretch; }
.c-preset { flex: none; width: 74%; max-width: 290px; display: flex; flex-direction: column; background: var(--night); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; scroll-snap-align: center; box-shadow: 0 16px 40px #0006; }
.c-preset img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.c-preset-body { display: flex; flex-direction: column; flex: 1; padding: 16px; }
.c-for { align-self: flex-start; background: var(--kraft); color: var(--ink); font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.c-preset h3 { margin: 10px 0 0; font: 600 25px/1.1 var(--display); letter-spacing: -.02em; }
.c-preset p { margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--soft); }
.c-preset ul { margin: 12px 0 14px; display: grid; gap: 4px; font-size: 13.5px; }
.c-preset li { position: relative; padding-left: 14px; }
.c-preset li::before { content: ''; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--lip); }
.c-preset-price { margin-top: auto; font-size: 22px; }
.c-preset .btn { margin-top: 12px; }

/* les avantages débloqués, sous la barre de progression */
.c-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; }
.c-tiers li { padding: 8px 6px; border: 1px dashed var(--line); border-radius: 6px; text-align: center; font-size: 12px; line-height: 1.3; color: var(--soft); transition: background .3s ease, color .3s ease, border-color .3s ease; }
.c-tiers b { display: block; font-size: 12.5px; color: var(--cream); }
.c-tiers .on { background: var(--kraft); border: 1px solid var(--kraft); color: var(--ink); animation: badgeIn .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.c-tiers .on b { color: var(--ink); }
#cLabel.goal { color: var(--kraft); font-weight: 700; }

/* la question sur la surprise, sous les sextoys */
.c-doubt { margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.c-doubt summary { padding: 14px 26px 14px 0; position: relative; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.c-doubt summary::-webkit-details-marker { display: none; }
.c-doubt summary::after { content: '+'; position: absolute; right: 2px; top: 9px; font: 400 26px/1 var(--display); color: var(--lip); transition: transform .15s; }
.c-doubt[open] summary::after { transform: rotate(45deg); }
.c-doubt p { padding-bottom: 14px; font-size: 14.5px; line-height: 1.5; color: var(--soft); }

/* récapitulatif : la valeur, les remises, le partage */
.c-value { margin-bottom: 12px; padding: 10px 12px; background: var(--blush); border-radius: 6px; font-size: 14.5px; }
.c-value s { opacity: .65; }
.c-value b { font-size: 17px; }
.c-lines .old, .c-price .old { margin-right: 6px; }
.totals .off { color: var(--lip-deep); font-weight: 600; }
.c-share { margin-top: 30px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; }
.c-share p { font-size: 15px; line-height: 1.45; }
.c-share .btn { margin-top: 14px; }
.c-share-note { margin-top: 12px; font-size: 14px; color: var(--kraft); word-break: break-all; }
@media (min-width: 620px) { .c-preset { width: 280px; } .c-preset-rail { margin-inline: 0; } }

/* ════════ Noël : la remise affichée partout, et le sextoy offert ════════ */
.c-xmas { margin-top: 16px; padding: 12px 14px; background: var(--lip); color: #fff; border-radius: 8px; font-size: 15px; line-height: 1.4; animation: riseIn .7s .45s ease both; box-shadow: 0 14px 36px #f0284a55; }
.c-off { display: inline-block; margin-left: 6px; padding: 3px 7px; background: var(--lip); color: #fff; border-radius: 4px; font: 700 12px/1 var(--body); font-style: normal; letter-spacing: 0; vertical-align: 4px; }
.c-price .old, .c-lines .old, .c-preset-price .old { margin-right: 7px; font-weight: 400; font-size: .82em; opacity: .62; }
.c-price { color: var(--blush); }
.c-preset-price .old { font-size: .62em; }
.c-gift-tag { align-self: flex-start; margin-bottom: 8px; padding: 4px 8px; border: 1px dashed var(--kraft); border-radius: 4px; font-size: 12.5px; font-weight: 700; color: var(--kraft); }

.c-gift { display: flex; gap: 14px; align-items: center; margin: 6px 0 18px; padding: 12px; border: 1.5px dashed var(--kraft); border-radius: 10px; transition: background .4s ease, border-color .4s ease; }
.c-gift img { flex: none; width: 66px; height: 66px; border-radius: 8px; object-fit: cover; filter: saturate(.75) brightness(.8); transition: filter .5s ease, transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.c-gift > div { flex: 1; min-width: 0; }
.c-gift b { display: block; font: 600 18px/1.2 var(--display); letter-spacing: -.01em; }
.c-gift span { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.35; color: var(--soft); }
.c-gift-bar { height: 6px; margin-top: 9px; border-radius: 6px; background: var(--line); overflow: hidden; }
.c-gift-bar i { display: block; height: 100%; border-radius: 6px; background: var(--kraft); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.c-gift.won { background: var(--kraft); border: 1.5px solid var(--kraft); color: var(--ink); animation: badgeIn .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.c-gift.won img { filter: none; transform: rotate(-6deg) scale(1.08); }
.c-gift.won span { color: var(--ink); opacity: .8; }
.c-gift.won .c-gift-bar { background: #2a071033; }
.c-gift.won .c-gift-bar i { background: var(--ink); }
.c-lines .gift b { color: var(--lip-deep); }
@media (prefers-reduced-motion: reduce) { .c-xmas, .c-gift.won { animation: none !important; } }
