/* Page prestation (service) — hero + onglets tarif / recommandation / fréquence
   --------------------------------------------------------------------------- */

.service-page {
  background: var(--color-bg);
}

.service-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.service-hero__media {
  margin: 0;
  line-height: 0;
  position: relative;
  overflow: hidden;
  background: #e8e1d9;
}

.service-hero__media--empty {
  min-height: clamp(220px, 40vw, 420px);
  aspect-ratio: 4 / 3;
}

.service-hero__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center top;
  aspect-ratio: 4 / 3;
}

.service-hero__content {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 400;
  margin: 0 0 0.75rem;
  color: var(--color-text);
}

.service-hero__subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
}

.service-hero__text {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0 0 1.5rem;
  max-width: 52ch;
}

/*
 * CTA hero : même typo / couleurs / pill que .prestations__cta ; cadre élargi au texte + aligné à gauche avec le bloc.
 */
.service-page .service-hero__content .prestations__cta {
  width: fit-content;
  max-width: 100%;
  padding-inline: 1.35rem;
  box-sizing: border-box;
  font-size: 1rem;
}

@media (max-width: 480px) {
  .service-page .service-hero__content .prestations__cta {
    width: fit-content;
    max-width: 100%;
    padding-inline: 1.1rem;
    font-size: 1rem;
  }
}

/* Trait du haut : mêmes retraits que .container (le positionnement absolu ne suit pas le padding du parent) */
.service-tabs.section.section--tight {
  position: relative;
  border-top: none;
}

.service-tabs.section.section--tight::before {
  content: "";
  position: absolute;
  top: 0;
  left: max(
    env(safe-area-inset-left),
    clamp(1rem, 4vw, var(--grid-margin-inline))
  );
  right: max(
    env(safe-area-inset-right),
    clamp(1rem, 4vw, var(--grid-margin-inline))
  );
  border-top: 2px solid #68523f;
  pointer-events: none;
}

.service-tabs.section.section--tight::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: max(
    env(safe-area-inset-left),
    clamp(1rem, 4vw, var(--grid-margin-inline))
  );
  right: max(
    env(safe-area-inset-right),
    clamp(1rem, 4vw, var(--grid-margin-inline))
  );
  border-bottom: 2px solid #68523f;
  pointer-events: none;
}

/* Moins d’espace sous les sections tant qu’aucun onglet tarif / reco / fréquence n’est ouvert */
main[data-service-page][data-tabs-idle="true"]
  .service-tabs.section.section--tight {
  padding-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

/* ——— Bloc sous les onglets (texte + galerie / vidéo + contre-indications) ——— */
.service-below-tabs.section.section--tight {
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.service-below-tabs__grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* Texte plus étroit, images nettement plus larges (~37 % / ~63 %) */
.service-below-tabs__grid:has(.service-below-tabs__media) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr);
}

.service-below-tabs__grid:not(:has(.service-below-tabs__media)) {
  grid-template-columns: 1fr;
}

.service-below-tabs__copy {
  text-align: left;
  max-width: min(100%, 40rem);
}

.service-below-tabs__title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 400;
  color: #68523f;
  margin: 0 0 1rem;
  line-height: 1.25;
}

.service-below-tabs__text {
  font-family: var(--font-sans);
  color: var(--color-text-muted);
  line-height: 1.65;
}

.service-below-tabs__text h1,
.service-below-tabs__text h2,
.service-below-tabs__text h3 {
  font-family: var(--font-serif);
  color: #68523f;
  font-weight: 400;
  margin: 1.1rem 0 0.65rem;
  line-height: 1.3;
}

.service-below-tabs__text h1:first-child,
.service-below-tabs__text h2:first-child,
.service-below-tabs__text h3:first-child {
  margin-top: 0;
}

.service-below-tabs__text p {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
}

.service-below-tabs__text p:last-child {
  margin-bottom: 0;
}

.service-below-tabs__text ul,
.service-below-tabs__text ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
}

.service-below-tabs__text ul {
  list-style: disc;
}

.service-below-tabs__text ol {
  list-style: decimal;
}

.service-below-tabs__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.45rem, 1.25vw, 0.75rem);
  align-items: stretch;
  width: 100%;
}

.service-below-tabs__figure {
  margin: 0;
  line-height: 0;
  overflow: hidden;
  background: #e8e1d9;
}

.service-below-tabs__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center top;
  aspect-ratio: 1 / 1;
}

/* Wrapper galerie : sert de repère pour les flèches (mobile) ; neutre en desktop */
.service-below-tabs__gallery-wrap {
  position: relative;
  width: 100%;
}

/* Flèches masquées par défaut (desktop = grille 3 colonnes) */
.service-gallery__nav {
  display: none;
}

.service-below-tabs__video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e8e1d9;
  overflow: hidden;
}

.service-below-tabs__video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.service-below-tabs__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-acc.service-acc--boxed {
  border-radius: 2px;
}

.service-acc.service-acc--boxed .service-acc__trigger {
  padding: 1rem 0.75rem;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  border: 2px solid #68523f;
  border-radius: 2px;
}

