/* ==========================================================================
   Assistant « Trouve ta puff idéale » (page d'accueil)
   Layout : bloc bannière réduit à moitié + carte quiz à droite.
   Chargé APRÈS style.css : les sélecteurs 3 classes + !important priment sur
   les règles .banner-content-grid figées dans style.css.
   ========================================================================== */

.banner-promo .banner-finder-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}

/* --- Bannière : carte verticale (image en haut, texte dessous) --- */
.banner-promo .banner-finder-layout .banner-content-grid {
  grid-template-columns: 1fr !important;
  grid-template-rows: minmax(200px, 1fr) auto !important;
  height: 100% !important;
}
.banner-promo .banner-finder-layout .banner-image {
  min-height: 200px;
}
.banner-promo .banner-finder-layout .banner-image img {
  min-height: 200px !important;
  height: 100% !important;
  max-height: none !important;
}
.banner-promo .banner-finder-layout .banner-text {
  padding: 22px 26px !important;
}
.banner-promo .banner-finder-layout .banner-text h2 {
  font-size: clamp(17px, 1.5vw, 23px) !important;
}
.banner-promo .banner-finder-layout .banner-text p {
  font-size: 13px !important;
  margin-bottom: 14px !important;
}

/* ==========================================================================
   Carte quiz
   ========================================================================== */
.puff-finder {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  border: 1.5px solid rgba(124, 92, 255, 0.16);
  box-shadow: 0 8px 32px rgba(124, 92, 255, 0.12);
}

.pf-noscript {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- En-tête dégradé diagonal --- */
.pf-head {
  position: relative;
  overflow: hidden;
  padding: 18px 22px 16px;
  color: #fff;
  background: linear-gradient(125deg, #7c5cff 0%, #9d4bff 55%, #b44cff 100%);
}
.pf-head::after {
  content: "";
  position: absolute;
  top: -60%;
  right: -10%;
  width: 55%;
  height: 220%;
  background: rgba(255, 255, 255, 0.10);
  transform: rotate(18deg);
  pointer-events: none;
}
.pf-head-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  margin-bottom: 8px;
}
.pf-head h3 {
  position: relative;
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.3px;
}
.pf-head p {
  position: relative;
  margin: 4px 0 0;
  font-size: 12.5px;
  opacity: 0.92;
}

/* --- Barre de progression --- */
.pf-progress {
  padding: 12px 22px 0;
}
.pf-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: #7a7290;
  margin-bottom: 7px;
}
.pf-progress-track {
  height: 6px;
  border-radius: 999px;
  background: #efeafe;
  overflow: hidden;
}
.pf-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c5cff, #b44cff);
  transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Corps / question --- */
.pf-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 22px 20px;
}
.pf-q-title {
  margin: 4px 0 2px;
  font-size: 16px;
  font-weight: 750;
  color: #1a1230;
  letter-spacing: -0.2px;
}
.pf-q-hint {
  margin: 0;
  font-size: 12px;
  color: #8b83a3;
}
.pf-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 14px;
}
.pf-opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 13px;
  border-radius: 14px;
  border: 1.5px solid #ece7ff;
  background: #faf8ff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}
.pf-opt:hover {
  border-color: #7c5cff;
  background: #f5f0ff;
  box-shadow: 0 5px 16px rgba(124, 92, 255, 0.14);
  transform: translateY(-1px);
}
.pf-opt.selected {
  border-color: #7c5cff;
  background: #f1eaff;
  box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.18) inset;
}
.pf-opt-emoji {
  font-size: 23px;
  line-height: 1.1;
}
.pf-opt-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pf-opt-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #1a1230;
  line-height: 1.2;
}
.pf-opt-sub {
  font-size: 11.5px;
  color: #7a7290;
  line-height: 1.25;
}

