/* ============================================================
   Petit & Joli — feuille de style
   Palette douce : crème, corail/terracotta, rose poudré, sauge
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Quicksand:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --cream:        #fbf7f2;
  --cream-2:      #f6efe7;
  --sage-band:    #d7ded3;
  --coral:        #e08560;
  --coral-dark:   #d2724d;
  --coral-soft:   #f3d9 cc; /* placeholder corrected below */
  --pink:         #e9b9b0;
  --pink-soft:    #f7e3df;
  --sage:         #aebfa6;
  --gold:         #e6b54e;
  --ink:          #4a4441;
  --ink-soft:     #897f78;
  --line:         #ece3d8;
  --white:        #ffffff;
  --radius:       18px;
  --radius-lg:    28px;
  --shadow:       0 14px 40px -18px rgba(120, 90, 70, .35);
  --shadow-soft:  0 8px 26px -14px rgba(120, 90, 70, .28);
  --font-hand:    'Caveat', cursive;
  --font-serif:   'Cormorant Garamond', serif;
  --font-body:    'Quicksand', sans-serif;
}

/* corrige la variable mal saisie */
:root { --coral-soft: #f6ddd0; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

/* ---------- bandeau top ---------- */
.topbar {
  background: var(--sage-band);
  color: #5b6358;
  font-size: .82rem;
  padding: 9px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.topbar a:hover { color: var(--coral-dark); }
.topbar .topbar-right { display: flex; gap: 1.4rem; }

/* ---------- header ---------- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  gap: 1.5rem;
}
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand .brand-name {
  font-family: var(--font-hand);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--ink);
}
.brand .brand-name::after { content: ' ♥'; color: var(--coral); font-size: 1.1rem; vertical-align: super; }
.brand .brand-sub {
  font-size: .58rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2px;
}

.main-nav { display: flex; gap: 2rem; }
.main-nav a {
  font-weight: 500;
  font-size: .95rem;
  color: var(--ink);
  position: relative;
  padding-bottom: 4px;
  transition: color .2s;
}
.main-nav a.active, .main-nav a:hover { color: var(--coral); }
.main-nav a.active::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--coral); border-radius: 2px;
}

.header-icons { display: flex; gap: 1.1rem; align-items: center; }
.header-icons a { position: relative; color: var(--ink); transition: color .2s; }
.header-icons a:hover { color: var(--coral); }
.cart-badge {
  position: absolute; top: -8px; right: -10px;
  background: var(--coral); color: #fff;
  font-size: .62rem; font-weight: 700;
  width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center;
}

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600;
  border: none; cursor: pointer;
  padding: .85rem 1.9rem;
  border-radius: 40px;
  font-size: .98rem;
  transition: transform .18s, box-shadow .18s, background .2s;
}
.btn-primary {
  background: var(--coral); color: #fff;
  box-shadow: 0 10px 24px -12px rgba(208,114,77,.8);
}
.btn-primary:hover { background: var(--coral-dark); transform: translateY(-2px); }
.btn-outline {
  background: transparent; color: var(--coral);
  border: 1.5px solid var(--coral);
}
.btn-outline:hover { background: var(--coral); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }

/* ---------- titres manuscrits ---------- */
.script-title {
  font-family: var(--font-hand);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--ink);
  font-weight: 700;
  text-align: center;
}
.script-title .heart { color: var(--coral); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream) 60%, var(--cream-2) 100%);
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 2rem;
  padding: 3.5rem 0 4rem;
}
.hero-text h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.12;
  color: var(--ink);
}
.hero-text h1 .hand {
  font-family: var(--font-hand);
  color: var(--coral);
  font-weight: 700;
  font-size: 1.15em;
}
.hero-text .hero-sub {
  margin: 1.4rem 0 2rem;
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 30rem;
}
.hero-divider {
  display: flex; align-items: center; gap: .6rem; margin: 1.2rem 0;
}
.hero-divider .dash { width: 46px; height: 2px; background: var(--coral); border-radius: 2px; }
.hero-divider .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  aspect-ratio: 4/3;
  background: var(--cream-2);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   BANDE AVANTAGES
   ============================================================ */
