/* Yuki Beauty — d'après la maquette Figma (mobile 402px) */
:root {
  --bg: #f7fafa;
  --white: #fff;
  --mint: #eef5f1;
  --mint-2: #ebf3ef;
  --mint-3: #e8f0ec;
  --sage: #d9e9e1;
  --leaf: #cfe0bb;
  --green: #49645b;
  --ink: #161d1b;
  --ink-2: #3d3d3d;
  --text: #4b4b4b;
  --text-2: #595555;
  --muted: #6a6969;
  --muted-2: #424845;
  --muted-3: #727975;
  --total: #949f9b;
  --line: rgba(193, 200, 196, .3);
  --glass-border: rgba(229, 231, 235, .5);
  --font: "Cabin", system-ui, sans-serif;
  --font-alt: "Plus Jakarta Sans", system-ui, sans-serif;
  --page: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.25;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.glass {
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 20;
  height: 41px;
  background: var(--white);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 21px;
}
.navbar__burger { justify-self: start; padding: 8px; margin-left: -8px; }
.navbar__logo {
  display: flex; align-items: center; gap: 0;
  font-weight: 700; font-size: 20px; color: var(--text-2);
}
.navbar__logo img { margin-right: -1px; transform: translateY(-1px); }
.navbar__cart { justify-self: end; position: relative; padding: 8px; margin-right: -8px; }
.navbar__badge {
  position: absolute; top: 1px; right: -2px;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 99px; background: var(--leaf);
  font-size: 9px; font-weight: 700; line-height: 15px; text-align: center; color: var(--text);
}

/* Menu burger */
.menu { position: fixed; inset: 0; z-index: 40; }
.menu[hidden] { display: none; }
.menu__backdrop { position: absolute; inset: 0; background: rgba(22, 29, 27, .25); }
.menu__panel {
  position: relative; z-index: 1;
  width: min(300px, 82vw); height: 100%;
  background: var(--white);
  padding: 56px 28px 28px;
  display: flex; flex-direction: column; gap: 6px;
  animation: slide .2s ease-out;
}
.menu__panel a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 18px; font-weight: 600; color: var(--text);
}
.menu__close { position: absolute; top: 16px; left: 24px; padding: 6px; }
@keyframes slide { from { transform: translateX(-100%); } }

