/**
 * PurpleSMP — feuille de style de la boutique.
 *
 * Tout repose sur les jetons du site (site.css) : --brand, --surface,
 * --ink, --line, --radius… Aucune couleur n'est écrite en dur ici, sauf
 * celles que l'administrateur choisit lui-même pour un grade ou une clé, et
 * qui arrivent par les variables locales --grade-tint / --key-tint.
 *
 * La page est une suite de blocs de même facture : un chapeau (surtitre,
 * titre, compteur) puis le contenu. Un bloc est une catégorie Tebex, le
 * curseur de points, le tableau des grades ou les clés — d'où le même
 * `.shop-block` partout, quel que soit l'ordre choisi au panel.
 *
 *  1. Ossature de la page et chapeaux de bloc
 *  2. Bandeau de réassurance
 *  3. Points Boutique (curseur)
 *  4. Cartes produit (catalogue Tebex)
 *  5. Tableau comparatif des grades
 *  6. Clés de caisse
 *  7. Panier : pastille flottante et tiroir
 *  8. Fenêtre de détail d'une offre
 *  9. Commande et pages de retour
 * 10. Apparitions au défilement et préférences de mouvement
 */

/* ==========================================================================
   1. Ossature de la page et chapeaux de bloc
   ========================================================================== */

.shop-page {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 3.75rem);
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: clamp(4rem, 8vw, 6.5rem);
}

.shop-blocks {
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 6vw, 5rem);
}

.shop-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.shop-block__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  position: relative;
}

/* Le filet du chapeau : plein sous le titre, il s'efface vers la droite. */
.shop-block__head::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent 65%);
}

.shop-block__heading {
  min-width: 0;
}

.shop-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

.shop-kicker i {
  font-size: 0.85em;
}

.shop-block__title {
  margin: 0;
  font-size: clamp(1.55rem, 1.1rem + 1.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.shop-block__lead {
  margin: 0.6rem 0 0;
  max-width: 64ch;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.shop-block__count {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.shop-block__count i {
  color: var(--brand);
}

/* Note de bas de bloc : le rappel « ça s'achète en jeu », avec son bouton. */
.shop-block__note {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(120deg, var(--brand-soft), transparent 70%), var(--surface);
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.shop-block__note p {
  margin: 0;
  flex: 1 1 22ch;
}

.shop-block__note > i {
  color: var(--brand);
  font-size: 1.05rem;
}

.shop-block__note code {
  padding: 0.1rem 0.4rem;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* État vide de la page entière */
.shop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 4.5rem 2rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
}

.shop-empty__icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.9rem;
}

.shop-empty h3 {
  margin: 0;
  font-size: 1.3rem;
}

.shop-empty p {
  margin: 0;
  max-width: 46ch;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

/* ==========================================================================
   2. Bandeau de réassurance
   ========================================================================== */

.shop-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-trust__item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.shop-trust__item strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
}

.shop-trust__item span {
  display: block;
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.shop-trust__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1rem;
}

/* ==========================================================================
   3. Points Boutique (curseur)
   ========================================================================== */

.points-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, var(--brand-soft), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-md);
}

.points-hero__aura {
  position: absolute;
  top: -45%;
  right: -18%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-a), transparent 68%);
  filter: blur(24px);
  opacity: 0.75;
  pointer-events: none;
}

.points-hero__main,
.points-hero__ticket {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.points-hero__main {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.points-hero__heading .shop-block__title {
  font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem);
}

.points-presets__label,
.points-ticket__label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.points-presets__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preset-chip {
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}

.preset-chip:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  color: var(--ink);
}

.preset-chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

.points-range input[type="range"] {
  width: 100%;
  height: 12px;
  margin: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand) var(--fill, 0%), var(--surface-3) var(--fill, 0%));
  border: 1px solid var(--line);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.points-range input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--brand);
  box-shadow: 0 4px 14px -4px var(--glow-b);
  cursor: grab;
  transition: transform var(--t-fast);
}

.points-range input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

.points-range input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--brand);
  cursor: grab;
}

.points-range input[type="range"]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

.points-range__labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.7rem;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.points-range__rate {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-soft);
}

.points-range__rate i {
  color: var(--brand);
  font-size: 0.8em;
}