.features {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.features .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 2rem 0;
}
.feature {
  display: flex; align-items: center; gap: .9rem;
  padding: 0 1rem;
  border-right: 1px solid var(--line);
}
.feature:last-child { border-right: none; }
.feature-icon {
  width: 50px; height: 50px; flex: none;
  border-radius: 50%;
  background: var(--coral-soft);
  display: grid; place-items: center;
  color: var(--coral-dark);
}
.feature h4 { font-size: .95rem; font-weight: 600; }
.feature p { font-size: .8rem; color: var(--ink-soft); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 4rem 0; }
.section-head { text-align: center; margin-bottom: 2.6rem; }

/* collections */
.collections-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.collection-card { text-align: center; }
.collection-card .thumb {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1/1;
  box-shadow: var(--shadow-soft);
  margin-bottom: -22px;
  position: relative;
}
.collection-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.collection-card:hover .thumb img { transform: scale(1.06); }
.collection-card .badge-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); color: var(--coral);
  display: grid; place-items: center;
  margin: 0 auto; position: relative; z-index: 2;
  box-shadow: var(--shadow-soft);
}
.collection-card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem; font-weight: 600;
  margin-top: .6rem;
}
.collection-card p { font-size: .85rem; color: var(--ink-soft); }

/* produits */
.products-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 2rem;
}
.products-head .script-title { text-align: left; }
.products-head .see-all {
  color: var(--coral); font-weight: 600; font-size: .92rem;
  display: inline-flex; align-items: center; gap: .4rem;
}
.products-head .see-all:hover { gap: .7rem; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-card .product-thumb {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--cream-2);
}
.product-card .product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .wish {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--coral);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.product-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--coral); color: #fff;
  font-size: .65rem; font-weight: 700; letter-spacing: .03em;
  padding: 3px 10px; border-radius: 20px;
}
.product-tag.sage { background: var(--sage); }
.product-body { padding: .85rem .9rem 1.1rem; text-align: center; }
.product-body .p-name {
  font-size: .9rem; font-weight: 500; color: var(--ink);
  margin-bottom: .3rem; min-height: 2.4em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-body .p-price { font-weight: 700; color: var(--ink); font-size: 1rem; }
.product-body .p-price .cents { font-size: .8rem; }
.product-card .quick-add {
  margin: 0 .9rem .9rem;
}

/* grille boutique (4 col) */
.shop-grid { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter {
  background: var(--pink-soft);
}
.newsletter .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 3rem 0;
}
.newsletter .nl-illu { font-size: 3rem; }
.newsletter h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem; font-weight: 600;
}
.newsletter p { color: var(--ink-soft); font-size: .92rem; }
.nl-form { display: flex; gap: .6rem; }
.nl-form input {
  border: 1px solid var(--line);
  background: #fff;
  padding: .8rem 1.1rem; border-radius: 30px;
  font-family: var(--font-body); min-width: 230px;
  outline: none;
}
.nl-form input:focus { border-color: var(--coral); }
.nl-form button {
  background: var(--coral); color: #fff; border: none;
  padding: .8rem 1.6rem; border-radius: 30px; font-weight: 700; cursor: pointer;
}
.nl-form button:hover { background: var(--coral-dark); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--cream);
  border-top: 1px solid var(--line);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
}
.footer-brand .brand-name { font-family: var(--font-hand); font-size: 1.9rem; font-weight: 700; }
.footer-brand .brand-sub { font-size: .55rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.footer-socials { display: flex; gap: .7rem; margin-top: 1rem; }
.footer-socials a {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--coral-soft); color: var(--coral-dark);
  display: grid; place-items: center; transition: .2s;
}
.footer-socials a:hover { background: var(--coral); color: #fff; }
.footer-col h5 {
  font-size: .95rem; font-weight: 700; margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a { color: var(--ink-soft); font-size: .9rem; }
.footer-col a:hover { color: var(--coral); }
.pay-icons { display: flex; gap: .5rem; flex-wrap: wrap; }
.pay-icons span {
  background: #fff; border: 1px solid var(--line);
  padding: .4rem .6rem; border-radius: 8px;
  font-size: .7rem; font-weight: 700; color: var(--ink-soft);
}
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  text-align: center; font-size: .8rem; color: var(--ink-soft);
}

/* ============================================================
   PAGES INTERNES (panier, produit, checkout)
   ============================================================ */
.page-head {
  background: var(--cream-2);
  padding: 2.4rem 0;
  text-align: center;
}
.page-head h1 { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 600; }
.breadcrumb { font-size: .82rem; color: var(--ink-soft); margin-top: .4rem; }
.breadcrumb a:hover { color: var(--coral); }

/* fiche produit */
.product-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  padding: 3rem 0;
}
.product-detail .pd-image {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 1/1; background: var(--cream-2);
}
.product-detail .pd-info h1 { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 600; }
.pd-cat { color: var(--coral); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.pd-price { font-size: 1.8rem; font-weight: 700; margin: 1rem 0; }
.pd-desc { color: var(--ink-soft); margin-bottom: 1.5rem; }
.pd-stock { font-size: .88rem; margin-bottom: 1.5rem; }
.pd-stock.in { color: #5a9367; }
.pd-stock.out { color: #c0594b; }
.qty-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 30px; overflow: hidden; }
.qty-control button { background: none; border: none; padding: .6rem 1rem; cursor: pointer; font-size: 1.1rem; color: var(--ink); }
.qty-control input { width: 44px; text-align: center; border: none; outline: none; font-family: var(--font-body); font-weight: 600; }

/* panier */
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.5rem; padding: 3rem 0; align-items: start; }
.cart-item {
  display: grid; grid-template-columns: 80px 1fr auto auto; gap: 1.2rem;
  align-items: center; padding: 1.2rem 0; border-bottom: 1px solid var(--line);
}
.cart-item .ci-thumb { width: 80px; height: 80px; border-radius: 14px; overflow: hidden; background: var(--cream-2); }
.cart-item .ci-name { font-weight: 600; }
.cart-item .ci-price { color: var(--ink-soft); font-size: .88rem; }
.cart-item .ci-remove { color: var(--ink-soft); font-size: .8rem; cursor: pointer; }
.cart-item .ci-remove:hover { color: #c0594b; }
.summary-box {
  background: var(--white); border-radius: var(--radius); padding: 1.8rem;
  box-shadow: var(--shadow-soft); position: sticky; top: 100px;
}
.summary-box h3 { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: 1.2rem; }
.summary-line { display: flex; justify-content: space-between; padding: .5rem 0; color: var(--ink-soft); }
.summary-line.total { border-top: 1px solid var(--line); margin-top: .6rem; padding-top: 1rem; font-weight: 700; color: var(--ink); font-size: 1.2rem; }
.free-ship-hint { font-size: .82rem; background: var(--pink-soft); color: var(--coral-dark); padding: .7rem 1rem; border-radius: 12px; margin: 1rem 0; }

/* checkout */
.checkout-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; padding: 3rem 0; align-items: start; }
.form-card { background: #fff; border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-soft); }
.form-card h3 { font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .35rem; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: .75rem .9rem; font-family: var(--font-body); outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--coral); }
#payment-element { margin: 1rem 0; }
#card-demo-note { font-size: .8rem; color: var(--ink-soft); background: var(--cream-2); padding: .8rem 1rem; border-radius: 12px; margin: 1rem 0; }

/* confirmation */
.confirm-wrap { text-align: center; padding: 4rem 0; }
.confirm-wrap .check {
  width: 80px; height: 80px; border-radius: 50%; background: var(--coral-soft);
  color: var(--coral-dark); display: grid; place-items: center; margin: 0 auto 1.5rem;
  font-size: 2rem;
}
.confirm-wrap h1 { font-family: var(--font-serif); font-size: 2.2rem; margin-bottom: .5rem; }
.confirm-ref { display: inline-block; background: var(--cream-2); padding: .5rem 1.2rem; border-radius: 30px; font-weight: 700; margin: 1rem 0; }

/* flash */
.flash { padding: .9rem 1.2rem; border-radius: 12px; margin: 1rem auto; width: min(1180px,92vw); font-weight: 500; }
.flash.success { background: #e7f1e6; color: #4e7d57; }
.flash.error { background: #f7e0db; color: #b8523f; }

/* empty state */
.empty-state { text-align: center; padding: 4rem 0; color: var(--ink-soft); }
.empty-state .big { font-size: 3rem; margin-bottom: 1rem; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-image { order: -1; }
  .features .container { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(2) { border-right: none; }
  .collections-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid, .shop-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter .container { grid-template-columns: 1fr; text-align: center; }
  .nl-form { justify-content: center; }
  .product-detail, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .main-nav { display: none; }
}
@media (max-width: 560px) {
  .products-grid, .shop-grid, .collections-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .topbar { font-size: .72rem; }
}

/* ============================================================
   PROMOS, ÉTOILES, GALERIE, AVIS (v2)
   ============================================================ */

/* badge promo */
.product-tag.promo { background: #d2724d; }
.price-promo { color: var(--coral-dark); font-weight: 700; }
.price-old { color: var(--ink-soft); text-decoration: line-through; font-size: .85em; font-weight: 500; margin-left: .3rem; }
.promo-badge { display: inline-block; background: var(--pink-soft); color: var(--coral-dark); font-size: .8rem; font-weight: 700; padding: 3px 12px; border-radius: 20px; margin-left: .6rem; vertical-align: middle; }

/* étoiles */
.stars { display: inline-flex; gap: 1px; line-height: 1; }
.stars .star { color: #e2d5c8; font-size: 1rem; }
.stars .star.on { color: var(--gold); }
.stars .star.half { background: linear-gradient(90deg, var(--gold) 50%, #e2d5c8 50%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* galerie fiche produit */
.pd-gallery { display: flex; flex-direction: column; gap: .8rem; }
.pd-image { position: relative; }
.pd-thumbs { display: flex; gap: .6rem; flex-wrap: wrap; }
.pd-thumb { width: 70px; height: 70px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--cream-2); }
.pd-thumb.active { border-color: var(--coral); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pd-rating { display: flex; align-items: center; gap: .6rem; margin: .5rem 0; }
.pd-rating .rating-meta { font-size: .85rem; color: var(--ink-soft); }

/* avis */
.reviews-section { border-top: 1px solid var(--line); }
.reviews-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2.5rem; align-items: start; }
.review-item { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.review-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .4rem; }
.review-item p { color: var(--ink); margin-bottom: .3rem; }
.review-date { font-size: .78rem; color: var(--ink-soft); }
.review-form-card { background: var(--white); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-soft); position: sticky; top: 100px; }
.review-form-card h3 { font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 1rem; }

/* input étoiles (sélection inversée via flex-direction) */
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { display: none; }
.star-input label { font-size: 1.6rem; color: #e2d5c8; cursor: pointer; transition: color .15s; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: var(--gold); }

@media (max-width: 980px) {
  .reviews-layout { grid-template-columns: 1fr; }
  .review-form-card { position: static; }
}

/* ============================================================
   BANDEAU PROMO, COUPONS, CATÉGORIE MISE EN AVANT (v3)
   ============================================================ */

/* bandeau promotionnel */
.promo-banner {
  text-align: center;
  padding: 9px 16px;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.promo-banner a { text-decoration: underline; }

/* coupon dans le panier */
.coupon-box { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.coupon-form { display: flex; gap: .5rem; }
.coupon-form input {
  flex: 1; border: 1px solid var(--line); border-radius: 30px;
  padding: .6rem 1rem; font-family: var(--font-body); outline: none;
  text-transform: uppercase;
}
.coupon-form input:focus { border-color: var(--coral); }
.coupon-applied {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--pink-soft); color: var(--coral-dark);
  padding: .6rem 1rem; border-radius: 12px; font-size: .88rem;
}
.coupon-applied form { margin: 0; }
.coupon-remove {
  background: none; border: none; color: var(--coral-dark);
  text-decoration: underline; cursor: pointer; font-size: .82rem;
}

/* catégorie mise en avant */
.featured-category { }
.featured-cat-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 1.8rem; gap: 1rem;
}
.featured-cat-label {
  display: inline-block;
  color: var(--coral); font-weight: 700; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: .2rem;
}