/* Toasts */
.toasts { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 30; width: min(360px, calc(100% - 32px)); }
.toast {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font-size: 14px; color: var(--green);
  box-shadow: 0 10px 30px rgba(73, 100, 91, .12);
  animation: toast 4s ease forwards;
}
@keyframes toast { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* ---------- Boutons ---------- */
.btn-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 39px; padding: 0 20px 0 13px;
  background: var(--sage);
  border: .5px solid rgba(106, 105, 105, .31);
  border-radius: 21px;
  font-size: 16.4px; color: var(--text);
  transition: background .15s;
}
.btn-pill img { opacity: .6; }
.btn-pill:hover { background: #cde0d6; }

.btn-add {
  min-width: 42px; height: 13px; padding: 0 9px;
  background: var(--leaf); border-radius: 5.5px;
  font-size: 7px; color: var(--text);
  transition: filter .15s;
}
.btn-add:hover { filter: brightness(.95); }
.btn-add--lg { width: 90px; height: 28px; font-size: 15.3px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 518px;
  background: var(--hero-img) center 30% / cover no-repeat;
  display: flex; align-items: flex-end;
  padding: 0 13px 21px;
  overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(217, 217, 217, .46); }
.hero__dot { position: absolute; right: 13px; top: 59%; z-index: 1; }
.hero__card {
  position: relative;
  width: min(100%, 560px);
  min-height: 364px;
  border-radius: 12px;
  padding: 42px 20px 23px;
  display: flex; flex-direction: column; align-items: flex-start;
  box-shadow: 0 20px 50px rgba(73, 100, 91, .08);
}
.hero__title { font-size: 32.3px; font-weight: 700; color: var(--ink-2); max-width: 302px; line-height: 1.2; }
.hero__text { margin-top: 38px; font-size: 16.15px; color: var(--muted); max-width: 242px; line-height: 1.2; }
.hero__card .btn-pill { margin-top: auto; }

/* ---------- Best-sellers ---------- */
.section-head { padding: 0 16px; }
.section-head h2 { font-weight: 400; font-size: 30.3px; color: var(--text); }
.section-head p { margin-top: 6px; font-size: 13.1px; color: var(--muted); }

.bestsellers { padding: 47px 0 40px; }
.bestsellers__track {
  margin-top: 30px;
  display: flex; gap: 15px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 22px 8px;
  scrollbar-width: none;
}
.bestsellers__track::-webkit-scrollbar { display: none; }
.bs-card { flex: 0 0 252px; scroll-snap-align: start; display: flex; flex-direction: column; }
.bs-card__media { display: block; height: 331px; border-radius: 10px; overflow: hidden; background: var(--white); }
.bs-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.bs-card__media--packshot img { object-fit: contain; padding: 18px; }
.bs-card:hover .bs-card__media img { transform: scale(1.03); }
.bs-card__kind { margin: 11px 0 0 17px; font-size: 13.1px; }
.bs-card__name { margin: 0 0 0 17px; font-size: 15.1px; font-weight: 700; }
.bs-card__price { margin: 3px 0 0 17px; font-size: 13.1px; }

/* ---------- Ingrédient vedette ---------- */
.ingredient { padding: 0 22px; }
.ingredient__inner {
  position: relative;
  max-width: 900px; margin: 0 auto;
  padding: 36px 35px 59px;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--mint) 0%, var(--bg) 100%);
  overflow: hidden;
}
.ingredient__inner::before {
  content: ""; position: absolute; top: -39px; right: -134px;
  width: 256px; height: 256px; border-radius: 50%;
  background: rgba(209, 239, 228, .6); filter: blur(32px);
}
.ingredient__media { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 284 / 355; }
.ingredient__media img { width: 100%; height: 100%; object-fit: cover; }
.ingredient__content { position: relative; margin-top: 34px; display: flex; flex-direction: column; gap: 16px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 3.6px; text-transform: uppercase; line-height: 12px; }
.ingredient__title { font-size: 40px; font-weight: 400; line-height: 50px; }
.ingredient__text { border-radius: 16px; padding: 33px 25px 25px; }
.ingredient__text p { font-size: 16px; line-height: 26px; letter-spacing: .16px; color: var(--muted); }
.ingredient__badges { display: flex; gap: 16px; padding-top: 16px; }
.ingredient__badges li { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 10px; line-height: 15px; text-transform: uppercase; color: var(--muted-2); }
.ingredient__icon { width: 48px; height: 48px; border-radius: 50%; background: rgba(209, 239, 228, .3); display: grid; place-items: center; }

/* ---------- Infos boutique ---------- */
.infos {
  margin: 37px 20px 37px; max-width: 900px;
  background: var(--mint-2); border-radius: 20px;
  padding: 25px 16px 25px;
  display: grid; gap: 33px; text-align: center;
}
@media (min-width: 900px) { .infos { margin-inline: auto; } }
.infos__item { display: flex; flex-direction: column; align-items: center; }
.infos__item img { margin-bottom: 7px; }
.infos__star { opacity: .6; }
.infos h3 { font-size: 11px; font-weight: 400; color: var(--text); }
.infos p { margin-top: 2px; font-size: 10px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--white); padding: 16px 14px 13px; }
.footer__links li + li { margin-top: 2px; }
.footer__links a { font-size: 12px; font-weight: 700; color: var(--text); line-height: 16px; }
.footer__links a:hover { color: var(--green); }
.footer__social { display: flex; gap: 6px; margin-top: 13px; }
.footer__copy {
  margin-top: 21px;
  display: flex; align-items: center; justify-content: center; gap: 2px;
  font-size: 8px; color: var(--text-2);
}
.footer__copy img { transform: scaleY(-1); }

