/* Identité du serveur : Titillium Web, fond noir, accent orange (#fe8e46), logo Ryse. */
:root {
  color-scheme: dark;
  --bg: #111111;
  --surface: #1a1a1a;
  --ink: #f3f2ee;
  --muted: #9a9890;
  --line: #2b2b2b;
  --accent: #fe8e46;
  --accent-ink: #1d0e04;
  --media-a: #262626;
  --media-b: #171717;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-up: 0 18px 40px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 "Titillium Web", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* En-tête */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand img { display: block; width: 44px; height: 44px; border-radius: 11px; }
.word { display: flex; flex-direction: column; line-height: 1; }
.word b { color: var(--accent); font-size: 26px; font-weight: 900; letter-spacing: .04em; }
.word i { margin-top: 3px; font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .3em; }

/* Hero */
.hero { padding-block: clamp(40px, 8vw, 88px) clamp(20px, 3vw, 32px); }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; max-width: 16ch; font-size: clamp(36px, 6.4vw, 72px); line-height: 1.02; font-weight: 700; letter-spacing: -.02em; }
.lead { margin: 20px 0 0; max-width: 52ch; color: var(--muted); font-size: clamp(17px, 2vw, 20px); }
.lead strong { color: var(--accent); font-weight: 700; }
.perks { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 15px; font-weight: 600; }
.perks li { display: flex; align-items: center; gap: 8px; }
.perks li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Filtres */
.tools { padding-block: 16px 8px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.search { position: relative; flex: 1 1 280px; }
.search svg { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
input[type="search"], select { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
input[type="search"] { padding: 0 16px 0 44px; }
input[type="search"]::placeholder { color: var(--muted); }
input[type="search"]:focus, select:focus { border-color: var(--accent); outline: none; }
.sort { flex: 0 1 200px; }
select { padding: 0 14px; cursor: pointer; }
.slider { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.chips { position: relative; flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding-block: 2px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 44px; }
.chips button { scroll-snap-align: start; }
/* Fondu aux bords quand il reste des catégories de ce côté : plus de pastille coupée net à côté de la flèche. */
.chips.fl { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 44px); mask-image: linear-gradient(90deg, transparent 0, #000 44px); }
.chips.fr { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent 100%); }
.chips.fl.fr { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%); }
.arrow { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, opacity .15s; }
.arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.arrow:disabled { opacity: .3; cursor: default; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; padding: 8px 18px; border-radius: 999px; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.chips button:hover { border-color: var(--accent); }
.chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chips small { opacity: .6; margin-left: 6px; font-size: 13px; font-variant-numeric: tabular-nums; }
.count { margin: 12px 0 0; color: var(--muted); font-size: 15px; }

/* Grille */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; padding-block: 16px 72px; }
.card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s, border-color .25s; content-visibility: auto; contain-intrinsic-size: 300px 340px; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-up); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(145deg, var(--media-a), var(--media-b)); }
.ghost { padding: 0 12px; max-width: 100%; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 16%, transparent); font-size: clamp(30px, 5vw, 46px); font-weight: 900; letter-spacing: 0; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; scale: var(--fit, 1.8); opacity: 0; transition: scale .35s cubic-bezier(.2, .7, .2, 1), opacity .6s ease; }
.media img.ok { opacity: 1; }
.card:hover .media img { scale: calc(var(--fit, 1.8) + .08); }
.vip { display: inline-block; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 900; letter-spacing: .1em; padding: 3px 10px; border-radius: 999px; }
.media .vip { position: absolute; top: 12px; left: 12px; }
.body { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 18px; }
.cat { color: var(--muted); font-size: 14px; }
.name { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: 0; line-height: 1.2; }
.price { margin-top: 12px; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price em { font-style: normal; font-size: 18px; font-weight: 600; color: var(--muted); }
.price span { margin-left: 3px; color: var(--accent); font-weight: 700; font-size: 20px; }
.empty { padding-block: 64px; text-align: center; color: var(--muted); }

.foot { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 15px; }
.foot p { margin: 0; }

/* Apparition en douceur : en-tête, intro, filtres, puis cartes l'une après l'autre. */
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.top { animation: fade .6s ease backwards; }
.hero > *, .tools { animation: rise .7s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero > :nth-child(2) { animation-delay: .08s; }
.hero > :nth-child(3) { animation-delay: .16s; }
.hero > :nth-child(4) { animation-delay: .24s; }
.tools { animation-delay: .32s; }
.card { animation: rise .6s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 45ms + .35s); }
/* Après le chargement (recherche, filtres) : apparition plus courte, sans attente. */
.ready .card { animation-duration: .4s; animation-delay: calc(var(--i, 0) * 25ms); }

@media (max-width: 640px) {
  .arrow { display: none; }
  .sort { flex: 1 1 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .top, .hero > *, .tools, .card { animation: none; }
  .card, .chips button, .arrow, .media img { transition: none; }
  .card:hover { transform: none; }
}
