/* ============================================================================
   ZAGAN'S SHOP · DESIGN SYSTEM
   ----------------------------------------------------------------------------
   Layout : une colonne centrée. Texte 680 px max, grilles 1040 px max.
   Langage : verre sombre + bordures néon violettes (UI kit), typographie Geist,
   une seule couleur d'accent (config.js > theme.accent). Thème sombre unique.
   Motion : courbes Apple, jamais plus de 0,8 s. Détails : docs/DESIGN.md
   Galerie des composants : ui-kit.html
   ========================================================================== */

:root {
  /* couleurs */
  --bg: #050308;
  --bg-band: #0a0710;
  --surface: #110c18;
  --surface-2: #181222;
  --surface-3: #22192e;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --fg: #f5f3f8;
  --fg-2: #a9a2b4;
  --fg-3: #7f7890;
  --accent: #c04bff;
  --accent-rgb: 192, 75, 255;
  --accent-soft: #efb9ff;
  --accent-deep: #772f9e;
  --on-accent: #ffffff;
  --ok: #30d158;
  --warn: #ffd60a;
  --bad: #ff453a;

  /* verre + néon */
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)), var(--surface);
  --neon-border: rgba(var(--accent-rgb), 0.7);
  --neon-glow: 0 0 0 1px rgba(var(--accent-rgb), 0.55), 0 0 18px rgba(var(--accent-rgb), 0.35), inset 0 0 14px rgba(var(--accent-rgb), 0.12);
  --neon-glow-strong: 0 0 0 1px rgba(var(--accent-rgb), 0.9), 0 0 28px rgba(var(--accent-rgb), 0.55), inset 0 0 18px rgba(var(--accent-rgb), 0.22);
  --neon-line: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.9) 30%, var(--accent-soft) 50%, rgba(var(--accent-rgb), 0.9) 70%, transparent);

  /* typographie */
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* mouvement */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);

  /* dimensions */
  --nav-h: 52px;
  --tab-h: 58px;
  --r-card: 22px;
  --r-sheet: 28px;
  --r-ctl: 14px;
  --w-text: 680px;
  --w-grid: 1040px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));

  color-scheme: dark;
}

/* ------------------------------------------------------------------ BASE */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html.smooth { scroll-behavior: smooth; }
html.locked, html.locked body { overflow: hidden; }
body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 17px; line-height: 1.47; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, picture { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; }
input { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(var(--accent-rgb), 0.35); }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.noscript { max-width: var(--w-text); margin: calc(var(--nav-h) + 24px) auto 0; padding: 14px 18px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line-2); color: var(--fg-2); font-size: 0.9375rem; }

/* ------------------------------------------------------------ TYPOGRAPHIE */
h1 { font-size: clamp(2.5rem, 6.5vw, 4.75rem); font-weight: 600; line-height: 1.03; letter-spacing: -0.035em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); font-weight: 600; line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
h3 { font-size: 1.1875rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.4375rem); line-height: 1.4; color: var(--fg-2); letter-spacing: -0.015em; text-wrap: pretty; }
.eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-soft); text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6); }
.caption { font-size: 0.8125rem; color: var(--fg-3); }
.sec-head { display: grid; gap: 12px; justify-items: center; text-align: center; max-width: var(--w-text); margin: 0 auto clamp(36px, 5vw, 56px); }
.sec-sub { font-size: 1.0625rem; color: var(--fg-2); max-width: 36em; text-wrap: pretty; }

/* ---------------------------------------------------------------- BOUTONS */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 24px; border-radius: 980px;
  background: var(--glass); color: var(--on-accent);
  border: 1px solid var(--neon-border); box-shadow: var(--neon-glow);
  font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), opacity 0.3s;
}
.btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 45%); pointer-events: none; }
.btn:active { transform: scale(0.98); }
.btn .ico { width: 16px; height: 16px; }
.btn-secondary { border-color: var(--line-2); box-shadow: none; color: var(--fg); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.875rem; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--glass); color: var(--fg-2); display: inline-grid; place-items: center; transition: box-shadow 0.3s, border-color 0.3s, color 0.3s, transform 0.3s var(--ease); }
.btn-icon:active { transform: scale(0.95); }
.link { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-soft); font-size: 0.9375rem; font-weight: 500; }
.link .ico { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }


