/* ── Page header + breadcrumb (matches other pages) ──────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-block: 1rem 1.5rem;
}
.page-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  color: var(--text);
  margin: 0 0 0.4rem;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0; margin: 0;
  gap: 0;
  font-size: var(--fs-sm);
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  margin-inline: 0.5rem;
  color: var(--text-subtle);
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb [aria-current="page"] { color: var(--primary); font-weight: var(--fw-medium); }
.page-header-actions { display: flex; gap: var(--space-2); }

/* ── Reservation intro ───────────────────────────────────────── */
.reserve-intro {
  text-align: center;
  max-width: 44rem;
  margin-inline: auto;
  margin-block-end: var(--space-8);
}
.reserve-intro-title {
  color: var(--primary);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-2xl);
  margin-block-end: var(--space-2);
}
.reserve-intro-subtitle {
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  margin-block-end: var(--space-1);
}
.reserve-intro-note {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ── Tab list ────────────────────────────────────────────────── */
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  list-style: none;
  padding: 0;
  margin-block-end: var(--space-6);
}
.tab-btn {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}
.tab-btn:hover { background: var(--surface-hover); color: var(--text); }
.tab-btn[aria-selected="true"] {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: var(--primary);
}

/* ── Tab panels ──────────────────────────────────────────────── */
[role="tabpanel"] { display: none; }
[role="tabpanel"][aria-hidden="false"] { display: block; }

/* ── Activity grid ───────────────────────────────────────────── */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--space-5);
}

/* Loading / empty / error line for a panel's grid (pages/reserver-une-activite.js) */
.activity-status {
  margin: 0;
  padding: var(--space-5) var(--space-4);
  text-align: center;
  color: var(--text-muted);
}
.activity-status.is-error { color: var(--danger); }

/* The card IS the link to the activity's slot list — mirrors app-card visuals
   without shadow DOM.
   --activity-card-bg / --activity-card-fg are the back office's per-activity
   colours (activites.couleur / couleurTexte), set by the page controller through
   the CSSOM. They fall back to theme tokens so a card whose colours were left
   empty still matches the rest of the portal. */
.activity-card {
  background: var(--activity-card-bg, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-5);
  gap: var(--space-3);
  min-block-size: 10rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}
/* The affordance the "Réserver" button used to provide: the whole card grows a
   little, so it reads as one target. The border is left alone on purpose — a card
   can carry the gym's own background colour, and recolouring its edge on hover
   fought with that. */
.activity-card:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}
.activity-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .activity-card { transition: none; }
  .activity-card:hover { transform: none; }
}
.activity-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.activity-card-img--default {
  width: auto;
  aspect-ratio: unset;
  max-block-size: 6rem;
  object-fit: contain;
  border-radius: 0;
}
.activity-card-name {
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--activity-card-fg, var(--text));
}

/* Cards are uniformly sized — photo (when there is one) and name. Legacy switched
   between three layouts on the two back-office image flags, which made one grid look
   like three. The only variation kept is the caption: an activity whose photo already
   has the name drawn into it (titreInclusImage) hides it rather than printing the name
   twice. See cardFor() in the page module. */
