:root {
  --cream: #ffffff;
  --cream-soft: #ffffff;
  --card: #ffffff;
  --forest: #1b4332;
  --forest-dark: #0f2e22;
  --forest-light: #2d6a4f;
  --sage: #e9f0e6;
  --gold: #c9a24b;
  --ink: #111111;
  --ink-muted: #222222;
}

html {
  scroll-behavior: smooth;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50% { transform: translateX(-50%) translateY(7px); opacity: 1; }
}

@keyframes poster-float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-14px) scale(1.025); }
}

@keyframes logo-pulse {
  0%, 100% { transform: translateY(0px); opacity: 1; filter: drop-shadow(0 2px 12px rgba(201,162,75,0.18)); }
  50% { transform: translateY(-6px); opacity: 0.88; filter: drop-shadow(0 6px 20px rgba(201,162,75,0.38)); }
}

body {
  background-color: #ffffff;
  color: var(--ink);
  font-family: "Inter", sans-serif;
}

h1, h2, h3, h4, .font-heading {
  font-family: "Playfair Display", serif;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Soft glow blobs (subtle, light theme) */
.glow-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.glow-sage { background: radial-gradient(circle, var(--sage) 0%, transparent 70%); }
.glow-gold { background: radial-gradient(circle, var(--gold) 0%, transparent 70%); opacity: 0.25; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}
.animate-float { animation: float 6s ease-in-out infinite; }

@keyframes float-logo {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}
.animate-float-logo { animation: float-logo 3s ease-in-out infinite; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -30px) scale(1.06); }
  66%       { transform: translate(-25px, 18px) scale(0.94); }
}
.animate-drift       { animation: drift 16s ease-in-out infinite; }
.animate-drift-slow  { animation: drift 22s ease-in-out infinite reverse; }
.animate-drift-med   { animation: drift 12s ease-in-out infinite 4s; }

/* Hero full-bleed gradient overlay */
.hero-gradient {
  background: linear-gradient(
    to right,
    rgba(15,46,34,0.96) 0%,
    rgba(15,46,34,0.80) 38%,
    rgba(15,46,34,0.30) 62%,
    transparent 78%
  );
}

/* Card */
.card {
  background: var(--card);
  border: 1px solid rgba(27, 67, 50, 0.08);
  box-shadow: 0 4px 20px rgba(27, 67, 50, 0.06);
}

/* Pack selector */
.pack-option {
  cursor: pointer;
  border: 2px solid rgba(27, 67, 50, 0.12);
  background: var(--card);
  transition: border-color 200ms ease, transform 150ms ease;
  position: relative;
}
.pack-option:hover { transform: translateY(-2px); }
.pack-option.selected {
  border-color: var(--forest);
  background: var(--sage);
}
.pack-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--cream);
}

/* Sticky CTA (toutes tailles) */
#sticky-cta {
  transform: translateY(100%);
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
}
#sticky-cta.visible { transform: translateY(0); }

/* FAQ */
.faq-chevron { transition: transform 250ms ease; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream-soft); }
::-webkit-scrollbar-thumb { background: var(--forest-light); border-radius: 999px; border: 2px solid var(--cream-soft); }
::-webkit-scrollbar-thumb:hover { background: var(--forest); }

.gallery-img { transition: transform 500ms ease; }
.gallery-img:hover { transform: scale(1.04); }

/* Avatar initials (placeholder reviewers, no fabricated photos) */
.avatar-initial {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--forest);
  background: var(--sage);
  flex-shrink: 0;
}

/* Comparison table */
.compare-row > div {
  border-bottom: 1px solid rgba(27, 67, 50, 0.08);
}
.compare-row:last-child > div { border-bottom: none; }

/* Giant faded wordmark in footer */
.footer-wordmark {
  font-family: "Playfair Display", serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 10vw, 5rem);
  line-height: 1;
  color: rgba(247, 245, 238, 0.06);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Simple illustrative chart bars */
.bar-chart-bar {
  background: linear-gradient(180deg, var(--gold), var(--forest));
  border-radius: 6px 6px 0 0;
}