/* --------------------------------------------------------- BADGES / FLAGS */
.badge, .flag {
  display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 11px; border-radius: 9px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
  background: var(--glass); border: 1px solid var(--line-2); color: var(--fg-2);
}
.badge .ico, .flag .ico { width: 13px; height: 13px; }
.badge { color: var(--accent-soft); border-color: rgba(var(--accent-rgb), 0.6); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.25), inset 0 0 10px rgba(var(--accent-rgb), 0.1); }
.flag.soon { color: var(--warn); }
.flag.soldout { color: var(--fg-3); }

/* ------------------------------------------------------------ CONTRÔLES */
.input { position: relative; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: 980px; background: var(--glass); border: 1px solid var(--line-2); color: var(--fg-2); transition: border-color 0.3s, box-shadow 0.3s; }
.input:focus-within { border-color: rgba(var(--accent-rgb), 0.7); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.25); color: var(--fg); }
.input input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--fg); font-size: 0.9375rem; -webkit-appearance: none; appearance: none; }
.input input::-webkit-search-decoration, .input input::-webkit-search-cancel-button { -webkit-appearance: none; }
.input input::placeholder { color: var(--fg-3); }
.toggle { position: relative; width: 52px; height: 30px; border-radius: 980px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--fg-2); transition: transform 0.3s var(--ease), background 0.3s; }
.toggle[aria-checked="true"] { background: rgba(var(--accent-rgb), 0.25); border-color: var(--neon-border); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.35); }
.toggle[aria-checked="true"]::after { transform: translateX(22px); background: var(--accent-soft); box-shadow: 0 0 10px var(--accent-soft); }
.check, .radio { appearance: none; width: 22px; height: 22px; margin: 0; border: 1px solid var(--line-2); background: var(--glass); display: inline-grid; place-items: center; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; flex: none; }
.check { border-radius: 7px; } .radio { border-radius: 50%; }
.check:checked, .radio:checked { border-color: var(--neon-border); box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.4); }
.check:checked::after { content: ""; width: 11px; height: 6px; border: 2px solid var(--accent-soft); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.radio:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-soft); box-shadow: 0 0 8px var(--accent-soft); }
.spinner { width: 30px; height: 30px; border-radius: 50%; flex: none; background: conic-gradient(from 0deg, transparent 0 30%, var(--accent) 100%); -webkit-mask: repeating-conic-gradient(#000 0 14deg, transparent 14deg 30deg), radial-gradient(circle, transparent 58%, #000 60%); -webkit-mask-composite: source-in; mask: repeating-conic-gradient(#000 0 14deg, transparent 14deg 30deg), radial-gradient(circle, transparent 58%, #000 60%); mask-composite: intersect; animation: spin 1.1s steps(12) infinite; filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.7)); }
.progress { position: relative; height: 8px; border-radius: 980px; background: var(--surface-3); border: 1px solid var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; width: var(--p, 0%); background: linear-gradient(90deg, var(--accent), var(--accent-soft)); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7); transition: width 1s linear; }
.stars { display: inline-flex; gap: 2px; color: var(--accent-soft); filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.6)); }
.stars .ico { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.stars .ico.off { fill: none; stroke: var(--fg-3); stroke-width: 1.4; }
.stars .half { position: relative; display: inline-grid; }
.stars .half .ico { grid-area: 1 / 1; }
.stars .half .ico.fill { clip-path: inset(0 50% 0 0); }

/* ---------------------------------------------------------------- DIVIDER */
.divider { position: relative; display: flex; align-items: center; justify-content: center; max-width: var(--w-grid); margin: 0 auto; height: 28px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--neon-line); box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5); }
.divider .ico { width: 26px; height: 26px; margin: 0 14px; color: var(--accent-soft); filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.8)); }

