/* Triplan Website / Containers / Group Trips List — V5
 * Shortcode: [triplan_group_trips_list]
 * Catalogue filtrable, scindé National / International, cartes V5.
 */

.tp-group-trips-list {
  padding: var(--tp-section-padding-y, 64px) 0 calc(var(--tp-section-padding-y, 64px) + 4px);
  background: var(--tp-ivory, #F6F3EE);
  color: var(--tp-ink, #0B2239);
  font-family: var(--tp-body-font, "Inter", sans-serif);
}

.tp-group-trips-list *,
.tp-group-trips-list *::before,
.tp-group-trips-list *::after {
  box-sizing: border-box;
}

.tp-group-trips-list__inner {
  width: 100%;
  max-width: var(--tp-content-max-width, 1200px);
  margin: 0 auto;
  padding: 0 var(--tp-section-padding-x-desktop, clamp(16px, 4vw, 48px));
}

/* ── Section (National / International) ─────────────────────── */
.tp-gt-section {
  margin-top: clamp(36px, 5vw, 52px);
}

.tp-gt-section:first-child {
  margin-top: 0;
}

.tp-gt-section[hidden] {
  display: none !important;
}

.tp-gt-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}

.tp-gt-section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tp-cyan-hover, #087C89);
}

.tp-gt-section__tick {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tp-terracotta, #D9784B);
}

.tp-gt-section__title {
  margin: 0;
  font-family: var(--tp-heading-font, "Bricolage Grotesque", sans-serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--tp-ink, #0B2239);
}

.tp-gt-section__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--tp-faint, #8A96A1);
}

.tp-gt-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: clamp(16px, 2vw, 24px);
}

@media (min-width: 768px) {
  .tp-group-trips-page.is-filtered-sparse .tp-gt-section__grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  }
}

/* ── Carte V5 ──────────────────────────────────────────────── */
.tp-gt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--tp-surface, #fff);
  border: 1px solid var(--tp-line, #E7E0D4);
  border-radius: var(--tp-card-radius, 18px);
  overflow: hidden;
  transition: transform var(--tp-motion-base, 0.2s) ease,
    border-color var(--tp-motion-base, 0.2s) ease,
    box-shadow var(--tp-motion-base, 0.2s) ease;
}

.tp-gt-card:hover,
.tp-gt-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--tp-cyan-soft, #9DE2E8);
  box-shadow: 0 12px 28px rgba(11, 34, 57, 0.10);
}

.tp-group-trip-list-card[hidden] {
  display: none !important;
}

.tp-gt-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--tp-midnight, #0B2239);
  overflow: hidden;
}

.tp-gt-card__surface-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  border-radius: inherit;
  background: transparent;
  text-decoration: none;
}

.tp-gt-card__surface-link:focus-visible {
  outline: 3px solid rgba(27, 186, 202, 0.55);
  outline-offset: -4px;
}

.tp-gt-card__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--tp-motion-base, 0.2s) ease;
}

.tp-gt-card:hover .tp-gt-card__media > img,
.tp-gt-card:focus-within .tp-gt-card__media > img {
  transform: scale(1.04);
}

.tp-gt-card__dates-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  min-height: 32px;
  max-width: calc(100% - 68px);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  pointer-events: none;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--tp-midnight, #0B2239);
  background: var(--tp-cyan-soft, #9DE2E8);
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1.25;
}

