/**
 * DeweAgroPast — Responsive site public
 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
}

.container,
.container-fluid {
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
}

/* Navbar */
@media (max-width: 991.98px) {
  .navbar .navbar-collapse {
    max-height: min(70vh, 480px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
  }
  .navbar .dropdown-menu {
    border: none;
    box-shadow: none;
    padding-left: 12px;
  }
}

@media (max-width: 576px) {
  .navbar-brand span,
  .navbar-brand .brand-text {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .announcement-band {
    font-size: 0.68rem;
    line-height: 1.35;
    padding: 6px 10px;
  }
}

/* Grilles contenu CMS */
@media (max-width: 768px) {
  .products-grid,
  .shop-grid,
  .blog-grid,
  .activities-grid,
  .news-grid,
  .gallery-masonry {
    gap: 14px;
  }
  .product-card,
  .news-card,
  .activity-card {
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  }
  .section-padding {
    padding: 48px 0;
  }
  .stats-mega-grid {
    grid-template-columns: 1fr;
  }
  .mission-stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .cart-panel,
  .cart-drawer,
  #cartOffcanvas {
    max-width: 100vw;
  }
}

/* Boutons flottants + safe area */
.whatsapp-float,
.back-to-top {
  bottom: calc(16px + env(safe-area-inset-bottom, 0));
}
.back-to-top {
  bottom: calc(76px + env(safe-area-inset-bottom, 0));
}

/* Tableaux éventuels */
.table-responsive {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Formulaires contact */
@media (max-width: 576px) {
  .contact-form-card,
  .contact-info-card {
    padding: 18px 16px;
  }
  .cf-row {
    gap: 12px;
  }
}

/* Très petits écrans */
@media (max-width: 380px) {
  .hero-badge-row .badge,
  .hero-stat-chip {
    font-size: 0.62rem;
    padding: 5px 8px;
  }
  .btn-hero-primary,
  .btn-hero-secondary,
  .btn-primary-custom,
  .btn-outline-custom {
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aos-animate {
    opacity: 1 !important;
    transform: none !important;
  }
}