/* -------------------------------------------------------------------- NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(5, 3, 8, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: var(--w-grid); margin: 0 auto; height: var(--nav-h); padding-left: var(--gutter-l); padding-right: var(--gutter-r); display: flex; align-items: center; gap: 28px; }
@media (max-width: 359px) { .brand span { display: none; } .nav-right { gap: 10px; } }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.5), 0 0 12px rgba(var(--accent-rgb), 0.45); }
.nav-links { display: none; gap: 24px; }
.nav-links a { font-size: 0.875rem; color: var(--fg-2); transition: color 0.2s, text-shadow 0.2s; }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.lang { display: inline-flex; align-items: center; gap: 2px; }
.lang button { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; color: var(--fg-3); padding: 12px 6px; min-height: 44px; transition: color 0.2s; }
.lang button[aria-pressed="true"] { color: var(--accent-soft); text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.7); }
.lang button + button::before { content: ""; display: inline-block; width: 1px; height: 10px; background: var(--line-2); margin-right: 9px; vertical-align: -1px; }
.account-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 0.875rem; color: var(--fg-2); transition: color 0.2s; }
.account-link .name { max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account-link .avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--surface-2); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.5); }
.account-link .avatar-fallback { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 600; color: var(--on-accent); background: rgba(var(--accent-rgb), 0.35); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.7), 0 0 10px rgba(var(--accent-rgb), 0.4); }

/* ------------------------------------------------------------------- HERO */
.hero {
  position: relative; isolation: isolate;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  padding-block: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(44px, 8vw, 88px)) clamp(48px, 8vw, 96px);
  display: grid; justify-items: center; text-align: center; overflow-x: clip;
}
/* aurore : deux rubans de lumière flous, lents (UI kit) */
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(44px); opacity: 0.55; mix-blend-mode: screen; }
.hero::before { width: 70vw; max-width: 900px; height: 180px; top: 18%; left: 50%; transform: translateX(-62%) rotate(-12deg); background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.55), rgba(239, 185, 255, 0.5), transparent); animation: ribbon-a 14s ease-in-out infinite alternate; }
.hero::after { width: 60vw; max-width: 760px; height: 120px; top: 34%; left: 50%; transform: translateX(-38%) rotate(10deg); background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.45), transparent); animation: ribbon-b 18s ease-in-out infinite alternate; }
.hero.off::before, .hero.off::after, html.locked .hero::before, html.locked .hero::after { animation-play-state: paused; }
@keyframes ribbon-a { to { transform: translateX(-46%) rotate(-6deg) scaleX(1.1); } }
@keyframes ribbon-b { to { transform: translateX(-52%) rotate(14deg); } }
.hero-logo { position: relative; width: clamp(200px, 38vw, 340px); aspect-ratio: 1; margin-bottom: clamp(32px, 5vw, 48px); animation: hero-logo 1.1s var(--ease-out) both; }
.hero-logo::before { content: ""; position: absolute; inset: -22%; border-radius: 50%; z-index: -1; background: radial-gradient(circle, rgba(var(--accent-rgb), 0.42) 0%, rgba(var(--accent-rgb), 0.12) 40%, transparent 68%); filter: blur(28px); }
.hero-logo img { width: 100%; height: auto; border-radius: 50%; }
.hero .eyebrow { margin-bottom: 14px; animation: rise 0.9s var(--ease-out) 0.1s both; }
.hero h1 { max-width: 14em; animation: rise 0.9s var(--ease-out) 0.15s both; }
.hero .lead { max-width: 30em; margin-top: 18px; animation: rise 0.9s var(--ease-out) 0.25s both; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; margin-top: 34px; animation: rise 0.9s var(--ease-out) 0.35s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hero-logo { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@supports (animation-timeline: view()) {
  .hero-logo { animation: hero-logo 1.1s var(--ease-out) both, hero-scroll linear both; animation-timeline: auto, view(); animation-range: normal, exit 0% exit 70%; }
  @keyframes hero-scroll { to { transform: scale(0.9); opacity: 0.5; } }
}

/* --------------------------------------------------------------- SECTIONS */
.section { padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: clamp(72px, 10vw, 128px); scroll-margin-top: calc(var(--nav-h) - 8px); }
.section > * { max-width: var(--w-grid); margin-left: auto; margin-right: auto; }
.section > .sec-head { max-width: var(--w-text); }
.band { background: var(--bg-band); }
.band-inner { max-width: var(--w-grid); margin: 0 auto; }
.cols { display: grid; grid-template-columns: 1fr; gap: 14px; }
.cols li { display: grid; gap: 8px; min-width: 0; align-content: start; padding: 24px; border-radius: var(--r-card); background: var(--glass); border: 1px solid var(--line); transition: border-color 0.4s var(--ease); }
.cols p { font-size: 0.9375rem; color: var(--fg-2); max-width: 32em; }

/* -------------------------------------------------------------------- SHOP */
.shop-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: -16px auto 28px; }
.shop-tools .input { min-width: min(100%, 320px); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { min-height: 34px; padding: 0 14px; border-radius: 980px; font-size: 0.8125rem; font-weight: 600; color: var(--fg-2); background: var(--glass); border: 1px solid var(--line-2); transition: color 0.2s, border-color 0.2s, box-shadow 0.2s; }
.chip[aria-pressed="true"] { color: var(--accent-soft); border-color: var(--neon-border); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3); }
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.grid-empty { grid-column: 1 / -1; text-align: center; color: var(--fg-3); padding: 24px 0; }
.card {
  position: relative; isolation: isolate; display: grid; grid-template-rows: auto 1fr auto; gap: 22px; min-width: 0; min-height: 240px;
  padding: 26px; border-radius: var(--r-card); overflow: hidden;
  background: var(--glass); border: 1px solid var(--line);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.45; transition: opacity 0.4s;
  background: radial-gradient(55% 45% at 8% 100%, rgba(var(--accent-rgb), 0.22), transparent 70%), radial-gradient(40% 35% at 100% 0%, rgba(var(--accent-rgb), 0.08), transparent 70%); }
.card:active { transform: translateY(-1px) scale(0.995); }
.card:focus-visible { border-radius: var(--r-card); outline-offset: 2px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.card-cat { font-size: 0.8125rem; color: var(--fg-3); letter-spacing: 0.01em; }
.card-img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: var(--surface-2); margin-bottom: 4px; }
.card-body { display: grid; gap: 6px; min-width: 0; align-content: start; }
.card-name { font-size: 1.5rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.025em; }
.card-tag { font-size: 0.9375rem; color: var(--fg-2); text-wrap: pretty; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-foot .ico { width: 16px; height: 16px; color: var(--fg-3); transition: transform 0.3s var(--ease), color 0.3s; }
.card.is-soldout .card-name, .card.is-soldout .price { color: var(--fg-2); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.9375rem; font-weight: 500; letter-spacing: -0.01em; min-width: 0; }
.price .pg { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.price .small { font-size: 0.75rem; color: var(--fg-3); font-weight: 500; }
.price .sep { color: var(--fg-3); }

/* ---------------------------------------------------------------- PRIVACY */
.privacy .cols .ico { width: 24px; height: 24px; color: var(--accent-soft); margin-bottom: 8px; filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.7)); stroke-width: 1.5; }

/* -------------------------------------------------------------------- HOW */
.step-n { font-family: var(--mono); font-size: 0.8125rem; color: var(--accent-soft); text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.7); margin-bottom: 6px; }

