/* ============================================
   MY DIAG HABITAT - RESPONSIVE (Mobile-First)
   Breakpoints: 768px (tablet), 1024px (desktop), 1440px (large)
   ============================================ */

/* ----------- TABLET (768px+) ----------- */
@media (min-width: 768px) {
  :root {
    --container-padding: var(--space-6);
    --font-size-5xl: 3.5rem;
  }
  
  /* Navigation desktop */
  .nav-toggle {
    display: none;
  }
  
  .nav-list {
    display: flex !important;
    position: static;
    flex-direction: row;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    gap: var(--space-1);
  }
  
  .nav-list a {
    padding: var(--space-2) var(--space-3);
  }
  
  .nav-list .btn-primary {
    margin-top: 0;
    margin-left: var(--space-2);
  }
  
  .header-contact {
    display: flex;
  }
  
  /* Hero */
  .hero {
    padding: var(--space-20) 0;
  }
  
  .hero h1 {
    font-size: var(--font-size-5xl);
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  /* Grids */
  .services-grid,
  .info-grid,
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Formulaire */
  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }
  
  /* Cookie banner */
  .cookie-content {
    flex-wrap: nowrap;
  }
  
  .cookie-actions {
    flex-wrap: nowrap;
  }
}

/* ----------- DESKTOP (1024px+) ----------- */
@media (min-width: 1024px) {
  :root {
    --container-padding: var(--space-8);
  }
  
  /* Hero layout */
  .hero-content {
    text-align: left;
  }
  
  .hero h1 {
    font-size: 4rem;
  }
  
  .hero-cta {
    justify-content: flex-start;
  }
  
  /* Grids 3 colonnes */
  .services-grid,
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .info-grid {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
  
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
  
  /* Cards hover plus prononcé */
  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
  }
  
  /* Section spacing */
  .section {
    padding: var(--space-16) 0;
  }
}

/* ----------- LARGE DESKTOP (1440px+) ----------- */
@media (min-width: 1440px) {
  :root {
    --container-max: 1400px;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .hero h1 {
    font-size: 4.5rem;
  }
}

/* ----------- HAUTE DENSITÉ (Retina) ----------- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo img,
  .footer-brand img,
  .certifications img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* ----------- MODE SOMBRE (préférence utilisateur) ----------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-border: #334155;
  }
  
  .card {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
  }
  
  .form-input,
  .form-textarea,
  .form-select {
    background: var(--color-bg);
    border-color: var(--color-border);
    color: var(--color-text);
  }
  
  /* Ne pas appliquer le dark mode au header/footer qui ont leurs propres couleurs */
}

/* ----------- RÉDUCTION DE MOUVEMENTS (accessibilité) ----------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .card:hover {
    transform: none;
  }
  
  .back-to-top:hover {
    transform: none;
  }
}