/* Vault — composants, mises en page et mouvement. Dépend de tokens.css. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs-body)/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.label { font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--muted); }
.serif { font-family: var(--serif); font-weight: 400; }
.num { font-variant-numeric: tabular-nums; }
.lock { overflow: hidden; }

/* ---------- Mouvement ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lineUp { from { transform: translateY(108%); } to { transform: none; } }
@keyframes drawX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes unveil { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
@keyframes settle { from { transform: scale(1.14); } to { transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.38); } 100% { transform: scale(1); } }
@keyframes bump { 0% { transform: none; } 40% { transform: translateY(-3px) scale(1.18); } 100% { transform: none; } }
@keyframes marq { to { transform: translateX(-50%); } }
@keyframes chipIn { from { opacity: 0; transform: translateY(6px) scale(0.96); } to { opacity: 1; transform: none; } }

/* Apparition : .rv reste invisible jusqu'à .is-in ; --i décale les éléments d'un même groupe. */
.rv { opacity: 0; }
.rv.is-in { animation: rise var(--t-reveal) var(--ease) both; animation-delay: calc(var(--i, 0) * var(--stagger)); }

/* ---------- Boutons et contrôles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 1px solid var(--ink); background: transparent; font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; transition: background var(--t-fast), color var(--t-fast); }
.btn:hover { background: var(--ink); color: var(--on-ink); }
.btn--solid { background: var(--ink); color: var(--on-ink); }
.btn--solid:hover { background: transparent; color: var(--ink); }
.btn--plain { text-transform: none; letter-spacing: 0; font-size: var(--fs-body); }
.btn--quiet { border-color: var(--rule); }
.link { padding: 0 0 2px; border: 0; border-bottom: 1px solid currentColor; background: none; }
.iconbtn { width: var(--ctl); height: var(--ctl); flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rule); background: transparent; transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); }
.iconbtn:hover { border-color: var(--ink); }
.iconbtn.is-on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.seg { display: inline-flex; }
.seg > button { height: var(--ctl); padding: 0 14px; border: 1px solid var(--rule); background: var(--surface); transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.seg > button + button { margin-left: -1px; }
.seg > button:hover { border-color: var(--ink); position: relative; }
.seg > button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); position: relative; }
.field { display: flex; align-items: center; gap: 10px; height: var(--ctl); padding: 0 12px; border: 1px solid var(--ink); background: var(--surface); }
.field:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.field input::placeholder { color: var(--muted); }
input[type="search"]::-webkit-search-cancel-button { display: none; }
kbd { font: inherit; font-size: 12px; padding: 1px 7px; border: 1px solid var(--rule); color: var(--muted); background: var(--surface); }
select.sel { height: var(--ctl); padding: 0 10px; border: 1px solid var(--rule); background: var(--surface); }
.check { display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.check span:last-child:not(:first-of-type) { margin-left: auto; color: var(--muted); }

/* ---------- En-tête ---------- */
.hd { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px 32px; height: var(--hd); padding: 0 var(--pad); background: var(--bg); border-bottom: 1px solid var(--rule); }
.hd__logo { font-family: var(--serif); font-size: 24px; letter-spacing: 0.34em; margin-right: 8px; }
.nav { display: flex; gap: 28px; }
.nav a { position: relative; padding: 8px 0; font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--muted); transition: color var(--t-fast); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform var(--t-panel) var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.hd__sp { flex: 1; }
.hd__search { display: flex; align-items: center; gap: 10px; width: 300px; height: var(--ctl); padding: 0 12px; border: 1px solid var(--rule); background: var(--surface); color: var(--muted); text-align: left; transition: border-color var(--t-fast); }
.hd__search:hover { border-color: var(--ink); }
.hd__search span { flex: 1; }
.selbtn { display: inline-flex; align-items: center; gap: 10px; height: var(--ctl); padding: 0 14px; border: 1px solid var(--ink); background: transparent; font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; }
.count { min-width: 20px; height: 20px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--on-ink); font-size: 12px; letter-spacing: 0; }
.count.is-bump { animation: bump 0.5s var(--ease); }