/* ---------- Collections ---------- */
.collection { max-width: var(--page); margin: 0 auto; padding: 30px 20px 60px; }
.collection__head { padding: 0 17px; }
.collection__head h1 { display: flex; align-items: center; gap: 2px; font-size: 21.6px; font-weight: 700; color: var(--text); }
.collection__head p { margin-top: 2px; font-size: 10.8px; color: #000; max-width: 225px; }
.collection__line { margin-top: 20px; }

.grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 50px 30px;
}
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { display: flex; flex-direction: column; }
.card__media { display: block; aspect-ratio: 1; border-radius: 11px; overflow: hidden; background: var(--white); }
.card__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.card__media:hover img { transform: scale(1.04); }
.card__body { padding: 5px 9px 0 12px; display: flex; flex-direction: column; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card__brand { font-size: 9.9px; font-weight: 700; color: var(--text-2); }
.card__price { font-size: 8.6px; white-space: nowrap; }
.card__name { margin-top: 1px; font-size: 9px; color: var(--muted); min-height: 2.5em; }
.card form { align-self: center; margin-top: 10px; }
@media (min-width: 720px) {
  .card__brand { font-size: 13px; }
  .card__price { font-size: 12px; }
  .card__name { font-size: 12px; }
  .card .btn-add { height: 22px; font-size: 11px; padding: 0 16px; border-radius: 8px; }
}

/* ---------- Fiche produit ---------- */
.product { max-width: 760px; margin: 0 auto; padding: 22px 26px 30px; display: flex; flex-direction: column; gap: 25px; }
.product__gallery { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.product__main { width: min(278px, 100%); aspect-ratio: 1; border-radius: 17px; overflow: hidden; background: var(--white); }
.product__main img { width: 100%; height: 100%; object-fit: contain; }
.product__thumbs { display: flex; gap: 16px; }
.product__thumb { width: 79px; height: 79px; overflow: hidden; border: 2px solid transparent; }
.product__thumb.is-active { border-color: var(--leaf); }
.product__thumb img { width: 100%; height: 100%; object-fit: cover; }

.product__info {
  position: relative;
  background: var(--mint); border: 1px solid rgba(255, 255, 255, .4); border-radius: 32px;
  padding: 33px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
}
.pill-tag {
  background: var(--white); border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 13px;
  font-family: var(--font-alt); font-weight: 600; font-size: 12px; line-height: 12px; letter-spacing: .96px;
  text-transform: uppercase; color: var(--green);
}
.product__title { font-size: 32px; font-weight: 700; color: var(--text-2); }
.product__desc { font-size: 16px; color: var(--muted); }
.product__price { display: flex; align-items: baseline; gap: 16px; font-family: var(--font-alt); }
.product__price span { font-size: 32px; font-weight: 600; letter-spacing: .64px; color: var(--green); line-height: 41.6px; }
.product__price s { font-size: 16px; color: rgba(66, 72, 69, .5); }
.product__actions { align-self: stretch; display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 1px; }
.product__fav { padding: 4px; transition: transform .15s; }
.product__fav[aria-pressed="true"] { transform: scale(1.2); filter: hue-rotate(-30deg) saturate(2); }

.panel { background: var(--mint); border-radius: 24px; padding: 31px 32px 8px; }
.reviews h2 { font-size: 28px; font-weight: 600; letter-spacing: .56px; line-height: 36.4px; color: var(--text); margin-bottom: 24px; }
.review { display: flex; flex-direction: column; gap: 7px; padding-bottom: 24px; }
.review + .review { padding-top: 24px; border-top: 1px solid var(--line); }
.review__stars { display: flex; }
.review__stars .is-empty { opacity: .25; }
.review__text { font-size: 16px; line-height: 25.6px; letter-spacing: .16px; color: var(--ink); }
.review__author { font-family: var(--font-alt); font-weight: 600; font-size: 12px; letter-spacing: .96px; color: rgba(66, 72, 69, .6); }

.results {
  background: var(--white); border: 1px solid rgba(193, 200, 196, .2); border-radius: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05); overflow: hidden;
}
.results__body { padding: 31px 32px 32px; }
.results h2 { font-size: 29px; font-weight: 600; letter-spacing: .64px; line-height: 41.6px; color: var(--text); }
.results__list { margin-top: 32px; display: flex; flex-direction: column; gap: 48px; }
.results__list div { display: grid; grid-template-columns: 108px 1fr; gap: 32px; align-items: center; }
.results__list dt { font-family: var(--font-alt); font-weight: 700; font-size: 48px; letter-spacing: -.96px; color: var(--muted); }
.results__list dd { font-size: 16px; line-height: 25.6px; letter-spacing: .16px; color: var(--muted-2); }
.results__media { aspect-ratio: 349 / 413; }
.results__media img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; }