/* "3D" product presentation: cut-out image, tilt + floating shadow */
.product-3d-stage {
  perspective: 1400px;
}
.product-3d {
  transform: rotateX(8deg) rotateY(-12deg);
  filter: drop-shadow(0 35px 30px rgba(15, 46, 34, 0.28));
  transition: transform 450ms ease, filter 450ms ease;
  will-change: transform;
}
.product-3d-stage:hover .product-3d {
  transform: rotateX(3deg) rotateY(-4deg) scale(1.03);
  filter: drop-shadow(0 45px 35px rgba(15, 46, 34, 0.32));
}
.product-3d-floor {
  background: radial-gradient(ellipse at center, rgba(15, 46, 34, 0.22) 0%, transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
  .product-3d { transition: none; }
}

/* Bento gallery */
.bento-cell {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--cream);
}

.bento-img {
  width: 100%;
  height: 108%;
  margin-top: -4%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.bento-cell:hover .bento-img {
  transform: scale(1.06);
}

.bento-tag {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 0.3ch;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(10,30,20,0.78) 0%, rgba(10,30,20,0.12) 55%, transparent 100%);
  color: var(--cream);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 450ms ease;
  pointer-events: none;
}

.bento-cell:hover .bento-tag {
  background: linear-gradient(to top, rgba(10,30,20,0.90) 0%, rgba(10,30,20,0.22) 60%, transparent 100%);
}

@media (hover: none) {
  .bento-img { height: 100%; margin-top: 0; }
}

/* Lifestyle bento grid */
.lifestyle-cell { cursor: pointer; }

.lifestyle-img {
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1), filter 700ms ease;
  will-change: transform;
}
.lifestyle-cell:hover .lifestyle-img {
  transform: scale(1.08);
  filter: brightness(1.06);
}

.lifestyle-caption {
  display: inline-block;
  background: rgba(10, 28, 20, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 13px;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), background 400ms ease;
}
.lifestyle-cell:hover .lifestyle-caption {
  transform: translateY(-8px);
  background: rgba(10, 28, 20, 0.72);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE OVERHAUL COMPLET
   ══════════════════════════════════════════════════════════════════ */

/* ── Base globale ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* Évite tout débordement horizontal sur toutes tailles */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ── Mobile (< 768px) ────────────────────────────────────────────── */
@media (max-width: 767px) {

  /* ─ Espacement général ─ */
  section, main, header, footer { max-width: 100%; overflow-x: hidden; }

  /* ─ Touch targets ─ */
  button,
  a[href],
  input[type="submit"],
  select,
  label[for] {
    min-height: 44px;
  }
  /* Exception : petits éléments purement décoratifs ou inline */
  .fiche-thumb, .caract-thumb,
  .produit-dot, .caract-dot,
  .star-btn { min-height: unset; }

  /* ─ Typography responsive ─ */
  h1, h2 { word-break: break-word; hyphens: auto; }

  /* ─ Header / nav ─ */
  header .max-w-7xl { padding-left: 1rem; padding-right: 1rem; }

  /* ─ Hero bannière ─ */
  .hero-banner-card {
    min-height: 380px !important;
  }
  .hero-banner-bg {
    background-size: 52% !important;
    background-position: right 0% center !important;
  }
  .hero-banner-text {
    padding: 1.5rem !important;
    min-height: 380px !important;
    max-width: 60% !important;
  }
  /* Dégradé côté gauche pour lisibilité du texte sur l'image */
  .hero-banner-text::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(245,243,238,1) 0%, rgba(245,243,238,0.92) 60%, transparent 100%);
    z-index: -1;
    border-radius: inherit;
  }

  /* ─ Hero CTAs sous bannière ─ */
  .hero-banner-card + div { padding-left: 0.25rem; padding-right: 0.25rem; }

  /* ─ Grille produit (image + info) → colonne ─ */
  /* (déjà géré par md:grid-cols-2, OK sur mobile) */

  /* ─ Miniatures produit → scroll horizontal ─ */
  #thumbs-produit,
  #thumbs-caract {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start !important;
    padding: 2px 4px 8px !important;
    gap: 8px !important;
  }
  #thumbs-produit::-webkit-scrollbar,
  #thumbs-caract::-webkit-scrollbar { display: none; }

  .fiche-thumb,
  .caract-thumb {
    flex-shrink: 0 !important;
    width: 60px !important;
    height: 60px !important;
  }

  /* ─ Pill tabs (Produit / Caractéristiques / Vidéo) ─ */
  .ptab { padding: 7px 14px !important; font-size: 0.75rem !important; }

  /* ─ Lifestyle bento grid → colonne flex ─ */
  .lifestyle-bento-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .lifestyle-bento-grid .lifestyle-cell {
    height: 220px !important;
    width: 100% !important;
  }
  /* Masquer les 2 petites cellules centre pour alléger le mobile */
  .lifestyle-bento-grid .lifestyle-cell:nth-child(3),
  .lifestyle-bento-grid .lifestyle-cell:nth-child(4) {
    display: none;
  }

  /* ─ Mode d'emploi (étapes) ─ */
  /* Déjà grid-cols-1 sur mobile grâce à la classe Tailwind, OK */

  /* ─ Comparaison VS ─ */
  /* Le badge VS entre les deux colonnes passe en centré sur mobile, OK */

  /* ─ Avis : note synthèse ─ */
  .rating-summary {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  /* ─ Garanties → 2 colonnes sur mobile ─ */
  /* (sm:grid-cols-2 déjà géré par Tailwind) */

  /* ─ FAQ ─ */
  .faq-question { padding: 1rem 0; min-height: 52px; }

  /* ─ Pack options ─ */
  .pack-option { width: 100%; }

  /* ─ Footer wordmark ─ */
  .footer-wordmark { display: none; }

  /* ─ Footer grid → espacements réduits ─ */
  footer .max-w-7xl { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  footer .gap-10 { gap: 1.5rem !important; }

  /* ─ Checkout steps → masquer labels, garder numéros ─ */
  .checkout-steps .step > span:last-child { display: none; }
  .checkout-steps .step-divider { max-width: 18px; min-width: 8px; }
  .checkout-steps { gap: 4px !important; }

  /* ─ Paiement : carte visuelle ─ */
  .card-visual { max-width: 100% !important; }

  /* ─ Comparaison : scroll interne si nécessaire ─ */
  .compare-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ─ Images produit full-width ─ */
  #fiche-zone .aspect-square,
  #ptab-produit.aspect-square,
  #ptab-caract.aspect-square { border-radius: 1rem; }

  /* ─ Boutons hero CTA pleine largeur ─ */
  .hero-cta-row { flex-direction: column !important; width: 100%; }
  .hero-cta-row a { width: 100%; justify-content: center; }
}

/* ── Petits téléphones (< 480px) ────────────────────────────────── */
@media (max-width: 479px) {

  /* ─ Titres ─ */
  .font-heading.text-3xl { font-size: 1.6rem !important; }
  .font-heading.text-4xl { font-size: 1.8rem !important; }
  .font-heading.text-5xl { font-size: 2rem !important; }

  /* ─ Sections : padding horizontal réduit ─ */
  .max-w-6xl.px-6,
  .max-w-5xl.px-6,
  .max-w-3xl.px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }

  /* ─ Avis : note box ─ */
  .rating-summary-inner {
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100%;
  }
  .rating-summary-bars { min-width: 0 !important; width: 100% !important; }

  /* ─ Icônes paiement (fiche produit) ─ */
  .payment-icons-row { flex-wrap: wrap; gap: 4px !important; }
  .payment-icons-row svg { height: 16px !important; }
}

