/*
Theme Name: Steel Fitness
Author: Timothée JACOB - Léonie LENOIR
Version: 1.0
*/


/* HERO */
.hero {
  min-height: 70vh;
  background: url("assets/images/hero.jpg") center / cover no-repeat;
  background-position: 0% 65%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1rem, 4vw, 4rem);
}

.hero__logo {
  width: 40%;
  margin: 0 0 4rem 1rem;
}

.hero__cards {
  display: grid;
  gap: 1rem;
  max-width: 50%;
  margin: 1rem;
}

.hero__cards .tags{
  margin-top: 0.8rem;
}

div.glass--frame:nth-child(1) > p:nth-child(1), div.glass--frame:nth-child(2) > p:nth-child(2) {
  font-size: 17px;
}


/* Hero button*/
.hero .wp-block-button.is-style-glass .wp-block-button__link {
  --glass-radius: 8px;
  padding: .5rem .9rem;
  font-family: var(--wp--preset--font-family--display);
  font-size: 24px;
  font-weight: 400;
}

/* PRICING: 2x2 grid, one column on mobile */
.pricing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  width: 70%;
  margin: auto;
  padding: 4rem 1rem;
}

.plan.glass {
  display: flex;
  flex-direction: column;
  padding: 4rem;
  border-radius: 28px;
}

.plan .wp-block-buttons { 
  margin-top: 3rem; 
}

@media screen and (max-width: 1200px) {
  .pricing {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 90%;
  }

  .plan.glass { 
    padding: 2rem; 
  }
  .plan__price { 
    width: 100%; 
  }
}

.glass--panel{
  padding: 50rem;
}

.plan__name {
  font-size: 16px;
  margin: 0;
  padding-bottom: .5rem;
  width: 85%;
  border-bottom: 1px solid #fff;
  font-weight: 700;
}

.plan__price {
  font-family: var(--wp--preset--font-family--display);
  font-size: 3rem;
  margin: 1rem 0.1rem;
  width: 50%;
  font-size: 56px;
  line-height: 4rem;
}

div.plan:nth-child(4) > p:nth-child(2) {
  white-space:initial; 
}

.plan > .wp-block-buttons.is-layout-flex {
  height: 100%;
  align-items: end;
  margin : 0 0 0 0.5rem;
}

/* Curseur "main" pendant le glisser */
.carousel__viewport { cursor: grab; }

.carousel__viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}




/* GLASS BUTTONS */
.wp-block-button.is-style-glass .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.3rem;
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
}

/* Arrow icon*/
.wp-block-button.is-style-glass.has-arrow .wp-block-button__link::after {
  content: "";
  width: 1.2em;
  height: 1.2em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Tags */
.tags {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.tags--stack {
  flex-direction: column;
  align-items: flex-start;
}


.tags li {
  font-size: 16px;
  padding: 0.2rem 0.8rem;
  font-weight: 700;
}

.tags li img{
  width: 10%;
  height: 100%;
  vertical-align: top;
}

.underlined{
  width: 50%;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #fff;
}

p {
  padding: 0.3rem;
  font-weight: 400;
}

ul.tags:nth-child(2) > li:nth-child(1) > img:nth-child(1) {
  width: 1em;
}

ul.tags:nth-child(2) > li:nth-child(2) > img:nth-child(1) {
  width: 0.8em;
}

ul.tags:nth-child(2) > li:nth-child(1) {
  width: fit-content;
}

ul.tags:nth-child(2) > li{
  padding: 0 1em 0 0;
}

/* Footer */
.wp-block-template-part:has(.site-footer) {
  width: 100%;
  display: flex;
  justify-content: center;
}

.site-footer.glass.wp-block-group {
  width: min(92%, 1330px);
  max-width: none;
  margin: 3rem 0 2rem;
  padding: 3rem clamp(1.5rem, 8vw, 7rem) 1.5rem;
  border-radius: 28px;
}

.site-footer__cols { display: contents; }

.site-footer__grid {
  display: grid;
  grid-template-columns: 25% 20% 15% 20% 20%;
  grid-template-rows: 1fr auto;
  align-items: start;
  align-content:  center;
}

.site-footer__logo {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 81%;
  margin: 0;
  background: #000;
}

.site-footer__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.site-footer__grid > .wp-block-group,
.site-footer__cols > .wp-block-group {
  grid-row: 2;
  padding-right: 1rem;
  padding-bottom: .5rem;
}

.site-footer h3 {
  margin: 1rem 0 1rem;
  font-size: 1.6rem;
}

.site-footer p,
.footer__links li {
  font-size: .85rem;
  line-height: 1.5;
}

.site-footer p { padding: 0; margin: 0 0 .75rem; }

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__links li + li { margin-top: .5rem; }

.footer__links a {
  color: inherit;
  text-decoration: none;
}

.footer__links a:hover { text-decoration: underline; }

.site-footer__bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / .6);
  text-align: center;
}