/* -------------------------------------------------------------------- FAQ */
.faq-list { max-width: var(--w-text); border-top: 1px solid var(--line-2); }
.faq-list details { border-bottom: 1px solid var(--line-2); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list .ico { width: 18px; height: 18px; color: var(--fg-3); transition: transform 0.35s var(--ease), color 0.2s; }
.faq-list details[open] .ico { transform: rotate(90deg); color: var(--accent-soft); }
.faq-list .faq-a { padding: 0 0 22px; color: var(--fg-2); font-size: 0.9375rem; max-width: 60ch; text-wrap: pretty; }

/* ------------------------------------------------------------------ FOOTER */
.foot { padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: 8px calc(28px + env(safe-area-inset-bottom, 0px)); }
.foot-inner { max-width: var(--w-grid); margin: 24px auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.foot-copy { font-size: 0.75rem; color: var(--fg-3); }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-links a { font-size: 0.75rem; color: var(--fg-2); transition: color 0.2s; }

/* ------------------------------------------------------------------- SHEET */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.62); opacity: 0; transition: opacity 0.4s var(--ease); }   /* flou uniquement sur desktop (coût GPU) */
.backdrop:not(.open) { pointer-events: none; }
.backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-height: calc(100vh - 20px - env(safe-area-inset-top, 0px));
  max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px));
  background: var(--surface); color: var(--fg);
  border-radius: 20px 20px 0 0; border-top: 1px solid rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 -1px 24px rgba(var(--accent-rgb), 0.18), 0 -30px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(100%); transition: transform 0.55s var(--ease-sheet);
  display: flex; flex-direction: column; overflow: hidden; outline: none;
}
.sheet.open { transform: none; }
.sheet-handle { width: 36px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; flex: none; }
.sheet-close { position: absolute; top: 14px; right: max(14px, env(safe-area-inset-right, 0px)); z-index: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line-2); color: var(--fg-2); transition: border-color 0.2s, color 0.2s, box-shadow 0.2s; }
.sheet-close .ico { width: 14px; height: 14px; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 22px var(--gutter-r) calc(24px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); }