.tp-gt-card__dates-badge i {
  flex: 0 0 auto;
  color: var(--tp-cyan-hover, #087C89);
}

.tp-gt-card__fav {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--tp-ink, #0B2239);
  box-shadow: 0 6px 14px rgba(11, 34, 57, 0.16);
  text-decoration: none;
  transition: background var(--tp-motion-fast, 0.16s) ease, color var(--tp-motion-fast, 0.16s) ease;
}

.tp-gt-card__fav:hover {
  background: #fff;
  color: var(--tp-cyan-hover, #087C89);
}

.tp-gt-card__fav.is-active,
.tp-gt-card__fav[aria-pressed="true"] {
  color: var(--tp-terracotta, #D9784B);
}

.tp-gt-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 16px 18px 20px;
}

.tp-gt-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tp-gt-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tp-ink, #0B2239);
  background: var(--tp-cream, #F1ECE3);
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.tp-gt-card__pill i {
  color: var(--tp-cyan-hover, #087C89);
  font-size: 0.85em;
}

.tp-gt-card__pill--scarce {
  background: var(--tp-warn-bg, #F4E7D2);
  color: var(--tp-warn-fg, #9A5B00);
}

.tp-gt-card__pill--scarce i {
  color: var(--tp-warn-fg, #9A5B00);
}

.tp-gt-card__title {
  margin: 2px 0 0;
  font-family: var(--tp-heading-font, "Bricolage Grotesque", sans-serif);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--tp-ink, #0B2239);
}

.tp-gt-card__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--tp-muted, #5C6B79);
}

.tp-gt-card__meta i {
  flex: 0 0 auto;
  width: 14px;
  color: var(--tp-faint, #8A96A1);
  font-size: 0.9em;
  text-align: center;
}

.tp-gt-card__meta strong {
  color: var(--tp-midnight, #0B2239);
  font-weight: 700;
}

.tp-gt-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  text-align: right;
}

.tp-gt-card__price {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-family: var(--tp-heading-font, "Bricolage Grotesque", sans-serif);
  color: var(--tp-ink, #0B2239);
}

.tp-gt-card__price small {
  font-family: var(--tp-body-font, "Inter", sans-serif);
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--tp-muted, #5C6B79);
  line-height: 1.15;
}

.tp-gt-card__price strong {
  font-weight: 750;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.tp-gt-card__price--quote {
  font-size: 0.95rem;
  color: var(--tp-muted, #5C6B79);
}

.tp-gt-card__rating {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tp-muted, #5C6B79);
  white-space: nowrap;
}

.tp-gt-card__rating i {
  color: var(--tp-cyan, #1BBACA);
  margin-right: 3px;
}

.tp-gt-card__cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--tp-control-radius, 12px);
  background: var(--tp-cyan, #1BBACA);
  color: #fff;
  font-family: var(--tp-body-font, "Inter", sans-serif);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background var(--tp-motion-fast, 0.16s) ease, color var(--tp-motion-fast, 0.16s) ease, transform 0.12s ease;
}

.tp-gt-card:hover .tp-gt-card__cta,
.tp-gt-card:focus-within .tp-gt-card__cta {
  background: var(--tp-cyan-hover, #087C89);
  color: #fff;
}

/* ── État vide (piloté par le filtre JS) ───────────────────── */
.tp-group-trips-list__empty {
  margin-top: 32px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed var(--tp-line-2, #E4DED3);
  border-radius: var(--tp-r-card-lg, 20px);
  color: var(--tp-ink, #0B2239);
  text-align: center;
  background: var(--tp-surface-2, #FBF9F5);
}

.tp-group-trips-list__empty[hidden] {
  display: none !important;
}

.tp-group-trips-list__empty i {
  color: var(--tp-cyan, #1BBACA);
  font-size: 2rem;
}

.tp-group-trips-list__empty strong {
  font-size: 1rem;
  font-weight: 800;
}

.tp-group-trips-list__empty span {
  color: var(--tp-muted, #5C6B79);
  font-size: 0.92rem;
}

@media (max-width: 767px) {
  .tp-group-trips-page.is-filtered .tp-gt-section__grid {
    --tp-filtered-carousel-gap: 14px;
    display: flex;
    gap: var(--tp-filtered-carousel-gap);
    margin-inline: calc(var(--tp-section-padding-x-mobile, 16px) * -1);
    padding: 4px var(--tp-section-padding-x-mobile, 16px) 18px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: var(--tp-section-padding-x-mobile, 16px);
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .tp-group-trips-page.is-filtered .tp-gt-section__grid::-webkit-scrollbar {
    display: none;
  }

  .tp-group-trips-page.is-filtered .tp-gt-section__grid > .tp-group-trip-list-card:not([hidden]) {
    flex: 0 0 calc(76.923% - 3px);
    scroll-snap-align: start;
  }
}

@media (max-width: 600px) {
  .tp-gt-section__head {
    margin-bottom: 18px;
  }

  .tp-gt-card__body {
    padding: 15px 16px 18px;
  }
}