.site-footer__bottom p {
  margin: 0;
  font-size: .8rem;
  opacity: .8;
}

/* Tablet */
@media screen and (max-width: 900px) {
  .site-footer.glass.wp-block-group { padding: 2rem; }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    row-gap: 2rem;
    text-align: center;
  }

  .site-footer__logo {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    max-width: 235px;
    margin-inline: auto;

  }

  .site-footer__grid > .wp-block-group,
  .site-footer__cols > .wp-block-group { grid-row: auto; }
}

@media screen and (max-width: 600px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    justify-items: center;   
    text-align: center;      
  }

  .site-footer__logo {
    margin-inline: auto;
  }

  .site-footer__grid > .wp-block-group,
  .site-footer__cols > .wp-block-group {
    width: 100%;
    padding-right: 0;        
  }
}


/* ================= CAROUSEL ================= */
.carousel-section { padding-block: 4rem; }

.carousel {
  --per-view: 4;                 /* photos visible at the same time */
  --gap: 1rem;
  --slide: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  position: relative;
  width: 100%;
  max-width: 1800px;
  margin-inline: auto;
}

.carousel__viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: 0;   /* slides start flush at the left edge, no partial photo */
  scrollbar-width: none;
}

.carousel__viewport::-webkit-scrollbar { display: none; }

.carousel__viewport:focus-visible {
  outline: 2px solid rgb(255 255 255 / .6);
  outline-offset: -2px;
}

.carousel__track {
  position: relative;
  display: flex;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.carousel__slide {
  flex: 0 0 var(--slide);
  aspect-ratio: 293 / 297;
  border-radius: 22px;
  overflow: hidden;
  scroll-snap-align: start;
  background: #161616;
}

.carousel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

/* Glass arrows */
.carousel .carousel__arrow {
  --glass-radius: 8px;
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 2.75rem;
  height: 2rem;
  padding: 0;
  border: 0;
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
}

.carousel__arrow--prev { left: clamp(.75rem, 4vw, 4rem); }
.carousel__arrow--next { right: clamp(.75rem, 4vw, 4rem); }

.carousel__arrow::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.2rem;
  height: 1.2rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.carousel__arrow--prev::after { transform: scaleX(-1); }

/* Bigger touch target on phones and tablets */
@media (pointer: coarse) {
  .carousel .carousel__arrow { height: 2.75rem; }
}

@media screen and (min-width: 769px) and (max-width: 1100px) {
  .carousel { --per-view: 3; }
}


/* ================= MOBILE: shared look ================= */
@media screen and (max-width: 768px) {
  :root {
    --m-gutter: 1.25rem;     /* space between the screen edge and the sections */
    --m-card-pad: 1.75rem;   /* inner padding of every glass card */
    --m-radius: 22px;        /* corner radius of every glass card */
  }

  /* All glass cards */
  body .glass.wp-block-group {
    padding: var(--m-card-pad);
    border-radius: var(--m-radius);
  }

  /* HERO */
  .hero {
    min-height: auto;
    padding: 1.5rem var(--m-gutter) 2rem;
    gap: 1.5rem;
  }

  .hero__logo {
    width: 100%;
    margin-inline: auto;
    margin: auto;
  }

  .hero__cards {
    width: 95%;
    max-width: none;
  }

  /* OFFERS: single card, columns stacked */
  .offers.glass.wp-block-group {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
    width: calc(100% - 2 * var(--m-gutter));
    margin: 2rem auto;
    padding: var(--m-card-pad);
  }

  .offers .offers__badge { display: none; }

  /* PRICING: one card per row */
  .pricing {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    padding: 2rem var(--m-gutter);
  }

  body .plan.glass.wp-block-group {
    max-width: none;
    padding: var(--m-card-pad);
  }

  .plan__price { width: 100%; }
  .tags--stack li { max-width: 100%; }

  /* CAROUSEL: one big photo with a peek of the next one */
  .carousel-section { padding-block: 2rem; }

  .carousel {
    --slide: min(72vw, 320px);
    --gap: .75rem;
  }

  .carousel__viewport { scroll-padding-inline-start: var(--m-gutter); }
  .carousel__slide { border-radius: var(--m-radius); }

  /* FOOTER */
  .site-footer.glass.wp-block-group {
    width: calc(100% - 2 * var(--m-gutter));
    margin: 2rem 0 1.5rem;
    padding: var(--m-card-pad);
  }
}


.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.back-link {
  position: fixed;
  z-index: 3;
  display: inline-block;
  padding-bottom: .6rem;
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
}

@media screen and (max-width: 768px) {
  .back-link{
    background: #0d0d0d;
  }

}

.back-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1rem;
  height: 1px;
  background: currentColor;
  transition: width .4s cubic-bezier(.2, .9, .2, 1);
}

