/**
 * Module adwfidelite - Styles front.
 * Conventions : BEM `adw-fidelite__*`, variables scopées `--fid-*` avec
 * repli sur les tokens `--nhp-*` / `--adw-*`.
 */

.adw-fidelite {
  --fid-green: var(--nhp-green, #91bd31);
  --fid-ink: var(--nhp-ink, #1d2123);
  --fid-orange: var(--nhp-orange, #f57c00);
  --fid-surface: var(--adw-surface, #ffffff);
  --fid-border: var(--adw-border, #e6e8ea);
  --fid-radius: var(--adw-radius, 14px);

  color: var(--fid-ink);
}

/* ---- Bloc récapitulatif (redesign) ------------------------------------- */
.adw-fidelite__summary {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem 2rem;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--fid-green) 0%, #7fa829 100%);
  border-radius: var(--fid-radius);
  color: #1d2123;
}

/* pastille points : bloc chiffre à gauche */
.adw-fidelite__summary-points {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.22);
  border-radius: var(--fid-radius);
  line-height: 1;
  min-width: 7rem;
}
.adw-fidelite__points-value {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  font-family: var(--nhp-font-display, "Neue Haas Display", "Inter", system-ui, sans-serif);
  color: #1d2123;
}
.adw-fidelite__points-label {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

/* bon de réduction : à droite de la pastille */
.adw-fidelite__summary-voucher {
  font-size: 1.05rem;
  font-weight: 500;
}
.adw-fidelite__summary-voucher strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: #1d2123;
}

/* CTA (utiliser mes points) */
.adw-fidelite__cta {
  grid-column: 1 / -1;
  justify-self: start;
  margin: 0;
  padding: 0.85rem 1.75rem;
  font-weight: 700;
  background: var(--fid-ink);
  border: none;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.adw-fidelite__cta:hover,
.adw-fidelite__cta:focus {
  background: #000000;
  color: #ffffff;
  transform: translateY(-1px);
}

/* message état vide : carte blanche lisible SUR le vert */
.adw-fidelite__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.9rem 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--adw-buttons-radius-small, 8px);
  color: var(--fid-ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

/* note "bon valable sur..." : discrète mais lisible */
.adw-fidelite__note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #1d2123;
  opacity: 0.85;
}

.adw-fidelite__empty {
  padding: 1.25rem;
  color: #6b7177;
  text-align: center;
}

/* ---- Tableaux ---------------------------------------------------------- */

.adw-fidelite__table-wrap {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.adw-fidelite__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--fid-surface);
}

.adw-fidelite__table th,
.adw-fidelite__table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--fid-border);
  vertical-align: middle;
}

.adw-fidelite__table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7177;
}

.adw-fidelite__points {
  font-weight: 700;
}

.adw-fidelite__points--negative {
  color: #c0392b;
}

.adw-fidelite__state {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  background: #eef0f2;
  color: #6b7177;
}

.adw-fidelite__state--available {
  background: rgba(145, 189, 49, 0.18);
  color: #4d6b14;
}

.text-right {
  text-align: right;
}

/* ---- Pagination -------------------------------------------------------- */

.adw-fidelite__pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.adw-fidelite__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border: 1px solid var(--fid-border);
  border-radius: 8px;
  color: var(--fid-ink);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.adw-fidelite__page:hover,
.adw-fidelite__page:focus {
  border-color: var(--fid-green);
}

.adw-fidelite__page.is-active {
  background: var(--fid-green);
  border-color: var(--fid-green);
  color: #1d2123;
  font-weight: 700;
}

/* ---- Hooks produit / panier / compte ----------------------------------- */

.adw-fidelite-product,
.adw-fidelite-cart {
  margin: 0.75rem 0;
}

.adw-fidelite-product__earn,
.adw-fidelite-cart {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(145, 189, 49, 0.12);
  border-left: 3px solid var(--nhp-green, #91bd31);
  border-radius: var(--adw-buttons-radius-small);
  color: var(--nhp-ink, #1d2123);
}

.adw-fidelite-cart--banner {
  align-items: flex-start;
  font-weight: 500;
  line-height: 1.45;
}

.adw-fidelite-cart--banner .material-icons {
  margin-top: 2px;
  flex: 0 0 auto;
}

.adw-fidelite-cart__text b {
  font-weight: 700;
}

.adw-fidelite-cart__text sup {
  color: #6b7177;
}

.adw-fidelite-product__none {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.9rem;
  color: #6b7177;
}

.adw-fidelite-product__value,
.adw-fidelite-cart__value {
  font-weight: 500;
  opacity: 0.8;
}

.adw-fidelite-product .material-icons,
.adw-fidelite-cart .material-icons {
  color: var(--nhp-green, #91bd31);
  font-size: 1.15rem;
}

.adw-fidelite-link__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  margin-left: 0.4rem;
  padding: 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--nhp-orange, #f57c00);
  border-radius: 999px;
  color: #ffffff;
}

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 767px) {
  .adw-fidelite__summary {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .adw-fidelite__cta {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 500px) {
  .adw-fidelite__cta {
    grid-column: 1 / -1;
    justify-self: stretch;       /* prend toute la largeur au lieu de "start" */
    width: 100%;
    text-align: center;
    justify-content: center;     /* centre le texte si le bouton est en flex */
    padding: 0.85rem 1rem;       /* padding horizontal réduit */
    white-space: normal;         /* autorise le retour à la ligne du texte */
    line-height: 1.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .adw-fidelite__cta,
  .adw-fidelite__page {
    transition: none;
  }

  .adw-fidelite__cta:hover,
  .adw-fidelite__cta:focus {
    transform: none;
  }
}


.adw-fidelite .nhp-section__head{
   text-align: left;
   max-width: 100%;
}