:root {
  --bg: #0a0a0b;
  --bg-panel: #0f0f11;
  --card-bg: #131315;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8e6e1;
  --text-muted: #8a8a8f;
  --text-faint: #5c5c61;
  --accent: #c9a24b;
  --accent-soft: rgba(201, 162, 75, 0.14);
  --essential: #9a2f34;
  --optional: #6b6f76;
  --watched: #4f8f6d;
  --radius: 3px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  background-image: radial-gradient(ellipse 1200px 600px at 50% -10%, rgba(255, 255, 255, 0.035), transparent);
  min-height: 100vh;
}

a { color: var(--accent); }

::selection { background: var(--accent-soft); color: var(--text); }

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 22px 32px 16px;
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--accent);
}

.brand h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: 0.3px;
  margin: 0;
  line-height: 1;
  color: var(--text);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.btn-outline.loading .refresh-icon {
  display: inline-block;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.overall-progress {
  max-width: 1240px;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-label-left {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
}

.progress-bar {
  flex: 1;
  height: 2px;
  background: var(--border);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
  width: 0%;
}

.progress-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Toolbar */
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.search-wrap {
  flex: 1;
  min-width: 200px;
}

#search-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  color: var(--text);
  padding: 6px 2px;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s ease;
}

#search-input::placeholder { color: var(--text-faint); }

#search-input:focus { border-color: var(--accent); }

.tabs {
  display: flex;
  gap: 22px;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-faint);
  padding: 4px 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text-muted); }

.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Phases */
.phase-section {
  margin-bottom: 56px;
}

.phase-header {
  margin-bottom: 10px;
}

.phase-subtitle {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 3px;
}

.phase-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  margin: 0;
  color: var(--text);
}

.phase-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 420px;
}

.phase-progress-wrap .progress-bar { height: 1px; }
.phase-progress-wrap .progress-label { font-size: 11.5px; color: var(--text-faint); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 20px 18px;
}

/* Card */
.card {
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, #1c1c1f, #101012);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover .poster-wrap {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.card.watched .poster-wrap img {
  filter: grayscale(0.55) brightness(0.6);
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
  padding: 12px;
  line-height: 1.4;
}

.eyebrow-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  padding: 3px 7px;
  background: rgba(10, 10, 11, 0.55);
  backdrop-filter: blur(3px);
  border-left: 2px solid var(--optional);
}

.eyebrow-tag.essentiel { border-left-color: var(--essential); }

.type-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(10, 10, 11, 0.55);
  backdrop-filter: blur(3px);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  background: linear-gradient(to top, rgba(6, 6, 7, 0.94) 5%, rgba(6, 6, 7, 0.55) 55%, transparent 100%);
  pointer-events: none;
}

.card-info {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
}

.card-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.card-meta {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.card-note {
  font-size: 10px;
  color: var(--accent);
  margin-top: 3px;
  line-height: 1.3;
}

.watched-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(10, 10, 11, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  transition: all 0.2s ease;
}

.card.watched .watched-badge {
  background: var(--watched);
  border-color: var(--watched);
  color: #0a1410;
}

.card.watched .card-title { color: #b9b7b1; }
.card.watched .scrim { opacity: 0.75; }

.empty-state {
  text-align: center;
  color: var(--text-faint);
  padding: 70px 0;
  font-size: 14px;
  font-style: italic;
  font-family: var(--font-display);
}

footer {
  text-align: center;
  padding: 36px 20px 48px;
  color: var(--text-faint);
  font-size: 11.5px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 11px 20px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  border-color: var(--essential);
  color: #e2a4a7;
}

/* Confirmation dialog */
.confirm-overlay[hidden] { display: none; }

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 7, 0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.confirm-overlay.show { opacity: 1; }

.confirm-dialog {
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  max-width: 360px;
  width: 100%;
  padding: 28px 26px 22px;
  transform: translateY(8px);
  transition: transform 0.18s ease;
}

.confirm-overlay.show .confirm-dialog { transform: translateY(0); }

.confirm-eyebrow {
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--essential);
}

.confirm-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.3;
}

.confirm-text {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 22px;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-solid {
  background: var(--essential);
  border: 1px solid var(--essential);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-solid:hover {
  background: #b23c42;
  border-color: #b23c42;
}

@media (max-width: 640px) {
  .topbar { padding: 18px 18px 14px; }
  .topbar-inner { flex-wrap: wrap; }
  .brand h1 { font-size: 26px; }
  main { padding: 20px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 16px; }
  .tabs { justify-content: space-between; }
}

/* Info button on cards */
.info-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(10, 10, 11, 0.6);
  backdrop-filter: blur(3px);
  color: #fff;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  z-index: 2;
}

.info-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}

.type-icon { right: 40px; top: 10px; height: 20px; }

