/* ============================================
   CORRECTIONS RESPONSIVE COMPLÈTES
   Tous les breakpoints optimisés
   ============================================ */

/* ============================================
   MOBILE PETIT (320px - 374px)
   ============================================ */

@media (max-width: 374px) {
  /* Container - padding réduit */
  .container {
    padding-left: max(1rem, env(safe-area-inset-left)) !important;
    padding-right: max(1rem, env(safe-area-inset-right)) !important;
  }

  /* Hero - textes adaptés */
  .hero-title {
    font-size: 1.2rem !important;
    line-height: 1.2 !important;
  }

  .hero-subtitle {
    font-size: 1rem !important;
  }

  .hero-phone-cta {
    font-size: 1.25rem !important;
    padding: 1rem 1.5rem !important;
  }

  .hero-copy-card {
    padding: 1.5rem !important;
  }

  /* Boutons - padding réduit */
  .btn,
  .btn-primary,
  .btn-secondary {
    padding: 0.875rem 1.5rem !important;
    font-size: 0.9375rem !important;
  }

  /* Section titles */
  .section-title {
    font-size: 1.625rem !important;
  }

  /* Footer mobile */
  .footer-brand .logo {
    font-size: 1.25rem !important;
  }

  .footer-tel {
    font-size: 1.125rem !important;
  }
}

/* ============================================
   MOBILE STANDARD (375px - 767px)
   ============================================ */

@media (min-width: 375px) and (max-width: 767px) {
  /* Hero optimisé */
  .hero-copy-card {
    padding: 1.75rem !important;
    border-radius: 20px !important;
  }

  .hero-title {
    font-size: 1.35rem !important;
  }

  .hero-subtitle {
    font-size: 1rem !important;
  }

  .hero-phone-cta {
    font-size: 1.375rem !important;
    padding: 1.125rem 2rem !important;
  }

  /* Grilles - 1 colonne */
  .premium-why-grid,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Cards - espacement */
  .premium-why-card,
  .card {
    padding: 1.5rem !important;
  }

  /* Tableaux - scroll horizontal */
  .home-price-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .home-price-table {
    min-width: 500px !important;
  }

  /* Footer - espacement */
  .footer-inner {
    padding: 2.5rem 0 2rem !important;
    row-gap: 2rem !important;
  }

  .footer-nav {
    max-width: 100% !important;
  }
}

/* ============================================
   MOBILE LARGE (768px)
   ============================================ */

@media (max-width: 768px) {
  /* Hero CTA row - stack vertical */
  .hero-cta-row {
    flex-direction: column !important;
    gap: 0.875rem !important;
  }

  .hero-cta {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Boutons - full width */
  .btn,
  .btn-primary,
  .btn-secondary,
  .cta-block-btn {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
  }

  /* Sections - padding réduit */
  .section {
    padding: clamp(2.5rem, 6vw, 4rem) 0 !important;
  }

  /* Section titles */
  .section-title {
    font-size: clamp(1.75rem, 5vw, 2.25rem) !important;
    margin-bottom: 1.5rem !important;
  }

  .section-intro {
    font-size: 1rem !important;
    margin-bottom: 2rem !important;
  }

  /* Cards grid */
  .premium-why-grid {
    gap: 1.5rem !important;
  }

  /* CTA blocks */
  .cta-block {
    padding: 2rem 1.5rem !important;
  }

  .cta-block-title {
    font-size: 1.625rem !important;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }

  .footer-brand,
  .footer-nav,
  .footer-contact {
    text-align: center !important;
  }

  /* Sticky bar mobile */
  .sticky-bar-mobile {
    display: flex !important;
  }
}

/* ============================================
   TABLETTE PORTRAIT (769px - 900px)
   ============================================ */

@media (min-width: 769px) and (max-width: 900px) {
  /* Container */
  .container {
    padding-left: max(2rem, env(safe-area-inset-left)) !important;
    padding-right: max(2rem, env(safe-area-inset-right)) !important;
  }

  /* Hero */
  .hero-copy-card {
    padding: 2.25rem !important;
  }

  .hero-title {
    font-size: 1.65rem !important;
  }

  .hero-phone-cta {
    font-size: 1.5rem !important;
  }

  /* Grilles - 2 colonnes */
  .premium-why-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }

  /* Footer - 2 colonnes */
  .footer-inner {
    grid-template-columns: 1fr 1fr !important;
    column-gap: 2.5rem !important;
    row-gap: 2.5rem !important;
  }

  .footer-brand {
    grid-column: 1 / -1 !important;
    text-align: center !important;
  }

  .footer-nav {
    grid-column: 1 !important;
  }

  .footer-contact {
    grid-column: 2 !important;
    text-align: right !important;
  }
}

