/* ================================================================
   ProductAssistant – CSS
   Compatible PrestaShop 9.x (Bootstrap 5)
   ================================================================ */

/* ── Variables ───────────────────────────────────────────────── */
:root {
  --pa-primary:       #2c6fad;
  --pa-primary-hover: #1a4f80;
  --pa-accent:        #ff6b35;
  --pa-bg:            #f8f9fa;
  --pa-card-bg:       #ffffff;
  --pa-border:        #dee2e6;
  --pa-radius:        12px;
  --pa-shadow:        0 4px 16px rgba(0,0,0,.08);
  --pa-transition:    .2s ease;
}

/* ── Wrapper ─────────────────────────────────────────────────── */
.pa-wrapper {
  /*max-width: 820px;*/
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ── Barre de progression ────────────────────────────────────── */
.pa-progress {
  position: relative;
  background: var(--pa-border);
  border-radius: 100px;
  height: 8px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.pa-progress__bar {
  height: 100%;
  background: var(--pa-primary);
  border-radius: 100px;
  transition: width .4s ease;
}
.pa-progress__label {
  display: block;
  text-align: right;
  font-size: .8rem;
  color: #6c757d;
  margin-top: .4rem;
}

/* ── Étapes ──────────────────────────────────────────────────── */
#pa-steps{
   max-width: 820px;
  margin:auto;
 }
.pa-step {
  display: none;
  animation: paFadeIn .3s ease;
}
.pa-step--active {
  display: block;
}

@keyframes paFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.pa-step__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .25rem;
  color: #212529;
}
.pa-step__subtitle {
  color: #6c757d;
  margin-bottom: 1.5rem;
}
.pa-step__notice {
  grid-column: 1 / -1;
  color: #6c757d;
  background: #f8f9fa;
  border: 1px dashed var(--pa-border);
  border-radius: 8px;
  padding: 1rem;
  margin: 0;
}

/* ── Options ─────────────────────────────────────────────────── */
.pa-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.pa-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1.25rem 1rem;
  background: var(--pa-card-bg);
  border: 2px solid var(--pa-border);
  border-radius: var(--pa-radius);
  cursor: pointer;
  transition: border-color var(--pa-transition), box-shadow var(--pa-transition), transform var(--pa-transition);
  font-size: .95rem;
  color: #212529;
  text-align: center;
}
.pa-option:hover {
  border-color: var(--pa-primary);
  box-shadow: var(--pa-shadow);
  transform: translateY(-2px);
}
.pa-option[aria-pressed="true"] {
  border-color: var(--pa-primary);
  background: #e8f0fb;
  box-shadow: 0 0 0 3px rgba(44,111,173,.2);
}
.pa-option__icon {
  font-size: 2rem;
  line-height: 1;
}
.pa-option__label {
  font-weight: 500;
}

/* ── Navigation ──────────────────────────────────────────────── */
.pa-nav {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}
.pa-nav__btn {
  min-width: 140px;
}
.pa-nav__btn--next:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ── Résultats ───────────────────────────────────────────────── */
.pa-results {
  animation: paFadeIn .3s ease;
}
.pa-results[hidden] { display: none; }

.pa-results__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.pa-results__grid {
  margin-bottom: 2rem;
}

/* Carte produit */
.pa-product-card {
  background: var(--pa-card-bg);
  border: 1px solid var(--pa-border);
  border-radius: var(--pa-radius);
  overflow: hidden;
  box-shadow: var(--pa-shadow);
  transition: transform var(--pa-transition), box-shadow var(--pa-transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}
.pa-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.pa-product-card__image-link {
  color: inherit;
  display: block;
  text-decoration: none;
}
.pa-product-card__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--pa-bg);
}
.pa-product-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  aspect-ratio: 1 / 1;
  background: var(--pa-bg);
}
.pa-product-card__body {
  padding: .75rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.pa-product-card__name {
  font-weight: 600;
  font-size: .95rem;
  color: #212529;
}
.pa-product-card__price {
  font-weight: 700;
  color: var(--pa-accent);
  font-size: 1.05rem;
  margin-top: auto;
}
.pa-product-card__cta {
  align-self: flex-start;
  margin-top: .75rem;
}

/* Bouton restart */
.pa-restart {
  display: block;
  margin: 1rem auto 0;
}

/* ── Widget Home ─────────────────────────────────────────────── */
.pa-home-widget {
  background: linear-gradient(135deg, var(--pa-primary) 0%, var(--pa-primary-hover) 100%);
  border-radius: var(--pa-radius);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  color: #fff;
}
.pa-home-widget__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.pa-home-widget__icon {
  font-size: 2.5rem;
}
.pa-home-widget__text {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.pa-home-widget__text strong {
  font-size: 1.1rem;
}
.pa-home-widget__btn {
  background: #fff;
  color: var(--pa-primary);
  border: none;
  font-weight: 600;
  white-space: nowrap;
}
.pa-home-widget__btn:hover {
  background: #e8f0fb;
  color: var(--pa-primary-hover);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 576px) {
  .pa-options {
    grid-template-columns: 1fr 1fr;
  }
  .pa-nav {
    flex-direction: column-reverse;
  }
  .pa-nav__btn {
    width: 100%;
  }
}

/* ── En-tête d'étape avec bouton Ignorer ─────────────────────── */
.pa-step__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .25rem;
}
.pa-step__head > div {
  flex: 1;
}

.pa-skip {
  flex-shrink: 0;
  font-size: .85rem;
  color: #6c757d;
  padding: .25rem .5rem;
  border: none;
  background: none;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--pa-transition);
  margin-top: .4rem;
}
.pa-skip:hover {
  color: var(--pa-primary);
  text-decoration: underline;
}
