/* Version isolee (scopee a .mn-quiz-wrapper) pour integration WordPress en plugin */
/* ==========================================================================
   Maison Natura — Quiz "Trouvez votre produit"
   ========================================================================== */

:root{
  --rose: #d46a93;
  --rose-dark: #b84f79;
  --rose-light: #f7d9e3;
  --sage: #7a9b76;
  --sage-dark: #5e7d5a;
  --cream: #fdf7f1;
  --cream-2: #faf1e6;
  --ink: #2e2a25;
  --ink-soft: #6b6258;
  --gold: #cf9b4e;
  --white: #ffffff;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 20px 60px -20px rgba(80, 40, 60, 0.25);
  --shadow-card: 0 10px 30px -12px rgba(80, 40, 60, 0.18);
  --ease: cubic-bezier(.22,.68,.32,1);
}

.mn-quiz-wrapper, .mn-quiz-wrapper *, .mn-quiz-wrapper *::before, .mn-quiz-wrapper *::after{ box-sizing: border-box; }

.mn-quiz-wrapper{
  font-family:'Poppins', sans-serif;
  color: var(--ink);
  background: var(--cream);
  overflow:hidden;
  position:relative;
  border-radius: 32px;
}

.mn-quiz-wrapper h1, .mn-quiz-wrapper h2, .mn-quiz-wrapper h3, .mn-quiz-wrapper .serif{
  font-family:'Fraunces', serif;
  font-weight:600;
  letter-spacing:-0.01em;
}

