body {
  font-family: system-ui, sans-serif;
  background: #f7f7f8;
  margin: 0;
}

.container {
  max-width: 820px;
  margin: 24px auto;
  padding: 0 16px;
}

h1 {
  font-size: 22px;
  margin: 0 0 18px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
}

.card-title {
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.muted {
  color: #666;
  margin: 8px 0 10px;
}

.list {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
}

.row:last-child {
  border-bottom: 0;
}

.time {
  font-weight: 600;
}

.btn {
  display: inline-block;
  padding: 9px 12px;
  border-radius: 10px;
  background: #eee;
  text-decoration: none;
  color: #111;
}

.btn.primary {
  background: #111;
  color: #fff;
}

.pill.off {
  background: #f1f1f1;
  color: #666;
  padding: 6px 10px;
  border-radius: 999px;
}

.form {
  background: white;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
}

.form input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  margin: 6px 0 12px;
}

.radios {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.disabled {
  opacity: .4;
}

.disabled-link {
  pointer-events: none;
  opacity: .45;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0 0 6px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 18px;
}

.stat-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.section-block {
  margin-top: 28px;
}

.section-block h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.actions form {
  margin: 0;
}

.actions .btn,
.actions button.btn {
  margin: 0;
}

button.btn {
  border: 0;
  cursor: pointer;
  font: inherit;
}

button.btn.primary {
  background: #111;
  color: #fff;
}

.card p {
  margin: 6px 0;
}

@media (max-width: 640px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .actions {
    flex-direction: column;
  }

  .actions .btn,
  .actions form,
  .actions button {
    width: 100%;
  }

  .actions button.btn {
    width: 100%;
  }
}

.btn.loading {
  background: #ccc !important;
  color: #666 !important;
  cursor: not-allowed;
  pointer-events: none;
}

button.btn:disabled,
.btn.disabled {
  background: #ccc !important;
  color: #666 !important;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 1;
}

.teacher-list {
  overflow: hidden;
}

.teacher-row {
  gap: 16px;
  align-items: center;
}

.teacher-main {
  flex: 1;
  min-width: 0;
}

.teacher-student {
  font-weight: 700;
  margin-bottom: 4px;
}

.teacher-meta {
  margin: 0;
}

.teacher-meta-small {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
  word-break: break-word;
}

.teacher-status {
  display: flex;
  align-items: center;
}

.teacher-actions {
  justify-content: flex-end;
  align-items: center;
}

.pill-status {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.pill-status.waiting {
  background: #f1f1f1;
  color: #666;
}

.pill-status.live {
  background: #e8f7ea;
  color: #18794e;
}

.pill-status.done {
  background: #eef1f5;
  color: #5b6470;
}

@media (max-width: 760px) {
  .teacher-row {
    flex-direction: column;
    align-items: stretch;
  }

  .teacher-status {
    justify-content: flex-start;
  }

  .teacher-actions {
    justify-content: flex-start;
  }
}


.teacher-meta-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pill-status.paid {
  background: #e8f7ea;
  color: #18794e;
}

.pill-status.pending {
  background: #fff3cd;
  color: #946200;
}

.pill-status.neutral {
  background: #f1f1f1;
  color: #666;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.header-actions form {
  margin: 0;
}

.btn.danger {
  background: #b42318;
  color: #fff;
}

.btn.danger:hover {
  opacity: 0.92;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid #e9e9e9;
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo {
  text-decoration: none;
  color: #111;
  font-weight: 800;
  font-size: 18px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: #444;
  font-weight: 500;
}

.site-nav a:hover {
  color: #111;
}

.hero {
  padding: 48px 0 28px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: center;
}

.hero-eyebrow {
  margin: 0 0 10px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
}

.hero h1 {
  font-size: 38px;
  line-height: 1.08;
  margin: 0 0 14px;
}

.hero-text {
  font-size: 17px;
  color: #444;
  margin: 0 0 20px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-card {
  padding: 20px;
}

.steps {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step p {
  margin: 4px 0 0;
  color: #666;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 28px;
}

.landing-section {
  padding: 24px 0 8px;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0 0 8px;
}

.feature-grid .card {
  min-height: 120px;
}

.landing-cta {
  padding-bottom: 48px;
}

.cta-card {
  text-align: center;
  padding: 28px;
}

@media (max-width: 760px) {
  .site-header-inner {
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    gap: 12px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 30px;
  }
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn-danger {
  background: #b91c1c;
  color: white;
  border: none;
}

.btn-danger:hover {
  opacity: 0.95;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.alert.success {
  background: #ecfdf5;
  color: #065f46;
}

.alert.error {
  background: #fef2f2;
  color: #991b1b;
}

.avail-jump-card {
  margin-bottom: 18px;
}

.avail-jump-form {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.avail-jump-form select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
  font: inherit;
}

.avail-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.avail-day-card {
  padding: 14px;
}

.avail-day-header {
  margin-bottom: 12px;
}

.avail-day-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.avail-day-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.avail-slot {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 10px;
  padding: 10px 8px;
  font: inherit;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .02s ease;
}

.avail-slot:hover {
  border-color: #999;
}

.avail-slot.is-open {
  background: #111;
  color: #fff;
  border-color: #111;
}

.avail-slot.is-reserved {
  background: #f1f1f1;
  color: #888;
  border-color: #ddd;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .avail-day-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


.gap-row {
  justify-content: center;
  background: #fafafa;
}

.gap-dots {
  color: #888;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 4px;
}



.timeline-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #666;
  margin-bottom: 12px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: -1px;
  border: 1px solid #ddd;
}

.legend-open {
  background: #111;
  border-color: #111;
}

.legend-reserved {
  background: #f59e0b;
  border-color: #f59e0b;
}

.legend-closed {
  background: #fff;
  border-color: #ddd;
}

.day-mini-timeline.compact {
  --slot-size: 7px;

  display: grid;
  grid-template-columns: repeat(34, var(--slot-size));
  width: calc(34 * var(--slot-size));
  height: var(--slot-size);
  border: 1px solid #1a1a1a;
  border-radius: 0;
  overflow: hidden;
  margin: 12px 0 10px;
  background: #ffffff;
}

/* base = fermé futur */
.mini-slot {
  display: block;
  width: var(--slot-size);
  height: var(--slot-size);
  background: #ffffff;
}

/* ouvert futur */
.mini-slot-open {
  background: #1a1a1a;
}

/* réservé futur */
.mini-slot-reserved {
  background: #f59e0b;
}

/* passé : toujours gris, peu importe l'état */
.mini-slot-past {
  background: #9a9a9a !important;
}

/* hover visuel */
.mini-slot {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
}

.mini-slot:hover {
  transform: scaleY(1.8);
  z-index: 3;
  position: relative;
  box-shadow: 0 0 0 1px #111;
}

/* tooltip */
.mini-tooltip {
  position: fixed;
  background: #111;
  color: #fff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
  transform: translate(-50%, -120%);
  opacity: 0;
  transition: opacity 0.1s ease;
}

.mini-slot {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}