/* ============================================================
   RESPONSIVE — Butter is Better
   Breakpoints: mobile <768, tablet 768-1023, desktop 1024+
   ============================================================ */

/* ─── MOBILE (<768px) ─────────────────────────────────────────── */

@media (max-width: 1024px) {
  .hero {
    padding: 8rem 1.5rem 3rem;
    justify-content: flex-end;
  }

  .hero__features {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-top: 2rem;
  }

  .hero__scroll-hint { display: none; }

  .hero-stats { padding: 1.8rem 1.5rem; }
}

@media (max-width: 767px) {
  :root {
    --header-h: 64px;
  }

  /* Hero mobile : bloc texte+bouton+mentions centré verticalement */
  .hero {
    padding: calc(var(--header-h) + 1.25rem) 1.2rem 5rem;
    justify-content: center;
  }

  /* Image fondant remontée au niveau du titre (object-fit: cover conservé) */
  .hero__bg-img {
    object-position: 70% 20%;
  }

  .hero__content {
    gap: 1rem;
  }

  /* Overlay mobile : sombre à gauche (texte), clair à droite (dessert) */
  .hero__overlay {
    background:
      linear-gradient(to right,
        rgba(61,20,24,0.94) 0%,
        rgba(61,20,24,0.88) 30%,
        rgba(61,20,24,0.55) 55%,
        rgba(61,20,24,0.15) 80%,
        rgba(61,20,24,0) 100%),
      linear-gradient(to bottom,
        rgba(61,20,24,0) 70%,
        rgba(61,20,24,0.4) 100%);
  }

  .hero__content {
    max-width: 80%;
    margin: 0 auto 0 0;
  }

  .hero__eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.32em;
    gap: 0.7rem;
    white-space: normal;
    flex-wrap: nowrap;
    line-height: 1.5;
  }

  .hero__eyebrow-line { width: 32px; }

  .hero__eyebrow span:not(.hero__eyebrow-line) {
    max-width: 200px;
    white-space: normal;
  }

  .hero__cta {
    width: 100%;
    max-width: 100%;
  }

  .hero__cta .btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .hero__title {
    font-size: clamp(3rem, 13vw, 4.5rem);
  }

  .hero__tagline { font-size: 1.1rem; }

  .hero__features {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    padding-top: 1.5rem;
    margin-top: 2rem;
  }

  .hero__feature svg { width: 20px; height: 20px; }
  .hero__feature span { font-size: 0.58rem; }

  /* Stats band mobile : grille 2x2 */
  .hero-stats { padding: 0; }
  .hero-stats__inner { grid-template-columns: 1fr 1fr; }
  .hero-stats__item {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 0.5rem;
  }
  .hero-stats__item:nth-child(2n) { border-right: none; }
  .hero-stats__item:nth-last-child(-n+2) { border-bottom: none; }

  .hero__cta .btn {
    width: 100%;
    justify-content: center;
  }

  /* Stats band — 2x2 grid */
  .stats-inner {
    grid-template-columns: 1fr 1fr;
  }
  .stat-item:nth-child(2n) { border-right: none; }
  .stat-item:nth-child(n+3) { border-top: 1px solid var(--border); }

  /* Concept */
  .concept-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .concept-figures {
    grid-template-columns: 1fr 1fr;
  }

  /* Showcase */
  .section--showcase { padding: 5rem 0; }
  .showcase-grid { grid-template-columns: 1fr; }
  .showcase-header { flex-direction: column; align-items: flex-start; gap: 1.5rem; }

  /* Events */
  .events-grid { grid-template-columns: 1fr; }

  /* Testimonials */
  .testimonials-grid { grid-template-columns: 1fr; }

  /* Locate */
  .locate-grid { grid-template-columns: 1fr; gap: 3rem; }

  /* Process */
  .process-steps { grid-template-columns: 1fr 1fr; gap: 1.5rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }

  /* Modal */
  .modal-grid { grid-template-columns: 1fr; }
  .modal-img { aspect-ratio: 4/3; height: auto; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-content { padding: 2rem; }

  /* Guarantees */
  .guarantees-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }

  /* Shop */
  .shop-hero { padding: calc(var(--header-h) + 1.25rem) 0 0.75rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

  /* Card footer mobile : prix au-dessus, bouton pleine largeur en dessous */
  .product-card__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem 0.7rem;
  }
  .product-card__add {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.5rem 0.5rem;
  }

  /* Drawer mobile pleine largeur */
  .product-drawer { width: 100vw; }

  /* Cart */
  .cart-panel { width: 100vw; }

  /* Section padding */
  .section--concept,
  .section--showcase,
  .section--events,
  .section--testimonials,
  .section--locate,
  .section--process,
  .section--event-types,
  .section--event-form,
  .section--how-it-works,
  .section--faq {
    padding: 5rem 0;
  }

  /* Events page */
  .event-types-grid { grid-template-columns: 1fr; }
  .how-steps { flex-direction: column; align-items: center; }
  .how-step__arrow { display: none; }
  .events-hero { padding: 8rem 0 3rem; }
  .event-form-grid { grid-template-columns: 1fr; gap: 3rem; }
  .form-row { grid-template-columns: 1fr; }

  /* Header nav hidden on mobile */
  .header-nav { display: none; }
  .menu-toggle { display: flex; }
}

/* ─── TABLET (768–1023px) ─────────────────────────────────────── */

@media (min-width: 768px) and (max-width: 1023px) {

  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .guarantees-grid { grid-template-columns: repeat(2, 1fr); }
  .event-form-grid { grid-template-columns: 1fr; gap: 3rem; }
  .event-types-grid { grid-template-columns: 1fr 1fr; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .footer-grid > *:first-child { grid-column: 1 / -1; }

  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2n) { border-right: none; }
  .stat-item:nth-child(n+3) { border-top: 1px solid var(--border); }

  .concept-grid { gap: 4rem; }
  .locate-grid { gap: 3rem; }

  .hero__title { font-size: clamp(3rem, 8vw, 5rem); }
}

/* ─── DESKTOP (1024px+) ───────────────────────────────────────── */

@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .showcase-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1400px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ─── HAMBURGER visible only mobile ──────────────────────────── */

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  #mobile-menu { display: none !important; }
}

/* ─── TOUCH DEVICES ───────────────────────────────────────────── */

/* Masque le curseur custom sur tout appareil à pointeur grossier (touch) */
@media (pointer: coarse), (hover: none) {
  .cursor,
  .cursor-ring {
    display: none !important;
  }
  body {
    cursor: auto !important;
  }
}

/* ─── iOS SAFE AREA ───────────────────────────────────────────── */

@supports (padding: max(0px)) {
  .cart-panel {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }
  #site-header {
    padding-top: env(safe-area-inset-top);
  }
}

/* ─── REDUCED MOTION ──────────────────────────────────────────── */

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

  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; }

  .hero__bg-img { animation: none !important; }
  .hero__scroll-hint { animation: none !important; }
}

/* ─── PRINT ───────────────────────────────────────────────────── */

@media print {
  #site-header,
  #loader,
  .cursor,
  .cursor-ring,
  .scroll-progress,
  .cart-overlay,
  .cart-panel,
  #mobile-menu,
  .marquee-band,
  .hero__scroll-hint {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero__bg, .hero__overlay { display: none; }
  .hero { min-height: auto; padding: 2rem; background: white; color: black; }
}
