/*
 * Garalabosse - Pages Sport.
 * Tous les sélecteurs sont préfixés par « gbs- » pour ne pas interférer avec le thème.
 */

/* ---------- Variables ---------- */
.gbs {
  --gbs-bg: #f8fafc;
  --gbs-text: #101c28;
  --gbs-muted: #67737c;
  --gbs-primary: #065f74;
  --gbs-border: #e0e5e9;
  --gbs-alt: #f1f4f6;
  --gbs-accent: #fa6e1d;
  --gbs-accent-dark: #e84400;
  --gbs-green: #13c784;
  --gbs-green-deep: #008448;
  --gbs-radius: 10px;
  --gbs-shadow: 0 1px 3px rgba(16, 28, 40, 0.06), 0 8px 24px -8px rgba(16, 28, 40, 0.1);
  --gbs-shadow-hover: 0 12px 32px -8px rgba(16, 28, 40, 0.18);

  color: var(--gbs-text);
  line-height: 1.6;
}

/*
 * Sections pleine largeur : le thème place le contenu dans un conteneur,
 * on déborde de ce conteneur sans créer de défilement horizontal.
 */
#module-gbsport-sport #wrapper,
#module-gbsport-discipline #wrapper {
  overflow-x: clip;
  padding-top: 0;
}

.gbs {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.gbs *,
.gbs *::before,
.gbs *::after {
  box-sizing: border-box;
}

.gbs img {
  max-width: 100%;
  height: auto;
}

.gbs h1,
.gbs h2,
.gbs h3 {
  margin: 0;
  color: var(--gbs-primary);
  line-height: 1.2;
}

.gbs ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Mise en page ---------- */
.gbs-container {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.gbs-container--narrow {
  max-width: 64rem;
}

.gbs-section {
  padding-block: 3.5rem;
}

.gbs-section--alt {
  background: var(--gbs-alt);
}

.gbs-heading {
  text-align: center;
}

.gbs-heading h2,
.gbs-title-center {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
}

.gbs-heading--ruled {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--gbs-border);
}

.gbs-eyebrow {
  margin: 0;
  color: var(--gbs-accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.gbs-muted {
  margin: 0;
  color: var(--gbs-muted);
  font-size: 0.875rem;
}

.gbs-lead {
  max-width: 48rem;
  margin: 1rem auto 0;
  color: var(--gbs-muted);
  text-align: center;
}

/* ---------- Boutons ---------- */
.gbs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s;
}

.gbs-btn:hover,
.gbs-btn:focus-visible {
  opacity: 0.9;
  text-decoration: none;
}

.gbs-btn--cta {
  background: linear-gradient(135deg, var(--gbs-accent), var(--gbs-accent-dark));
  color: #fff;
}

.gbs-btn--green {
  background: var(--gbs-green-deep);
  color: #fff;
}

.gbs-btn--dark {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(16, 28, 40, 0.6);
  color: #fff;
}

.gbs-btn--outline {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(3px);
}

.gbs-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.gbs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.gbs-actions--center {
  justify-content: center;
}

/* ---------- Bandeau d'en-tête ---------- */
.gbs-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #061022;
  color: #fff;
}

.gbs-hero--tall {
  display: flex;
  min-height: 40rem;
  align-items: center;
}

.gbs-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gbs-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(16, 28, 40, 0.45);
}

.gbs-hero__shade--sport {
  background: linear-gradient(100deg, #002f36 0%, rgba(0, 34, 48, 0.96) 42%, rgba(5, 23, 41, 0.78) 72%, rgba(6, 16, 34, 0.45) 100%);
}

.gbs-hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
  padding-block: 3.5rem;
}

.gbs-hero__inner--center {
  flex-direction: column;
  justify-content: center;
  max-width: 64rem;
  padding-block: 6rem;
  text-align: center;
}

.gbs-hero__text {
  flex: 1 1 22rem;
  min-width: 0;
  max-width: 48rem;
}