.service-acc.service-acc--boxed .service-acc__panel {
  padding: 0 0.75rem 1.6rem;
}

.service-below-tabs__ci-body {
  font-family: var(--font-sans);
  color: var(--color-text-muted);
  line-height: 1.65;
  padding-top: 0.25rem;
}

.service-below-tabs__ci-body h1,
.service-below-tabs__ci-body h2,
.service-below-tabs__ci-body h3 {
  font-family: var(--font-serif);
  color: #68523f;
  font-weight: 400;
  margin: 1rem 0 0.5rem;
}

.service-below-tabs__ci-body p {
  margin: 0 0 1rem;
}

.service-below-tabs__ci-body ul,
.service-below-tabs__ci-body ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.service-below-tabs__ci-body ul {
  list-style: disc;
}

.service-below-tabs__ci-body ol {
  list-style: decimal;
}

@media (max-width: 900px) {
  .service-below-tabs__grid:has(.service-below-tabs__media) {
    grid-template-columns: 1fr;
  }

  /* Carrousel « swipe » : flèche | image | flèche (façon avant/après) */
  .service-below-tabs__gallery-wrap.has-nav {
    display: flex;
    align-items: center;
    gap: clamp(0.1rem, 1vw, 0.4rem);
  }

  .service-below-tabs__gallery {
    display: flex;
    grid-template-columns: none;
    gap: 0;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 2px;
  }

  .service-below-tabs__gallery::-webkit-scrollbar {
    display: none;
  }

  .service-below-tabs__figure {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: center;
  }

  .service-below-tabs__img {
    aspect-ratio: 4 / 3;
    object-position: center top;
  }

  /* Flèches : chevron brun sans cadre ni fond (identique à .ba-nav de l'avant/après) */
  .service-below-tabs__gallery-wrap.has-nav .service-gallery__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: none;
    color: #68523f;
    cursor: pointer;
    transition: opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .service-gallery__nav:hover:not(:disabled) {
    opacity: 0.75;
  }

  .service-gallery__nav:disabled {
    opacity: 0.22;
    cursor: not-allowed;
  }

  .service-gallery__nav:focus-visible {
    outline: 2px solid #68523f;
    outline-offset: 4px;
  }

  .service-gallery__icon {
    display: block;
    width: 0.6rem;
    height: 0.6rem;
    border-right: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
  }

  .service-gallery__nav--prev .service-gallery__icon {
    transform: rotate(135deg);
    margin-left: 0.2rem;
  }

  .service-gallery__nav--next .service-gallery__icon {
    transform: rotate(-45deg);
    margin-right: 0.2rem;
  }
}

@media (max-width: 520px) {
  .service-below-tabs__img {
    aspect-ratio: 1 / 1;
    object-position: center top;
  }
}

/* ——— Barre d’onglets principale ——— */
.service-tabs__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 2px solid #68523f;
  border-radius: 2px;
  padding: 0.35rem 0;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.service-tabs__tab {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.85vw, 1.3rem);
  color: var(--color-text-muted);
  cursor: pointer;
  text-align: center;
  text-decoration: underline transparent;
  text-underline-offset: 0.32em;
  text-decoration-thickness: 1px;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease;
}

/* Soulignement léger du texte au survol (onglets non actifs) */
.service-tabs__tab:not(.is-active):hover {
  color: var(--color-text);
  text-decoration-color: rgba(104, 82, 63, 0.45);
}

.service-tabs__tab.is-active {
  color: #68523f;
  text-decoration: underline;
  text-decoration-color: #68523f;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 2px;
}

.service-tabs__sep {
  width: 2px;
  align-self: stretch;
  min-height: 2rem;
  background: #68523f;
  flex-shrink: 0;
}

.service-tab-text {
  font-family: var(--font-sans);
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 720px;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.service-tab-text--ruled {
  border-left: 2px solid #68523f;
  padding-left: clamp(1rem, 3vw, 1.5rem);
}

.service-tab-text--ruled h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 400;
  color: #68523f;
  margin: 0 0 1rem;
  line-height: 1.25;
  text-align: left;
}

.service-tab-text--ruled h2,
.service-tab-text--ruled h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 400;
  color: #68523f;
  margin: 1.25rem 0 0.75rem;
  line-height: 1.3;
  text-align: left;
}

.service-tab-text--ruled h1:first-child,
.service-tab-text--ruled h2:first-child,
.service-tab-text--ruled h3:first-child {
  margin-top: 0;
}

.service-tab-text--ruled p {
  margin: 0 0 1rem;
  text-align: left;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
}

.service-tab-text--ruled p:last-child {
  margin-bottom: 0;
}

.service-tab-text--ruled ul,
.service-tab-text--ruled ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  text-align: left;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
}

.service-tab-text--ruled ul {
  list-style: disc;
}

.service-tab-text--ruled ol {
  list-style: decimal;
}

.service-tab-text--ruled li {
  margin-bottom: 0.35rem;
}

