/* ============================================================
   PAGE AGENCE — OPTIMISATION MOBILE (≤ 760 px)
   Scopé sous body.agency-page : n'affecte ni le desktop,
   ni les autres pages. Aucun contenu supprimé, uniquement
   de la réorganisation et des espacements.
   ============================================================ */
@media (max-width: 760px) {
  /* ---------- 1. Hero : hauteur et espacements réduits ---------- */
  body.agency-page .agency-founder-hero {
    min-height: 0;
    padding: 96px 0 30px;
  }
  body.agency-page .agency-founder-copy {
    width: calc(100% - 32px);
    margin: 0 16px;
    padding: 16px 0 0 14px;
  }
  /* Le logo est déjà dans l'en-tête : masqué dans le hero mobile,
     l'espace récupéré rééquilibre badge, titre et paragraphe. */
  body.agency-page .agency-hero-logo-mark {
    display: none;
  }
  body.agency-page .agency-founder-copy h1 {
    font-size: clamp(2.5rem, 12.5vw, 4rem);
    line-height: .9;
    margin: 22px 0 16px;
  }
  body.agency-page .agency-founder-copy .lead {
    font-size: .9rem !important;
    line-height: 1.55 !important;
    max-width: 100% !important;
  }
  body.agency-page .founder-identity-row {
    gap: 6px;
    margin-top: 14px;
  }
  body.agency-page .founder-identity-row span {
    font-size: .56rem;
    padding: 6px 8px;
    letter-spacing: .07em;
  }
  body.agency-page .founder-identity-row b {
    font-size: .78rem;
    padding: 3px 6px;
  }
  body.agency-page .agency-founder-copy .hero-actions {
    margin-top: 18px;
    gap: 10px;
  }
  body.agency-page .agency-founder-copy .btn {
    padding: 13px 18px;
    font-size: .88rem;
  }
  /* La section Services suit directement le hero : le bouton d'ancre est
     masqué sur mobile, sans remplacement, pour alléger la composition. */
  body.agency-page .agency-founder-copy .hero-actions a[href="#services-detail"] {
    display: none;
  }
  /* La bande de prénoms décorative répète la rangée d'identité : masquée sur mobile. */
  body.agency-page .agency-founder-strip {
    display: none;
  }

  /* ---------- 2. Bande vidéo : galerie horizontale ---------- */
  body.agency-page .video-strip {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 12px !important;
    overflow-x: auto;
    padding: 6px 20px 22px !important;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  body.agency-page .video-strip::-webkit-scrollbar {
    display: none;
  }
  body.agency-page .video-strip .am-video {
    position: relative;
    flex: none;
    width: 76%;
  }
  body.agency-page .video-strip .am-video video {
    display: block;
    width: 100%;
    height: 190px !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 22px;
  }
  /* La 2e vidéo garde son ajustement « contain » d'origine (style.css). */
  body.agency-page .video-strip .am-video[data-am-video="2"] video {
    object-fit: contain !important;
    object-position: center center !important;
    background: #050509;
    padding: 6px;
  }
  /* Commande lecture/pause visible sur chaque vidéo. */
  body.agency-page .am-video-toggle {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: 46px;
    height: 46px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(6, 6, 14, .62);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background .25s;
  }
  body.agency-page .am-video-toggle svg { width: 20px; height: 20px; display: block; }
  body.agency-page .am-video-toggle .am-icon-pause { display: none; }
  body.agency-page .am-video-toggle.is-playing .am-icon-play { display: none; }
  body.agency-page .am-video-toggle.is-playing .am-icon-pause { display: block; }
  body.agency-page .video-strip .am-track {
    display: contents;
  }

  /* ---------- 3. Services : onglets horizontaux + panneau unique ---------- */
  body.agency-page .service-showcase {
    padding: 10px 20px 56px;
    gap: 0;
  }
  body.agency-page .am-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    margin: 0 -2px;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  body.agency-page .am-tabs::-webkit-scrollbar {
    display: none;
  }
  body.agency-page .am-tabs button {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .72);
    font: inherit;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s;
  }
  body.agency-page .am-tabs button b {
    color: #9d98ff;
    font-size: .68rem;
    letter-spacing: .12em;
  }
  body.agency-page .am-tabs button.am-active {
    background: #5850FF;
    border-color: #5850FF;
    color: #fff;
    box-shadow: 0 10px 30px rgba(88, 80, 255, .35);
  }
  body.agency-page .am-tabs button.am-active b {
    color: rgba(255, 255, 255, .85);
  }
  body.agency-page .service-strip {
    display: none;
    min-height: 0;
    gap: 0;
  }
  body.agency-page .service-strip.am-active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    opacity: 1;
    transform: none;
    animation: amFade .35s ease;
    /* Chaque catégorie suit sa hauteur de contenu, sans espace réservé. */
    min-height: 0;
    align-content: start;
  }
  @keyframes amFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
  body.agency-page .service-strip .service-media {
    height: 220px !important;
    min-height: 0;
    border-radius: 24px;
  }
  body.agency-page .service-strip .service-media span {
    font-size: 3.2rem;
    left: 16px;
    bottom: 12px;
  }
  body.agency-page .service-strip .service-copy {
    padding: 20px;
    border-radius: 24px;
  }
  body.agency-page .service-strip .service-copy h2 {
    font-size: 1.65rem !important;
    line-height: 1.04;
    margin: 8px 0 12px;
  }
  body.agency-page .service-strip .service-copy p {
    font-size: .9rem;
    line-height: 1.6;
  }
  body.agency-page .service-strip .service-copy ul {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
  }
  body.agency-page .service-strip .service-copy li {
    padding: 10px 12px;
    font-size: .74rem;
    border-radius: 14px;
  }

  /* ---------- 4. Méthode : carrousel horizontal à étapes ---------- */
  body.agency-page .agency-proof {
    padding: 44px 0 56px;
  }
  body.agency-page .agency-proof > .reveal {
    padding: 0 20px;
  }
  body.agency-page .agency-proof .section-title {
    font-size: clamp(1.7rem, 7.6vw, 2.4rem);
  }
  body.agency-page .proof-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 22px 20px 6px;
    margin-top: 0;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  body.agency-page .proof-grid::-webkit-scrollbar {
    display: none;
  }
  body.agency-page .proof-card {
    flex: none;
    width: min(84%, 340px);
    min-height: 0;
    scroll-snap-align: center;
    padding: 22px;
    border-radius: 24px;
  }
  body.agency-page .proof-card strong {
    font-size: .78rem;
  }
  body.agency-page .proof-card h3 {
    font-size: 1.45rem;
    margin: 12px 0 10px;
  }
  body.agency-page .proof-card p {
    font-size: .88rem;
    line-height: 1.6;
  }
  body.agency-page .am-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0 0;
  }
  body.agency-page .am-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .25);
    cursor: pointer;
    transition: width .25s, background .25s;
  }
  body.agency-page .am-dots button.am-active {
    width: 22px;
    background: #5850FF;
  }

  /* ---------- 5. Petits écrans ---------- */
  @media (max-width: 360px) {
    body.agency-page .video-strip .am-video {
      width: 82%;
    }
    body.agency-page .video-strip video {
      height: 170px !important;
    }
    body.agency-page .proof-card {
      width: 88%;
    }
  }
}

