/* ── 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); }

/* Plain div card — 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;
  text-align: center;
  padding: var(--space-5);
  gap: var(--space-3);
}
.activity-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.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), name, button. 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. */
/* Pinned to the bottom of the card so every button in a row lines up, whatever is
   above it — a name that wraps to two lines, or no caption at all when the photo
   already carries the name. Grid rows stretch the cards to equal height, so `auto`
   here absorbs the difference. */
.activity-reserve-btn {
  margin-block-start: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1.1rem;
  background: var(--primary);
  color: var(--primary-contrast);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out);
}
.activity-reserve-btn:hover { background: var(--primary-hover); }