/* fiche produit */
.detail { display: grid; gap: 28px; grid-template-areas: "head" "buy" "body"; }
.detail-head { grid-area: head; display: grid; gap: 12px; padding-right: 96px; min-width: 0; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.detail-head .lead { font-size: 1.0625rem; }
.detail-share { position: absolute; top: 14px; right: calc(max(14px, env(safe-area-inset-right, 0px)) + 46px); z-index: 2; width: 38px; height: 38px; border-radius: 50%; }
.detail-img { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; background: var(--surface-2); }
.detail-share .ico { width: 15px; height: 15px; }
.detail-body { grid-area: body; display: grid; gap: 24px; min-width: 0; }
.detail-desc { color: var(--fg-2); font-size: 0.9375rem; max-width: 60ch; text-wrap: pretty; }
.detail-label { font-size: 0.8125rem; font-weight: 600; color: var(--fg-3); margin-bottom: 12px; }
.features { display: grid; gap: 10px; }
.features li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: 0.9375rem; }
.features .ico { width: 18px; height: 18px; margin-top: 2px; color: var(--accent-soft); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(var(--accent-rgb), 0.6)); }

.buy { grid-area: buy; display: grid; gap: 16px; padding: 22px; border-radius: 20px; background: var(--glass); border: 1px solid rgba(var(--accent-rgb), 0.35); box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.12), inset 0 0 24px rgba(var(--accent-rgb), 0.05); }
.buy-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.buy-row .lbl { font-size: 0.875rem; color: var(--fg-2); }
.buy-row .val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 500; font-size: 1rem; }
.buy-row.main .val { font-size: 1.75rem; letter-spacing: -0.02em; text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.4); }
.buy-setup-ok { margin: 0; font-size: 0.8125rem; color: var(--accent-soft, var(--accent)); }
.plan-picker { display: grid; gap: 8px; }
.plan-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--fg); font: inherit; cursor: pointer; text-align: left; }
.plan-chip .plan-name { font-weight: 500; font-size: 0.9375rem; }
.plan-chip .plan-price { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.8125rem; color: var(--fg-2); }
@media (hover: hover) and (pointer: fine) { .plan-chip:hover { border-color: rgba(var(--accent-rgb), 0.5); } }
.plan-chip.on { border-color: rgba(var(--accent-rgb), 0.8); background: rgba(var(--accent-rgb), 0.12); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.18); }
.plan-chip.on .plan-price { color: var(--accent-soft, var(--accent)); }
.plan-chip:focus-visible { outline: 2px solid rgba(var(--accent-rgb), 0.8); outline-offset: 2px; }
.option-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.875rem; color: var(--fg-2); }
.option-row .option-name { color: var(--fg-2); }
.buy-assets { display: flex; flex-wrap: wrap; gap: 6px; }
.buy-assets li { font-family: var(--mono); font-size: 0.75rem; padding: 5px 9px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--fg-2); }
.buy-note { font-size: 0.8125rem; color: var(--fg-3); text-wrap: pretty; }
.buy-note.warn { color: var(--warn); }
.buy hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* états de paiement (API) */
.pay-state { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 8px 0 4px; }
.pay-state .okmark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ok); border: 1px solid rgba(48, 209, 88, 0.5); box-shadow: 0 0 14px rgba(48, 209, 88, 0.35); animation: pop 0.5s var(--ease-out) both; }
.pay-state .okmark .ico { width: 18px; height: 18px; stroke-width: 2.2; }
.pay-state .okmark.warn { color: var(--warn); border-color: rgba(255, 214, 10, 0.5); box-shadow: 0 0 14px rgba(255, 214, 10, 0.25); }
.pay-state strong { font-size: 1rem; font-weight: 600; }
.pay-state p { font-size: 0.875rem; color: var(--fg-2); }
.pay-state .progress { width: 100%; margin-top: 2px; }
.pay-state .caption { font-family: var(--mono); font-variant-numeric: tabular-nums; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* compte */
.account { display: grid; gap: 22px; padding-right: 44px; max-width: 520px; }
.account-user { display: flex; align-items: center; gap: 14px; }
.account-user .avatar, .account-user .avatar-fallback { width: 48px; height: 48px; border-radius: 50%; }
.account-user .avatar { object-fit: cover; background: var(--surface-2); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.5), 0 0 14px rgba(var(--accent-rgb), 0.35); }
.account-user .avatar-fallback { display: grid; place-items: center; font-weight: 600; color: var(--on-accent); background: rgba(var(--accent-rgb), 0.3); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.7), 0 0 14px rgba(var(--accent-rgb), 0.4); }
.account-user strong { display: block; font-size: 1.0625rem; }
.account-user span { font-size: 0.875rem; color: var(--fg-3); }
.account p { color: var(--fg-2); font-size: 0.9375rem; }
.subs { display: grid; gap: 8px; }
.subs li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 14px 16px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.subs .sub-name { grid-column: 1; grid-row: 1; font-weight: 600; }
.subs .sub-meta { grid-column: 1; grid-row: 2; font-size: 0.8125rem; color: var(--fg-3); }
.subs .pill { grid-column: 2; grid-row: 1 / span 2; justify-self: end; font-size: 0.75rem; font-weight: 500; padding: 4px 9px; border-radius: 980px; background: rgba(255, 255, 255, 0.06); color: var(--fg-2); }
.subs .pill.active { color: var(--ok); background: rgba(48, 209, 88, 0.12); box-shadow: 0 0 10px rgba(48, 209, 88, 0.2); }
.subs .pill.expired { color: var(--warn); background: rgba(255, 214, 10, 0.1); }
.subs .sub-renew { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }
.account-actions { display: grid; gap: 10px; }
.account .auth { display: flex; align-items: center; min-height: 40px; }
.account .logout { font-size: 0.875rem; color: var(--fg-3); justify-self: start; }