/* ============================================
   TABLETTE PAYSAGE (901px - 1024px)
   ============================================ */

@media (min-width: 901px) and (max-width: 1024px) {
  /* Container */
  .container {
    max-width: 960px !important;
    padding-left: max(2.5rem, env(safe-area-inset-left)) !important;
    padding-right: max(2.5rem, env(safe-area-inset-right)) !important;
  }

  /* Hero */
  .hero-copy-card {
    padding: 2.5rem !important;
  }

  .hero-title {
    font-size: 1.85rem !important;
  }

  .hero-phone-cta {
    font-size: 1.625rem !important;
  }

  /* Grilles - 2-3 colonnes */
  .premium-why-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }

  /* Footer - grille adaptée */
  .footer-inner {
    grid-template-columns: minmax(200px, 260px) repeat(2, 1fr) minmax(220px, 280px) !important;
    column-gap: 2.5rem !important;
  }

  .footer-inner > * + * {
    padding-left: 2rem !important;
  }
}

/* ============================================
   DESKTOP PETIT (1025px - 1279px)
   ============================================ */

@media (min-width: 1025px) and (max-width: 1279px) {
  /* Container */
  .container {
    max-width: 1140px !important;
  }

  /* Hero */
  .hero-title {
    font-size: 1.95rem !important;
  }

  .hero-phone-cta {
    font-size: 1.75rem !important;
  }

  /* Grille « Pourquoi nous » : 4 cartes sur une ligne (desktop) */
  .premium-why-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: clamp(1rem, 2vw, 1.75rem) !important;
  }

  /* Footer - 5 colonnes */
  .footer-inner {
    grid-template-columns: minmax(220px, 280px) repeat(3, minmax(130px, 1fr)) minmax(240px, 300px) !important;
    column-gap: 2.5rem !important;
  }
}

/* ============================================
   DESKTOP STANDARD (1280px - 1439px)
   ============================================ */

@media (min-width: 1280px) and (max-width: 1439px) {
  /* Container */
  .container {
    max-width: 1280px !important;
  }

  /* Hero */
  .hero-title {
    font-size: 2.05rem !important;
  }

  .hero-phone-cta {
    font-size: 1.85rem !important;
  }

  .premium-why-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: clamp(1.25rem, 2.2vw, 2rem) !important;
  }

  /* Footer - 5 colonnes optimisées */
  .footer-inner {
    grid-template-columns: minmax(220px, 280px) repeat(3, minmax(130px, 1fr)) minmax(240px, 300px) !important;
    column-gap: 3rem !important;
  }
}

/* ============================================
   DESKTOP LARGE (1440px+)
   ============================================ */

@media (min-width: 1440px) {
  /* Container */
  .container {
    max-width: 1320px !important;
  }

  /* Hero */
  .hero-title {
    font-size: 2.15rem !important;
  }

  .hero-phone-cta {
    font-size: 1.85rem !important;
    padding: 1.25rem 2.5rem !important;
  }

  .premium-why-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: clamp(1.5rem, 2.5vw, 2.75rem) !important;
  }

  /* Footer - 5 colonnes spacieuses */
  .footer-inner {
    grid-template-columns: minmax(240px, 300px) repeat(3, minmax(140px, 1fr)) minmax(260px, 320px) !important;
    column-gap: 3.5rem !important;
  }

  .footer-inner > * + * {
    padding-left: 2.5rem !important;
  }
}

/* ============================================
   CORRECTIONS SPÉCIFIQUES PAR COMPOSANT
   ============================================ */

/* Hero carousel - responsive images */
@media (max-width: 768px) {
  .hero-carousel-img {
    object-fit: cover !important;
    object-position: center !important;
  }

  .hero-carousel-overlay {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.6) 50%,
      rgba(0, 0, 0, 0.75) 100%
    ) !important;
  }
}

