:root {
  /* Theme matched to École Saint-Jean-de-la-Croix
     (teal #349db7 primary, magenta #e42382 accent, Nunito/Open Sans). */
  --bg: #f3f8fb;
  --card: #ffffff;
  --ink: #21323a;
  --muted: #66787f;
  --accent: #349db7;
  --accent-dark: #2c87a0;
  --accent-2: #e42382;
  --accent-ink: #ffffff;
  --accent-disabled: #a9d3dd;
  --ok: #15803d;
  --full: #b91c1c;
  --border: #e5e7eb;
  --radius: 14px;
  --font-head: "Nunito", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
}

.topbar {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--accent-ink);
  padding: calc(env(safe-area-inset-top) + 22px) 20px 22px;
  text-align: center;
}

.topbar h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.subtitle {
  margin: 6px 0 0;
  opacity: 0.9;
  font-size: 0.9rem;
}

.info-panel[hidden] {
  display: none;
}

.info-panel {
  width: calc(100% - 32px);
  max-width: 608px;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fdeaf3;
  border: 1px solid #f6c2dd;
  border-left: 4px solid var(--accent-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-panel p {
  margin: 0;
  font-size: 0.92rem;
  color: #8a1d5c;
  white-space: pre-wrap;
}

.info-panel .info-icon {
  font-size: 1.4rem;
  line-height: 1;
}

/* Blue variant (announcement banner), to distinguish it from the magenta one. */
.info-panel--blue {
  background: #e8f4f8;
  border-color: #b9dde7;
  border-left-color: var(--accent);
}

.info-panel--blue p {
  color: #1b5a6e;
}

.content {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}

.status {
  text-align: center;
  color: var(--muted);
  padding: 32px 0;
}

.section {
  margin-bottom: 28px;
}

.section-head {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-2);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent-2);
}

.section-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.activity {
  margin-bottom: 24px;
}

.activity-head {
  margin-bottom: 10px;
}

.activity-head h3 {
  margin: 0 0 2px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.activity-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.slot {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slot-time {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  font-weight: 600;
}

.slot-duration {
  font-weight: 600;
  /* font-weight: 800;
  font-size: 1.05rem;
  color: var(--accent-dark); */
}

.slot-window {
  font-weight: 400;
  font-size: 0.85rem;
  /* color: var(--ink); */
}

.seats {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.seats.ok {
  color: var(--ok);
  background: #dcfce7;
}

.seats.full {
  color: var(--full);
  background: #fee2e2;
}

.btn-primary,
.btn-ghost {
  font: inherit;
  border-radius: 10px;
  padding: 9px 16px;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:disabled {
  background: var(--accent-disabled);
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}

.signup-btn {
  font: inherit;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.signup-btn:disabled {
  background: var(--accent-disabled);
  cursor: not-allowed;
}

.empty-vol {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* Dialog */
dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(92vw, 420px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

#signup-form {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#signup-form h2 {
  margin: 0;
}

.dialog-slot {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

#signup-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

#signup-form input {
  font: inherit;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

#signup-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.field-hint {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.link-btn {
  align-self: flex-start;
  margin: -8px 0 0;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.form-error {
  margin: 0;
  color: var(--full);
  font-size: 0.85rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 20px);
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  z-index: 10;
}

/* --- Admin panel --------------------------------------------------------- */

.admin-login {
  max-width: 360px;
  margin: 24px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-login h2 {
  margin: 0;
}

.admin-login label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.admin-login input {
  font: inherit;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.admin-login input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--ink);
}

.admin-bar-actions {
  display: flex;
  gap: 8px;
}

.vol-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.vol-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
}

.vol-list a {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
}

.vol-nocontact {
  color: var(--muted);
}

/* Admin seat badges: staffing health (empty = red, partial = orange, full = green). */
.seats.seat-empty {
  color: var(--full);
  background: #fee2e2;
}

.seats.seat-partial {
  color: #b45309;
  background: #ffedd5;
}

.seats.seat-complete {
  color: var(--ok);
  background: #dcfce7;
}

/* --- Guided flow (/parcours) --------------------------------------------- */

.step-intro {
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.choice-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 40px 16px 18px;
  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.08s ease;
}

.choice-card:hover {
  border-color: var(--accent);
  border-left-color: var(--accent-2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.choice-card:active {
  transform: translateY(0);
}

.choice-label {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent-dark);
}

.choice-sub {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

/* Sub-section card: the list of activities it contains, emphasised and capped
   to two lines (ellipsis) so a long list never overflows the card. */
.choice-activities {
  color: var(--ink);
  /* font-weight: 600; */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.choice-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-2);
  line-height: 1;
}

.step-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.back-btn {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
}

.back-btn:hover {
  border-color: var(--accent);
}

.step-crumb {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

.step-head {
  margin-bottom: 14px;
}

.step-title {
  margin: 0 0 2px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-2);
}

.step-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.slot-list {
  display: flex;
  flex-direction: column;
}

#page-switch {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 40px;
  text-align: center;
}

#page-switch a {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

#page-switch a:hover {
  text-decoration: underline;
}
