/* voltage.css — charte « VOLTAGE » Revuelto Gaming (blanc & violet électrique).
   Repris de tailwind.config.ts + app/globals.css. Unités en PX (on ne dépend pas
   du root 10px de Dawn) pour retomber sur les pixels EXACTS de l'original. */

:root {
  /* Neutres (dominants) + accent violet (parcimonie) — charte §3.1 */
  --v-ink: #12101c;
  --v-ink-soft: #6b6880;
  --v-surface: #f7f6fa;
  --v-dark: #0e0b1a;
  --v-line: #ece9f3;          /* hairline discret */
  --v-accent: #7c3aed;
  --v-accent-hover: #6d28d9;
  --v-accent-soft: #f1ecfe;
  --v-fomo: #ff4500;
  --v-promo: #0b7d43; /* vert prix de vente (contraste 5.2:1 sur blanc) */

  /* Échelle d'espacement (base 4/8px) — noms figés (dépendances inter-agents) */
  --v-space-1: 4px;
  --v-space-2: 8px;
  --v-space-3: 12px;
  --v-space-4: 16px;
  --v-space-5: 24px;
  --v-space-6: 32px;
  --v-space-7: 48px;
  --v-space-8: 64px;
  --v-space-9: 80px;

  /* Rythme vertical des sections (souffle fluide) */
  --v-section-py: clamp(48px, 8vw, 96px);

  /* Rayons */
  --v-radius-sm: 10px;
  --v-radius-card: 16px;      /* 12 → 16 : plus de douceur */
  --v-radius-pill: 9999px;

  /* Ombres premium — couches douces, neutres (pas de hard shadow) */
  --v-shadow-soft: 0 1px 2px rgba(16, 11, 26, .04), 0 6px 20px rgba(16, 11, 26, .06);
  --v-shadow-card: 0 1px 2px rgba(16, 11, 26, .04), 0 8px 24px rgba(16, 11, 26, .08);
  --v-shadow-pop: 0 12px 34px rgba(16, 11, 26, .14);
  --v-shadow-card-hover: 0 14px 40px rgba(16, 11, 26, .16);

  /* Typographie */
  --v-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --v-display: "Space Grotesk", var(--v-sans);
  --v-maxw: 1280px;
}