/* Le « ticket » : ce que le visiteur obtient, et le bouton d'ajout. */
.points-hero__ticket {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: color-mix(in oklab, var(--surface-2) 88%, transparent);
  backdrop-filter: blur(10px);
  text-align: center;
}

.points-ticket__amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1;
}

.points-ticket__amount strong {
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--brand);
}

.points-ticket__amount span {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink-muted);
}

.points-ticket__price {
  margin: 0.5rem 0 1.35rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line-strong);
  font-size: 1.35rem;
  font-weight: 800;
}

.points-ticket__note {
  margin: 0.9rem 0 0;
  color: var(--ink-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.points-ticket__note i {
  color: var(--brand);
}

@media (max-width: 900px) {
  .points-hero {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   4. Cartes produit (catalogue Tebex)
   ========================================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.15rem;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  cursor: pointer;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, var(--brand-soft), transparent 45%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}

.product-card:hover,
.product-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
  outline: none;
}

.product-card:hover::after,
.product-card:focus-visible::after {
  opacity: 1;
}

.product-card:focus-visible {
  border-color: var(--brand);
}

.product-card__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(90% 90% at 50% 20%, var(--surface-3), transparent 70%),
    var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.product-card__halo {
  position: absolute;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-a), transparent 70%);
  opacity: 0.55;
  filter: blur(14px);
  transition: opacity var(--t-base), transform var(--t-base);
}

.product-card:hover .product-card__halo {
  opacity: 0.85;
  transform: scale(1.15);
}

.product-card__img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.1rem;
  transition: transform var(--t-base);
}

.product-card:hover .product-card__img {
  transform: scale(1.06);
}

.product-card__fallback {
  position: relative;
  color: var(--brand);
  font-size: 2.4rem;
  opacity: 0.65;
}

.product-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  padding: 1.1rem 1.15rem 0.9rem;
}

.product-card__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.product-card__excerpt {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.product-card__more {
  margin-top: auto;
  padding-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 700;
  transition: color var(--t-fast);
}

.product-card:hover .product-card__more {
  color: var(--brand);
}

.product-card__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem 1.1rem;
}

.product-card__price {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.product-card__price span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.product-card__price strong {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand);
}

.product-card__add {
  flex: none;
}

/* ==========================================================================
   5. Tableau comparatif des grades
   ========================================================================== */

.compare {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* La zone défilante. La barre native est masquée : le curseur du bas la
   remplace, plus visible et manipulable au doigt comme à la souris. */
.compare__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.compare__viewport::-webkit-scrollbar {
  display: none;
}

.compare__viewport:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.compare__table {
  width: 100%;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

/* -- Colonne des libellés, figée à gauche -- */

.compare__corner,
.compare__label {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 220px;
  max-width: 320px;
  background: var(--surface-2);
  border-right: 1px solid var(--line-strong);
}

.compare__corner {
  z-index: 4;
  padding: 1.25rem 1.25rem 1.1rem;
  vertical-align: bottom;
  border-bottom: 1px solid var(--line-strong);
}

.compare__corner-title {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.compare__corner-sub {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.compare__label {
  padding: 0.85rem 1.25rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.compare__label i {
  margin-right: 0.5rem;
  color: var(--brand);
  font-size: 0.85em;
}

.compare__label span {
  vertical-align: middle;
}

.compare__flag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* -- En-têtes de grade -- */

.compare__head {
  position: relative;
  min-width: 190px;
  padding: 1.5rem 1.1rem 1.15rem;
  text-align: center;
  vertical-align: bottom;
  border-bottom: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--grade-tint) 20%, transparent), transparent 85%),
    var(--surface);
}

.compare__head::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: var(--grade-tint);
}

.compare__head.is-featured {
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--grade-tint) 34%, transparent), transparent 85%),
    var(--surface);
}

.compare__ribbon {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.16rem 0.6rem;
  border-radius: var(--r-pill);
  background: var(--grade-tint);
  color: #0a0710;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.compare__head-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 0.6rem;
  border-radius: var(--r-sm);
  background: color-mix(in oklab, var(--grade-tint) 18%, transparent);
  color: var(--grade-tint);
  font-size: 1.1rem;
}

.compare__head-name {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grade-tint);
  text-shadow: 0 0 24px color-mix(in oklab, var(--grade-tint) 45%, transparent);
}

.compare__head-tag {
  display: block;
  margin: 0.35rem auto 0;
  max-width: 22ch;
  color: var(--ink-muted);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.4;
}

