/* Horaires & tarifs — passe qualité visuelle, page 7 uniquement. */
body.page-id-7 .agd-official-composition {
  isolation: isolate;
  box-shadow: 0 24px 58px rgba(6, 29, 58, .22), inset 0 1px rgba(255,255,255,.12);
}

body.page-id-7 .agd-official-composition__texture {
  background-size: 165% 165% !important;
  animation: agd-hours-background-drift 22s ease-in-out infinite alternate;
}

body.page-id-7 .agd-official-zone {
  border-color: rgba(214,173,106,.42);
  box-shadow: inset 0 1px rgba(255,255,255,.1), 0 12px 26px rgba(6,29,58,.1);
}

body.page-id-7 .agd-official-schedules,
body.page-id-7 .agd-official-prices,
body.page-id-7 .agd-official-gyms-zone {
  position: relative;
  overflow: hidden;
}

body.page-id-7 .agd-official-schedules::after,
body.page-id-7 .agd-official-prices::after,
body.page-id-7 .agd-official-gyms-zone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(118deg, transparent 0 38%, rgba(242,214,160,.08) 46%, transparent 56%);
  transform: translateX(-115%);
  animation: agd-hours-light-sweep 15s ease-in-out infinite;
}

body.page-id-7 .agd-official-schedules > *,
body.page-id-7 .agd-official-prices > *,
body.page-id-7 .agd-official-gyms-zone > * {
  position: relative;
  z-index: 1;
}

body.page-id-7 .agd-official-zone h2 {
  text-wrap: balance;
}

body.page-id-7 .agd-official-group,
body.page-id-7 .agd-official-gym {
  border-color: rgba(214,173,106,.48);
  backdrop-filter: blur(2px);
}

body.page-id-7 .agd-official-gym {
  scroll-margin-top: 112px;
}

body.page-id-7 .agd-official-group h3,
body.page-id-7 .agd-official-gym h3 {
  color: #f3d38f;
  letter-spacing: .01em;
}

body.page-id-7 .agd-official-group li,
body.page-id-7 .agd-official-gym p {
  color: rgba(239,246,250,.9);
}

body.page-id-7 .agd-official-prices {
  background: linear-gradient(135deg, rgba(10,39,73,.96), rgba(16,86,112,.9));
  border-color: rgba(242,214,160,.55);
}

body.page-id-7 .agd-official-price {
  border-color: rgba(242,214,160,.24);
  transition: background-color .24s ease, border-color .24s ease;
}

body.page-id-7 .agd-official-price:hover,
body.page-id-7 .agd-official-price:focus-within {
  background: rgba(242,214,160,.08);
  border-color: rgba(242,214,160,.5);
}

body.page-id-7 .agd-official-price strong {
  color: #f6d88f;
  letter-spacing: .01em;
}

body.page-id-7 .agd-official-gym__address {
  color: #f2d6a0;
  text-decoration-thickness: 1px;
}

body.page-id-7 .agd-official-group__action .wp-element-button,
body.page-id-7 .agd-official-card a {
  text-underline-offset: .22em;
}

body.page-id-7 .agd-official-schedule-grid .agd-official-group {
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

body.page-id-7 .agd-official-schedule-grid .agd-official-group:hover,
body.page-id-7 .agd-official-schedule-grid .agd-official-group:focus-within {
  transform: translateY(-3px);
  border-color: rgba(242,214,160,.7);
  box-shadow: 0 12px 24px rgba(6,29,58,.16), inset 0 1px rgba(255,255,255,.16);
}

body.page-id-7 .agd-official-prices {
  box-shadow: 0 16px 30px rgba(6,29,58,.14), inset 0 1px rgba(255,255,255,.42);
}

body.page-id-7 .agd-official-price strong {
  text-shadow: 0 1px rgba(255,255,255,.28);
}

body.page-id-7 .agd-official-gyms-zone .agd-official-gym {
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.035));
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

body.page-id-7 .agd-official-gyms-zone .agd-official-gym:hover,
body.page-id-7 .agd-official-gyms-zone .agd-official-gym:focus-within {
  transform: translateY(-3px);
  border-color: rgba(242,214,160,.68);
  box-shadow: 0 12px 24px rgba(6,29,58,.15), inset 0 1px rgba(255,255,255,.14);
}

@keyframes agd-hours-background-drift {
  from { background-position: 0% 50%; }
  to { background-position: 100% 46%; }
}

@keyframes agd-hours-light-sweep {
  0%, 22% { transform: translateX(-115%); opacity: 0; }
  36%, 64% { transform: translateX(115%); opacity: 1; }
  78%, 100% { transform: translateX(115%); opacity: 0; }
}