/* ---------- Background decoration ---------- */
.bg-decor{
  position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none;
}
.blob{
  position:absolute;
  border-radius:50%;
  filter: blur(70px);
  opacity:.55;
  animation: float 18s ease-in-out infinite;
}
.blob-1{
  width:480px; height:480px;
  background: radial-gradient(circle at 30% 30%, var(--rose-light), var(--rose) 70%);
  top:-160px; left:-120px;
  animation-duration: 22s;
}
.blob-2{
  width:420px; height:420px;
  background: radial-gradient(circle at 60% 40%, #e4efd9, var(--sage) 75%);
  bottom:-180px; right:-140px;
  animation-duration: 26s;
  animation-delay: -4s;
}
.blob-3{
  width:300px; height:300px;
  background: radial-gradient(circle at 50% 50%, #fff3d6, var(--gold) 80%);
  top:40%; right:10%;
  opacity:.35;
  animation-duration: 20s;
  animation-delay: -8s;
}
@keyframes float{
  0%,100%{ transform: translate(0,0) scale(1); }
  33%{ transform: translate(30px,-40px) scale(1.08); }
  66%{ transform: translate(-20px,30px) scale(0.95); }
}
.grain{
  position:absolute; inset:0;
  background-image: radial-gradient(rgba(46,42,37,.035) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
}

/* ---------- Header ---------- */
.site-header{
  position:relative; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding: 24px clamp(16px, 5vw, 64px);
}
.logo{ display:flex; align-items:center; gap:10px; text-decoration:none; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.logo:hover{ transform: translateY(-2px); opacity:.85; }
.logo-img{
  height: clamp(30px, 4vw, 42px);
  width:auto;
  display:block;
  animation: logoIn .7s var(--ease);
}
@keyframes logoIn{
  from{ opacity:0; transform: translateY(-8px) scale(.94); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}
.intro-logo-link{ display:inline-block; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.intro-logo-link:hover{ transform: scale(1.03); opacity:.85; }
.shop-link{
  font-size:.85rem; font-weight:500; color: var(--ink-soft);
  text-decoration:none; border:1px solid rgba(46,42,37,.15);
  padding:9px 16px; border-radius:999px; transition: all .25s var(--ease);
  background: rgba(255,255,255,.5); backdrop-filter: blur(6px);
}
.shop-link:hover{ background: var(--ink); color:#fff; border-color:var(--ink); transform: translateY(-2px); }
.shop-link .arrow{ display:inline-block; transition: transform .25s; }
.shop-link:hover .arrow{ transform: translate(2px,-2px); }

.header-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

.cart-wrap{ position:relative; }

.cart-indicator{
  position:relative;
  display:inline-flex; align-items:center; gap:7px;
  font-size:.85rem; font-weight:600; color: var(--ink-soft);
  font-family:inherit; border:1px solid rgba(46,42,37,.15); cursor:pointer;
  padding:9px 16px; border-radius:999px; transition: all .2s var(--ease);
  background: rgba(255,255,255,.5); backdrop-filter: blur(6px);
}
.cart-indicator:hover{ background: var(--rose-light); border-color: var(--rose); }
.cart-indicator[aria-expanded="true"]{ background: var(--rose-dark); color:#fff; border-color: var(--rose-dark); }
.cart-icon{ font-size:1rem; }
.cart-count{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:18px; height:18px; padding:0 4px;
  border-radius:999px; background: var(--rose-dark); color:#fff;
  font-size:.68rem; font-weight:700; line-height:1;
}
.cart-indicator[aria-expanded="true"] .cart-count{ background:#fff; color: var(--rose-dark); }

/* ---------- Mini-panier deroulant ---------- */
.mini-cart-panel{
  position:absolute; top: calc(100% + 10px); right:0; z-index:150;
  width: min(320px, 85vw);
  background:#fff; border-radius: var(--radius-md);
  box-shadow: 0 20px 50px -14px rgba(46,42,37,.3);
  border: 1px solid rgba(46,42,37,.08);
  padding: 14px;
  animation: mcIn .22s var(--ease);
}
@keyframes mcIn{ from{ opacity:0; transform: translateY(-8px) scale(.97);} to{ opacity:1; transform: translateY(0) scale(1);} }
.mini-cart-empty{
  padding: 18px 6px; text-align:center; font-size:.85rem; color: var(--ink-soft); line-height:1.5;
}
.mini-cart-items{
  max-height: 300px; overflow-y:auto;
  display:flex; flex-direction:column; gap:10px;
}
.mini-cart-item{
  display:flex; align-items:center; gap:10px;
  padding-bottom:10px; border-bottom:1px solid rgba(46,42,37,.08);
  transition: opacity .2s;
}
.mini-cart-item:last-child{ border-bottom:none; padding-bottom:0; }
.mini-cart-item img{
  width:44px; height:44px; border-radius:8px; object-fit:cover; flex-shrink:0;
  background: var(--cream-2);
}
.mini-cart-item-info{ display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.mini-cart-item-name{
  font-size:.82rem; font-weight:600; color:var(--ink);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.mini-cart-item-meta{ font-size:.78rem; color: var(--ink-soft); }
.mini-cart-item-price{ color: var(--rose-dark); font-weight:600; }
.mini-cart-remove{
  flex-shrink:0; width:24px; height:24px; border-radius:50%;
  border:none; background: var(--cream-2); color: var(--ink-soft);
  font-size:.72rem; cursor:pointer; transition: all .2s;
}
.mini-cart-remove:hover{ background:#f4d9d9; color:#b23b3b; }
.mini-cart-footer{
  margin-top:12px; padding-top:12px; border-top:1.5px dashed rgba(46,42,37,.15);
}
.mini-cart-total{
  display:flex; justify-content:space-between; align-items:center;
  font-size:.9rem; margin-bottom:10px;
}
.mini-cart-total strong{ color: var(--rose-dark); font-size:1.05rem; }
.mini-cart-cta{ display:block; text-align:center; padding:11px; font-size:.88rem; }

/* ---------- Layout ---------- */
.quiz-stage{
  position:relative; z-index:2;
  display:flex; flex-direction:column; align-items:center;
  padding: 10px 16px 60px;
  min-height: 72vh;
}
.quiz-card{
  width:100%; max-width: 860px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(22px, 4vw, 48px);
  position:relative;
  overflow:hidden;
}
.quiz-card::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(135deg, rgba(212,106,147,.06), transparent 40%, rgba(122,155,118,.08));
  pointer-events:none;
}

/* ---------- Progress ---------- */
.progress-track{
  position:relative;
  height:6px;
  background: rgba(46,42,37,.08);
  border-radius: 999px;
  margin-bottom: clamp(20px, 4vw, 34px);
  overflow:visible;
}
.progress-fill{
  position:absolute; left:0; top:0; bottom:0;
  width:0%;
  background: linear-gradient(90deg, var(--sage), var(--rose));
  border-radius: 999px;
  transition: width .55s var(--ease);
}
.progress-fill::after{
  content:"";
  position:absolute; right:-5px; top:50%; translate: 0 -50%;
  width:14px; height:14px; border-radius:50%;
  background: var(--white);
  border: 3px solid var(--rose-dark);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.progress-steps{
  display:flex; justify-content:space-between; margin-top:8px;
  font-size:.72rem; color: var(--ink-soft); font-weight:500;
}

/* ---------- Step container & transitions ---------- */
.step-container{ position:relative; min-height: 340px; }
.step{
  animation: stepIn .5s var(--ease);
}
.step.leaving{ animation: stepOut .3s var(--ease) forwards; }
@keyframes stepIn{
  from{ opacity:0; transform: translateX(26px) scale(.98); }
  to{ opacity:1; transform: translateX(0) scale(1); }
}
@keyframes stepOut{
  to{ opacity:0; transform: translateX(-26px) scale(.98); }
}

.eyebrow{
  display:inline-flex; align-items:center; gap:6px;
  font-size:.75rem; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color: var(--rose-dark);
  background: var(--rose-light);
  padding:5px 14px; border-radius:999px;
  margin-bottom:14px;
}
.step-title{
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin: 0 0 8px;
  color: var(--ink);
}
.step-subtitle{
  color: var(--ink-soft);
  margin: 0 0 28px;
  font-size: .98rem;
  max-width: 56ch;
  line-height:1.5;
}

/* ---------- Intro ---------- */
.intro{ text-align:center; padding: 10px 0 4px; }
.intro-logo{
  height: 54px; width:auto; margin: 0 auto 18px;
  display:block;
  animation: logoIn .7s var(--ease);
}
.intro .intro-icons{ font-size:2.1rem; margin-bottom:18px; display:flex; gap:14px; justify-content:center; }
.intro .intro-icons span{ animation: bob 3s ease-in-out infinite; display:inline-block; }
.intro .intro-icons span:nth-child(2){ animation-delay:.3s; }
.intro .intro-icons span:nth-child(3){ animation-delay:.6s; }
@keyframes bob{ 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-10px);} }
.intro h1{ font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 14px; }
.intro p{ color: var(--ink-soft); max-width: 50ch; margin: 0 auto 30px; line-height:1.6; }
.intro-meta{
  display:flex; justify-content:center; gap:28px; margin-bottom:34px; flex-wrap:wrap;
}
.intro-meta div{ text-align:center; }
.intro-meta strong{ display:block; font-size:1.3rem; font-family:'Fraunces',serif; color:var(--rose-dark); }
.intro-meta span{ font-size:.78rem; color:var(--ink-soft); }

/* ---------- Options grid ---------- */
.options-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.options-grid.cols-2{ grid-template-columns: repeat(2, 1fr); }
.options-grid.cols-4{ grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); }

.option-card{
  position:relative;
  display:flex; flex-direction:column; align-items:flex-start; gap:10px;
  background: var(--white);
  border: 1.5px solid rgba(46,42,37,.08);
  border-radius: var(--radius-md);
  padding: 18px 18px;
  cursor:pointer;
  text-align:left;
  font-family:inherit;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
  overflow:hidden;
}
.option-card::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(120deg, transparent 30%, rgba(212,106,147,.12), transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s var(--ease);
}
.option-card:hover{
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: var(--rose);
}
.option-card:hover::after{ transform: translateX(120%); }
.option-card:active{ transform: translateY(-2px) scale(.99); }
.option-icon{
  font-size: 1.6rem;
  width: 46px; height:46px;
  display:flex; align-items:center; justify-content:center;
  background: var(--cream-2);
  border-radius: 14px;
  transition: transform .3s var(--ease), background .3s;
}
.option-card:hover .option-icon{ transform: scale(1.12) rotate(-6deg); background: var(--rose-light); }
.option-label{ font-weight:600; font-size:.98rem; color:var(--ink); }
.option-desc{ font-size:.8rem; color: var(--ink-soft); line-height:1.4; }
.option-chevron{
  margin-left:auto; align-self:center; opacity:0; transform: translateX(-6px);
  transition: all .25s var(--ease); color: var(--rose-dark); font-weight:700;
}
.option-card:hover .option-chevron{ opacity:1; transform:translateX(0); }

/* vertical / binary layout */
.option-card.binary{ flex-direction:row; align-items:center; }

/* ---------- Nav buttons ---------- */
.step-nav{
  display:flex; align-items:center; justify-content:space-between;
  margin-top: 28px;
}
.btn{
  font-family:inherit;
  border:none; cursor:pointer; text-decoration:none;
  border-radius: 999px;
  font-weight:600;
  font-size:.92rem;
  padding: 13px 26px;
  display:inline-flex; align-items:center; gap:8px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn-primary{
  background: linear-gradient(120deg, var(--rose-dark), var(--rose));
  color:#fff;
  box-shadow: 0 10px 24px -8px rgba(184,79,121,.55);
}
.btn-primary:hover{ transform: translateY(-3px); box-shadow: 0 14px 30px -8px rgba(184,79,121,.65); }
.btn-ghost{
  background: transparent; color: var(--ink-soft);
  border: 1.5px solid rgba(46,42,37,.15);
}
.btn-ghost:hover{ background: rgba(46,42,37,.05); color:var(--ink); }
.btn-lg{ padding:16px 34px; font-size:1.02rem; }
.btn[disabled]{ opacity:.4; cursor:not-allowed; }
.btn.is-applied{
  background: #9a9a93 !important;
  color:#fff; box-shadow:none; opacity:1; transform:none !important;
  cursor:default;
}

/* ---------- Result screen ---------- */
.result{ text-align:left; }
.result-header{ text-align:center; margin-bottom: 30px; }
.result-header .eyebrow{ background: var(--sage); color:#fff; }
.result-badge{
  font-size:2.4rem; margin-bottom:6px;
  animation: pop .6s var(--ease);
}
@keyframes pop{ 0%{ transform: scale(.4) rotate(-10deg); opacity:0;} 70%{ transform: scale(1.12) rotate(4deg);} 100%{ transform: scale(1) rotate(0); opacity:1;} }

/* ---------- Bandeau remise de fin de quiz ---------- */
.coupon-banner{
  display:flex; align-items:center; gap:18px; flex-wrap:wrap;
  background: linear-gradient(120deg, #fff6e9, #fdf0e3);
  border: 1.5px dashed var(--gold);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 26px;
  animation: cardIn .5s var(--ease) both;
}
.coupon-icon{ font-size:2rem; flex-shrink:0; animation: bob 3s ease-in-out infinite; }
.coupon-text{ display:flex; flex-direction:column; gap:4px; flex:1; min-width:220px; }
.coupon-text strong{ font-size:1rem; color: var(--ink); line-height:1.4; }
.coupon-sub{ font-size:.8rem; color: var(--ink-soft); }
.coupon-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.coupon-copy{
  display:inline-flex; align-items:center; gap:6px;
  background:#fff; border: 1.5px dashed var(--gold); color: var(--ink);
  font-weight:700; font-size:.85rem; letter-spacing:.03em;
  padding: 10px 14px; border-radius: 10px; cursor:pointer;
  transition: all .2s var(--ease);
}
.coupon-copy:hover{ background: var(--gold); color:#fff; border-style:solid; }
.coupon-copy.is-copied{ background: var(--sage); color:#fff; border-color:var(--sage); border-style:solid; }
.coupon-code-text{ font-family:'Fraunces', serif; }

.products-grid{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:18px; margin-bottom: 10px;
}
.product-card{
  background:#fff;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(46,42,37,.08);
  overflow:hidden;
  display:flex; flex-direction:column;
  box-shadow: var(--shadow-card);
  animation: cardIn .55s var(--ease) both;
  transition: transform .3s var(--ease);
}
.product-card:hover{ transform: translateY(-6px); }
.product-card.is-primary{ border-color: var(--rose); box-shadow: 0 16px 40px -14px rgba(184,79,121,.4); }
@keyframes cardIn{
  from{ opacity:0; transform: translateY(18px) scale(.97);}
  to{ opacity:1; transform: translateY(0) scale(1);}
}
.product-media{
  position:relative; aspect-ratio: 4/3; overflow:hidden; background: var(--cream-2);
}
.product-media img{
  width:100%; height:100%; object-fit:cover; display:block;
  transition: transform .5s var(--ease);
}
.product-card:hover .product-media img{ transform: scale(1.07); }
.match-tag{
  position:absolute; top:10px; left:10px;
  background: var(--sage); color:#fff; font-size:.7rem; font-weight:700;
  padding: 5px 11px; border-radius:999px; letter-spacing:.03em;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.sale-tag{
  position:absolute; top:10px; right:10px;
  background: var(--gold); color:#fff; font-size:.7rem; font-weight:700;
  padding: 5px 11px; border-radius:999px;
}
.product-body{ padding: 16px 18px 20px; display:flex; flex-direction:column; gap:8px; flex:1; }
.product-cat{ font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; color: var(--sage-dark); font-weight:700; }
.product-name{ font-family:'Fraunces',serif; font-size:1.12rem; font-weight:600; margin:0; line-height:1.3; }
.product-why{ font-size:.85rem; color: var(--ink-soft); line-height:1.5; flex:1; }
.product-price{ display:flex; align-items:baseline; gap:8px; margin-top:4px; }
.price-now{ font-weight:700; font-size:1.05rem; color: var(--rose-dark); }
.price-old{ font-size:.85rem; color: var(--ink-soft); text-decoration: line-through; }
.product-cta{
  margin-top:10px; text-align:center; text-decoration:none;
  background: var(--ink); color:#fff; font-weight:600; font-size:.88rem;
  padding: 11px; border-radius: 12px; transition: all .25s var(--ease);
}
.product-cta:hover{ background: var(--rose-dark); transform: translateY(-2px); }

.product-actions{
  display:flex; align-items:stretch; gap:8px; margin-top:10px;
}
.product-add-cart{
  flex:1; min-width:0;
  text-align:center; text-decoration:none; display:flex; align-items:center; justify-content:center;
  background: linear-gradient(120deg, var(--rose-dark), var(--rose));
  color:#fff; font-weight:700; font-size:.88rem;
  padding: 12px 10px; border-radius: 12px; border:none; cursor:pointer;
  box-shadow: 0 10px 22px -10px rgba(184,79,121,.55);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .2s;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.product-add-cart:hover{ transform: translateY(-2px); box-shadow: 0 14px 26px -8px rgba(184,79,121,.65); }
.product-add-cart.loading{ opacity:.65; pointer-events:none; }
.product-link-secondary{
  flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  text-decoration:none; white-space:nowrap;
  font-size:.82rem; font-weight:600; color: var(--ink-soft);
  padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid rgba(46,42,37,.15);
  transition: all .2s var(--ease);
}
.product-link-secondary:hover{ color: var(--rose-dark); border-color: var(--rose); background: var(--rose-light); }

/* ---------- Toast de confirmation panier ---------- */
.mn-toast{
  position:fixed; left:50%; bottom:28px; z-index:200;
  transform: translate(-50%, 20px); opacity:0;
  background: var(--ink); color:#fff; font-weight:600; font-size:.88rem;
  padding: 13px 22px; border-radius:999px; box-sizing:border-box;
  box-shadow: 0 14px 34px -12px rgba(0,0,0,.4);
  font-family:'Poppins', sans-serif;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
  pointer-events:none;
  max-width: 90vw; text-align:center;
}
.mn-toast.is-visible{ transform: translate(-50%, 0); opacity:1; }
.mn-toast--error{ background: #b23b3b; }

@keyframes mnPulse{
  0%{ transform: scale(1); }
  30%{ transform: scale(1.22); }
  60%{ transform: scale(.95); }
  100%{ transform: scale(1); }
}
.mn-pulse{ animation: mnPulse .5s var(--ease); }

.secondary-title{
  margin: 30px 0 14px; font-size:.95rem; font-weight:600; color: var(--ink-soft);
  display:flex; align-items:center; gap:8px;
}
.secondary-title::before{ content:""; width:22px; height:2px; background: var(--rose); display:inline-block; }

.result-actions{
  display:flex; justify-content:center; gap:14px; margin-top: 34px; flex-wrap:wrap;
}

/* ---------- Trust line & footer ---------- */
.trust-line{
  margin-top: 22px; display:flex; gap: 22px; flex-wrap:wrap; justify-content:center;
  font-size:.8rem; color: var(--ink-soft);
}
.trust-line span{
  background: rgba(255,255,255,.6); padding: 7px 14px; border-radius:999px;
  border: 1px solid rgba(46,42,37,.08);
}
.site-footer{
  position:relative; z-index:2; text-align:center; padding: 24px 16px 40px;
  color: var(--ink-soft); font-size:.82rem;
}

/* ---------- Confetti ---------- */
.confetti-root{
  position:absolute; inset:0; pointer-events:none; z-index: 50; overflow:hidden;
}
.confetti-piece{
  position:absolute; top:-10px; border-radius:2px; opacity:.9;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall{
  to{ transform: translateY(105vh) rotate(540deg); opacity:0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 560px){
  .options-grid.cols-2{ grid-template-columns: 1fr; }
  .step-nav{ flex-direction:column-reverse; gap:12px; align-items:stretch; }
  .btn{ justify-content:center; width:100%; }
  .intro-meta{ gap:16px; }
  .cart-label{ display:none; }
  .cart-indicator{ padding:9px 11px; }
}