/* -- Intertitres et lignes -- */

.compare__section th {
  padding: 0.7rem 1.25rem;
  background: var(--surface-3);
  border-block: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* L'intertitre couvre toute la largeur du tableau : son libellé est collé à
   gauche pour rester lisible quand on fait défiler les colonnes. */
.compare__section-label {
  position: sticky;
  left: 1.25rem;
  display: inline-block;
}

.compare__section th i {
  margin-right: 0.5rem;
  color: var(--brand);
}

.compare__cell {
  min-width: 190px;
  padding: 0.85rem 1.1rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid color-mix(in oklab, var(--line) 55%, transparent);
  font-size: 0.88rem;
  vertical-align: middle;
}

.compare__cell.is-featured {
  background: color-mix(in oklab, var(--grade-tint) 7%, transparent);
}

.compare__row:hover .compare__cell {
  background: color-mix(in oklab, var(--grade-tint) 12%, transparent);
}

.compare__row:hover .compare__label {
  color: var(--ink);
  background: var(--surface-3);
}

.compare__table tbody tr:last-child .compare__cell,
.compare__table tbody tr:last-child .compare__label {
  border-bottom: 0;
}

.compare__yes {
  color: var(--grade-tint);
  font-size: 0.95rem;
  filter: drop-shadow(0 0 8px color-mix(in oklab, var(--grade-tint) 55%, transparent));
}

.compare__value {
  display: inline-block;
  padding: 0.18rem 0.65rem;
  border-radius: var(--r-pill);
  background: color-mix(in oklab, var(--grade-tint) 14%, transparent);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.compare__none {
  color: var(--ink-muted);
  opacity: 0.45;
}

/* -- Lignes de tarif -- */

.compare__row--price .compare__cell {
  padding-block: 1rem;
}

.compare__price {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--grade-tint);
  white-space: nowrap;
}

.compare__price-suffix {
  display: block;
  margin-top: 0.1rem;
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.compare__row--price.is-recommended .compare__cell {
  background: color-mix(in oklab, var(--grade-tint) 12%, transparent);
}

.compare__row--price.is-recommended .compare__price {
  font-size: 1.3rem;
}

.compare__row--price.is-recommended .compare__label {
  color: var(--ink);
  font-weight: 700;
}

/* -- Curseur de défilement horizontal -- */

.compare__scroller {
  padding: 0.85rem 1.25rem 0.95rem;
  border-top: 1px solid var(--line-strong);
  background: var(--surface-2);
}

.compare__scroller input[type="range"] {
  display: block;
  width: 100%;
  height: 10px;
  margin: 0;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--line);
  appearance: none;
  -webkit-appearance: none;
  cursor: grab;
}

.compare__scroller input[type="range"]:active {
  cursor: grabbing;
}

.compare__scroller input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 96px;
  height: 10px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand), color-mix(in oklab, var(--brand) 60%, var(--c-primary)));
  box-shadow: 0 2px 10px -3px var(--glow-b);
}

.compare__scroller input[type="range"]::-moz-range-thumb {
  width: 96px;
  height: 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--brand);
}

.compare__scroller input[type="range"]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .compare__corner,
  .compare__label {
    min-width: 148px;
    max-width: 148px;
    padding-inline: 0.85rem;
    font-size: 0.8rem;
  }

  .compare__head,
  .compare__cell {
    min-width: 150px;
    padding-inline: 0.75rem;
  }

  .compare__corner-sub {
    display: none;
  }
}

/* ==========================================================================
   6. Clés de caisse
   ========================================================================== */

.key-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.15rem;
}

.key-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.35rem 1.15rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(110% 80% at 50% 0%, color-mix(in oklab, var(--key-tint) 16%, transparent), transparent 62%),
    var(--surface);
  text-align: center;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

.key-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in oklab, var(--key-tint) 55%, transparent);
  box-shadow: 0 22px 44px -26px color-mix(in oklab, var(--key-tint) 90%, transparent);
}

.key-card__art {
  position: relative;
  display: grid;
  place-items: center;
  height: 108px;
  margin-bottom: 0.9rem;
}

.key-card__halo {
  position: absolute;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--key-tint) 45%, transparent), transparent 68%);
  filter: blur(10px);
  transition: transform var(--t-base), opacity var(--t-base);
}

