/* ── Hero : grille fluide ─────────────────────────────
   48 % à ≥ 1440 px  →  30 % à ≤ 600 px  (linéaire)    */
.hero-visual {
  width: clamp(30vw, calc(60.9vw - 185px), 48vw);
}

/* ── Hero : contenu & marge ─────────────────────────── */
@media (max-width: 1280px) {
  #hero .container { margin-left: 6rem; }
  .hero-content    { max-width: 56%; }
}

@media (max-width: 1024px) {
  #hero .container { margin-left: 2rem; }
  .hero-content    { max-width: 62%; }
}

/* ── Mobile ──────────────────────────────────────────── */
/* ── Services responsive ────────────────────────────── */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-inner {
    padding: 6rem 2rem 1rem;
  }
  .service-img-wrap {
    max-height: 50vh;
  }
}

@media (max-width: 768px) {
  #services {
    overflow-y: auto;
    align-items: flex-start;
  }
  .services-inner {
    padding: 7rem 1.2rem 2rem;
    gap: 1.5rem;
    min-height: 100%;
    height: auto;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .service-img-wrap {
    aspect-ratio: 3 / 4;
    max-height: none;
  }
  .service-card {
    padding: 0.8rem 0.8rem 0.4rem;
  }
  .service-title {
    font-size: 0.72rem;
  }
  .service-desc {
    font-size: 0.62rem;
  }
}

/* ── Contact responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .contact-inner {
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 1.5rem;
  }
  .contact-hl-img {
    height: 200px;
  }
  .contact-heading {
    font-size: 2rem;
  }
  .contact-subheading {
    font-size: 0.95rem;
  }
  .contact-links {
    flex-direction: column;
    gap: 0.8rem;
  }
  .contact-link {
    font-size: 0.85rem;
  }
}

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Nav compact */
  .nav {
    padding: 0.75rem 1rem 0.5rem;
    gap: 1rem;
  }

  .nav-logo img { height: 36px; }

  .nav-links { gap: 1rem; }

  .nav-links a {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }

  /* Titre de section compact */
  #section-title {
    font-size: 1rem;
    padding: 0.4rem 1rem 0.4rem;
  }

  /* Hero en colonne */
  #hero {
    flex-direction: column;
    align-items: stretch;
    padding-top: 8rem;
    min-height: 100vh;
  }

  #hero .container {
    margin-left: 0;
    margin-right: 0;
    padding: 0 1.5rem;
    flex-shrink: 0;
  }

  .hero-content { max-width: 100%; }

  .hero-tagline { font-size: 1.4rem; }

  /* Grille en dessous */
  .hero-visual {
    position: relative;
    inset: auto;
    width: 100%;
    flex: 1;
    min-height: 160px;
    max-height: 35vh;
    margin-top: 0;
  }

  .grid-slider-wrap {
    bottom: -1rem;
    width: 75%;
  }

  #project-tabs { gap: 0; }

  /* ── Nav projets ─────────────────────────────────── */
  .projects-nav {
    top: 6.5rem;
    padding: 0 1rem;
    gap: 0.3rem;
    flex-wrap: wrap;
  }

  .project-tab {
    padding: 0.3em 0.8em;
    font-size: 0.6rem;
    margin-right: 0.3rem;
  }

  .projects-wrapper {
    padding-top: 7.5rem;
    overflow-y: auto;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 7rem, black 9.5rem);
    mask-image: linear-gradient(to bottom, transparent 0, transparent 7rem, black 9.5rem);
  }

  .projects-content {
    overflow: visible;
    height: auto;
  }

  /* ── Project views : base commune ───────────────── */
  .project-view {
    position: relative;
    flex-direction: column;
    height: auto;
    min-height: unset;
    align-items: stretch;
    padding: 1rem 1rem 2rem;
    gap: 1rem;
    opacity: 1;
    pointer-events: auto;
  }

  .project-view:not(.is-active) {
    display: none;
  }

  /* ── SSP ─────────────────────────────────────────── */
  .project-view--ssp {
    padding: 1rem 1rem 2.5rem;
    gap: 1.5rem;
  }

  .ssp-left {
    flex: none;
    width: 100%;
    gap: 1rem;
  }

  .ssp-top-zone {
    margin: 0;
    padding: 0.8rem 0.8rem;
    gap: 0.3rem;
  }

  .ssp-title    { font-size: 1.3rem; }
  .ssp-tagline  { font-size: 0.8rem; }
  .ssp-desc     { font-size: 0.78rem; line-height: 1.55; }

  .ssp-features {
    gap: 0.45rem;
  }

  .ssp-features li {
    font-size: 0.75rem;
    line-height: 1.4;
    padding-left: 0.6rem;
  }

  .ssp-feature-name {
    font-size: 0.75rem;
  }

  .ssp-stack li {
    font-size: 0.52rem;
  }

  .ssp-visual {
    flex: none;
    width: 100%;
  }

  .ssp-video-frame {
    max-width: 65%;
    margin: 0 auto;
  }

  /* ── VALOPERL ────────────────────────────────────── */
  .project-view--valoperl {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 1.2rem 1rem 2rem;
  }

  .valoperl-left {
    flex: none;
    width: 100%;
    margin-top: 0;
    padding: 0;
  }

  .valoperl-title   { font-size: 1.3rem; }
  .valoperl-tagline { font-size: 0.8rem; }
  .valoperl-desc    { font-size: 0.78rem; }
  .valoperl-features li { font-size: 0.75rem; }
  .valoperl-feature-name { font-size: 0.75rem; }

  .valoperl-visual {
    flex: none;
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .valoperl-phone-img {
    height: 26vh;
  }

  .valoperl-phone-img--back,
  .valoperl-phone-img--front {
    transform: none;
  }

  .valoperl-right {
    flex: none;
    width: 100%;
    margin-left: 0;
  }

  .valoperl-features {
    gap: 1.5rem;
  }

  .valoperl-bg-img {
    display: none;
  }

  /* ── JuLi ────────────────────────────────────────── */
  .project-view--juli {
    flex-direction: column;
    align-items: stretch;
    padding: 1.2rem 1rem 2rem;
    gap: 1.2rem;
  }

  .juli-left {
    flex: none;
    width: 100%;
  }

  .juli-top-zone {
    margin: 0;
  }

  .juli-title    { font-size: 1.3rem; }
  .juli-tagline  { font-size: 0.8rem; }
  .juli-desc     { font-size: 0.78rem; }

  .juli-features li {
    font-size: 0.75rem;
  }

  .juli-feature-name { font-size: 0.75rem; }

  .juli-visual {
    flex: none;
    width: 100%;
  }

  .juli-screenshot-frame {
    max-width: 70%;
    margin: 0 auto;
  }
}