/* Info dialog */
.info-overlay[hidden] { display: none; }

.info-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 7, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.info-overlay.show { opacity: 1; }

.info-dialog {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  width: 100%;
  max-width: 780px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.info-overlay.show .info-dialog { transform: translateY(0); }

.info-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(10, 10, 11, 0.7);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}

.info-close:hover { border-color: var(--accent); color: var(--accent); }

.info-hero {
  height: 180px;
  background-color: #17171a;
  background-size: cover;
  background-position: center 20%;
  position: relative;
}

.info-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 15, 17, 0.2), var(--bg-panel));
}

.info-content {
  display: flex;
  gap: 28px;
  padding: 0 32px 30px;
  margin-top: -80px;
  position: relative;
  z-index: 1;
}

.info-poster {
  flex: 0 0 170px;
  aspect-ratio: 2 / 3;
  background: #17171a;
  border: 1px solid var(--border-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  align-self: flex-start;
}

.info-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

.info-poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--text-faint);
}

.info-main { flex: 1; min-width: 0; padding-top: 88px; }

.info-eyebrow {
  margin: 0 0 6px;
  font-size: 10.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}

.info-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 8px;
}

.info-meta { margin: 0 0 12px; font-size: 13px; color: var(--text-muted); min-height: 1em; }

.info-tagline {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-muted);
  font-size: 15px;
}

.info-tagline:empty, .info-note:empty { display: none; }

