/**
 * DARNEO Mobile UX – Mobile-only overrides (max-width: 767px)
 * Desktop remains completely unchanged. All rules scoped to @media (max-width: 767px).
 */

@media (max-width: 767px) {

  /* ─── 1. Hero section mobile optimization ─── */
  #hero-visual-intro {
    min-height: 70vh;
  }

  #hero-visual-intro .hero-badge {
    margin-bottom: 0.75rem !important;
    font-size: 0.7rem !important;
  }

  #hero-visual-intro h1 {
    font-size: 1.5rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.75rem !important;
  }

  #hero-visual-intro .hero-cta-primary,
  #hero-visual-intro a[href="devis.html"] {
    min-height: 52px !important;
    padding: 0.875rem 1.25rem !important;
    font-size: 0.9375rem !important;
  }

  /* ─── 2. Sticky mobile CTA bar – content padding & safe area ─── */
  /* Reserve space so footer/content is not hidden behind the sticky bar */
  body:has(#mobile-sticky-cta) {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
  }

  .mobile-sticky-cta-bar {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  /* ─── 3. Mobile navigation ─── */
  #mobileMenu {
    padding: 1rem 1.25rem 1.5rem;
  }

  #mobileMenu a {
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
  }

  #mobileMenu a[href="devis.html"] {
    min-height: 52px;
    padding: 1rem 1.25rem !important;
    font-size: 1rem !important;
  }

  /* ─── 4. Mobile services / prestations ─── */
  /* Trust elements – compact on mobile (first grid in #services) */
  #services > div > .grid {
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  #services > div > .grid > div {
    padding: 0.875rem !important;
    font-size: 0.875rem;
  }

  #services > div > .grid [class*="text-2xl"],
  #services > div > .grid [class*="text-3xl"],
  #services > div > .grid [class*="text-4xl"] {
    font-size: 1.25rem;
  }

  /* Prestations section header – compact on mobile */
  #prestations-title {
    font-size: 1.125rem !important;
    margin-bottom: 0.5rem !important;
  }

  /* Prestations grid – stacked cards */
  #services .grid > .group {
    padding: 1rem 1.25rem !important;
  }

  /* ─── 5. Mobile process section – abrégé ─── */
  #processus-header {
    margin-bottom: 1.5rem !important;
  }

  #processus-header h2 {
    font-size: 1.375rem !important;
  }

  #processus-header .processus-header-desc {
    display: none;
  }

  #processus .processus-steps {
    gap: 0.75rem;
  }

  #processus .processus-step-desc {
    display: none;
  }

  #processus .processus-step-ul {
    margin-top: 0;
  }

  #processus .bg-surface-light,
  #processus .bg-surface-dark {
    padding: 1rem 1.25rem !important;
  }

  #processus .processus-steps > div > div:first-child {
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    min-height: 2.25rem !important;
    font-size: 0.875rem !important;
    margin-bottom: 0.5rem !important;
  }

  #processus .bg-surface-light h3,
  #processus .bg-surface-dark h3 {
    margin-bottom: 0.25rem !important;
    font-size: 0.9375rem !important;
  }

  #processus .text-center.mt-10 {
    margin-top: 1.5rem !important;
  }

  /* ─── 5b. Pourquoi DARNÉO – header compact sur mobile ─── */
  #pourquoi-darneo-header {
    margin-bottom: 1.5rem !important;
  }

  #pourquoi-darneo-header h2 {
    font-size: 1.375rem !important;
    margin-bottom: 0.5rem !important;
  }

  #pourquoi-darneo-header .pourquoi-darneo-desc {
    display: none;
  }

  #pourquoi-darneo-header .pourquoi-darneo-desc + div {
    margin-top: 0.75rem !important;
  }

  /* Pourquoi DARNÉO engagement cards ─── */
  #pourquoi-darneo .grid {
    gap: 0.75rem;
  }

  #pourquoi-darneo .engagement-card {
    padding: 1rem !important;
  }

  /* ─── 6. Mobile project showcase ─── */
  #projets .grid {
    gap: 1rem;
  }

  #projets article > div:last-child {
    margin-top: 0.75rem;
  }

  /* ─── 7. Mobile testimonials ─── */
  #temoignages .grid > div {
    padding: 1.25rem 1.5rem !important;
  }

  /* ─── 8. Mobile forms ─── */
  #quote-form input,
  #quote-form select,
  #quote-form textarea {
    min-height: 52px !important;
    padding: 0.875rem 1rem !important;
  }

  #quote-form textarea {
    min-height: 120px;
  }

  #quote-form button[type="submit"] {
    min-height: 52px !important;
  }

  /* ─── 9. Mobile spacing & readability ─── */
  main#accueil .max-w-7xl,
  section .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  #accueil {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  h2 {
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }

  /* Main hero cards (accueil) – cleaner mobile rhythm */
  #accueil .grid.grid-cols-2 {
    gap: 0.5rem;
  }

  #accueil .grid.grid-cols-2 .group {
    padding: 1rem !important;
  }

  /* ─── 10. Mobile footer – design épuré et centré ─── */
  #main-footer {
    padding: 1.5rem 1rem !important;
  }

  #main-footer .max-w-6xl > div:first-child {
    align-items: center !important;
    text-align: center !important;
    gap: 1.5rem !important;
  }

  #main-footer .order-1 p {
    max-width: 16rem;
    margin-left: auto;
    margin-right: auto;
  }

  #main-footer nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.25rem 1rem !important;
  }

  #main-footer nav a {
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  #main-footer .order-3 {
    align-items: center !important;
    text-align: center !important;
  }

  #main-footer .order-3 a {
    justify-content: center !important;
  }

  #main-footer .mt-10.pt-6 {
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1rem !important;
  }

  /* ─── 11. FAQ mobile ─── */
  #faq details {
    padding: 1rem 1.25rem !important;
  }

  #faq summary {
    font-size: 0.9375rem;
  }
}
