/* ==========================================================================
   responsive.css — Adaptations mobile / tablette
   Rôle : media queries appliquées après main.css pour ajuster la mise en
   page sur les petits écrans (breakpoints mobile et tablette).
   ========================================================================== */

/* Tablette (<= 900px) */
@media (max-width: 900px) {
  .hero {
    padding: var(--spacing-lg);
  }

  .hero h1 {
    font-size: var(--font-size-lg);
  }

  section {
    padding: var(--spacing-lg);
  }

  .about-layout {
    grid-template-columns: 1fr;
  }
}

/* Project rail + stack sur tablette/mobile (<= 768px) */
@media (max-width: 768px) {
  .project-page {
    padding: 1rem 1rem 2.5rem;
  }

  .project-stage {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: auto;
  }

  .project-focus {
    min-height: 60vh;
    grid-column: auto;
    order: 1;
  }

  .project-thumbs {
    position: static;
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.25rem;
    scroll-snap-type: x proximity;
  }

  .thumb-item {
    scroll-snap-align: start;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
  }
}

/* Mobile (<= 600px) */
@media (max-width: 600px) {
  body {
    padding-top: 72px;
  }

  .site-header {
    padding: 0.75rem 1rem;
  }

  .nav-link,
  .contact-link {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }

  .site-logo img {
    height: 26px;
  }

  .gallery-section {
    min-height: auto;
    padding: 0.75rem 0 3rem;
  }

  .gallery-container {
    gap: 0.75rem;
    padding: 1.5rem 1rem 2.5rem;
    height: 100vh;
    /* Repli mobile (barre d'adresse Safari) — voir le commentaire sur
       .project-page dans main.css pour le détail du problème. */
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .gallery-container::-webkit-scrollbar {
    display: none;
  }

  .gallery-item {
    height: 70vh;
    scroll-snap-align: center;
    margin: 8vh 0;
  }

  .gallery-caption {
    opacity: 1;
  }

  .gallery-item:not(.is--focused) .gallery-caption {
    opacity: 0;
  }

  .gallery-item.is--focused .gallery-caption {
    opacity: 1;
  }

  .hero h1 {
    font-size: var(--font-size-md);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .project-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-caption {
    left: 0.75rem;
    bottom: 0.75rem;
  }

  .about-page {
    padding: 1.25rem 1rem 2.5rem;
  }

  .about-columns {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    width: 100%;
  }

  .about-column {
    justify-content: flex-start;
  }

  .about-column--right {
    padding-top: 0;
  }

  .about-logo {
    width: min(200px, 100%);
  }

  .about-photo {
    height: 60vh;
  }

  .about-back {
    margin-top: 1.5rem;
  }
}

@media (max-width: 360px) {
  .site-header {
    padding: 0.7rem 0.8rem;
    gap: 0.5rem;
  }

  .nav-link,
  .contact-link {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  .site-logo img {
    height: 22px;
  }
}