/* ---------- Accueil : ouverture ---------- */
.hero { display: flex; height: clamp(640px, 88vh, 900px); overflow: hidden; }
.hero__p { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: var(--pad); overflow: hidden; transition: flex-grow 0.9s var(--ease); }
.hero__p--light { background: #F1EFEB; color: #111111; }
.hero__p--dark { background: #111111; color: #FAF9F7; }
.hero:hover .hero__p { flex-grow: 0.82; }
.hero .hero__p:hover, .hero .hero__p:focus-visible { flex-grow: 1.3; }
.hero__top { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; opacity: 0.72; animation: fade 1s 0.5s both; }
.hero__idx { font-family: var(--serif); font-style: italic; font-size: 18px; letter-spacing: 0; text-transform: none; }
.hero__brand { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 28px 0; animation: fade 1.1s 0.35s both; }
.hero__frame { display: flex; align-items: center; justify-content: center; padding: 30px 36px; border: 1px solid currentColor; transition: opacity var(--t) var(--ease), transform var(--t-panel) var(--ease), background var(--t) var(--ease); }
.hero__p:hover .hero__frame, .hero__p:focus-visible .hero__frame { transform: scale(1.02); }
.hero__p--light:hover .hero__frame { background: #FFFFFF; }
.hero__p--dark:hover .hero__frame { background: #FAF9F7; color: #111111; }
.brandmark { display: block; line-height: 1; }
.brandmark--gucci { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 6.2vw, 82px); letter-spacing: 0.16em; text-transform: uppercase; }
.brandmark--ysl { font-family: var(--sans); font-weight: 700; font-size: clamp(22px, 3.5vw, 46px); letter-spacing: 0.32em; text-transform: uppercase; }
.hero__tag { font-size: var(--fs-small); letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.55; }
.hero__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-top: 28px; padding-top: 18px; position: relative; animation: fade 1s 0.9s both; }
.hero__foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: currentColor; opacity: 0.28; transform-origin: left; animation: drawX 1.2s var(--ease-io) 0.7s both; }
.hero__meta { display: flex; flex-direction: column; gap: 2px; }
.hero__meta b { font-weight: 400; font-size: 16px; }
.hero__meta span { opacity: 0.72; }
.hero__cta { display: inline-flex; align-items: center; gap: 12px; font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; }
.hero__cta i { display: block; width: 36px; height: 1px; background: currentColor; transform-origin: left; transition: transform var(--t-panel) var(--ease); }
.hero__p:hover .hero__cta i { transform: scaleX(1.9); }

/* ---------- Bandeau défilant ---------- */
.marq { overflow: hidden; white-space: nowrap; border-bottom: 1px solid var(--rule); }
.marq__track { display: inline-flex; animation: marq 48s linear infinite; }
.marq:hover .marq__track { animation-play-state: paused; }
.marq__track span { display: inline-flex; align-items: center; gap: 28px; padding: 16px 14px; font-family: var(--serif); font-style: italic; font-size: 19px; }
.marq__track span::after { content: ""; width: 5px; height: 5px; background: var(--ink); transform: rotate(45deg); }

/* ---------- Compteurs ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule); border-bottom: 1px solid var(--rule); }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 44px var(--pad) 40px; background: var(--bg); }
.stat__n { font-family: var(--serif); font-size: clamp(40px, 5.2vw, 76px); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.stat__n--sale { color: var(--sale-text); }

/* ---------- Sections et rail « à la une » ---------- */
.sec { padding: 72px var(--pad) 64px; }
.sec__hd { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-bottom: 32px; }
.sec__hd > div:first-child { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.sec__title { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h2); line-height: 1.1; }
.rail { display: flex; gap: var(--gut); margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--pad); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: 0 0 clamp(220px, 23vw, 312px); scroll-snap-align: start; }
.rail__no { display: block; margin-bottom: 10px; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); }
.rail__bar { height: 1px; margin-top: 28px; background: var(--rule); }
.rail__bar i { display: block; height: 1px; margin-top: -0.5px; border-top: 2px solid var(--ink); transform-origin: left; transform: scaleX(var(--p, 0.2)); transition: transform var(--t-base) linear; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 24px var(--pad) 40px; border-top: 1px solid var(--rule); font-size: var(--fs-small); color: var(--muted); }