/* ---------- Panier ---------- */
.cart { max-width: 600px; margin: 0 auto; padding: 24px 33px 34px; }
.cart__head { display: flex; justify-content: space-between; align-items: center; padding: 0 0 20px; }
.cart__head h1 { font-size: 18px; font-weight: 700; color: var(--text); }
.cart__count { font-family: var(--font-alt); font-weight: 600; font-size: 10.6px; letter-spacing: 1.06px; text-transform: uppercase; color: var(--muted-3); }
.cart__items { display: flex; flex-direction: column; gap: 14px; }
.cart-item { position: relative; display: flex; gap: 14px; padding: 14px; border-radius: 10.6px; border-width: .9px; }
.cart-item__media { flex: 0 0 85px; height: 113px; border-radius: 7px; overflow: hidden; background: var(--mint-3); }
.cart-item__media img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.cart-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 3px 0; }
.cart-item__name { font-size: 20px; font-weight: 600; line-height: 1.2; color: var(--ink); padding-right: 16px; }
.cart-item__meta { margin-top: 4px; font-family: var(--font-alt); font-weight: 600; font-size: 10.6px; letter-spacing: .85px; color: var(--muted-2); }
.cart-item__foot { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cart-item__price { font-size: 22px; font-weight: 600; color: var(--text); }
.cart-item__remove { position: absolute; top: 6px; right: 8px; }
.cart-item__remove button { padding: 4px; }
.qty {
  display: flex; align-items: center;
  background: var(--mint); border: .9px solid var(--line); border-radius: 99px;
  padding: 4px 8px; font-family: var(--font-alt); font-size: 14px;
}
.qty button { width: 28px; height: 28px; border-radius: 50%; color: var(--green); }
.qty button:hover { background: rgba(255, 255, 255, .7); }
.qty__value { padding: 0 10px; color: var(--ink); min-width: 28px; text-align: center; }

.summary {
  margin-top: 28px; border-radius: 14px; padding: 22px;
  box-shadow: 0 17.6px 35px rgba(73, 100, 91, .05);
  display: flex; flex-direction: column; gap: 21px;
}
.summary h2 { font-size: 20px; font-weight: 600; color: var(--ink); padding-bottom: 14px; border-bottom: .9px solid var(--line); }
.summary__rows { display: flex; flex-direction: column; gap: 14px; font-family: var(--font-alt); font-size: 14px; }
.summary__rows div { display: flex; justify-content: space-between; }
.summary__rows dt { color: var(--muted-2); }
.summary__rows dd { font-weight: 500; color: var(--ink); }
.summary__rows dd.is-free { color: var(--green); }
.summary__note {
  display: flex; align-items: center; gap: 7px;
  margin-top: -7px; padding: 10.6px; border-radius: 7px;
  background: rgba(248, 216, 219, .2);
  font-family: var(--font-alt); font-weight: 600; font-size: 10.6px; letter-spacing: .85px; text-transform: uppercase; color: #70585b;
}
.summary__total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: .9px solid var(--line); padding-top: 22px;
}
.summary__total span { font-size: 24.7px; font-weight: 600; color: var(--ink); }
.summary__total strong { font-family: var(--font-alt); font-size: 42px; font-weight: 700; letter-spacing: -.85px; color: var(--total); }
.btn-pay {
  width: 100%; padding: 14px; border-radius: 99px;
  background: var(--muted); color: var(--white);
  display: flex; justify-content: center; align-items: center; gap: 7px;
  font-size: 16px; font-weight: 500; letter-spacing: .35px;
  box-shadow: 0 8.8px 13.2px -2.6px rgba(73, 100, 91, .2), 0 3.5px 5.3px -3.5px rgba(73, 100, 91, .2);
  transition: background .15s;
}
.btn-pay:hover { background: #5a5959; }
.summary__pay { display: flex; justify-content: center; gap: 14px; opacity: .4; }

.cart__empty { border-radius: 14px; padding: 32px 22px; display: flex; flex-direction: column; align-items: center; gap: 18px; font-size: 16px; color: var(--muted); }
.empty { grid-column: 1 / -1; color: var(--muted); }

/* ---------- Écrans larges ---------- */
@media (min-width: 720px) {
  .hero { min-height: 620px; padding: 0 40px 48px; }
  .section-head, .bestsellers__track { max-width: var(--page); margin-inline: auto; }
  .bestsellers__track { padding-inline: 16px; }
  .ingredient__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 48px; }
  .ingredient__content { margin-top: 0; }
  .infos { grid-template-columns: repeat(3, 1fr); }
  .footer { padding-inline: max(14px, calc((100% - var(--page)) / 2)); }
}
@media (min-width: 900px) {
  .product { max-width: 1000px; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .product__main { width: 100%; }
  .reviews, .results { grid-column: span 1; }
}
