/* optimisation — porté depuis Astro */
.combos {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    align-items: center;
    margin-top: 2.5rem;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    border-radius: var(--radius-lg);
    background: var(--panel);
    border: 1px solid rgba(88, 166, 255, 0.2);
    color: var(--night-text);
  }

  .combos-head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
  }

  .combos-head .icon-tile {
    background: rgba(255, 255, 255, 0.08);
    color: var(--sky);
  }

  .combos h3 {
    color: #fff;
    font-size: var(--step-2);
    margin-bottom: 0.35rem;
  }

  .combo-list {
    display: grid;
    gap: 0.75rem;
  }

  .combo-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--night-line);
  }

  .combo-list strong {
    display: block;
    color: #fff;
  }

  .combo-list small {
    font-size: 0.88rem;
  }

  .combo-price {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 750;
    color: #fff;
    white-space: nowrap;
  }

  .combo-price s {
    font-size: 1rem;
    font-weight: 500;
    color: var(--night-text);
    opacity: 0.7;
    margin-right: 0.35rem;
  }

  @media (max-width: 480px) {
    .combo-list li {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.4rem;
    }
  }

  @media (max-width: 860px) {
    .combos {
      grid-template-columns: minmax(0, 1fr);
    }

  }

/* ===== Carte « votre PC » + interrupteur Ordi Boost (client/boost.js) =====
   Sans .is-ready (pas de JavaScript, animations réduites) : visuels à l'état « après »,
   chaque ligne montre l'avant barré et l'après. Avec .is-ready : une seule version à la fois. */
.boost {
  --hot: var(--danger);
  --cool: var(--sky);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  max-width: 920px;
  margin-inline: auto;
  padding: clamp(1.25rem, 3.5vw, 2.25rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.06), transparent 55%), var(--surface);
}

.boost-side {
  display: grid;
  gap: 1rem;
}

.boost-panel {
  display: grid;
  gap: 1.1rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  transition: border-color 0.6s var(--ease-out);
}

.boost-state {
  display: grid;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 750;
}

.boost-state > span {
  grid-area: 1 / 1;
  transition:
    opacity 0.35s var(--ease-out),
    translate 0.35s var(--ease-out);
}

.boost-state .st-was {
  color: var(--hot);
  opacity: 0;
}

.boost-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: end;
}

.boost-meter {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
}

.meter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.meter-label svg {
  flex: none;
}

/* Jauge : arc + aiguille, sans graduation chiffrée */
.boost-dial {
  width: 100%;
  max-width: 150px;
  overflow: visible;
}

.dial-track,
.dial-value {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
}

.dial-track {
  stroke: var(--line-strong);
}

.dial-value {
  stroke: var(--cool);
  stroke-dasharray: 100;
  stroke-dashoffset: 70;
  transition:
    stroke-dashoffset 0.9s var(--ease-in-out),
    stroke 0.9s var(--ease-in-out);
}

.dial-needle {
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  transform-box: view-box;
  transform-origin: 60px 62px;
  rotate: -50deg;
  transition: rotate 0.9s var(--ease-in-out);
}

.dial-hub {
  fill: var(--ink);
}

.boost-fan {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  color: var(--cool);
  background: var(--sky-soft);
  transition:
    color 0.6s var(--ease-out),
    background-color 0.6s var(--ease-out);
}

/* Poussière (créée par boost.js) */
.boost-fan .dust {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--s, 4px);
  height: var(--s, 4px);
  margin: calc(var(--s, 4px) / -2);
  border-radius: 50%;
  background: #8a8174;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

.boost-bar {
  display: grid;
  gap: 0.45rem;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-gradient);
  transform-origin: left;
  scale: 1 1;
  transition: scale 0.7s var(--ease-out);
}

/* Interrupteur : visible seulement quand la carte est interactive */
.boost-switch {
  display: none;
  align-items: center;
  justify-self: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.4rem 1.1rem 0.4rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.3s,
    background-color 0.3s;
}

.boost-switch:hover {
  border-color: rgba(88, 166, 255, 0.55);
}

.boost-switch .track {
  position: relative;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background-color 0.35s var(--ease-out);
}