.key-card:hover .key-card__halo {
  transform: scale(1.15);
  opacity: 0.9;
}

.key-card__img {
  position: relative;
  width: 84px;
  height: 84px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
  transition: transform var(--t-base);
}

.key-card:hover .key-card__img {
  transform: translateY(-3px) rotate(-6deg);
}

.key-card__fallback {
  position: relative;
  color: var(--key-tint);
  font-size: 2.6rem;
}

.key-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
}

.key-card__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--key-tint);
}

.key-card__tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--r-pill);
  background: color-mix(in oklab, var(--key-tint) 16%, transparent);
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.key-card__desc {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.key-card__price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line-strong);
}

.key-card__price span {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.key-card__price strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--key-tint);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .key-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .key-card {
    padding: 1rem 0.75rem;
  }

  .key-card__art {
    height: 84px;
  }

  .key-card__img {
    width: 62px;
    height: 62px;
  }
}

/* ==========================================================================
   7. Panier : pastille flottante et tiroir
   ========================================================================== */

.cart-trigger-pill {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.3rem 0.7rem 0.85rem;
  border: 1px solid color-mix(in oklab, var(--c-accent) 45%, transparent);
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 18px 40px -16px color-mix(in oklab, var(--c-accent) 95%, transparent);
  cursor: pointer;
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.cart-trigger-pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -18px color-mix(in oklab, var(--c-accent) 100%, transparent);
}

.cart-trigger-pill__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1rem;
}

.cart-trigger-pill__badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--c-accent);
  font-size: 0.7rem;
  font-weight: 900;
}

.cart-trigger-pill__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.cart-trigger-pill__text span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.85;
}

.cart-trigger-pill__text strong {
  font-size: 1rem;
  font-weight: 800;
}

/* Panier vide : la pastille se fait discrète, et ne s'allume qu'une fois
   quelque chose dedans. */
.cart-trigger-pill.is-empty {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.cart-trigger-pill.is-empty .cart-trigger-pill__icon {
  background: var(--surface-2);
  color: var(--ink-muted);
}

.cart-trigger-pill.is-empty .cart-trigger-pill__badge {
  background: var(--surface-3);
  color: var(--ink-muted);
}

@media (max-width: 560px) {
  .cart-trigger-pill__text {
    display: none;
  }

  .cart-trigger-pill {
    padding: 0.7rem;
  }
}

.shop-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
}

.shop-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 13, 0.68);
  backdrop-filter: blur(3px);
  animation: shopFade 0.2s var(--ease);
}

.shop-drawer__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  height: 100%;
  border-left: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: shopDrawerSlide 0.28s var(--ease);
}

@keyframes shopDrawerSlide {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes shopFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.shop-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--line);
}

.shop-drawer__head h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.shop-drawer__head i {
  color: var(--brand);
}

.shop-drawer__close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.shop-drawer__close:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.shop-drawer__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.15rem 1.35rem;
  overflow-y: auto;
}

.shop-drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  transition: border-color var(--t-fast);
}

.shop-drawer-item:hover {
  border-color: var(--line-strong);
}

.shop-drawer-item__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.shop-drawer-item__info strong {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
}

.shop-drawer-item__price {
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 800;
}

.shop-drawer-item__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}

.shop-cart__qty {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.shop-cart__qty span {
  min-width: 22px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.shop-cart__qty .btn {
  padding: 0.35rem;
  font-size: 0.65rem;
}

.shop-drawer-item__remove {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.shop-drawer-item__remove:hover {
  background: color-mix(in oklab, var(--c-error) 14%, transparent);
  color: var(--c-error);
}

.shop-cart__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: auto 0;
  padding: 2.5rem 1rem;
  text-align: center;
}

.shop-cart__empty i {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 1.5rem;
}

.shop-cart__empty p {
  margin: 0;
  font-weight: 700;
}

.shop-cart__empty span {
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.shop-drawer__foot {
  padding: 1.15rem 1.35rem 1.35rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.shop-drawer__subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.shop-drawer__subtotal strong {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--brand);
}

.shop-drawer__note {
  margin: 0.7rem 0 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.74rem;
}

/* ==========================================================================
   8. Fenêtre de détail d'une offre
   ========================================================================== */

.shop-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.shop-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 13, 0.72);
  backdrop-filter: blur(4px);
  animation: shopFade 0.2s var(--ease);
}

.shop-modal__dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: shopModalZoom 0.24s var(--ease);
}

