/* ============================================================
   RESPONSIVE.CSS — Tablette & Mobile
   ============================================================ */

/* TABLETTE — ≤ 1024px */
@media (max-width: 1024px) {
  .trust-grid-4  { grid-template-columns: repeat(2, 1fr); }
  .methode-grid  { grid-template-columns: repeat(2, 1fr); }
  .footer-main   { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .faq-layout    { grid-template-columns: 1fr; }
  .faq-cta-box   { position: static; }
  .about-grid    { grid-template-columns: 1fr; }
  .about-image   { order: 2; }
  .about-text    { order: 1; }
  .google-reviews-grid { grid-template-columns: 1fr; }
  .home-realisations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* TABLETTE PORTRAIT — ≤ 768px */
@media (max-width: 768px) {
  /* Header mobile : burger | logo | téléphone */
  .site-header {
    z-index: 1200;
    background: color-mix(in srgb, var(--color-dark) 96%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .header-inner {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    gap: .35rem;
    height: 66px;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .nav-toggle {
    display: inline-flex;
    grid-column: 1;
    justify-self: start;
  }
  .logo-link {
    grid-column: 2;
    justify-self: center;
    min-width: 0;
  }
  .logo-link img {
    max-height: 52px;
    max-width: min(190px, 100%);
    object-fit: contain;
  }
  .header-cta {
    grid-column: 3;
    justify-self: end;
    margin-left: 0;
    gap: 0;
  }
  .btn-devis-header { display: none; }
  .header-phone {
    width: 44px;
    height: 44px;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.16);
    background: var(--color-secondary);
    color: var(--color-white);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--color-secondary) 24%, transparent);
  }
  .header-phone:hover { color: var(--color-white); }
  .phone-label { display: none; }
  .phone-icon {
    width: 19px;
    height: 19px;
  }

  .main-nav {
    margin-left: 0;
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background:
      radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--color-secondary) 26%, transparent), transparent 32%),
      linear-gradient(180deg, var(--color-dark) 0%, color-mix(in srgb, var(--color-dark) 86%, var(--color-primary)) 45%, var(--color-primary) 100%);
    z-index: 1100;
    overflow-y: auto;
    padding: 1rem 1rem max(1.25rem, env(safe-area-inset-bottom));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
    -webkit-overflow-scrolling: touch;
min-height: 100vh;
  }
  .main-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  body.nav-open { overflow: hidden; }

  .mobile-menu-head {
    display: grid;
    justify-items: center;
    gap: .35rem;
    padding: .95rem .75rem .75rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    background: rgba(255,255,255,.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  }
  .mobile-menu-head img {
    width: min(220px, 88%);
    height: auto;
  }
  .mobile-menu-head p {
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: center;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: .55rem;
    width: 100%;
  }
  .nav-list > li { width: 100%; }
  .nav-link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: .95rem 1rem;
    font-size: .92rem;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 16px;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.95);
    box-shadow: 0 10px 26px rgba(0,0,0,.14);
  }
  .nav-link::after { display: none; }
  .nav-link:hover,
  .nav-link:focus-visible {
    color: var(--color-white);
    border-color: rgba(255,255,255,.22);
    background: rgba(255,255,255,.11);
    outline: none;
  }
  .nav-link:hover svg { transform: none; }
  .has-dropdown.open > .nav-link {
    border-color: color-mix(in srgb, var(--color-secondary) 58%, transparent);
    background: color-mix(in srgb, var(--color-secondary) 16%, transparent);
  }
  .has-dropdown.open > .nav-link .nav-chevron { transform: rotate(180deg); }

  .dropdown {
    display: none !important;
    position: static;
    min-width: 0;
    margin: .5rem 0 .25rem;
    padding: .45rem;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 16px;
    box-shadow: none;
    background: rgba(0,0,0,.18);
  }
  .has-dropdown.open .dropdown { display: grid !important; gap: .2rem; }
  .dropdown li a {
    padding: .65rem .75rem;
    border-radius: 12px;
    color: rgba(255,255,255,.78);
    font-size: .86rem;
    line-height: 1.25;
  }
  .dropdown li a:hover,
  .dropdown li a:focus-visible {
    background: rgba(255,255,255,.08);
    color: var(--color-white);
    padding-left: .75rem;
    outline: none;
  }

  .mobile-menu-cta {
    display: grid;
    gap: .75rem;
    margin-top: .25rem;
  }
  .mobile-menu-phone,
  .mobile-menu-devis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 18px;
    font-family: var(--font-heading);
    font-weight: 800;
    text-align: center;
  }
  .mobile-menu-phone {
    flex-direction: column;
    gap: .1rem;
    background: rgba(255,255,255,.95);
    color: var(--color-primary);
  }
  .mobile-menu-phone span {
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-muted);
  }
  .mobile-menu-phone strong {
    font-size: 1.05rem;
    letter-spacing: .03em;
  }
  .mobile-menu-devis {
    padding: 0 1rem;
    background: var(--color-secondary);
    color: var(--color-white);
    box-shadow: 0 14px 30px color-mix(in srgb, var(--color-secondary) 26%, transparent);
  }
  .mobile-menu-note {
    display: block;
    margin: 0;
    color: rgba(255,255,255,.64);
    font-size: .82rem;
    text-align: center;
  }

  /* Hero */
  .hero-content {
    grid-template-columns: 1fr !important;
    text-align: center;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .hero-image { display: none; }
  .hero-badges { justify-content: center; }
  .hero-cta { justify-content: center; }

  /* Trust bar */
  .trust-grid { flex-direction: column; gap: 1rem; text-align: center; }
  .trust-item { flex-direction: column; }

  /* Grilles */
  .trust-grid-4  { grid-template-columns: 1fr 1fr; }
  .services-grid-home { grid-template-columns: 1fr 1fr; }
  .services-grid-home:not(.is-expanded) .service-card-home:nth-child(n+9) { display: none; }
  .services-home-more { display: flex; }
  .methode-grid  { grid-template-columns: 1fr 1fr; }
  .zones-grid    { grid-template-columns: 1fr; }
  .depts-grid    { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .villes-grid   { grid-template-columns: 1fr 1fr; }
  .google-review-cards { grid-template-columns: 1fr; }
  .google-rating-card { padding: 2rem; }
  .google-review-actions { justify-content: center; }
  .home-realisations-grid { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer-main { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .footer-legal { justify-content: center; flex-wrap: wrap; gap: 1rem; }
}

/* MOBILE — ≤ 480px */
@media (max-width: 480px) {
  .trust-grid-4   { grid-template-columns: 1fr; }
  .methode-grid   { grid-template-columns: 1fr; }
  .services-grid  { grid-template-columns: 1fr; }
  .services-grid-home { grid-template-columns: 1fr; }
  .services-grid-home:not(.is-expanded) .service-card-home:nth-child(n+9) { display: none; }
  .services-home-more { display: flex; }
  .villes-grid    { grid-template-columns: 1fr; }
  .google-reviews-section,
  .home-realisations-section { padding: 3.5rem 0; }
  .google-rating-card { padding: 1.5rem; }
  .google-review-actions { flex-direction: column; align-items: stretch; }
  .google-review-actions .btn { width: 100%; justify-content: center; }
  .home-realisations-grid { grid-template-columns: 1fr; }
  .home-realisation-card img { height: 220px; }
  .hero-cta       { flex-direction: column; }
  .hero-cta .btn  { width: 100%; justify-content: center; }
  .cta-buttons    { flex-direction: column; }
  .cta-buttons .btn { width: 100%; max-width: 320px; justify-content: center; }
  .page-content   { padding: 2rem 1rem 3rem; }
  h1 { font-size: 2.0rem; }
  .header-inner {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    height: 64px;
    padding-left: .8rem;
    padding-right: .8rem;
  }
  .main-nav { top: 64px; }
  .logo-link img { max-width: min(176px, 100%); max-height: 48px; }
  .nav-toggle,
  .header-phone { width: 42px; height: 42px; border-radius: 13px; }
  h2 { font-size: 1.3rem; }
}

/* PAGE DÉPARTEMENT — responsive blocs SEO locaux */
@media (max-width: 1024px) {
  .dept-local-seo-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .dept-local-seo-card {
    position: static;
  }
}

@media (max-width: 480px) {
  .dept-local-seo-section,
  .dept-services-section,
  .dept-zones-section,
  .dept-method-section,
  .dept-faq-section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
  .dept-local-seo-card {
    padding: 1.5rem;
  }
}
