/* ============================================================
   ELLOHOST — responsive.css
   Breakpoints mobile/tablette
   ============================================================ */

/* ---- LARGE (≤1200px) ---- */
@media (max-width: 1200px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .footer-brand { grid-column: 1 / -1; }
  .hero-visual { display: none; }
  .post-layout { grid-template-columns: 1fr 280px; }
}

/* ---- TABLET (≤1024px) ---- */
@media (max-width: 1024px) {
  /* Nav */
  .nav-burger { display: flex; }
  .nav-right { display: none; }

  .nav-menu {
    position: fixed;
    top: 72px; right: 0;
    width: 100%;
    max-width: 380px;
    height: calc(100vh - 72px);
    background: var(--card);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.5rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }
  .nav-menu.open {
    transform: translateX(0);
    display: flex;
  }
  .nav-overlay { display: block; pointer-events: none; }
  .nav-overlay.active { pointer-events: all; }

  .nav-link { padding: 0.75rem 0.5rem; font-size: 1rem; border-radius: 0; border-bottom: 1px solid var(--border); }
  .nav-arrow { display: none; }

  /* Mega menus become accordion on mobile */
  .mega-panel {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: all !important;
    min-width: auto;
    box-shadow: none;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 0.5rem;
    display: none;
    padding-top: 0 !important; /* reset desktop padding */
  }
  .has-mega.mega-open .mega-panel { display: block; }
  .has-mega::after { display: none; } /* no bridge needed on mobile */
  .mega-panel::before { display: none; }
  .mega-inner { flex-direction: column; gap: 0.5rem; padding: 0.75rem; }
  .mega-col + .mega-col { border-left: none; border-top: 1px solid var(--border); padding-left: 0; margin-left: 0; padding-top: 0.75rem; margin-top: 0.25rem; }

  /* Mobile nav CTA */
  .nav-menu::after {
    content: '';
    display: block;
    flex: 1;
  }
  .nav-mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
  }

  /* Sections */
  section { padding: 4rem 0; }
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { position: static; }
  .archive-layout { grid-template-columns: 1fr; }
  .archive-sidebar { display: none; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}

/* ---- TABLET SMALL (≤768px) ---- */
@media (max-width: 768px) {
  /* Typography */
  h1 { font-size: clamp(2rem, 7vw, 2.8rem); }
  h2 { font-size: clamp(1.5rem, 5vw, 2rem); }

  /* Hero */
  .hero { padding: 120px 0 60px; min-height: auto; }
  .hero-stat-bar { gap: 1rem; }
  .hero-stat-sep { display: none; }
  .hero-badge { font-size: 0.72rem; }

  /* Sections */
  section { padding: 3.5rem 0; }
  .section-header { margin-bottom: 2.5rem; }
  .cta-section { padding: 4rem 0; }

  /* Grids */
  .agents-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
  .features-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); gap: 1.5rem; padding: 2.5rem 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }

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

  /* Posts */
  .posts-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .post-hero-image { height: 250px; }
  .post-meta-bar { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  /* FAQ */
  .faq-list { margin-top: 2rem; }

  /* Domain search */
  .domain-search-form { flex-direction: column; border-radius: var(--radius); overflow: visible; background: transparent; border: none; gap: 0.75rem; }
  .domain-search-input { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1.25rem; }
  .domain-search-btn { border-radius: var(--radius); width: 100%; }
  .domain-search-form:focus-within { border: none; }

  /* Cookie */
  #cookie-banner { left: 1rem; right: 1rem; bottom: 1rem; }

  /* Allinone */
  .allinone-card { padding: 2rem 1.5rem; }
  .allinone-features { gap: 1rem; }

  /* Hero stat */
  .hero-stat-bar { flex-direction: column; gap: 1rem; border-top: none; padding-top: 0; }

  /* CTA btns */
  .cta-btns { flex-direction: column; align-items: center; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}

/* ---- MOBILE (≤480px) ---- */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .container-sm { padding: 0 1rem; }

  .nav-container { padding: 0 1rem; }

  .hero-title { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .hero-actions .btn-primary-lg,
  .hero-actions .btn-ghost-lg { width: 100%; justify-content: center; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 2rem; }

  .pricing-grid { max-width: 100%; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-socials { gap: 0.4rem; }
  .social-link .social-count { display: none; }

  .allinone-price { font-size: 2.8rem; }

  .post-layout { gap: 2rem; }
  .post-hero-image { height: 200px; }

  /* Trust strip */
  .trust-strip-inner { gap: 1.5rem; }

  /* 404 */
  .error-404-number { font-size: 6rem; }
  .error-404 h1 { font-size: 1.5rem; }
  .error-404-btns { flex-direction: column; }

  /* Mega menu mobile */
  .nav-menu { max-width: 100%; border-left: none; }

  /* Breadcrumb */
  .breadcrumb { flex-wrap: wrap; gap: 0.3rem; }
}

/* ---- BOUTONS FLOTTANTS (mobile) ---- */
@media (max-width: 480px) {
  .whatsapp-float { bottom: 1.25rem; right: 1.25rem; width: 50px; height: 50px; }
  .whatsapp-tooltip { display: none; }
  /* RDV au-dessus de WhatsApp : 1.25rem + 50px + 0.6rem ≈ 4.75rem */
  .rdv-float { bottom: 4.75rem; right: 1.25rem; width: 50px; height: 50px; }
  .rdv-tooltip { display: none; }
}

/* ---- HERO AGENTS ---- */
@media (max-width: 600px) {
  .hero-agents-row { gap: 0.4rem; }
  .hero-agents-label { width: 100%; }
}

/* ---- VIDEO ---- */
@media (max-width: 768px) {
  .video-embed { border-radius: var(--radius); }
}

/* ---- PRINT ---- */
@media print {
  .site-header, .site-footer, .nav-burger, .nav-overlay,
  .cookie-banner, .hero-scroll, #cookie-banner { display: none !important; }
  body { background: white; color: black; }
  a { color: black; }
  .hero { min-height: auto; padding: 2rem 0; }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-group > * {
    opacity: 1;
    transform: none;
  }
}