@media (max-width: 700px) {
  /* Quatrième passe : premier écran mobile plus direct, sans modifier le desktop. */
  body.page-id-7 .premium-header {
    height: 88px !important;
    min-height: 88px !important;
    border-radius: 0 0 22px 22px;
    overflow: visible;
  }

  body.page-id-7 .premium-header .header-inner {
    height: 88px !important;
    min-height: 88px !important;
    padding: 8px 0 !important;
  }

  body.page-id-7 .premium-header .premium-brand {
    gap: 9px !important;
  }

  body.page-id-7 .premium-header .premium-brand img {
    width: 76px !important;
    height: 60px !important;
  }

  body.page-id-7 .premium-header .brand-title strong {
    font-size: 1.05rem !important;
    letter-spacing: .1em !important;
  }

  body.page-id-7 .premium-header .brand-title em {
    font-size: .5rem !important;
    letter-spacing: .15em !important;
  }

  body.page-id-7 .premium-header .brand-divider {
    height: 42px !important;
  }

  body.page-id-7 .premium-header .premium-nav,
  body.page-id-7 .premium-header .premium-nav.is-open {
    top: 88px !important;
  }

  body.page-id-7 .agd-official-page.agd-official-composition {
    margin-top: 0 !important;
    padding: 16px 14px 24px !important;
  }

  body.page-id-7 .agd-official-composition > .agd-section-intro {
    margin-bottom: 12px !important;
  }

  body.page-id-7 .agd-official-composition > .agd-section-intro .eyebrow {
    margin-bottom: 5px !important;
    font-size: .64rem !important;
  }

  body.page-id-7 .agd-official-composition > .agd-section-intro h1 {
    margin-bottom: 7px !important;
    font-size: clamp(1.95rem, 9vw, 2.65rem) !important;
    line-height: .98 !important;
  }

  body.page-id-7 .agd-official-composition > .agd-section-intro > p:last-child {
    font-size: .88rem !important;
    line-height: 1.35 !important;
  }

  body.page-id-7 .agd-official-schedules {
    padding: 14px 12px 12px !important;
  }

  body.page-id-7 .agd-official-zone h2 {
    margin-bottom: 10px !important;
    font-size: 1.45rem !important;
  }

  body.page-id-7 .agd-official-schedule-grid {
    gap: 8px !important;
  }

  body.page-id-7 .agd-official-schedule-grid .agd-official-group {
    padding: 11px 11px 10px !important;
  }

  body.page-id-7 .agd-official-schedule-grid .agd-official-group h2 {
    margin-bottom: 6px !important;
    font-size: .98rem !important;
  }

  body.page-id-7 .agd-official-group__intro {
    margin-bottom: 6px !important;
    font-size: .76rem !important;
    line-height: 1.28 !important;
  }

  body.page-id-7 .agd-official-schedule-grid .agd-official-group li {
    padding: 6px 0 !important;
    font-size: .76rem !important;
    line-height: 1.25 !important;
  }

  /* La sous-carte d'ouverture doit être lisible dès l'arrivée, sans attendre le reveal. */
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-schedule-grid .agd-official-group:first-child,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-schedule-grid .agd-official-group:first-child h2,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-schedule-grid .agd-official-group:first-child .agd-official-group__intro,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-schedule-grid .agd-official-group:first-child li,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-schedule-grid .agd-official-group:first-child .agd-official-fee {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  body.page-id-7 .agd-official-schedule-grid .agd-official-group:hover,
  body.page-id-7 .agd-official-schedule-grid .agd-official-group:focus-within,
  body.page-id-7 .agd-official-gyms-zone .agd-official-gym:hover,
  body.page-id-7 .agd-official-gyms-zone .agd-official-gym:focus-within {
    transform: none;
  }
}

/* Sixième passe qualité : raccords de page et lecture des repères. */
body.page-id-7 .agd-official-prices .agd-official-price span {
  color: #f4f8fb !important;
  font-weight: 800;
}

body.page-id-7 .agd-official-prices .agd-official-price strong {
  color: #f6d88f !important;
}

@media (max-width: 700px) {
  body.page-id-7 .wp-site-blocks > main,
  body.page-id-7 .wp-site-blocks > main > .wp-block-post-content {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
    padding-top: 0 !important;
  }

  body.page-id-7 .wp-site-blocks > .wp-block-template-part:has(> footer.site-footer) {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
  }

  body.page-id-7 .premium-footer {
    margin-top: 0 !important;
    padding: 32px 12px 20px !important;
    border-radius: 24px 24px 0 0 !important;
  }

  body.page-id-7 .premium-footer .footer-main {
    gap: 20px 10px !important;
    padding-bottom: 22px !important;
  }

  body.page-id-7 .premium-footer .footer-logo img {
    width: 108px !important;
    height: auto !important;
  }

  body.page-id-7 .premium-footer .footer-identity p {
    margin-top: 3px !important;
    line-height: 1.2 !important;
    font-size: .76rem !important;
  }

  body.page-id-7 .premium-footer .footer-partners {
    padding-top: 18px !important;
    padding-bottom: 20px !important;
  }

  body.page-id-7 .premium-footer .partner-logos {
    gap: 10px !important;
    margin-top: 13px !important;
  }

  body.page-id-7 .premium-footer .partner-logo {
    min-height: 72px !important;
    padding: 6px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.page-id-7 .premium-footer .partner-logo img {
    max-height: 44px !important;
    margin: 0 auto !important;
  }

  body.page-id-7 .premium-footer .partner-logo-coeur {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    justify-self: stretch !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.page-id-7 .premium-footer .partner-logo-coeur img {
    max-height: 36px !important;
  }

  body.page-id-7 .premium-footer .footer-bottom {
    padding-top: 12px !important;
  }
}

/* Septième passe qualité : repères visibles plus tôt, footer plus dense. */
@media (max-width: 700px) {
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices {
    animation-delay: .85s !important;
  }

  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices > h2 {
    animation-delay: 1.05s !important;
  }

  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices .agd-official-price:nth-child(1) {
    animation-delay: 1.25s !important;
  }

  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices .agd-official-price:nth-child(2) {
    animation-delay: 1.4s !important;
  }

  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices .agd-official-price:nth-child(3) {
    animation-delay: 1.55s !important;
  }

  body.page-id-7 .premium-footer {
    padding: 12px 10px 6px !important;
  }

  body.page-id-7 .premium-footer .footer-main {
    gap: 8px 9px !important;
    padding-bottom: 7px !important;
  }

  body.page-id-7 .premium-footer .footer-logo img {
    width: 110px !important;
  }

  body.page-id-7 .premium-footer .footer-partners {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  body.page-id-7 .premium-footer .partner-logos {
    gap: 4px !important;
    margin-top: 5px !important;
  }

  body.page-id-7 .premium-footer .partner-logo {
    min-height: 44px !important;
    padding: 3px !important;
  }

  body.page-id-7 .premium-footer .footer-bottom {
    padding-top: 5px !important;
  }
}

/* Septième passe — footer mobile intégral dans un écran au repos. */
@media (max-width: 430px) {
  body.page-id-7 .premium-footer {
    min-height: 100vh !important;
    box-sizing: border-box !important;
    padding: 34px 12px 20px !important;
  }

  body.page-id-7 .premium-footer .footer-main {
    gap: 22px 12px !important;
    padding-bottom: 20px !important;
  }

  body.page-id-7 .premium-footer .footer-logo img {
    width: 116px !important;
    max-height: 78px !important;
  }

  body.page-id-7 .premium-footer .footer-identity p {
    max-width: 220px !important;
    font-size: .74rem !important;
  }

  body.page-id-7 .premium-footer .footer-column {
    gap: 2px !important;
    padding-top: 0 !important;
  }

  body.page-id-7 .premium-footer h3 {
    margin-bottom: 2px !important;
    font-size: .86rem !important;
  }

  body.page-id-7 .premium-footer .footer-column a {
    font-size: .7rem !important;
    line-height: 1.16 !important;
  }

  body.page-id-7 .premium-footer .footer-partners {
    padding-top: 18px !important;
    padding-bottom: 20px !important;
  }

  body.page-id-7 .premium-footer .footer-partners-heading {
    font-size: .58rem !important;
  }

  body.page-id-7 .premium-footer .partner-logos {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 12px !important;
  }

  body.page-id-7 .premium-footer .partner-logo {
    min-height: 70px !important;
    padding: 6px !important;
    border-radius: 8px !important;
  }

  body.page-id-7 .premium-footer .partner-logo img,
  body.page-id-7 .premium-footer .partner-logo-avant-garde img,
  body.page-id-7 .premium-footer .partner-logo-ville img,
  body.page-id-7 .premium-footer .partner-logo-ligue img,
  body.page-id-7 .premium-footer .partner-logo-codep img,
  body.page-id-7 .premium-footer .partner-logo-coeur img {
    max-height: 46px !important;
  }

  body.page-id-7 .premium-footer .partner-logo-coeur {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    justify-self: stretch !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.page-id-7 .premium-footer .footer-bottom {
    gap: 5px !important;
    padding-top: 12px !important;
    font-size: .64rem !important;
  }
}

/* Passe finale : défilement mobile stable et sans débordement parasite. */
@media (max-width: 700px) {
  html {
    scroll-behavior: smooth;
    overscroll-behavior-x: none;
  }

  body.page-id-7 {
    overflow-x: hidden !important;
    touch-action: pan-y;
  }

  body.page-id-7 .agd-official-composition,
  body.page-id-7 .premium-footer {
    max-width: 100%;
  }

  body.page-id-7 .agd-official-composition *,
  body.page-id-7 .premium-footer * {
    min-width: 0;
  }

  body.page-id-7 .premium-footer a {
    touch-action: manipulation;
  }
}

/* Correctif d'ouverture : le contenu des repères ne doit pas attendre le moteur motion. */
@media (max-width: 700px) {
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices > h2,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices .agd-official-price {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Mobile : la page officielle reste immédiatement lisible ; aucun reveal ne pilote son contenu. */
@media (max-width: 700px) {
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-composition,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-composition * {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
    clip-path: none !important;
    transition: none !important;
    animation: none !important;
    transition-delay: 0s !important;
    animation-delay: 0s !important;
    will-change: auto !important;
  }

  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-composition::before,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-composition::after,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-composition__texture::before,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-composition__texture::after,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-schedules::before,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-schedules::after,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices::before,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices::after,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-gyms-zone::before,
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-gyms-zone::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    will-change: auto !important;
  }
}

/* Neuvième passe qualité : partenaires restaurés et footer mobile réouvert. */
@media (max-width: 430px) {
  body.page-id-7 .premium-footer {
    padding: 16px 9px 9px !important;
  }

  body.page-id-7 .premium-footer .footer-main {
    gap: 10px 9px !important;
    padding-bottom: 9px !important;
  }

  body.page-id-7 .premium-footer .footer-partners {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  body.page-id-7 .premium-footer .partner-logos {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin-top: 7px !important;
  }

  body.page-id-7 .premium-footer .partner-logo {
    min-height: 50px !important;
    padding: 4px !important;
  }

  body.page-id-7 .premium-footer .partner-logo img,
  body.page-id-7 .premium-footer .partner-logo-avant-garde img,
  body.page-id-7 .premium-footer .partner-logo-ville img,
  body.page-id-7 .premium-footer .partner-logo-ligue img,
  body.page-id-7 .premium-footer .partner-logo-codep img,
  body.page-id-7 .premium-footer .partner-logo-coeur img {
    max-height: 38px !important;
  }

  body.page-id-7 .premium-footer .partner-logo-codep,
  body.page-id-7 .premium-footer .partner-logo-coeur {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Grille partenaires : six logos sur trois colonnes homogènes, puis Cœur Côte Fleurie sur toute la ligne. */
  body.page-id-7 .premium-footer .partner-logos {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  body.page-id-7 .premium-footer .partner-logo:not(.partner-logo-coeur) {
    grid-column: span 2 !important;
    width: auto !important;
    min-width: 0 !important;
    justify-self: stretch !important;
  }

  body.page-id-7 .premium-footer .partner-logo-coeur {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    justify-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
}

/* Huitième passe qualité : apparition plus rapide et plus cohérente des repères. */
@media (max-width: 700px) {
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices {
    animation-delay: .38s !important;
    animation-duration: .72s !important;
  }

  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices > h2 {
    animation-delay: .58s !important;
    animation-duration: .5s !important;
  }

  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices .agd-official-price:nth-child(1) {
    animation-delay: .72s !important;
    animation-duration: .52s !important;
  }

  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices .agd-official-price:nth-child(2) {
    animation-delay: .84s !important;
    animation-duration: .52s !important;
  }

  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-prices .agd-official-price:nth-child(3) {
    animation-delay: .96s !important;
    animation-duration: .52s !important;
  }

  body.page-id-7 .agd-official-prices {
    border-left: 3px solid rgba(242,214,160,.78);
  }

  body.page-id-7 .agd-official-prices .agd-official-price {
    align-items: center;
    min-height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-id-7 .agd-official-composition__texture {
    animation: none !important;
    background-position: 0 50% !important;
  }
  body.page-id-7 .agd-official-schedule-grid .agd-official-group,
  body.page-id-7 .agd-official-gyms-zone .agd-official-gym,
  body.page-id-7 .agd-official-price,
  body.page-id-7 .agd-official-schedules::after,
  body.page-id-7 .agd-official-prices::after,
  body.page-id-7 .agd-official-gyms-zone::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Cinquième passe qualité : ouverture plus directe et contrastes renforcés. */
body.page-id-7 .agd-official-prices h2 {
  color: #fff;
}

@media (max-width: 700px) {
  body.page-id-7 .agd-official-composition {
    margin-bottom: 0 !important;
  }

  /* Le bloc Loisirs reste respirant même sans texte d'introduction. */
  body.page-id-7 .agd-official-schedule-grid .agd-official-group:has(.agd-official-group__intro:empty) {
    padding-top: 13px !important;
  }

  /* Le troisième groupe doit rejoindre l'écran rapidement, avec une entrée courte. */
  html.agd-public-motion.agd-motion-ready body.page-id-7 .agd-official-schedule-grid .agd-official-group:nth-child(3) {
    animation-delay: 1.15s !important;
  }
}