/* ---------- Carte produit ---------- */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--rule); transition: border-color var(--t-fast); }
.card:hover, .card:focus-within { border-color: var(--ink); }
.card__media { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--photo); overflow: hidden; }
.card__img { width: 100%; height: 100%; object-fit: contain; filter: brightness(var(--photo-dim)); transition: transform 1s var(--ease), opacity var(--t-base); }
.card:hover .card__img { transform: scale(1.07); }
.nophoto { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; background: var(--wash); color: var(--muted); font-size: 12px; letter-spacing: 0.06em; text-align: center; overflow-wrap: anywhere; }
.badge { position: absolute; z-index: 1; }
.badge--sale { top: 10px; left: 10px; padding: 3px 7px; background: var(--sale); color: #FFFFFF; font-size: 12px; font-weight: 600; }
.badge--brand { top: 12px; right: 12px; font-size: 11px; letter-spacing: var(--ls-label); text-transform: uppercase; color: #5E5E5E; }
.badge--out { left: 10px; bottom: 10px; padding: 3px 7px; background: #111111; color: #FFFFFF; font-size: 11px; letter-spacing: var(--ls-label); text-transform: uppercase; }
.badge--seen { left: 10px; bottom: 10px; display: none; align-items: center; gap: 6px; font-size: 12px; color: #5E5E5E; }
.card.is-out .card__img { opacity: 0.6; }
.card.is-seen .card__img { opacity: 0.55; }
.card.is-seen .card__name { color: var(--muted); }
.card.is-seen:not(.is-out) .badge--seen { display: inline-flex; }
.fav { position: absolute; z-index: 2; right: 8px; bottom: 8px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid #E8E5E0; background: #FFFFFF; color: #111111; opacity: 0; transform: translateY(6px); transition: opacity var(--t-fast), transform var(--t-base) var(--ease), border-color var(--t-fast); }
.fav:hover { border-color: #111111; }
.card:hover .fav, .card:focus-within .fav, .fav.is-on { opacity: 1; transform: none; }
.fav.is-on .ico { fill: currentColor; }
.fav.is-pop .ico { animation: pop 0.45s var(--ease); }
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 16px; }
.card__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; line-height: 1.4; }
.card__name span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.6s var(--ease); }
.card:hover .card__name span { background-size: 100% 1px; }
.card__name::after { content: ""; position: absolute; inset: 0; }
.price { display: flex; flex-direction: column; }
.price__old { font-size: var(--fs-small); color: var(--muted); }
.price__now { font-size: var(--fs-price); line-height: 1.25; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sizes span { min-width: 28px; padding: 2px 6px; border: 1px solid var(--rule); font-size: 12px; text-align: center; }
.sizes .more { border: 0; padding: 2px 4px; color: var(--muted); }

/* ---------- Catalogue ---------- */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; padding: 48px var(--pad) 28px; }
.ph__title { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h1); line-height: 1.05; }
.ph__title .ln { display: block; overflow: hidden; }
.ph__title .ln > span { display: block; animation: lineUp 0.9s var(--ease) both; }
.ph p { color: var(--muted); animation: fade 0.8s 0.3s both; }
.tb { position: sticky; top: var(--hd); z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px var(--pad); background: var(--bg); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tb .field { flex: 1 1 260px; }
.tb__sort { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.cat { display: flex; align-items: flex-start; gap: 32px var(--pad); padding: 24px var(--pad) 72px; }
.fl { flex: 0 0 264px; position: sticky; top: calc(var(--hd) + 80px); max-height: calc(100vh - var(--hd) - 96px); overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.fl__g { display: flex; flex-direction: column; gap: 8px; padding: 20px 0; border-top: 1px solid var(--rule); }
.fl__g:first-child, .fl__hd + .fl__g { padding-top: 0; border-top: 0; }
.fl__tree { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 32px; padding: 0; border: 0; background: none; font-weight: 500; }
.fl__tree .ico { transition: transform var(--t-base) var(--ease); }
.fl__tree[aria-expanded="true"] .ico { transform: rotate(90deg); }
.fl__sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-panel) var(--ease); }
.fl__sub.is-open { grid-template-rows: 1fr; }
.fl__sub > div { overflow: hidden; display: flex; flex-direction: column; padding-left: 14px; border-left: 1px solid var(--rule); }
.fl__range { display: flex; align-items: center; gap: 8px; }
.fl__range input { flex: 1; min-width: 0; height: var(--ctl); padding: 0 10px; border: 1px solid var(--rule); background: var(--surface); }
.fl .seg { display: flex; }
.fl .seg > button { flex: 1; padding: 0; height: 36px; font-size: var(--fs-small); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills button { min-width: 40px; height: 32px; padding: 0 8px; border: 1px solid var(--rule); background: var(--surface); font-size: var(--fs-small); transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.pills button:hover { border-color: var(--ink); }
.pills button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.res { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.res__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-height: 36px; }
.chip { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 2px 0 12px; border: 1px solid var(--ink); font-size: var(--fs-small); animation: chipIn 0.35s var(--ease) both; }
.chip button { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; }
.chip button .ico { width: 12px; height: 12px; transition: transform var(--t-base) var(--ease); }
.chip button:hover .ico { transform: rotate(90deg); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gut); }
.grid.is-dense { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.grid.is-dense .card__body { padding: 10px 10px 12px; gap: 6px; }
.grid.is-dense .price__now { font-size: 18px; }
.more { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 0 0; color: var(--muted); font-size: var(--fs-small); }
.more__bar { width: 240px; height: 2px; background: var(--rule); }
.more__bar i { display: block; height: 2px; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform var(--t-reveal) var(--ease); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 96px 24px; border: 1px solid var(--rule); background: var(--surface); text-align: center; animation: rise var(--t-reveal) var(--ease) both; }
.empty h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; }
.empty p { max-width: 380px; color: var(--muted); }

/* ---------- Tableau dense ---------- */
.tblw { overflow-x: auto; border: 1px solid var(--rule); animation: rise var(--t-reveal) var(--ease) both; }
.tbl { width: 100%; min-width: 1040px; border-collapse: collapse; background: var(--surface); font-variant-numeric: tabular-nums; }
.tbl th { height: 44px; padding: 0 12px; border-bottom: 1px solid var(--ink); text-align: left; font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tbl th button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; letter-spacing: inherit; text-transform: inherit; }
.tbl th[aria-sort] { color: var(--ink); }
.tbl td { height: 44px; padding: 0 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tbl tbody tr { transition: background var(--t-fast); }
.tbl tbody tr:hover { background: var(--bg); }
.tbl .r { text-align: right; }
.tbl .code { font-size: var(--fs-small); letter-spacing: 0.04em; color: var(--muted); }
.tbl .ours { font-weight: 600; color: var(--accent); }
.tbl .off { font-weight: 600; color: var(--sale-text); }
.tbl .na { color: var(--muted); }
.tbl input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); vertical-align: middle; }

/* ---------- Couches : voile, fiche, tiroir, recherche ---------- */
.scrim { position: fixed; inset: 0; z-index: 30; background: var(--scrim); opacity: 0; visibility: hidden; transition: opacity var(--t-panel) var(--ease), visibility 0s var(--t-panel); }
.scrim.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }

.fiche { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--bg); overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(28px); transition: opacity var(--t-panel) var(--ease), transform var(--t-panel) var(--ease), visibility 0s var(--t-panel); }
.fiche.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.fiche__bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; min-height: 64px; padding: 0 var(--pad); background: var(--bg); border-bottom: 1px solid var(--rule); }
.fiche__bar .pos { flex: 1; text-align: center; font-size: var(--fs-small); color: var(--muted); }
.fiche__bar .btn { height: var(--ctl); padding: 0 12px; }
.fiche__main { flex: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 40px 72px; padding: 40px var(--pad); }
.gal { flex: 1 1 520px; max-width: 700px; display: flex; justify-content: flex-end; gap: 16px; }
.gal__th { display: flex; flex-direction: column; gap: 10px; }
.gal__th button { width: 72px; height: 90px; padding: 0; border: 1px solid var(--rule); background: var(--photo); overflow: hidden; transition: border-color var(--t-fast); }
.gal__th button:hover, .gal__th button[aria-pressed="true"] { border-color: var(--ink); }
.gal__th img { width: 100%; height: 100%; object-fit: contain; filter: brightness(var(--photo-dim)); }
.stage { position: relative; flex: 0 1 576px; aspect-ratio: 4 / 5; align-self: flex-start; background: var(--photo); border: 1px solid var(--rule); box-shadow: var(--shadow-photo); overflow: hidden; cursor: zoom-in; }
.stage img { width: 100%; height: 100%; object-fit: contain; filter: brightness(var(--photo-dim)); transform-origin: var(--zx, 50%) var(--zy, 50%); transition: transform 0.35s var(--ease), opacity var(--t-base); }
.stage.is-zoom img { transform: scale(2.2); }
.stage.is-swap img { opacity: 0; }
.stage__hint { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: #FFFFFF; border: 1px solid #E8E5E0; font-size: 12px; color: #5E5E5E; transition: opacity var(--t-base); }
.stage.is-zoom .stage__hint { opacity: 0; }
.info { flex: 1 1 380px; max-width: 460px; display: flex; flex-direction: column; gap: 24px; }
.fiche.is-open .info > *, .fiche.is-open .gal { animation: rise 0.7s var(--ease) both; animation-delay: calc(0.12s + var(--i, 0) * 0.07s); }
.info__brand { font-size: var(--fs-label); letter-spacing: 0.2em; text-transform: uppercase; }
.info__name { font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1.15; margin: 10px 0; }
.info__name:focus { outline: none; }
.info__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-small); color: var(--muted); }
.info__meta b { font-weight: 400; color: var(--ink); letter-spacing: 0.04em; }
.info__price { display: flex; flex-direction: column; gap: 2px; padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.info__price .old { display: flex; align-items: center; gap: 10px; }
.info__price s { font-size: 15px; color: var(--muted); }
.info__price .off { padding: 2px 7px; background: var(--sale); color: #FFFFFF; font-size: 12px; font-weight: 600; }
.info__price .now { font-size: 46px; line-height: 1.12; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.info__sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.info__sizes span { min-width: 44px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rule); background: var(--surface); }
.stock { display: flex; align-items: center; gap: 8px; }
.stock i { width: 8px; height: 8px; background: var(--accent); }
.stock.is-out i { background: var(--muted); }
.info__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.info__acts .btn--solid { flex: 1 1 100%; height: 48px; }
.info__acts .btn--plain { flex: 1 1 150px; }
.marks { background: var(--surface); border: 1px solid var(--rule); }
.marks > span { display: block; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.marks dl { display: grid; grid-template-columns: 1fr auto; font-variant-numeric: tabular-nums; }
.marks dt, .marks dd { padding: 9px 16px; border-bottom: 1px solid var(--rule); }
.marks dt { color: var(--muted); }
.marks dd { text-align: right; }
.marks dt:nth-last-of-type(1), .marks dd:nth-last-of-type(1) { border-bottom: 0; }
.marks .ours { font-weight: 600; color: var(--accent); }
.marks .off { font-weight: 600; color: var(--sale-text); }
.fiche__keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; padding: 14px var(--pad); border-top: 1px solid var(--rule); font-size: var(--fs-small); color: var(--muted); }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 35; width: min(480px, 100%); display: flex; flex-direction: column; background: var(--bg); box-shadow: var(--shadow-float); transform: translateX(104%); visibility: hidden; transition: transform var(--t-panel) var(--ease-io), visibility 0s var(--t-panel); }
.drawer.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.drawer__hd { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px 24px; border-bottom: 1px solid var(--rule); }
.drawer__hd h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; }
.drawer__hd span { flex: 1; color: var(--muted); }
.drawer__list { flex: 1; min-height: 0; overflow-y: auto; }
.li { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 16px 12px; border-bottom: 1px solid var(--rule); }
.drawer.is-open .li { animation: rise 0.6s var(--ease) both; animation-delay: calc(0.16s + var(--i, 0) * 0.06s); }
.li__mv { display: flex; flex-direction: column; gap: 2px; }
.li__mv button { width: 24px; height: 38px; padding: 0; border: 0; background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.li__mv button:hover:not(:disabled) { color: var(--ink); }
.li__mv button:disabled { opacity: 0.3; cursor: default; }
.li__img { flex: 0 0 64px; height: 80px; position: relative; background: var(--photo); border: 1px solid var(--rule); overflow: hidden; }
.li__img img { width: 100%; height: 100%; object-fit: contain; filter: brightness(var(--photo-dim)); }
.li__img .nophoto { font-size: 9px; }
.li__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.li__tx .brand { font-size: 11px; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--muted); }
.li__tx .code { font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
.li__pr { display: flex; flex-wrap: wrap; gap: 2px 16px; font-variant-numeric: tabular-nums; }
.li__pr span span { color: var(--muted); }
.li__pr b { font-weight: 600; color: var(--accent); }
.li__note { margin-top: 6px; height: 36px; padding: 0 10px; border: 1px solid var(--rule); background: var(--surface); }
.li__rm { width: 36px; height: 36px; flex: none; padding: 0; border: 0; background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; transition: color var(--t-fast); }
.li__rm:hover { color: var(--sale-text); }
.drawer__sum { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px 24px; border-top: 1px solid var(--ink); background: var(--surface); }
.drawer__sum dl { display: grid; grid-template-columns: 1fr auto; row-gap: 6px; align-items: baseline; font-variant-numeric: tabular-nums; }
.drawer__sum dt { color: var(--muted); }
.drawer__sum dd { text-align: right; font-size: 16px; }
.drawer__sum dd.big { font-size: 28px; line-height: 1.2; font-weight: 600; color: var(--accent); }
.drawer__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer__acts .btn { flex: 1 1 120px; padding: 0 10px; }
.drawer__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 40px; text-align: center; }
.drawer__empty h3 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h3); }
.drawer__empty p { max-width: 300px; color: var(--muted); }