/* Mouvement réduit : pas de fondu automatique sur les onglets. */
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  body.agency-page .service-strip.am-active {
    animation: none;
  }
}

/* ---------- 6. Accessibilité clavier & économie de données (mobile) ---------- */
@media (max-width: 760px) {
  body.agency-page .am-tabs { padding-top: 6px; }
  body.agency-page .am-tabs button { min-height: 44px; }
  body.agency-page .am-tabs button:focus-visible,
  body.agency-page .am-dots button:focus-visible,
  body.agency-page .am-rotate-toggle:focus-visible,
  body.agency-page .proof-grid:focus-visible,
  body.agency-page .service-strip:focus-visible,
  body.agency-page .am-video-toggle:focus-visible {
    outline: 2px solid #1CC6ED;
    outline-offset: 3px;
  }
  body.agency-page .proof-grid:focus-visible { outline-offset: -2px; border-radius: 24px; }
  /* Zone tactile de 44 px autour des points, sans changer leur aspect. */
  body.agency-page .am-dots { gap: 0; }
  body.agency-page .am-dots button {
    box-sizing: content-box;
    border: 14px solid transparent;
    background-clip: padding-box;
    margin: 0 -4px;
  }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  body.agency-page .am-tabs button, body.agency-page .am-dots button { transition: none; }
}

/* ---------- 7. Rotation automatique : commande discrète (mobile) ---------- */
@media (max-width: 760px) {
  body.agency-page .am-rotate-bar {
    display: flex;
    justify-content: flex-end;
    padding: 0 2px 8px;
  }
  /* Sous les points de la méthode : la commande reprend l'axe centré. */
  body.agency-page .am-dots + .am-rotate-bar {
    justify-content: center;
    padding: 12px 0 0;
  }
  body.agency-page .am-rotate-toggle {
    position: relative;
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .6);
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s;
  }
  /* Zone tactile d'au moins 44 px autour de la pastille, sans l'agrandir. */
  body.agency-page .am-rotate-toggle::after {
    content: "";
    position: absolute;
    inset: -6px;
  }
  body.agency-page .am-rotate-toggle svg { width: 13px; height: 13px; display: block; }
  body.agency-page .am-rotate-toggle .am-icon-play { display: none; }
  body.agency-page .am-rotate-toggle .am-icon-pause { display: block; }
  body.agency-page .am-rotate-toggle.is-paused .am-icon-play { display: block; }
  body.agency-page .am-rotate-toggle.is-paused .am-icon-pause { display: none; }
  body.agency-page .am-rotate-toggle:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .34);
  }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  body.agency-page .am-rotate-toggle { transition: none; }
}