.boost-switch .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition:
    translate 0.35s var(--ease-out),
    color 0.35s;
}

.boost-switch[aria-checked='true'] .track {
  background: var(--accent-solid);
}

.boost-switch[aria-checked='true'] .knob {
  translate: 26px 0;
  color: var(--accent-solid);
}

/* Lignes : avant barré + après (sans JavaScript) */
.boost-rows {
  display: grid;
  gap: 0.6rem;
}

.boost-rows li {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
}

.boost-rows .was,
.boost-rows .now {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.boost-rows svg {
  flex: none;
}

.boost-rows .was {
  color: var(--muted);
  font-size: 0.9rem;
}

.boost-rows .was > span {
  text-decoration: line-through;
  text-decoration-color: rgba(248, 81, 73, 0.6);
}

.boost-rows .was svg {
  color: var(--danger);
}

.boost-rows .now {
  color: var(--ink);
  font-weight: 600;
}

.boost-rows .now svg {
  color: var(--success);
}

/* ----- Carte interactive ----- */
.boost.is-ready .boost-switch {
  display: inline-flex;
}

.boost.is-ready .boost-rows li {
  grid-template-areas: 'one';
  transition: border-color 0.4s var(--ease-out) var(--d, 0s);
}

.boost.is-ready .boost-rows .was,
.boost.is-ready .boost-rows .now {
  grid-area: one;
  font-size: 1rem;
  transition:
    opacity 0.3s var(--ease-out) var(--d, 0s),
    translate 0.45s var(--ease-out) var(--d, 0s);
}

.boost.is-ready .boost-rows .was {
  color: var(--ink-2);
}

.boost.is-ready .boost-rows .was > span {
  text-decoration: none;
}

/* État « avant » */
.boost.is-ready:not(.is-on) .boost-state .st-was {
  opacity: 1;
}

.boost.is-ready:not(.is-on) .boost-state .st-now,
.boost.is-ready.is-on .boost-state .st-was {
  opacity: 0;
  translate: 0 -6px;
}

.boost.is-ready:not(.is-on) .boost-panel {
  border-color: rgba(248, 81, 73, 0.35);
}

.boost.is-ready:not(.is-on) .dial-value {
  stroke: var(--hot);
  stroke-dashoffset: 12;
}

.boost.is-ready:not(.is-on) .dial-needle {
  rotate: 62deg;
}

.boost.is-ready:not(.is-on) .boost-fan {
  color: #c9b6a3;
  background: rgba(248, 81, 73, 0.1);
}

.boost.is-ready:not(.is-on) .boost-fan .dust {
  opacity: 0.85;
}

.boost.is-ready:not(.is-on) .bar-fill {
  background: var(--hot);
  scale: 0.06 1;
}

/* La barre de démarrage avance péniblement une fois la carte à l'écran */
.boost.is-ready.is-seen:not(.is-on) .bar-fill {
  scale: 0.3 1;
  transition: scale 3.2s cubic-bezier(0.2, 0.6, 0.4, 1);
}

.boost.is-ready:not(.is-on) .boost-rows li {
  border-color: rgba(248, 81, 73, 0.22);
}

.boost.is-ready:not(.is-on) .boost-rows .now,
.boost.is-ready.is-on .boost-rows .was {
  opacity: 0;
}

.boost.is-ready:not(.is-on) .boost-rows .now {
  translate: 0 10px;
}

.boost.is-ready.is-on .boost-rows .was {
  translate: 0 -10px;
}

.boost.is-ready.is-on .boost-rows li {
  border-color: rgba(63, 185, 80, 0.3);
}

/* Le petit ventilateur vibre tant que le PC est encrassé (seulement à l'écran) */
@media (prefers-reduced-motion: no-preference) {
  .boost.is-ready.is-seen:not(.is-on) .boost-fan svg {
    animation: boost-rattle 0.12s steps(2, jump-none) infinite;
  }
}

@keyframes boost-rattle {
  0% {
    translate: -0.8px 0.4px;
    rotate: -3deg;
  }

  100% {
    translate: 0.8px -0.4px;
    rotate: 3deg;
  }
}

@media (max-width: 760px) {
  .boost {
    grid-template-columns: minmax(0, 1fr);
  }
}