/* Police globale du storefront (Inter texte, Space Grotesk titres) — charte §3.2. */
body {
  font-family: var(--v-sans);
  font-size: 16px;
  line-height: 1.5;            /* corps confortable */
  color: var(--v-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .v-display {
  font-family: var(--v-display);
  font-weight: 700;
  line-height: 1.12;           /* titres serrés */
  letter-spacing: -0.02em;
  color: var(--v-ink);
}
::selection { background: var(--v-accent); color: #fff; }

/* Conteneur centré (max-w-7xl = 1280px, px-4 / sm:px-6). */
.v-container { max-width: var(--v-maxw); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .v-container { padding-inline: 24px; } }

/* Base commune aux sections custom. */
.v-sec, .v-sec * { box-sizing: border-box; }
.v-sec img { max-width: 100%; }
/* Souffle vertical des sections (rythme premium). */
.v-sec { padding-block: var(--v-section-py); }

/* Bouton principal (CTA violet plein) + secondaire (outline) — charte §3.4. */
.v-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--v-space-2);
  font-family: var(--v-sans); font-weight: 600; font-size: 15px; line-height: 1;
  padding: 14px 24px; border-radius: var(--v-radius-card);
  border: 1px solid transparent; cursor: pointer;
  background: var(--v-accent); color: #fff;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  text-decoration: none;
}
.v-btn:hover { background: var(--v-accent-hover); }
.v-btn:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }
.v-btn--ghost { background: #fff; color: var(--v-ink); border-color: var(--v-line); }
.v-btn--ghost:hover { border-color: var(--v-accent); color: var(--v-accent); background: #fff; }
.v-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Pastilles / badges. */
.v-badge {
  display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .04em; padding: 4px 9px; border-radius: var(--v-radius-pill);
}
.v-badge--accent { background: var(--v-accent-soft); color: var(--v-accent); }
.v-badge--fomo { background: var(--v-fomo); color: #fff; letter-spacing: .02em; }
.v-badge--hype { background: var(--v-ink); color: #fff; }

.v-icon { display: inline-block; vertical-align: middle; flex: none; }

/* Titres de section (éditorial). */
.v-h2 { font-family: var(--v-display); font-weight: 800; color: var(--v-ink); font-size: clamp(28px, 4.4vw, 44px); line-height: 1.08; letter-spacing: -0.025em; text-align: center; }
.v-eyebrow { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--v-accent); }

/* ── Carte produit (ProductCard.tsx) + grilles ─────────────────────────── */
.vpc { display: flex; height: 100%; flex-direction: column; overflow: hidden; border-radius: var(--v-radius-card); border: 1px solid var(--v-line); background: #fff; box-shadow: var(--v-shadow-soft); transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease; }
.vpc:hover { transform: translateY(-3px); border-color: var(--v-line); box-shadow: var(--v-shadow-card-hover); }
.vpc__media { position: relative; padding: var(--v-space-5) var(--v-space-5) 0; }
.vpc__badges { position: absolute; left: var(--v-space-4); top: var(--v-space-4); z-index: 10; display: flex; flex-direction: column; align-items: flex-start; gap: var(--v-space-2); pointer-events: none; }
.vpc__badge { border-radius: var(--v-radius-pill); padding: 3px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; box-shadow: var(--v-shadow-soft); }
.vpc__badge--hype { background: var(--v-accent); }
.vpc__badge--bogo { background: var(--v-fomo); }
.vpc__badge--oos { background: var(--v-dark); }
.vpc__imgwrap { display: block; aspect-ratio: 1 / 1; border-radius: var(--v-radius-sm); overflow: hidden; background: var(--v-surface); }
.vpc__img { width: 100%; height: 100%; object-fit: contain; display: block; padding: var(--v-space-3); box-sizing: border-box; transition: transform .3s ease; }
.vpc:hover .vpc__img { transform: scale(1.03); }
.vpc__img--dimmed { filter: grayscale(1) opacity(.55); }
.vpc__body { display: flex; flex: 1; flex-direction: column; gap: var(--v-space-3); padding: var(--v-space-5); }
.vpc__meta { display: flex; align-items: center; gap: var(--v-space-2); }
.vpc__brand { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .18em; color: var(--v-ink-soft); }
.vpc__cat { margin-left: auto; border-radius: var(--v-radius-pill); background: var(--v-accent-soft); padding: 3px 9px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--v-accent); white-space: nowrap; }
.vpc__name { font-family: var(--v-display); font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--v-ink); margin: 0; }
.vpc__name a { color: inherit; text-decoration: none; display: block; padding-block: 4px; }
.vpc__name a:hover { color: var(--v-accent); }
.vpc__name a:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; border-radius: 4px; }
.vpc__platforms { display: flex; flex-wrap: wrap; gap: var(--v-space-1); }
.vpc__plat { border: 1px solid var(--v-line); border-radius: 5px; padding: 2px 7px; font-size: 12px; font-weight: 500; color: var(--v-ink-soft); }
.vpc__foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--v-space-4); padding-top: var(--v-space-1); }
.vpc__cta { display: flex; width: 100%; align-items: center; justify-content: center; min-height: 44px; gap: var(--v-space-2); border-radius: var(--v-radius-card); padding: 12px 16px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.vpc__cta:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }
.vpc__cta--add { background: var(--v-accent); color: #fff; }
.vpc__cta--add:hover { background: var(--v-accent-hover); }
.vpc__cta--add:active { background: var(--v-accent-hover); }
.vpc__cta--opts { background: var(--v-accent); color: #fff; border-color: var(--v-accent); }
.vpc__cta--opts:hover { background: var(--v-accent-hover); border-color: var(--v-accent-hover); color: #fff; }
.vpc__cta--oos { background: var(--v-surface); color: var(--v-ink-soft); border-color: var(--v-line); cursor: not-allowed; }

/* Carte catalogue en mobile : rendu identique a la carte d'accueil (purple-card)
   — libelle de rayon, visuel pleine largeur, prix vert a gauche et pastille
   fleche a droite, a la place du bouton « Voir le produit » pleine largeur. */
.vpc__type { display: none; font-size: 11px; line-height: 1.3; color: var(--v-ink-soft); }
.vpc__cta-mini { display: none; }
@media (max-width: 760px) {
  .vpc__media { padding: 0; }
  .vpc__imgwrap { aspect-ratio: 1.1; border-radius: 0; }
  .vpc__img { padding: 12px; }
  .vpc__badges { left: 8px; top: 8px; }
  .vpc__body { gap: 6px; }
  .vpc__type { display: block; font-size: 10px; }
  .vpc__platforms { display: none; }
  .vpc__foot { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
  .vpc__foot .vprice { justify-content: flex-start; }
  .vpc__cta { display: none; }
  .vpc__cta-mini { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 28px; border: 0; border-radius: 4px; background: var(--v-accent); color: #fff; text-decoration: none; }
  .vpc__cta-mini--oos { background: var(--v-surface); color: var(--v-ink-soft); cursor: not-allowed; }
  .vgrid { gap: 12px; }
}

/* Prix (PriceTag.tsx) */
.vprice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--v-space-2); }
.vpc__foot .vprice { justify-content: center; }
.vprice__sale { font-family: var(--v-display); font-weight: 700; line-height: 1; font-size: 21px; letter-spacing: -0.02em; color: var(--v-promo); }
.vprice__sale--off { color: var(--v-fomo); }
.vprice__orig { font-size: 14px; color: var(--v-ink-soft); text-decoration: line-through; }
.vprice__pct { border-radius: var(--v-radius-pill); background: var(--v-fomo); padding: 2px 8px; font-size: 12px; font-weight: 700; color: #fff; }
.vprice--lg .vprice__sale { font-size: 30px; }
.vprice--lg .vprice__orig { font-size: 16px; }

/* Pastille stock faible (StockPulse.tsx) */
@keyframes v-inv-pulse { 0% { opacity: .75; } 100% { opacity: 0; transform: scale(2.3); } }
.vstock { display: inline-flex; align-items: center; gap: 6px; }
.vstock__ring { transform-origin: center; animation: v-inv-pulse 2s linear infinite; }
.vstock__label { font-size: 15px; font-weight: 600; color: var(--v-fomo); }
.vstock--sm .vstock__label { font-size: 12px; }

/* Grilles produit */
.vgrid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .vgrid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Section spacing (marges généreuses) */
.vsection { padding-top: 56px; padding-bottom: 56px; }
@media (min-width: 768px) { .vsection { padding-top: 72px; padding-bottom: 72px; } }

/* Accessibilité : neutralise animations/transitions dans toutes les sections VOLTAGE
   (.v-sec est le conteneur commun à product/collection/cart/page/etc.) pour les
   utilisateurs qui demandent moins de mouvement — couvre notamment le pulse de
   StockPulse (v-inv-pulse) et les micro-transitions hover (scale, etc.). */
@media (prefers-reduced-motion: reduce) {
  .v-sec *, .v-sec *::before, .v-sec *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Ancien prix barre sur la carte catalogue — visible seulement quand le produit
   porte un compare_at_price superieur au prix courant (vraie promotion). */
.vprice__was { margin-left: 8px; font-family: var(--v-sans); font-size: 14px; font-weight: 500;
  color: var(--v-ink-soft); text-decoration: line-through; text-decoration-thickness: 1px; }

/* Blocs partages fiche produit + panier (etaient dans voltage-product-css,
   deplaces ici car la page panier les utilise aussi). */
/* ── Estimation de livraison + compte a rebours d'expedition ───────────── */
.vpdp__eta { display: flex; flex-direction: column; gap: 8px; }
.vpdp__eta-line { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 15px; line-height: 1.5; color: var(--v-ink); }
.vpdp__eta-line b { font-weight: 700; color: #3d7851; }
.vpdp__eta-icon { flex: none; margin-top: 2px; color: var(--v-ink-soft); }
.vpdp__eta-line--cut { color: #3d7851; }
.vpdp__eta-line--cut .vpdp__eta-icon { color: #3d7851; }

/* ── Prix avec ancien tarif barré (promotions) ─────────────────────────── */
.vprc { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
/* Prix paye toujours en vert, quel que soit le conteneur : la fiche produit, le
   slider « Vous aimerez aussi » (.vsl__price) et le panier colorent leur bloc,
   une couleur posee sur l'enfant l'emporte sur celle dont il herite. */
.vprc__now { color: var(--v-promo); }
.vprc__was { font-family: var(--v-sans); font-size: .62em; font-weight: 500; color: var(--v-ink-soft);
  text-decoration: line-through; text-decoration-thickness: 1px; }

/* Annonce « tapis offert » (fiche souris + collection Souris). Teinte verte des
   signaux positifs du site, pas le violet d'accent, pour se distinguer du reste. */
.vgiftb { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px;
  border: 1px solid #bcd8c7; border-radius: var(--v-radius-card); background: #edf5ef; }
.vgiftb__icon { flex: none; color: #3d7851; line-height: 0; margin-top: 1px; }
.vgiftb__txt { margin: 0; font-size: 14px; line-height: 1.5; color: #2f5c40; }
.vgiftb__txt b { color: #3d7851; font-weight: 800; }
.vcol__grid + .vgiftb, .vgiftb + .vgrid { margin-top: 16px; }

/* Toute la carte produit est cliquable (relais JS dans voltage.js). */
.vpc { cursor: pointer; }
.vgiftb__link { margin-left: 6px; color: #2f5c40; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.vgiftb__link:hover { color: #3d7851; }

.vgiftb__sub { margin: 0; font-size: 14px; line-height: 1.5; color: #4a7059; }

/* ── Note en etoiles + disponibilite sur les cartes produit ────────────────
   Les etoiles ne sont rendues que si le produit porte une vraie note (voir
   snippets/voltage-stars.liquid) : sans source d'avis, la ligne n'existe pas
   dans le DOM et la carte se referme dessus toute seule. */
.vstars { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1; }
.vstars__row { position: relative; display: inline-block; color: #d7d4de; letter-spacing: 1px;
  font-size: 15px; white-space: nowrap; }
.vstars__fg { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: #ff6a1f; white-space: nowrap; }
.vstars__val { font-weight: 700; color: var(--v-ink); }
.vstars__count { color: var(--v-ink-soft); }
.vstars--compact { font-size: 12px; gap: 5px; }
.vstars--compact .vstars__row { font-size: 13px; }

.vstock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  color: var(--v-promo); }
.vstock::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.vstock--oos { color: var(--v-ink-soft); }
@media (max-width: 760px) { .vstock { font-size: 11px; } .vstock::before { width: 6px; height: 6px; } }
