/* ===========================================================
   Capybara-land.com — feuille de style globale
   Mobile-first. Palette issue du logo : brun chocolat + corail.
   =========================================================== */

:root {
  --brun:        #4a2c1a;
  --brun-clair:  #7a5a40;
  --corail:      #f4806e;
  --corail-fonce:#e56853;
  --creme:       #faf4ea;
  --creme-fonce: #f1e6d4;
  --blanc:       #ffffff;
  --texte:       #3a2a1d;
  --gris:        #8a7a68;
  --vert-ok:     #4caf6e;
  --ombre:       0 4px 24px rgba(74,44,26,.10);
  --rayon:       16px;
  --max:         1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--texte);
  background: var(--creme);
  line-height: 1.6;
  font-size: 17px;            /* gros texte, lisible mobile */
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-weight: 800; line-height: 1.2; color: var(--brun); }
h1 { font-size: clamp(1.8rem, 6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 4vw, 1.4rem); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 18px; }
.center { text-align: center; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--corail); color: #fff; border: 0;
  padding: 15px 28px; border-radius: 50px;
  font-size: 1.05rem; font-weight: 800; cursor: pointer;
  transition: transform .12s ease, background .15s ease;
  font-family: inherit;
}
.btn:hover { background: var(--corail-fonce); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--block { width: 100%; }
.btn--ghost { background: #fff; color: var(--brun); border: 2px solid var(--creme-fonce); }
.btn--ghost:hover { background: var(--creme-fonce); }
.btn--lg { padding: 18px 34px; font-size: 1.15rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ===========================================================
   Barre d'annonces défilante
   =========================================================== */
.announce {
  background: var(--brun); color: #fff;
  font-weight: 700; font-size: .92rem;
  overflow: hidden; white-space: nowrap;
}
.announce__track {
  display: inline-block; padding: 9px 0;
  animation: marquee 22s linear infinite;
}
.announce__track span { padding: 0 38px; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.announce:hover .announce__track { animation-play-state: paused; }

/* ===========================================================
   En-tête / navigation
   =========================================================== */
.header {
  background: var(--blanc);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 14px rgba(74,44,26,.07);
}
.header__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; max-width: var(--max); margin: 0 auto; gap: 12px;
}
.header__logo img { height: 46px; width: auto; }
.header__nav { display: flex; gap: 26px; }
.header__nav a { font-weight: 700; color: var(--brun); }
.header__nav a:hover { color: var(--corail); }
.header__actions { display: flex; align-items: center; gap: 14px; }

.cart-btn { position: relative; background: none; border: 0; cursor: pointer; font-size: 1.5rem; }
.cart-btn__count {
  position: absolute; top: -6px; right: -8px;
  background: var(--corail); color: #fff;
  font-size: .68rem; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.burger { background: none; border: 0; font-size: 1.6rem; cursor: pointer; display: none; }

/* Menu mobile */
.mobile-menu {
  display: none; flex-direction: column; gap: 4px;
  background: #fff; padding: 8px 18px 16px;
  border-top: 1px solid var(--creme-fonce);
}
.mobile-menu a { padding: 12px 4px; font-weight: 700; border-bottom: 1px solid var(--creme); }
.mobile-menu.open { display: flex; }

@media (max-width: 760px) {
  .header__nav { display: none; }
  .burger { display: block; }
}

/* ===========================================================
   Hero
   =========================================================== */
.hero {
  background: linear-gradient(180deg, var(--creme-fonce), var(--creme));
  text-align: center; padding: 48px 18px 56px;
}
.hero img { margin: 0 auto 18px; max-width: 220px; }
.hero__banner { max-width: 560px !important; width: 100%; border-radius: var(--rayon); }
.hero p { font-size: 1.15rem; color: var(--brun-clair); max-width: 520px; margin: 12px auto 26px; }

/* ===========================================================
   Catégories / grilles produits
   =========================================================== */
.section { padding: 44px 0; }
.section__title { text-align: center; margin-bottom: 28px; }

.cat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.cat-card {
  background: #fff; border-radius: var(--rayon); overflow: hidden;
  box-shadow: var(--ombre); text-align: center; padding-bottom: 18px;
  transition: transform .15s ease;
}
.cat-card:hover { transform: translateY(-4px); }
.cat-card img { aspect-ratio: 1/1; object-fit: cover; }
.cat-card h3 { margin: 14px 0 4px; }

.product-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.p-card {
  background: #fff; border-radius: var(--rayon); overflow: hidden;
  box-shadow: var(--ombre); transition: transform .15s ease;
  display: flex; flex-direction: column;
}
.p-card:hover { transform: translateY(-4px); }
.p-card__img { aspect-ratio: 1/1; object-fit: cover; background: var(--creme-fonce); }
.p-card__body { padding: 14px 14px 18px; display: flex; flex-direction: column; flex: 1; }
.p-card__name { font-weight: 800; font-size: 1.05rem; margin-bottom: 4px; }
.p-card__desc { font-size: .9rem; color: var(--gris); margin-bottom: 10px; flex: 1; }
.p-card__price { font-size: 1.25rem; font-weight: 800; color: var(--corail); }
.p-card__price s { color: var(--gris); font-size: .95rem; font-weight: 600; margin-right: 6px; }
.badge-promo {
  display: inline-block; background: var(--corail); color: #fff;
  font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 20px;
  margin-bottom: 8px;
}

@media (max-width: 520px) {
  .cat-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .p-card__name { font-size: .95rem; }
}

/* Lecteur vidéo blog — ratio 16:9 responsive, pleine largeur */
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16/9;
  border-radius: var(--rayon); overflow: hidden; margin: 32px 0;
  box-shadow: var(--ombre); background: #000;
}
/* Déborde des marges de l'article pour un rendu plus immersif sur desktop */
@media (min-width: 820px) {
  .video-embed { width: calc(100% + 160px); margin-left: -80px; }
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-soon {
  background: var(--creme-fonce); border-radius: var(--rayon);
  padding: 40px 20px; text-align: center; margin: 24px 0;
}
.hidden { display: none; }

/* Badges de disponibilité produit */
.stock-badge {
  display: inline-block; font-weight: 700; font-size: .9rem;
  padding: 6px 14px; border-radius: 20px; margin: 4px 0 14px;
}
.stock-badge--out { background: #fdecea; color: #c0392b; }
.stock-badge--low { background: #fff3cd; color: #8a6d00; }
/* Pastille "Épuisé" sur les cartes produit */
.p-card { position: relative; }
.badge-epuise {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: #c0392b; color: #fff; font-weight: 700;
  font-size: .72rem; padding: 3px 9px; border-radius: 14px;
}
.p-card--out .p-card__img { opacity: .55; }

/* Icône capybara — silhouette PNG transparente, colorée via currentColor (mask).
   .capy = taille du texte courant ; modificateurs pour les usages décoratifs. */
.capy {
  display: inline-block;
  width: 1.15em; height: 1.15em;
  vertical-align: -0.2em;
  background-color: currentColor;
  -webkit-mask: url(/assets/logo/capybara.png) center/contain no-repeat;
  mask: url(/assets/logo/capybara.png) center/contain no-repeat;
}
.capy--lg { width: 3.6rem; height: 3.6rem; vertical-align: middle; }
.capy--xl { width: 4.6rem; height: 4.6rem; vertical-align: middle; }

/* Bloc "Notre histoire" en accueil */
.story-block {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 30px; align-items: center;
}
.story-block img { border-radius: var(--rayon); box-shadow: var(--ombre); }
@media (max-width: 760px) {
  .story-block { grid-template-columns: 1fr; }
}

/* ===========================================================
   Page produit
   =========================================================== */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; padding: 30px 0; }
.gallery__main { border-radius: var(--rayon); aspect-ratio: 1/1; object-fit: cover; background: var(--creme-fonce); }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery__thumbs img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 10px;
  cursor: pointer; border: 2px solid transparent;
}
.gallery__thumbs img.active { border-color: var(--corail); }

.product__price { font-size: 1.9rem; font-weight: 800; color: var(--corail); margin: 10px 0; }
.product__shortdesc { color: var(--brun-clair); margin-bottom: 18px; }

.sizes { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.size-opt {
  min-width: 46px; padding: 9px 12px; border: 2px solid var(--creme-fonce);
  border-radius: 10px; background: #fff; cursor: pointer; font-weight: 700;
}
.size-opt.active { border-color: var(--corail); background: var(--corail); color: #fff; }

/* Bundles */
.bundles { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.bundle {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--creme-fonce); border-radius: 12px;
  padding: 12px 14px; cursor: pointer; background: #fff; position: relative;
}
.bundle.active { border-color: var(--corail); background: #fff7f5; }
.bundle__radio {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--creme-fonce);
  flex-shrink: 0;
}
.bundle.active .bundle__radio { border-color: var(--corail); background: var(--corail); box-shadow: inset 0 0 0 3px #fff; }
.bundle__info { flex: 1; }
.bundle__qty { font-weight: 800; }
.bundle__save { font-size: .82rem; color: var(--vert-ok); font-weight: 700; }
.bundle__price { text-align: right; font-weight: 800; }
.bundle__price s { display: block; color: var(--gris); font-size: .82rem; font-weight: 600; }
.bundle__tag {
  position: absolute; top: -10px; right: 12px;
  background: var(--corail); color: #fff; font-size: .68rem; font-weight: 800;
  padding: 2px 8px; border-radius: 20px;
}

/* Accordéon (FAQ, infos) */
.accordion { border-top: 1px solid var(--creme-fonce); }
.accordion__item { border-bottom: 1px solid var(--creme-fonce); }
.accordion__head {
  width: 100%; text-align: left; background: none; border: 0;
  padding: 16px 4px; font-size: 1rem; font-weight: 800; color: var(--brun);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  font-family: inherit;
}
.accordion__body { display: none; padding: 0 4px 16px; color: var(--brun-clair); }
.accordion__item.open .accordion__body { display: block; }
.accordion__head .chev { transition: transform .2s; }
.accordion__item.open .chev { transform: rotate(180deg); }

@media (max-width: 760px) {
  .product { grid-template-columns: 1fr; gap: 20px; }
  .product__price { font-size: 1.6rem; }
}

/* ===========================================================
   Panier
   =========================================================== */
.cart-line {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px;
  align-items: center; background: #fff; border-radius: 12px;
  padding: 12px; margin-bottom: 10px; box-shadow: var(--ombre);
}
.cart-line img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-ctrl button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--creme-fonce);
  background: #fff; font-size: 1.1rem; cursor: pointer; font-weight: 800;
}
.cart-summary {
  background: #fff; border-radius: var(--rayon); padding: 20px;
  box-shadow: var(--ombre); position: sticky; top: 90px;
}
.cart-summary .line { display: flex; justify-content: space-between; margin: 8px 0; }
.cart-summary .total { font-size: 1.3rem; font-weight: 800; border-top: 2px solid var(--creme-fonce); padding-top: 12px; margin-top: 12px; }
.freeship-bar { background: var(--creme-fonce); border-radius: 20px; height: 10px; overflow: hidden; margin: 8px 0; }
.freeship-bar > div { background: var(--vert-ok); height: 100%; transition: width .3s; }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
@media (max-width: 800px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}

/* ---------- Formulaires ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 5px; font-size: .95rem; }
.field input, .field select {
  width: 100%; padding: 13px 14px; border: 2px solid var(--creme-fonce);
  border-radius: 10px; font-size: 1rem; font-family: inherit;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--corail); }
.field--error input { border-color: #e74c3c; }
.field__err { color: #e74c3c; font-size: .82rem; margin-top: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.phone-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.checkbox-line { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.checkbox-line input { width: 20px; height: 20px; margin-top: 2px; }

/* ===========================================================
   Suivi de colis — timeline
   =========================================================== */
.timeline { display: flex; justify-content: space-between; margin: 26px 0; position: relative; }
.timeline::before {
  content: ''; position: absolute; top: 19px; left: 8%; right: 8%;
  height: 3px; background: var(--creme-fonce); z-index: 0;
}
.tl-step { text-align: center; flex: 1; position: relative; z-index: 1; }
.tl-step__dot {
  width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 8px;
  background: var(--creme-fonce); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.tl-step.done .tl-step__dot { background: var(--vert-ok); color: #fff; }
.tl-step.current .tl-step__dot { background: var(--corail); color: #fff; }
.tl-step__label { font-size: .82rem; font-weight: 700; }

/* ===========================================================
   Pied de page
   =========================================================== */
.footer { background: var(--brun); color: #f0e3d4; margin-top: 50px; padding: 40px 0 24px; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 26px; }
.footer h4 { color: #fff; margin-bottom: 10px; font-size: 1rem; }
.footer a { display: block; padding: 4px 0; color: #e0d0bd; font-size: .92rem; }
.footer a:hover { color: var(--corail); }
.footer__social { display: flex; gap: 12px; margin-top: 14px; }
.footer__social a.social-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; margin: 0;
  box-sizing: border-box;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.footer__social a.social-btn:hover {
  background: var(--corail); border-color: var(--corail);
  color: #fff; transform: translateY(-2px);
}
.footer__social a.social-btn svg {
  width: 22px; height: 22px; display: block; flex: 0 0 auto;
}
.footer__bottom {
  text-align: center; margin-top: 28px; padding-top: 18px;
  border-top: 1px solid #5e4030; font-size: .82rem; color: #c4ad96;
}
.newsletter-form { display: flex; gap: 8px; margin-top: 8px; }
.newsletter-form input { flex: 1; padding: 11px; border-radius: 8px; border: 0; font-family: inherit; }

/* ---------- Drawer panier ---------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw);
  background: var(--creme); z-index: 100; transform: translateX(100%);
  transition: transform .25s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 18px; border-bottom: 1px solid var(--creme-fonce); }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px; }
.drawer__foot { padding: 16px; border-top: 1px solid var(--creme-fonce); background: #fff; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--brun); color: #fff; padding: 13px 22px; border-radius: 50px;
  font-weight: 700; z-index: 200; transition: transform .25s ease; box-shadow: var(--ombre);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Utilitaires ---------- */
.muted { color: var(--gris); }
.mt { margin-top: 18px; }
.legal { max-width: 760px; }
.legal h2 { margin: 26px 0 10px; }
.legal p, .legal li { margin-bottom: 10px; }
.legal ul { padding-left: 22px; }
.trust-row { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-top: 20px; }
.trust-row div { font-size: .9rem; font-weight: 700; color: var(--brun-clair); }