.pal { position: fixed; top: 96px; left: 50%; z-index: 45; width: min(720px, calc(100% - 32px)); display: flex; flex-direction: column; background: var(--bg); box-shadow: var(--shadow-float); opacity: 0; visibility: hidden; transform: translate(-50%, -14px) scale(0.985); transition: opacity var(--t-base) var(--ease), transform var(--t-panel) var(--ease), visibility 0s var(--t-panel); }
.pal.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.pal__in { display: flex; align-items: center; gap: 14px; height: 68px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--ink); }
.pal__in .ico { width: 20px; height: 20px; }
.pal__in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 20px; }
.pal__hd { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 20px 8px; font-size: var(--fs-small); color: var(--muted); }
.pal__it { display: flex; align-items: center; gap: 16px; padding: 10px 20px 10px 18px; border-left: 2px solid transparent; animation: rise 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
.pal__it.is-cur, .pal__it:hover { background: var(--surface); border-left-color: var(--ink); }
.pal__it .th { flex: 0 0 48px; height: 60px; position: relative; background: var(--photo); border: 1px solid var(--rule); overflow: hidden; }
.pal__it .th img { width: 100%; height: 100%; object-fit: contain; }
.pal__it .th .nophoto { font-size: 8px; padding: 2px; }
.pal__it .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pal__it .tx b { font-weight: 400; font-size: 15px; }
.pal__it .tx span { font-size: var(--fs-small); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal__it mark { background: none; color: inherit; font-weight: 600; border-bottom: 1px solid var(--ink); }
.pal__it .pr { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.pal__it .pr s { font-size: var(--fs-small); color: var(--muted); }
.pal__it .pr b { font-size: 16px; font-weight: 600; color: var(--accent); }
.pal__all { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; margin-top: 8px; padding: 16px 20px; border: 0; border-top: 1px solid var(--rule); background: none; font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; }
.pal__all:hover, .pal__all.is-cur { background: var(--surface); }
.pal__none { padding: 28px 20px 32px; text-align: center; color: var(--muted); }
.pal__none b { display: block; margin-bottom: 6px; font: 400 24px/1.25 var(--serif); color: var(--ink); }
.pal__keys { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 12px 20px; border-top: 1px solid var(--rule); background: var(--wash); font-size: var(--fs-small); color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; padding: 12px 18px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-float); opacity: 0; transform: translate(-50%, 14px); transition: opacity var(--t-base), transform var(--t-panel) var(--ease); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Bascule de thème : révélation circulaire depuis le bouton ---------- */
@keyframes themeReveal { from { clip-path: circle(0 at var(--tx, 90%) var(--ty, 36px)); } to { clip-path: circle(150vmax at var(--tx, 90%) var(--ty, 36px)); } }
html.vt-theme::view-transition-old(root) { animation: none; }
html.vt-theme::view-transition-new(root) { animation: themeReveal 0.8s var(--ease-io) both; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }

/* ---------- Mobile et tablette ---------- */
.only-m { display: none; }
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.is-dense { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fl { position: fixed; inset: 0; z-index: 36; flex: none; max-height: none; padding: 0 var(--pad) 96px; background: var(--bg); transform: translateY(104%); visibility: hidden; transition: transform var(--t-panel) var(--ease-io), visibility 0s var(--t-panel); }
  .fl.is-open { transform: none; visibility: visible; transition-delay: 0s; }
  .fl__hd { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 64px; margin-bottom: 16px; background: var(--bg); border-bottom: 1px solid var(--rule); }
  .fl__hd h2 { font: 400 26px/1.2 var(--serif); }
  .fl__go { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px var(--pad) 20px; background: var(--surface); border-top: 1px solid var(--ink); }
  .fl__go .btn { width: 100%; height: 52px; }
  .check { min-height: 44px; }
  .pills button { min-width: 54px; height: 44px; }
  .fl .seg > button { height: 44px; }
  .only-m { display: inline-flex; }
  .hd__search { width: var(--ctl); padding: 0; justify-content: center; }
  .hd__search span, .hd__search kbd { display: none; }
}
@media (min-width: 1101px) { .fl__hd, .fl__go { display: none; } }
@media (max-width: 820px) {
  .nav { display: none; }
  .hero { flex-direction: column; height: auto; }
  .hero__p, .hero:hover .hero__p, .hero .hero__p:hover { flex: none; min-height: 420px; }
  .hero__frame { padding: 20px 18px; }
  .brandmark--ysl { letter-spacing: 0.18em; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 28px var(--pad); }
  .sec { padding: 48px var(--pad); }
  .gal { flex-direction: column-reverse; max-width: none; }
  .gal__th { flex-direction: row; }
  .gal__th button { width: 56px; height: 70px; }
  .stage { flex: none; width: 100%; }
  .fiche__keys, .pal__keys, .fiche__bar .btn span { display: none; }
  .pal { top: 0; width: 100%; height: 100%; }
}
@media (max-width: 560px) {
  .hd { gap: 4px; }
  .hd__logo { font-size: 20px; margin-right: auto; }
  .hd__sp { display: none; }
  .hd .iconbtn, .hd__search { border-color: transparent; background: transparent; }
  .selbtn { padding: 0 10px; border-color: transparent; }
  .selbtn > span:first-child { display: none; }
  .grid, .grid.is-dense { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fav { opacity: 1; transform: none; width: 44px; height: 44px; right: 0; bottom: 0; border-color: transparent; background: transparent; }
  .card__body { padding: 10px 10px 12px; gap: 6px; }
  .price__now { font-size: 20px; }
  .tb .seg--density { display: none; }
  .info__name { font-size: 28px; }
  .info__price .now { font-size: 38px; }
  .fiche__main { padding: 0 0 32px; gap: 20px; }
  .info { padding: 0 var(--pad); max-width: none; }
  .gal__th { padding: 0 var(--pad); }
  .stage { border-width: 0 0 1px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .marq__track { animation: none; }
}


/* ---------- Commande ---------- */
.order { border: 0; padding: 0; width: min(560px, 92vw); color: #111; background: #FAF9F7; border-radius: 2px; }
.order::backdrop { background: rgba(17, 17, 17, 0.55); }
.order__form { padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 12px; }
.order__hd { display: flex; align-items: center; justify-content: space-between; }
.order__hd h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0; }
.order__intro { margin: 0; color: #6B6B6B; font-size: var(--fs-small); line-height: 1.5; }
.order__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #555; }
.order input, .order select, .order textarea { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid #D9D5CD; background: #FFFFFF; color: #111; border-radius: 2px; text-transform: none; letter-spacing: 0; }
.order input:focus, .order select:focus, .order textarea:focus { outline: 2px solid #111; outline-offset: 1px; }
.order__opt { text-transform: none; letter-spacing: 0; color: #999; }
.order__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.order__sum { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid #E8E5E0; font-size: 13px; }
.order__msg { min-height: 1.2em; margin: 0; font-size: 13px; }
.order__msg.is-err { color: #B3261E; }
.order__msg.is-ok { color: #0A6E0A; }
.order__acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
@media (max-width: 560px) { .order__row { grid-template-columns: 1fr; } .order__form { padding: 20px; } }

/* ---------- Impression : fiche synthétique A4 de la sélection ---------- */
.sheet { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body > *:not(.sheet) { display: none !important; }
  .sheet { display: block; color: #111; font-size: 10pt; }
  .sheet h1 { font: 400 22pt/1.2 var(--serif); margin-bottom: 2mm; }
  .sheet p { color: #555; margin-bottom: 6mm; }
  .sheet table { width: 100%; border-collapse: collapse; }
  .sheet th, .sheet td { padding: 2.2mm 2mm; border-bottom: 0.3pt solid #999; text-align: left; vertical-align: top; }
  .sheet th { font-size: 8pt; letter-spacing: 0.1em; text-transform: uppercase; color: #555; border-bottom: 0.6pt solid #111; }
  .sheet .r { text-align: right; white-space: nowrap; }
  .sheet tfoot td { font-weight: 600; border-bottom: 0; border-top: 0.6pt solid #111; }
}