/* ------------------------------------------------------------------- TOAST */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 80; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 18px 0 16px; border-radius: 14px; max-width: calc(100vw - 32px);
  background: var(--glass); border: 1px solid var(--neon-border); box-shadow: var(--neon-glow); color: var(--fg); font-size: 0.9375rem; font-weight: 600; white-space: nowrap;
  transition: transform 0.45s var(--ease-out), opacity 0.3s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .ico { color: var(--accent-soft); }
.toast .ico.end { color: var(--ok); }
html.in-telegram .toast { bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom, 0px)); }
html.in-telegram.locked .toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

/* ----------------------------------------------------------------- TABBAR */
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 0 var(--gutter-r) env(safe-area-inset-bottom, 0px) var(--gutter-l);
  background: rgba(5, 3, 8, 0.78); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); }
.tabbar-inner { height: var(--tab-h); display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; }
.tabbar a { display: grid; justify-items: center; gap: 4px; color: var(--fg-3); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.02em; transition: color 0.2s; }
.tabbar a .ico { width: 24px; height: 24px; stroke-width: 1.6; transition: filter 0.3s, color 0.3s; }
.tabbar a.active { color: var(--accent-soft); }
.tabbar a.active .ico { filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.8)); }
html.in-telegram .tabbar { display: block; transition: transform 0.4s var(--ease-sheet), visibility 0.4s; }
html.in-telegram body { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); }
html.in-telegram.locked .tabbar { transform: translateY(100%); visibility: hidden; }