.gbs-badge {
  display: inline-block;
  margin: 0;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(19, 199, 132, 0.14);
  color: var(--gbs-green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gbs .gbs-hero__title {
  margin-top: 1.25rem;
  color: #fff;
  font-size: clamp(2.5rem, 4.6vw, 3.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
  text-transform: uppercase;
}

.gbs .gbs-hero__title--page {
  margin-top: 0;
  font-size: clamp(2rem, 5vw, 3.75rem);
  letter-spacing: normal;
  line-height: 1.15;
  text-transform: none;
}

.gbs-hero__title-accent {
  display: block;
  margin-top: 0.25rem;
  color: var(--gbs-green);
  font-style: italic;
}

.gbs-hero__intro {
  max-width: 36rem;
  margin: 1.25rem 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.gbs-hero__intro--wide {
  max-width: 56rem;
  margin-inline: auto;
  color: #fff;
  font-size: 1.05rem;
}

.gbs-hero__side {
  flex: 0 1 36rem;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  object-fit: cover;
}

.gbs-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 40rem;
  margin-top: 2rem;
}

.gbs-features li {
  padding: 1rem;
  border: 1px solid rgba(19, 199, 132, 0.22);
  border-radius: 1rem;
  background: rgba(17, 32, 59, 0.7);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.gbs-features strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fff;
  font-size: 0.95rem;
}

/* ---------- Cartes des disciplines ---------- */
.gbs-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.gbs-card {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--gbs-border);
  border-radius: var(--gbs-radius);
  background: #fff;
  box-shadow: var(--gbs-shadow);
  transition: box-shadow 0.2s;
}

.gbs-card:hover,
.gbs-card:focus-within {
  box-shadow: var(--gbs-shadow-hover);
}

.gbs-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.gbs-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gbs-card__body {
  display: block;
  padding: 1.25rem;
}

.gbs-card__title {
  display: block;
  color: var(--gbs-primary);
  font-size: 1.125rem;
  font-weight: 600;
}

.gbs-card__zones {
  display: block;
  margin-top: 0.5rem;
  color: var(--gbs-muted);
  font-size: 0.875rem;
}

/* ---------- Pages disciplines ---------- */
.gbs-band {
  padding-block: 4rem;
  background: var(--gbs-primary);
  color: #fff;
  text-align: center;
}

.gbs-band__block + .gbs-band__block {
  margin-top: 2.5rem;
}

.gbs .gbs-band h2 {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
}

.gbs-band p {
  margin: 0.75rem 0 0;
}

.gbs-banner {
  display: block;
  width: 100%;
  height: 32rem;
  object-fit: cover;
}

.gbs-items {
  display: grid;
  gap: 3rem 1rem;
  margin-top: 2.5rem;
}

.gbs-item {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.gbs-item__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  object-fit: cover;
}

.gbs .gbs-item h3 {
  margin-top: 1.5rem;
  font-size: 1.6rem;
  font-weight: 600;
}

.gbs-item__text {
  flex: 1;
  margin: 0.75rem 0 0;
  color: var(--gbs-muted);
}

.gbs-item .gbs-btn {
  width: 100%;
  margin-top: 1.25rem;
}

.gbs-table-wrap {
  margin-top: 2.5rem;
  overflow-x: auto;
  border: 1px solid var(--gbs-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--gbs-shadow);
}

.gbs-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.gbs-table th,
.gbs-table td {
  padding: 1rem 1.5rem;
}

.gbs-table thead th {
  background: var(--gbs-primary);
  color: #fff;
}

.gbs-table tbody tr {
  border-top: 1px solid var(--gbs-border);
}

.gbs-table tbody tr:hover {
  background: var(--gbs-alt);
}

.gbs-table tbody th {
  color: var(--gbs-primary);
}

.gbs-table td {
  color: var(--gbs-muted);
}

.gbs-faq {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}

.gbs-faq__entry {
  padding: 0 1.5rem;
  border: 1px solid var(--gbs-border);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: var(--gbs-shadow);
}

.gbs-faq__entry summary {
  padding-block: 1.1rem;
  font-weight: 600;
  cursor: pointer;
}

.gbs-faq__entry p {
  margin: 0;
  padding-bottom: 1.1rem;
  color: var(--gbs-muted);
}

.gbs-cta {
  padding-block: 4rem;
  background: var(--gbs-primary);
  color: #fff;
  text-align: center;
}

.gbs .gbs-cta h2 {
  color: #fff;
  font-size: 1.9rem;
  font-weight: 700;
}

.gbs-cta p {
  margin: 0.75rem 0 1.5rem;
}

.gbs-others {
  padding-block: 1.5rem;
}

/* ---------- Défilement des réalisations ---------- */
.gbs-marquee {
  position: relative;
  margin-top: 2.5rem;
  overflow: hidden;
}

.gbs-marquee::before,
.gbs-marquee::after {
  position: absolute;
  inset-block: 0;
  z-index: 1;
  width: 4rem;
  content: "";
  pointer-events: none;
}

.gbs-marquee::before {
  left: 0;
  background: linear-gradient(to right, #fff, transparent);
}

.gbs-marquee::after {
  right: 0;
  background: linear-gradient(to left, #fff, transparent);
}

.gbs-marquee__track {
  display: flex;
  width: max-content;
  animation: gbs-marquee var(--gbs-duration, 80s) linear infinite;
}

.gbs-marquee:hover .gbs-marquee__track,
.gbs-gallery:has(dialog[open]) .gbs-marquee__track {
  animation-play-state: paused;
}

.gbs-marquee__group {
  display: flex;
  flex-shrink: 0;
  gap: 1.5rem;
  padding-right: 1.5rem;
}

.gbs-marquee__item {
  width: 20rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--gbs-shadow);
}

.gbs-marquee__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.gbs-marquee__open img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gbs-marquee__caption {
  margin: 0;
  padding: 1rem;
  font-weight: 600;
}

@keyframes gbs-marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gbs-marquee {
    overflow-x: auto;
  }

  .gbs-marquee__track {
    animation: none;
  }
}

/* ---------- Visionneuse plein écran ---------- */
.gbs-lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  background: rgba(6, 16, 34, 0.96);
  color: #fff;
}

.gbs-lightbox[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.gbs-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.gbs-lightbox__image {
  min-height: 0;
  max-width: 100%;
  flex: 1;
  object-fit: contain;
  user-select: none;
}

.gbs-lightbox__caption {
  margin: 0;
  text-align: center;
  font-weight: 600;
}

.gbs-lightbox__close,
.gbs-lightbox__nav {
  position: absolute;
  display: flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.gbs-lightbox__close {
  top: 1rem;
  right: 1rem;
}

.gbs-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}

.gbs-lightbox__nav--prev {
  left: 1rem;
}

.gbs-lightbox__nav--next {
  right: 1rem;
}

/* ---------- Écrans larges ---------- */
@media (min-width: 576px) {
  .gbs-card {
    width: calc(50% - 0.625rem);
  }
}

@media (min-width: 768px) {
  .gbs-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .gbs-card {
    width: calc(25% - 0.95rem);
  }

  .gbs-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .gbs-features {
    grid-template-columns: 1fr;
  }

  .gbs-actions .gbs-btn {
    width: 100%;
  }

  .gbs-banner {
    height: 16rem;
  }

  .gbs-hero__inner--center {
    padding-block: 4rem;
  }
}
