/* =========================================================
   ADAPTATION AUX ÉCRANS PLUS PETITS
   Ces règles prennent le relais quand l'espace devient limité.
========================================================= */

@media (max-width: 900px) {
  :root { --section-spacing: 4rem; }

  .hero-container, .about-container { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .direction-principles { grid-template-columns: 1fr; }
  .hero-media { max-width: 680px; }
  .hero-media video { aspect-ratio: 16 / 10; }
  .about-container { gap: var(--space-7); text-align: center; }
  .about-photo { order: -1; }
  .about-photo-image { width: 220px; }
}

@media (max-width: 700px) {
  /* Des nappes plus petites sur mobile pour garder une lecture nette. */
  body::before,
  body::after { width: 135vw; height: 27rem; opacity: 0.34; filter: blur(24px); }

  .container { width: min(100% - 2rem, var(--content-width)); }
  .header-container { min-height: 4.25rem; }
  .logo { gap: 0.5rem; font-size: 1rem; }
  .logo img { width: 1.8rem; height: 1.8rem; }
  .main-nav { gap: var(--space-4); font-size: 0.78rem; }
  .hero-actions { gap: var(--space-3); }
  .projects-grid, .skills-grid, .direction-principles { grid-template-columns: 1fr; }
  .skill-icon { width: 2rem; height: 2rem; }
  .timeline { padding-left: 3.5rem; }
  .timeline::before { left: 1.4rem; }
  .timeline-circle { left: -3.5rem; width: 2.8rem; height: 2.8rem; font-size: 0.75rem; }
  .contact-item { align-items: flex-start; flex-direction: column; }
  .footer-container, .footer-meta { align-items: flex-start; flex-direction: column; }
  .footer-container { gap: var(--space-5); }
}

@media (max-width: 450px) {
  :root { --section-spacing: 3rem; }

  .main-nav a:nth-child(2), .main-nav a:nth-child(3), .main-nav a:nth-child(4), .main-nav a:nth-child(5) { display: none; }
  .hero-content h1 { font-size: 2.6rem; }
  .hero-actions .button { width: 100%; }
}