.back-link:is(:hover, :focus-visible)::after { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .back-link::after { transition: none; }
}

/* ================= BOOKING PAGE: card ================= */
.booking-page {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 100vh;
  padding: 2.5rem;
}

.back-link { align-self: flex-start; }

/* Centered horizontally and vertically, and bigger */
.booking-page  .booking.glass.wp-block-group {
  width: min(100%, 52em);
  margin: auto;
  margin-top: 3em;
  padding: 2.4em 2.8em;
  border-radius: 1.4em;
  font-size: clamp(1rem, 1.55vw, 1.45rem);   /* the whole card scales with this */
}

.booking__title {
  display: inline-block;
  margin: 0 0 2em;
  padding-bottom: .65em;
  font-family: var(--wp--preset--font-family--body);
  font-size: .95em;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgb(255 255 255 / .55);
}

/* Radio chips */
.booking__choices {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4em;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice { position: relative; }

.choice__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice__label {
  display: inline-block;
  padding: .15em .75em;
  font-size: .95em;
  font-weight: 700;
  letter-spacing: .04em;
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: .4em;
  background: rgb(255 255 255 / .03);
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}

.choice__input:not(:checked) + .choice__label:hover { background: rgb(255 255 255 / .12); }

.choice__input:checked + .choice__label {
  color: #000;
  background: #fff;
  border-color: #fff;
}

.choice__input:focus-visible + .choice__label {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Price and description */
.booking__detail {
  width: min(100%, 30em);
  margin-top: 2em;
  padding-top: .9em;
  border-top: 2px solid rgb(255 255 255 / .35);
}

.booking__price {
  margin: 0 0 .25em;
  padding: 0;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: .05em;
}

.booking__desc {
  min-height: 6.3em;     /* keeps the button from jumping when the text length changes */
  margin: 0;
  padding: 0;
  font-size: .72em;
  font-style: italic;
  line-height: 1.5;
  white-space: pre-wrap;
}

.booking .wp-block-buttons { margin-top: 1.5em; }

/* Pay button scales with the card */
.booking .wp-block-button.is-style-glass .wp-block-button__link { font-size: 1.2em; }

@media screen and (max-width: 768px) {
  .booking-page { padding: 1.25rem; }

  .booking-page .booking.glass.wp-block-group {
    width: 100%;
    padding: 1.75rem;
    border-radius: 22px;
    font-size: 1rem;
  }
}


/* ================= MERCI ================== */

.merci-page {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 100vh;
  padding: 2.5rem;
}

.back-link { align-self: flex-start; }

.merci-page  .merci.glass.wp-block-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 52em);
  margin: auto;
  padding: 2.4em 2.8em;
  border-radius: 1.4em;
  font-size: clamp(1rem, 1.55vw, 1.45rem);
}