@keyframes shopModalZoom {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.shop-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.shop-modal__close:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.shop-modal__content {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.shop-modal__media {
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(90% 80% at 50% 30%, var(--brand-soft), transparent 70%),
    var(--surface-2);
  border-right: 1px solid var(--line);
}

.shop-modal__media img {
  max-height: 260px;
  object-fit: contain;
}

.shop-modal__media i {
  color: var(--brand);
  font-size: 3.5rem;
  opacity: 0.6;
}

.shop-modal__info {
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.shop-modal__title {
  margin: 0.15rem 0 0.75rem;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.shop-modal__price-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.15rem;
  font-weight: 900;
}

.shop-modal__description {
  margin-top: 1.25rem;
  max-height: 320px;
  overflow-y: auto;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}

.shop-modal__description ul {
  margin: 0.75rem 0;
  padding-left: 1.15rem;
  list-style: disc;
}

.shop-modal__description li {
  margin-bottom: 0.3rem;
}

.shop-modal__description li::marker {
  color: var(--brand);
}

.shop-modal__footer {
  margin-top: 1.5rem;
}

@media (max-width: 700px) {
  .shop-modal__content {
    grid-template-columns: 1fr;
  }

  .shop-modal__media {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 1.5rem;
  }

  .shop-modal__media img {
    max-height: 170px;
  }
}

/* ==========================================================================
   9. Commande et pages de retour
   ========================================================================== */

.shop-checkout-container {
  margin-block: clamp(1.75rem, 4vw, 2.75rem) clamp(4rem, 8vw, 6rem);
}

.shop-checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 880px) {
  .shop-checkout-grid {
    grid-template-columns: 1fr;
  }
}

.shop-checkout__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
  font-size: 1.2rem;
  font-weight: 800;
}

.shop-checkout__title i {
  color: var(--brand);
}

.shop-checkout__skin-preview {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(120deg, var(--brand-soft), transparent 65%), var(--surface-2);
}

.shop-checkout__avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--r-sm);
  image-rendering: pixelated;
  background: var(--surface-3);
}

.shop-checkout__skin-info {
  min-width: 0;
}

.shop-checkout__skin-label {
  display: block;
  color: var(--ink-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shop-checkout__skin-name {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.shop-checkout__gift-box {
  padding: 1.15rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.shop-checkout__security-note {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.shop-checkout__security-note p {
  margin: 0;
}

.shop-checkout__security-note i {
  color: var(--c-success);
  font-size: 1.15rem;
}

.shop-checkout-summary {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.shop-checkout-summary h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.15rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.shop-checkout-summary h2 i {
  color: var(--brand);
}

.shop-checkout__items {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.shop-checkout__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  font-size: 0.88rem;
}

.shop-checkout__item-qty {
  margin-left: 0.4rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.shop-checkout__item-price {
  font-weight: 700;
  white-space: nowrap;
}

.shop-checkout__divider {
  height: 1px;
  margin: 1.15rem 0;
  background: var(--line);
}

.shop-checkout__total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.shop-checkout__total-price {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--brand);
}

.shop-status-card {
  position: relative;
  overflow: hidden;
}

.shop-status-icon {
  font-size: 4rem;
  line-height: 1;
}

.shop-status-card--success .shop-status-icon {
  color: var(--c-success);
}

.shop-status-card--cancel .shop-status-icon {
  color: var(--c-error);
}

/* ==========================================================================
   10. Apparitions au défilement et préférences de mouvement
   ========================================================================== */

/* L'état masqué n'est posé que si le script a pris la main : sans lui,
   les cartes restent simplement visibles. */
html.shop-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}

html.shop-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html.shop-reveal [data-reveal],
  html.shop-reveal [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .product-card,
  .key-card,
  .cart-trigger-pill,
  .preset-chip {
    transition: none;
  }

  .product-card:hover,
  .key-card:hover,
  .cart-trigger-pill:hover,
  .preset-chip:hover {
    transform: none;
  }

  .key-card:hover .key-card__img,
  .product-card:hover .product-card__img,
  .product-card:hover .product-card__halo,
  .key-card:hover .key-card__halo {
    transform: none;
  }

  .shop-drawer__panel,
  .shop-modal__dialog {
    animation: none;
  }
}