/* --- Pied : navigation --- */
.pf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}
.pf-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 12px;
  transition: filter 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.pf-btn-ghost {
  background: transparent;
  color: #7a7290;
  padding-left: 4px;
}
.pf-btn-ghost:hover {
  color: #4a3f6b;
}
.pf-btn-ghost[disabled] {
  opacity: 0;
  pointer-events: none;
}
.pf-btn-primary {
  background: linear-gradient(135deg, #7c5cff, #b44cff);
  color: #fff;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.32);
}
.pf-btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.42);
}
.pf-btn-primary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ==========================================================================
   Écran de résultats
   ========================================================================== */
.pf-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px;
  color: #7a7290;
  font-size: 13.5px;
  font-weight: 600;
}
.pf-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #ece7ff;
  border-top-color: #7c5cff;
  animation: pf-spin 0.8s linear infinite;
}
@keyframes pf-spin {
  to { transform: rotate(360deg); }
}

.pf-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pf-result {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: 1.5px solid #efeafe;
  background: #fbfaff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.pf-result:hover {
  border-color: #7c5cff;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.14);
  transform: translateY(-1px);
}
.pf-result-img {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  object-fit: contain;
  border-radius: 10px;
  background: #f2eeff;
  padding: 4px;
}
.pf-result-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.pf-result-brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #9d4bff;
}
.pf-result-name {
  font-size: 13px;
  font-weight: 650;
  color: #1a1230;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pf-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 1px;
}
.pf-result-price {
  font-size: 13.5px;
  font-weight: 800;
  color: #071126;
}
.pf-chip {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #efeafe;
  color: #6a4bd6;
}
.pf-result-cta {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 18px;
  color: #b44cff;
}

.pf-results-foot {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.pf-results-foot .pf-btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
}
.pf-btn-outline {
  border: 1.5px solid #d9cfff;
  background: #fff;
  color: #6a4bd6;
}
.pf-btn-outline:hover {
  background: #f5f0ff;
}

.pf-error {
  padding: 24px;
  text-align: center;
  color: #8b83a3;
  font-size: 13px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .banner-promo .banner-finder-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .banner-promo .banner-finder-layout .banner-content-grid {
    grid-template-rows: auto auto !important;
  }
  .banner-promo .banner-finder-layout .banner-image img {
    height: 200px !important;
  }
  .puff-finder {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .pf-options {
    grid-template-columns: 1fr;
  }
  .pf-head h3 { font-size: 17px; }
  .pf-body { padding: 14px 16px 18px; }
  .pf-head, .pf-progress { padding-left: 16px; padding-right: 16px; }
}

/* ==========================================================================
   Mobile : bannière « Les saveurs de vape » compacte + bouton sans débordement
   Sur mobile, le bouton (white-space:nowrap + width:fit-content + texte long)
   imposait sa largeur minimale (~380px) à la grille et faisait déborder tout
   le bloc hors de l'écran. On autorise le retour à la ligne, on passe le
   bouton en pleine largeur et on réduit la taille générale de la carte.
   ========================================================================== */
@media (max-width: 640px) {
  .banner-promo .banner-finder-layout,
  .banner-promo .banner-finder-layout .banner-content-grid,
  .banner-promo .banner-finder-layout .banner-text {
    min-width: 0 !important;
  }

  .banner-promo .banner-finder-layout .banner-image,
  .banner-promo .banner-finder-layout .banner-image img {
    min-height: 160px !important;
    height: 160px !important;
  }
  .banner-promo .banner-finder-layout .banner-text {
    padding: 16px 18px 18px !important;
  }
  .banner-promo .banner-finder-layout .banner-text h2 {
    font-size: 18px !important;
    margin-bottom: 8px !important;
  }
  .banner-promo .banner-finder-layout .banner-text p {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
  }

  .banner-promo .banner-finder-layout .banner-text .btn,
  .banner-promo .banner-finder-layout .banner-text .btn-primary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 46px !important;
    padding: 11px 16px !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.2 !important;
    font-size: 13.5px !important;
  }
  .banner-promo .banner-finder-layout .banner-text .btn::after {
    margin-left: 8px !important;
    font-size: 15px !important;
  }
}