/* ── Très petits écrans (< 375px) ───────────────────────────────── */
@media (max-width: 374px) {

  /* ─ Hero bannière ─ */
  .hero-banner-text { max-width: 65% !important; }
  .hero-banner-bg { background-size: 48% !important; background-position: right 0% center !important; }

  /* ─ Titres ─ */
  .text-4xl { font-size: 1.5rem !important; line-height: 1.2; }
  h1.text-3xl { font-size: 1.45rem !important; }

  /* ─ Pill tabs ─ */
  .ptab { padding: 6px 9px !important; font-size: 0.68rem !important; }

  /* ─ Spacing ─ */
  .px-6 { padding-left: 0.875rem !important; padding-right: 0.875rem !important; }
  .p-8 { padding: 1.25rem !important; }
  .gap-10 { gap: 1rem !important; }

  /* ─ Pack stepper ─ */
  #qty-minus, #qty-plus { width: 38px !important; height: 38px !important; }

  /* ─ CTA bouton ─ */
  button[data-buy-button], a[data-buy-button] { font-size: 0.85rem !important; }
}

/* ── Tablette portrait (768px – 1023px) ─────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {

  /* ─ Navbar ─ */
  nav.hidden.sm\:flex a { padding: 0.4rem 0.55rem; font-size: 0.75rem; }

  /* ─ Hero bannière ─ */
  .hero-banner-bg { background-size: 50% !important; }

  /* ─ Lifestyle bento : 2 lignes ─ */
  .lifestyle-bento-grid {
    grid-template-rows: 280px 180px 180px !important;
  }
}

/* ── Réduction de mouvement ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .product-3d { transition: none; }
}