/* ----------------------------------------------------------------- REVEAL */
html.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); transition-delay: var(--d, 0s); }
html.js .reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- TELEGRAM */
html.in-telegram .nav-links, html.in-telegram .foot-links { display: none; }
html.in-telegram .buy #buyAction:has(> .btn-main) { display: none; }   /* remplacé par le MainButton natif */
html.in-telegram .sheet { max-height: calc(100vh - 10px); max-height: calc(100dvh - 10px); }
.demo-mainbutton { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; min-height: 50px; padding: 0 16px env(safe-area-inset-bottom, 0px); background: var(--accent-deep, #772f9e); color: var(--on-accent); font-weight: 600; font-size: 0.9375rem; box-shadow: 0 -8px 30px rgba(var(--accent-rgb), 0.35); }

/* ------------------------------------------------------------------ HOVER */
/* uniquement sur les appareils à pointeur : sur mobile, un survol collant après un tap n'a pas de sens */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { box-shadow: var(--neon-glow-strong); border-color: var(--accent-soft); transform: translateY(-1px); }
  .btn-secondary:hover { border-color: rgba(var(--accent-rgb), 0.6); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.2); }
  .btn-icon:hover { color: var(--fg); border-color: rgba(var(--accent-rgb), 0.7); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.3); }
  .link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .link:hover .ico { transform: translateX(2px); }
  .nav-links a:hover, .account-link:hover, .foot-links a:hover, .account .logout:hover { color: var(--fg); }
  .nav-links a:hover { text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6); }
  .card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.65); box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.25), inset 0 0 20px rgba(var(--accent-rgb), 0.06); }
  .card:hover::after { opacity: 1; }
  .card:hover .card-foot .ico { transform: translateX(3px); color: var(--accent-soft); }
  .sheet-close:hover { color: var(--fg); border-color: rgba(var(--accent-rgb), 0.7); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3); }
}

/* ------------------------------------------------------------- BREAKPOINTS */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 880px) {
  .nav-links { display: flex; }
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: min(920px, calc(100vw - 48px)); max-height: min(86vh, 820px);
    border-radius: var(--r-sheet); border: 1px solid rgba(var(--accent-rgb), 0.35);
    box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.18), 0 40px 120px rgba(0, 0, 0, 0.6);
    transform: translate(-50%, -48%) scale(0.98); opacity: 0;
    transition: transform 0.45s var(--ease-sheet), opacity 0.3s var(--ease);
  }
  .sheet.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet-handle { display: none; }
  .sheet-body { padding: 66px 40px 40px; }
  .detail { grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr); grid-template-areas: "head buy" "body buy"; gap: 28px 40px; align-items: start; }
  .detail-head { padding-right: 0; }
  .account { padding-right: 0; }
  .buy { position: sticky; top: 62px; }
  .backdrop { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

/* ---------------------------------------------------------- REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .hero::before, .hero::after { animation: none; }
}