.service-tab-text--ruled li:last-child {
  margin-bottom: 0;
}

.service-tab-text__placeholder {
  font-style: italic;
  opacity: 0.75;
}

/* ——— Tarifs deux colonnes ——— */
.service-pricing__cols {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.service-pricing__vsep {
  width: 2px;
  background: #68523f;
  min-height: 120px;
  align-self: stretch;
}

.service-pricing__gender {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 400;
  margin: 0 0 1rem;
  text-align: center;
  color: #68523f;
}

.service-acc__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.35rem;
  border: none;
  background: transparent;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.85vw, 1.3rem);
  text-align: left;
  color: #68523f;
  cursor: pointer;
}

.service-acc__chev {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #68523f;
  border-bottom: 2px solid #68523f;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-bottom: 0.2rem;
}

.service-acc.is-open .service-acc__chev {
  transform: rotate(-135deg);
  margin-bottom: -0.15rem;
}

.service-acc__panel {
  padding: 0 0.25rem 1rem;
}

.service-price-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.service-price-table td {
  padding: 0.4rem 0;
  vertical-align: top;
  border-bottom: 1px solid #68523f;
}

.service-price-table td:last-child {
  text-align: right;
  white-space: nowrap;
  color: #68523f;
  font-weight: 500;
}

.service-price-table td:first-child {
  color: var(--color-text-muted);
  padding-right: 1rem;
}

.service-price-table tr:last-child td {
  border-bottom: none;
}

.service-pricing__list {
  max-width: 34rem;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
}

.service-pricing__list-title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 400;
  margin: 0 0 1.25rem;
  text-align: center;
  color: #68523f;
}

.service-price-table--list {
  font-size: clamp(1rem, 1.2vw, 1.125rem);
}

.service-price-table--list td {
  padding: 0.65rem 0;
}

.service-price-table--size td:first-child {
  padding-right: 1.25rem;
}

.service-price-table__name {
  display: block;
  color: #68523f;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.service-price-table__hint {
  display: block;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.service-tarif-note {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border: 1.5px solid #68523f;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.6;
  color: var(--color-text-muted);
  text-align: center;
  text-wrap: pretty;
  box-sizing: border-box;
}

/* ——— Offres ——— */
.service-offers__title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 400;
  text-align: center;
  margin: 0 0 1.5rem;
  color: #68523f;
}

.service-offers__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 3vw, 1.5rem);
}

.service-offer-card {
  border: 2px solid #68523f;
  border-radius: 2px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  text-align: center;
  box-sizing: border-box;
  flex: 1 1 clamp(11rem, 22%, 16rem);
  max-width: 16rem;
}

.service-offer-card__name {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 400;
  margin: 0 0 0.5rem;
  color: #68523f;
}

.service-offer-card__price {
  font-family: var(--font-sans);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin: 0;
  color: #68523f;
}

@media (max-width: 900px) {
  /* Plus d'air en haut : la navbar fixe ne « mange » plus le début de section */
  .service-hero.section {
    padding-top: clamp(6rem, 18vw, 8rem);
    /* Bas = même valeur que la marge au-dessus du bouton → bouton centré dans l'espace */
    padding-bottom: clamp(2.5rem, 9vw, 4.5rem);
  }

  /* Ordre mobile voulu : texte → image → bouton (centré) */
  .service-hero__grid {
    display: flex;
    flex-direction: column;
    /* stretch : titre / sous-titre / texte restent alignés à gauche (pas centrés) */
    align-items: stretch;
    gap: 0;
  }

  /* Contenu aplati : titre / sous-titre / texte / bouton réordonnables avec l'image */
  .service-hero__content {
    display: contents;
  }

  .service-hero__title,
  .service-hero__subtitle,
  .service-hero__text {
    order: 1;
  }

  .service-hero__media {
    order: 2;
    margin-top: clamp(0.5rem, 2vw, 1rem);
  }

  .service-hero__img {
    object-position: center top;
  }

  .service-page .service-hero__content .prestations__cta {
    order: 3;
    align-self: center;
    /* Même espace au-dessus que le padding-bottom de la section → centrage vertical */
    margin-top: clamp(2.5rem, 9vw, 4.5rem);
  }

  .service-pricing__cols {
    grid-template-columns: 1fr;
  }

  .service-pricing__vsep {
    display: none;
  }

  .service-offers__grid {
    gap: clamp(0.85rem, 2.5vw, 1.25rem);
  }

  .service-offer-card {
    flex: 1 1 calc(50% - 0.75rem);
    max-width: none;
  }
}

@media (max-width: 520px) {
  .service-tabs__bar {
    flex-direction: column;
  }

  .service-tabs__sep {
    display: none;
  }

  .service-tabs__tab {
    width: 100%;
    border-bottom: 2px solid #68523f;
  }

  .service-tabs__tab:last-child {
    border-bottom: none;
  }

  .service-offers__grid {
    flex-direction: column;
    align-items: stretch;
  }

  .service-offer-card {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
  }
}
