/* ============================================
   MAISON DU PEPS — Responsive (Mobile-First)
   v2.0 — Updated for new design elements
   ============================================ */

/* --- Mobile Base (0-767px) --- */
@media (max-width: 767px) {
  /* Mobile Navigation */
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: var(--color-bg-pure);
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--header-height) + var(--space-lg)) var(--space-lg) var(--space-lg);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    overflow-y: auto;
    z-index: 1000;
  }

  .nav.open {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-link {
    display: block;
    padding: var(--space-md) 0;
    font-size: var(--text-base);
  }

  .nav-link::after {
    display: none;
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0 0 var(--space-sm) var(--space-md);
    display: none;
  }

  .nav-item.dropdown-open .nav-dropdown {
    display: block;
  }

  .nav-dropdown a {
    padding: var(--space-xs) 0;
  }

  .menu-toggle {
    display: flex;
  }

  .lang-switcher {
    margin-top: var(--space-md);
  }

  /* Mobile Overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .nav-overlay.active {
    display: block;
  }

  /* Hero */
  .hero {
    min-height: 70vh;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .hero p {
    font-size: var(--text-base);
  }

  .hero-tagline {
    font-size: var(--text-xs);
    letter-spacing: 2px;
    padding: 6px 16px;
  }

  /* Page Hero */
  .page-hero {
    min-height: 300px;
  }

  .page-hero h1 {
    font-size: var(--text-2xl);
  }

  /* Typography */
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }

  /* Sections */
  .section {
    padding: var(--space-2xl) 0;
  }

  /* Section wave separators — reduce on mobile */
  .section-bg::before {
    top: -20px;
    height: 20px;
  }
  .section-bg::after {
    bottom: -20px;
    height: 20px;
  }
  .footer::before {
    top: -15px;
    height: 15px;
  }

  /* Cards */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* Contact Grid — stack on mobile */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .contact-card {
    padding: var(--space-md);
  }

  /* Info Block */
  .info-block {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Tech Grid */
  .tech-grid,
  .tech-grid.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: var(--space-lg);
  }

  .tech-image img {
    height: 250px;
  }

  /* Pillars */
  .pillars-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .pillar {
    padding: var(--space-md);
  }

  .pillar-icon {
    width: 60px;
    height: 60px;
  }

  .pillar-icon svg {
    width: 28px;
    height: 28px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .footer-logo {
    font-size: var(--text-2xl);
  }

  /* Sticky CTA Mobile */
  .sticky-cta {
    display: block;
  }

  /* Add bottom padding to body to account for sticky CTA */
  body.has-sticky-cta {
    padding-bottom: 70px;
  }

  /* Service Grid */
  .service-grid {
    grid-template-columns: 1fr;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-item {
    padding-left: calc(var(--space-xl) + var(--space-md));
  }

  .feature-item::before {
    font-size: var(--text-3xl);
    left: var(--space-md);
    top: var(--space-md);
  }

  /* Buttons */
  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
  }

  /* FAQ */
  .faq-question {
    font-size: var(--text-base);
  }

  /* Team stat */
  .team-stat {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Tablet (768px+) --- */
@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 80vh;
  }

  .hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
  }
}

/* --- Desktop (1024px+) --- */
@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pillars-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero {
    min-height: 90vh;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
  }

  .page-hero h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
  }

  .sticky-cta {
    display: none !important;
  }
}

/* --- Large Desktop (1280px+) --- */
@media (min-width: 1280px) {
  .container {
    padding: 0 var(--space-lg);
  }

  h1 { font-size: var(--text-5xl); }
}

/* --- Print Styles --- */
@media print {
  .header,
  .sticky-cta,
  .menu-toggle,
  .nav-overlay {
    display: none !important;
  }

  .hero {
    min-height: auto;
    margin-top: 0;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  .fade-in, .slide-left, .slide-right {
    opacity: 1;
    transform: none;
  }
}