.info-overview { margin: 0 0 14px; font-size: 14px; line-height: 1.65; color: #cfcdc8; }

.info-note { margin: 0 0 14px; font-size: 12.5px; color: var(--accent); }

.info-extra { margin: 0 0 22px; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }

.info-extra dt {
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 10.5px;
  font-weight: 600;
  padding-top: 2px;
}

.info-extra dd { margin: 0; color: var(--text); line-height: 1.5; }

.info-extra.loading::after {
  content: 'Chargement des détails…';
  grid-column: 1 / -1;
  color: var(--text-faint);
  font-style: italic;
}

.info-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.info-actions a.btn-outline { text-decoration: none; display: inline-block; }
.info-actions [hidden] { display: none; }

.btn-watch.is-watched {
  background: transparent;
  border-color: var(--watched);
  color: var(--watched);
}

.btn-watch.is-watched:hover { background: rgba(79, 143, 109, 0.12); }

@media (max-width: 640px) {
  .info-content { flex-direction: column; padding: 0 20px 24px; gap: 0; }
  .info-poster { flex-basis: auto; width: 120px; }
  .info-main { padding-top: 16px; }
  .info-title { font-size: 23px; }
  .info-extra { grid-template-columns: 1fr; gap: 2px; }
  .info-extra dd { margin-bottom: 8px; }
}

/* View switch */
.view-switch {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  width: fit-content;
  padding: 3px;
  border-radius: var(--radius);
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.view-btn:hover { color: var(--text); }
.view-btn.active { background: var(--accent-soft); color: var(--accent); }

.card-plan {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

/* Calendar */
.calendar-view[hidden], #catalogue-view[hidden] { display: none; }

.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.cal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.cal-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  margin: 0;
  min-width: 210px;
  text-align: center;
}

.cal-nav {
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.cal-nav:hover { border-color: var(--accent); color: var(--accent); }
.cal-today { margin-left: auto; }

.cal-weekdays, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal-weekdays span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 8px 8px;
}

.cal-grid {
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.cal-cell {
  min-height: 112px;
  padding: 6px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  outline: none;
  transition: background 0.15s ease;
}

.cal-cell:hover { background: rgba(255, 255, 255, 0.025); }
.cal-cell:focus-visible { box-shadow: inset 0 0 0 1px var(--accent); }
.cal-cell.outside { background: rgba(0, 0, 0, 0.25); }
.cal-cell.outside .cal-num { color: var(--text-faint); opacity: 0.6; }
.cal-cell.selected { background: var(--accent-soft); }
.cal-cell.drag-over { background: rgba(201, 162, 75, 0.22); box-shadow: inset 0 0 0 1px var(--accent); }

.cal-num {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-cell.past .cal-num { color: var(--text-faint); }
.cal-cell.today .cal-num { background: var(--accent); color: #151208; }

.cal-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.cal-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 2px 6px 2px 2px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 2px solid var(--optional);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  cursor: grab;
  border-radius: 2px;
  transition: border-color 0.15s ease;
}

.cal-chip.essentiel { border-left-color: var(--essential); }
.cal-chip:hover { border-color: var(--border-strong); }
.cal-chip:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
.cal-chip.dragging { opacity: 0.4; }
.cal-chip.done { opacity: 0.55; border-left-color: var(--watched); }
.cal-chip.done .cal-chip-label { text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.35); }

.cal-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cal-chip .thumb { width: 16px; height: 24px; font-size: 9px; }

.cal-more { font-size: 11px; color: var(--text-faint); padding-left: 4px; }

.cal-dots { display: none; }

.thumb {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1c1c1f;
  color: var(--text-faint);
  font-weight: 700;
  overflow: hidden;
  border-radius: 1px;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cal-hint { font-size: 12px; color: var(--text-faint); margin: 12px 0 0; }

/* Side panel */
.cal-side {
  position: sticky;
  top: 150px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 20px;
}

.cal-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cal-day-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin: 0;
  line-height: 1.25;
}

.cal-day-head .btn-solid { padding: 8px 12px; white-space: nowrap; }

.cal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.cal-list-label {
  margin: 22px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-faint);
}

.cal-list-label.late { color: #d07a7f; }

.cal-empty { font-size: 13px; color: var(--text-faint); padding: 6px 0; }

.cal-row { display: flex; align-items: center; gap: 10px; }
.cal-row .thumb { width: 32px; height: 48px; font-size: 12px; }

.cal-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  color: inherit;
  font-family: var(--font-body);
  cursor: pointer;
}

.cal-row-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-row-sub { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-row-text:hover .cal-row-title { color: var(--accent); }
.cal-row.done .cal-row-title { color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.3); }

.cal-check {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: transparent;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-check:hover { border-color: var(--watched); color: var(--watched); }
.cal-row.done .cal-check { background: var(--watched); border-color: var(--watched); color: #fff; }

/* Planner & entry dialogs */
.plan-dialog, .entry-dialog { max-width: 440px; }
.plan-eyebrow { color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; flex: 1; }

.field span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-faint);
}

.field select, .field input {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 9px 10px;
  font-family: var(--font-body);
  font-size: 13.5px;
  border-radius: var(--radius);
  outline: none;
  color-scheme: dark;
}

.field select:focus, .field input:focus { border-color: var(--accent); }

.field-row { display: flex; gap: 10px; }
.field-small { flex: 0 0 82px; }

.plan-status { font-size: 12.5px; color: var(--text-muted); margin: 0 0 14px; }
.plan-status[hidden], .plan-tv[hidden], #plan-tv-fields[hidden] { display: none; }

.plan-summary { font-size: 13px; color: var(--accent); margin: 2px 0 20px; min-height: 1em; }

.btn-solid:disabled { opacity: 0.5; cursor: default; }

.entry-actions { align-items: center; flex-wrap: wrap; }
.entry-actions .spacer { flex: 1; }

.btn-link-danger {
  background: none;
  border: none;
  padding: 0;
  color: #d07a7f;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-link-danger:hover { color: #f0a0a4; }

@media (max-width: 960px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .cal-side { position: static; }
}

@media (max-width: 640px) {
  .view-switch { width: 100%; }
  .view-btn { flex: 1; }
  .cal-title { font-size: 19px; min-width: 0; flex: 1; white-space: nowrap; }
  .cal-today { padding: 8px 10px; }
  .cal-weekdays span { padding: 0 0 6px; text-align: center; font-size: 9.5px; letter-spacing: 0.8px; }
  .cal-cell { min-height: 58px; padding: 4px 2px; align-items: center; }
  .cal-chips, .cal-hint { display: none; }
  .cal-dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
  .cal-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
  .cal-dot.done { background: var(--watched); }
  .cal-side { padding: 16px; }
  .field-row { flex-wrap: wrap; }
}

/* Décalage d'une séance + de la suite */
.shift-box {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  margin: 0 0 20px;
}

.shift-label {
  margin: 0 0 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-faint);
}

.shift-label span { color: var(--text-muted); letter-spacing: 0.4px; text-transform: none; font-weight: 500; }

.shift-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.shift-btns .btn-outline { padding: 7px 11px; font-size: 11px; }
.shift-btns [hidden] { display: none; }
.shift-resume { border-color: var(--accent); color: var(--accent); }

.cal-late-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.cal-late-head .cal-list-label { margin: 0; padding: 0; border: 0; }
.cal-late-head .btn-outline { padding: 6px 10px; font-size: 10.5px; border-color: rgba(208, 122, 127, 0.5); color: #d07a7f; }
.cal-late-head .btn-outline:hover { border-color: #d07a7f; background: rgba(208, 122, 127, 0.08); }

.toast { z-index: 300; display: flex; align-items: center; gap: 14px; }
.toast[hidden] { display: none; }

.toast-action {
  background: none;
  border: none;
  border-left: 1px solid var(--border-strong);
  padding: 0 0 0 14px;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.toast-action:hover { text-decoration: underline; }
.toast { max-width: calc(100vw - 32px); }