.merci__title {
  display: inline-block;
  margin: 0 0 2em;
  font-family: var(--wp--preset--font-family--body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.merci__slogan {
  font-size: 69px;
}

.merci__goodbye {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.09em;
  padding-top: 1em;
}

.merci__text-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3em 0;
}

.merci__logo {
  width: 30%;
  padding-top: 1em;
}


/* ================= PAGES LÉGALES ================= */
.legal-page {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 100vh;
  padding: 2.5rem;
}

.legal-page .legal.glass.wp-block-group {
  width: min(100%, 52rem);
  margin: 3rem auto 2rem;
  padding: 2.5rem 3rem;
  border-radius: 28px;
}

.legal__title {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.legal__content h2 { margin: 2rem 0 .5rem; font-size: 1.8rem; }
.legal__content h3 { margin: 1.5rem 0 .5rem; font-size: 1.4rem; }

.legal__content p,
.legal__content li {
  font-size: .95rem;
  line-height: 1.7;
}

.legal__content ul,
.legal__content ol { padding-left: 1.25rem; }

.legal__content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media screen and (max-width: 768px) {
  .legal-page { padding: 1.25rem; }

  .legal-page .legal.glass.wp-block-group {
    padding: 1.75rem;
    border-radius: 22px;
  }
}

/* Défilement doux, sauf si le visiteur préfère moins d'animations */
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Bouton "remonter en haut" */
.glass.up-arrow {
  --glass-radius: 50%;
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 100;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: #fff;
  text-decoration: none;
}

.glass.up-arrow.is-hidden { display: none; }

@media screen and (max-width: 768px) {
  .glass.up-arrow { right: 1rem; bottom: 1rem; }
}



.booking__schedule[hidden],
.booking__times-wrap[hidden] { display: none; }

.booking__schedule { margin-top: 2em; }

.booking__schedule-title {
  margin: 0 0 .6em;
  padding: 0;
  font-size: .85em;
  font-weight: 700;
  letter-spacing: .04em;
}

.booking__terms, .booking__hint{
  font-size: 0.75em;
}

.booking__dates,
.booking__times {
  display: flex;
  flex-wrap: wrap;
  gap: .4em;
  margin-bottom: 1.2em;
  font-size: .85em;
}

.slot {
  padding: .2em .7em;
  font: inherit;
  font-weight: 700;
  color: inherit;
  background: rgb(255 255 255 / .03);
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: .4em;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.slot:hover:not(:disabled):not(.is-selected) { background: rgb(255 255 255 / .12); }
.slot.is-selected { color: #000; background: #fff; border-color: #fff; }
.slot:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.slot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }



/* ================= RÉSILIATION ================= */
.cancel-info h2,
.cancel-step h2 { margin: 1.5rem 0 .75rem; font-size: 1.6rem; }

.cancel-info ul { margin: 0 0 2rem; }

.cancel-form .field { margin-bottom: 1.1rem; }

.cancel-form label { display: block; margin-bottom: .35rem; font-weight: 700; font-size: .9rem; }

.cancel-form input[type="text"],
.cancel-form input[type="email"],
.cancel-form input[type="date"],
.cancel-form select,
.cancel-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: .6em .8em;
  font: inherit;
  color: #fff;
  background: rgb(255 255 255 / .04);
  border: 1px solid rgb(255 255 255 / .2);
  border-radius: .5em;
}

.cancel-form select option { color: #000; }

.cancel-form input:focus-visible,
.cancel-form select:focus-visible,
.cancel-form textarea:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.cancel-form .field--check { display: flex; align-items: flex-start; gap: .6em; }
.cancel-form .field--check label { margin: 0; font-weight: 400; }
.cancel-form .field--check input { margin-top: .3em; accent-color: #fff; }

.field__help { margin: .35rem 0 0; padding: 0; font-size: .8rem; opacity: .8; }

.cancel-legit[hidden],
.cancel-step[hidden],
.cancel-error[hidden] { display: none; }

.cancel-error {
  margin: 0 0 1rem;
  padding: .7em 1em;
  border: 1px solid rgb(255 120 120 / .6);
  border-radius: .5em;
  background: rgb(255 80 80 / .1);
}

.cancel-hp { position: absolute; left: -9999px; }

.cancel-recap { margin: 1rem 0 1.5rem; }
.cancel-recap dt { margin-top: .8rem; font-weight: 700; font-size: .85rem; opacity: .8; }
.cancel-recap dd { margin: .1rem 0 0; }

.cancel-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Lien sous la carte de réservation */
.booking__cancel-link { margin: 0 auto 2rem; padding: 0; font-size: .85rem; text-align: center; }
.booking__cancel-link a { color: inherit; text-underline-offset: .2em; opacity: .8; }
.booking__cancel-link a:hover { opacity: 1; }