/* Navigation mobile */
@media (max-width: 900px) {
  .nav-overlay {
    width: 100% !important;
  }

  .nav-overlay-panel {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Formulaires responsive */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .form-group {
    width: 100% !important;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px !important; /* Évite zoom iOS */
  }
}

/* Tableaux responsive */
@media (max-width: 768px) {
  .home-price-table th,
  .home-price-table td {
    padding: 1rem 0.75rem !important;
    font-size: 0.875rem !important;
  }

  .home-price-table th:first-child,
  .home-price-table td:first-child {
    padding-left: 1rem !important;
  }

  .home-price-table th:last-child,
  .home-price-table td:last-child {
    padding-right: 1rem !important;
  }
}

/* Cards responsive */
@media (max-width: 768px) {
  .premium-why-card__icon {
    width: 48px !important;
    height: 48px !important;
  }

  .premium-why-card__icon .icon {
    width: 24px !important;
    height: 24px !important;
  }

  .premium-why-card h3 {
    font-size: 1.25rem !important;
  }

  .premium-why-card p {
    font-size: 0.9375rem !important;
  }
}

/* Top bar responsive */
@media (max-width: 768px) {
  .top-bar {
    padding: 0.625rem 1rem !important;
  }

  .top-bar-tagline {
    font-size: 0.75rem !important;
  }

  .top-bar-tel {
    font-size: 0.875rem !important;
  }

  .top-bar-cta-phone-num {
    display: none !important;
  }
}

/* Header mobile */
@media (max-width: 900px) {
  .mobile-header {
    padding: 0.875rem 1rem !important;
  }

  .mobile-header-logo-text {
    font-size: 1.125rem !important;
  }
}

/* Sticky bar mobile - toujours visible */
@media (max-width: 768px) {
  .sticky-bar-mobile {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    display: flex !important;
    gap: 0.625rem !important;
    padding: 0.875rem 1rem !important;
    padding-bottom: max(0.875rem, env(safe-area-inset-bottom)) !important;
    background: rgba(13, 14, 18, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
  }

  .sticky-bar-mobile-btn {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    min-height: 54px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    border: none !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    padding: 0.875rem 1rem !important;
    white-space: nowrap !important;
  }

  .sticky-bar-mobile-btn--call {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%) !important;
    color: var(--btn-text) !important;
    box-shadow: 0 2px 12px rgba(212, 212, 216, 0.25) !important;
  }

  .sticky-bar-mobile-btn--call:active {
    transform: scale(0.98) !important;
  }

  .sticky-bar-mobile-btn--whatsapp {
    background: var(--whatsapp) !important;
    color: #fff !important;
    box-shadow: 0 2px 12px rgba(37, 211, 102, 0.25) !important;
  }

  .sticky-bar-mobile-btn--whatsapp:active {
    transform: scale(0.98) !important;
  }

  .sticky-bar-mobile-icon,
  .sticky-bar-mobile-icon-svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
  }

  .sticky-bar-mobile-label {
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
  }

  /* Ajouter padding-bottom au body pour éviter que le contenu soit caché */
  body {
    padding-bottom: 88px !important;
  }
}

/* Mobile petit - texte réduit */
@media (max-width: 374px) {
  .sticky-bar-mobile-btn {
    font-size: 0.9375rem !important;
    padding: 0.75rem 0.75rem !important;
  }

  .sticky-bar-mobile-label {
    font-size: 0.9375rem !important;
  }

  .sticky-bar-mobile-icon,
  .sticky-bar-mobile-icon-svg {
    width: 18px !important;
    height: 18px !important;
  }
}

/* Desktop - cacher sticky bar */
@media (min-width: 769px) {
  .sticky-bar-mobile {
    display: none !important;
  }

  body {
    padding-bottom: 0 !important;
  }
}

/* ============================================
   CORRECTIONS ORIENTATION
   ============================================ */

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-copy-card {
    padding: 1.5rem !important;
  }

  .hero-title {
    font-size: 1.2rem !important;
    margin-bottom: 0.5rem !important;
  }

  .hero-subtitle {
    font-size: 0.875rem !important;
    margin-bottom: 1rem !important;
  }

  .hero-phone-cta {
    font-size: 1.125rem !important;
    padding: 0.875rem 1.75rem !important;
    margin-bottom: 1rem !important;
  }

  .hero-cta {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9375rem !important;
  }
}

/* ============================================
   PRINT - Optimisation impression
   ============================================ */

@media print {
  .top-bar,
  .mobile-header,
  .nav-overlay,
  .sticky-bar-mobile,
  .carousel-btn,
  .hero-carousel-dots {
    display: none !important;
  }

  .hero-carousel-overlay {
    opacity: 0.3 !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .container {
    max-width: 100% !important;
  }
}

/* ============================================
   ACCESSIBILITÉ - Préférences utilisateur
   ============================================ */

/* Réduire les animations si demandé */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-phone-cta {
    animation: none !important;
  }
}

/* Mode sombre système */
@media (prefers-color-scheme: dark) {
  /* Le site est déjà en dark mode, pas de changement nécessaire */
}

/* Contraste élevé */
@media (prefers-contrast: high) {
  .btn-primary,
  .hero-phone-cta {
    border: 2px solid #fff !important;
  }

  .btn-secondary {
    border: 2px solid var(--gold) !important;
  }
}

/* ============================================
   FIX GLOBAL - Images SEO mobile trop grandes
   ============================================ */
@media (max-width: 767px) {
  .service-image img {
    width: 100% !important;
    max-height: 220px !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}
