:root {
  color-scheme: light;
  --paper: #ece6d7;
  --sheet: #f7f3e9;
  --ink: #173f3c;
  --muted: #62716a;
  --gold: #927236;
  --line: #c9c5b5;
  --accent: #1c514c;
  --danger: #913b32;
  --radius: 8px;
  font:
    17px/1.5 Palatino,
    "Palatino Linotype",
    "Book Antiqua",
    serif;
  background: var(--paper);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
button {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.6rem 1rem;
  color: var(--ink);
  background: var(--sheet);
  line-height: 1.3;
}
button:hover {
  border-color: var(--gold);
  background: #e7e0cc;
}
.primary {
  background: var(--accent);
  color: #fff9e8;
  border-color: var(--accent);
}
.primary:hover {
  background: #123e39;
  color: white;
}
.outline {
  display: inline-block;
  border: 1px solid var(--gold);
  border-radius: 5px;
  padding: 0.6rem 1rem;
  text-decoration: none;
  background: transparent;
}
.quiet {
  background: transparent;
}
.danger {
  color: var(--danger);
}
.close {
  border: 0;
  font: 30px/1 sans-serif;
  padding: 0.25rem 0.5rem;
  background: transparent;
}
.spacer {
  flex: 1;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
input:not([type="checkbox"]):not([type="range"]),
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: #fffdf6;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  min-width: 0;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
textarea {
  resize: vertical;
}
label {
  display: block;
  font-size: 0.9rem;
  font-weight: bold;
}
label input,
label select,
label textarea {
  margin-top: 0.3rem;
  font-weight: normal;
}
label.inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-weight: normal;
}
.inline input {
  margin: 0;
}
.field-note {
  font-size: 0.83rem;
  color: var(--muted);
  margin: 0.2rem 0;
}
.muted {
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.13;
  font-weight: normal;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 1.65rem;
  line-height: 1.2;
  font-weight: normal;
}
h3 {
  font-size: 1.1rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.65rem;
  color: var(--gold);
  font-family: system-ui, sans-serif;
  margin-bottom: 0.65rem;
}
.masthead {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: var(--sheet);
}
.brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  text-decoration: none;
}
.brand img {
  border-radius: 50%;
  border: 1px solid var(--gold);
}
.brand small {
  display: block;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.13em;
}
.brand strong {
  display: block;
  font-size: 1.1rem;
  font-weight: normal;
}
.session-bar {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.85rem;
}
.session-bar button {
  padding: 0.4rem 0.6rem;
}
main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 4rem) 3rem;
  min-height: calc(100vh - 180px);
}
.notice {
  min-height: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.notice.error {
  color: var(--danger);
}
.notice.success {
  color: var(--accent);
}
.notice:empty {
  visibility: hidden;
}
.login-panel {
  max-width: 440px;
  margin: 3vh auto 4rem;
  padding: 2rem;
  border-top: 3px solid var(--gold);
  background: var(--sheet);
  box-shadow: 0 15px 45px #173f3c09;
}
.login-panel > p {
  margin: 1rem 0;
}
.login-panel h1 {
  font-size: 3rem;
}
.login-panel .muted {
  font-size: 0.83rem;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.login-panel form {
  margin-top: 1.5rem;
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 2rem;
}
.workspace-heading p {
  margin-top: 0.6rem;
}
.tabs {
  display: flex;
  gap: 0.6rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  padding: 0.8rem 1rem;
}
.tabs button[aria-current="page"] {
  border-bottom-color: var(--gold);
  font-weight: bold;
}
.tabs span {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 0.4rem;
}
.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.toolbar .search-field {
  flex: 1;
  min-width: 170px;
}
.toolbar > p {
  flex: 1;
}
.toolbar .inline {
  padding: 0.8rem 0;
}
.event-list {
  border-top: 1px solid var(--line);
}
.event-row {
  display: grid;
  grid-template-columns: 90px 100px minmax(140px, 1fr) auto;
  align-items: center;
  gap: 1.3rem;
  padding: 1.2rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.event-day {
  font-size: 2rem;
  line-height: 1;
  display: block;
  font-weight: normal;
  color: var(--gold);
}
.event-weekday {
  font-size: 0.8rem;
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
}
.event-time {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.event-title {
  font-size: 1.2rem;
  font-weight: normal;
  overflow-wrap: anywhere;
}
.event-hosts {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.portraits {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.portrait {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--sheet);
  background: #d6ddce;
  color: var(--ink);
  object-fit: cover;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
}
.portraits .portrait + .portrait {
  margin-left: -8px;
}
.row-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.row-actions button {
  font-size: 0.85rem;
  padding: 0.5rem 0.7rem;
}
.empty-state {
  padding: 4rem 1rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.empty-state h2 {
  margin-bottom: 0.7rem;
}
.empty-state p {
  color: var(--muted);
  margin-bottom: 1.3rem;
}
.host-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.host-card {
  padding: 1.3rem;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.host-card .portraits .portrait {
  width: 52px;
  height: 52px;
  font-size: 1rem;
}
.host-card h3 {
  overflow-wrap: anywhere;
}
.host-card .row-actions {
  margin-top: auto;
}
.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}
.badge {
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  background: #dce5d7;
  border-radius: 30px;
  white-space: nowrap;
}
.badge.disabled {
  background: #e9d9d3;
  color: var(--danger);
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}
.page-footer span:first-child {
  font-style: italic;
  color: var(--gold);
}
dialog {
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 1.5rem;
  width: min(560px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  box-shadow: 0 25px 100px #092e3155;
}
dialog.wide {
  width: min(1040px, calc(100% - 24px));
}
dialog::backdrop {
  background: #0a302ed1;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.3rem;
  margin-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}
.event-columns,
.avatar-columns {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
}
.fields-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.host-picker {
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
}
.choice-list {
  max-height: 230px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.host-choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: normal;
}
.host-choice:has(input:checked) {
  background: #e2e9dc;
  border-color: var(--accent);
}
.host-choice input {
  margin: 0;
}
.host-choice span:last-child {
  overflow-wrap: anywhere;
}
.avatar-setting {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.avatar-setting .quiet {
  text-align: left;
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.avatar-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-height: 48px;
}
.avatar-preview .portrait {
  width: 48px;
  height: 48px;
}
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1.2rem;
}
.form-message {
  color: var(--danger);
  font-size: 0.9rem;
  white-space: pre-line;
}
.form-message:not(:empty) {
  padding-top: 1rem;
}
.avatar-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 0.7rem;
  max-height: 440px;
  overflow: auto;
  padding: 0.3rem;
}
.avatar-choice {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem 0.3rem;
  font-weight: normal;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  position: relative;
}
.avatar-choice:has(input:checked) {
  background: #e2e9dc;
  border-color: var(--accent);
}
.avatar-choice .portrait {
  width: 60px;
  height: 60px;
}
.avatar-choice span {
  font-size: 0.75rem;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.avatar-choice input {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
}
.upload-panel {
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
}
#crop-canvas {
  display: block;
  width: min(100%, 280px);
  height: auto;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--paper);
}
.history-item {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.history-item small {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1800px) {
  :root {
    font-size: 20px;
  }
  main {
    max-width: 1800px;
  }
}
@media (max-width: 760px) {
  :root {
    font-size: 16px;
  }
  .masthead {
    align-items: flex-start;
    padding: 1rem;
  }
  .session-bar {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.3rem;
    max-width: 150px;
  }
  .session-bar #session-name {
    width: 100%;
    text-align: right;
  }
  .brand small {
    font-size: 0.55rem;
  }
  .brand strong {
    font-size: 0.95rem;
  }
  .brand img {
    width: 36px;
    height: 36px;
  }
  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbar {
    gap: 0.7rem;
  }
  .toolbar > label {
    flex: 1;
    min-width: 120px;
  }
  .toolbar .primary {
    width: 100%;
  }
  .event-row {
    grid-template-columns: 48px 70px minmax(0, 1fr);
    gap: 0.65rem;
    padding: 1rem 0;
  }
  .event-title {
    font-size: 1.05rem;
  }
  .event-hosts {
    flex-wrap: wrap;
    font-size: 0.8rem;
  }
  .event-row .row-actions {
    grid-column: 3;
    justify-self: start;
  }
  .event-day {
    font-size: 1.7rem;
  }
  .event-weekday {
    font-size: 0.68rem;
  }
  .event-time {
    font-size: 0.75rem;
  }
  .event-columns,
  .avatar-columns {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .host-picker,
  .upload-panel {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
  }
  dialog {
    padding: 1rem;
    max-height: calc(100dvh - 24px);
  }
  .dialog-footer {
    flex-wrap: wrap;
  }
  .dialog-footer .primary {
    flex: 1;
  }
  .fields-pair {
    grid-template-columns: 1fr;
  }
  .page-footer {
    flex-direction: column;
    gap: 0.3rem;
  }
  .login-panel {
    margin-top: 1rem;
    padding: 1.4rem;
  }
  .tabs {
    gap: 0;
  }
  .tabs button {
    padding: 0.7rem 0.6rem;
    font-size: 0.9rem;
  }
  .user-row {
    flex-wrap: wrap;
  }
  .avatar-gallery {
    max-height: 280px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  dialog[open] {
    animation: appear 0.15s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ── Lives TikTok : lignes de compte et dossier du live ── */
.record-list {
  border-top: 1px solid var(--line);
}
.record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.record > div:first-child {
  flex: 1 1 320px;
  min-width: 0;
}
.record p {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.record-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.record-actions button {
  font-size: 0.85rem;
  padding: 0.5rem 0.8rem;
}
.record-actions [hidden] {
  display: none;
}
.record .live-dossier-line {
  margin-top: 0.5rem;
  padding: 0.45rem 0.7rem;
  border-left: 3px solid var(--gold);
  background: #efe8d6;
  color: var(--ink);
}
.record .live-dossier-line small {
  color: var(--muted);
}
.live-dossier-dialog form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.dossier-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 0.5rem;
  max-height: 330px;
  overflow: auto;
  padding: 0.2rem;
}
.dossier-choice {
  display: grid;
  grid-template-columns: auto 64px minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: normal;
  cursor: pointer;
}
.dossier-choice:has(input:checked) {
  background: #e2e9dc;
  border-color: var(--accent);
}
.dossier-choice:has(input:focus-visible) {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.dossier-choice img {
  width: 64px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
  background: #d6ddce;
}
.dossier-choice small {
  display: block;
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dossier-choice strong {
  display: block;
  font-weight: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

/* ── Prochainement : le programme des futurs lives ── */
.upcoming-intro {
  margin: -0.6rem 0 1rem;
}
.upcoming-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.upcoming-row {
  display: grid;
  grid-template-columns: auto auto 2.6rem 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--theme, var(--gold));
}
.upcoming-row.theme-lois { --theme: #b0843a; }
.upcoming-row.theme-cosmos { --theme: #3e5f8c; }
.upcoming-row.theme-terre { --theme: #8a5a32; }
.upcoming-row.theme-vivant { --theme: #4f7a4a; }
.upcoming-row.is-hidden {
  background: repeating-linear-gradient(135deg, transparent 0 10px, #e9e3d3 10px 20px);
}
.upcoming-row.is-hidden .upcoming-thumb {
  filter: grayscale(1);
  opacity: 0.6;
}
.upcoming-num {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--gold);
  text-align: center;
}
.upcoming-thumb {
  width: 112px;
  height: 75px;
  object-fit: cover;
  border-radius: 4px;
  background: #d6ddce;
}
.upcoming-body {
  min-width: 0;
}
.upcoming-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
}
.upcoming-theme {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--theme, var(--gold));
}
.upcoming-title {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.08rem;
  font-weight: normal;
  overflow-wrap: anywhere;
}
.upcoming-hook {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.upcoming-row .row-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}
.upcoming-list .empty-state {
  list-style: none;
  margin-top: 1rem;
}
.upcoming-dialog .inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.upcoming-dialog textarea {
  resize: vertical;
  line-height: 1.45;
}
.upcoming-dialog .field-note.is-over {
  color: var(--danger);
}
.upcoming-dialog [hidden] {
  display: none !important;
}
.upcoming-media {
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.upcoming-preview {
  position: relative;
  margin: 0;
  aspect-ratio: 640 / 430;
  border-radius: 6px;
  overflow: hidden;
  background: #0e1a2e;
}
.upcoming-preview img,
.upcoming-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upcoming-preview.is-empty img {
  display: none;
}
.upcoming-preview figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.4rem 0.6rem;
  background: #0a1422cc;
  color: #f4ecd8;
  font-size: 0.75rem;
}
.upcoming-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 0.45rem;
  max-height: 230px;
  overflow: auto;
  padding: 0.2rem;
}
.upcoming-choice {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.3rem;
  font-size: 0.68rem;
  font-family: system-ui, sans-serif;
  text-align: center;
  min-width: 0;
}
.upcoming-choice img {
  width: 100%;
  aspect-ratio: 640 / 430;
  object-fit: cover;
  border-radius: 3px;
  background: #d6ddce;
}
.upcoming-choice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upcoming-choice[aria-selected="true"] {
  border-color: var(--accent);
  background: #e2e9dc;
  box-shadow: inset 0 0 0 2px var(--accent);
}
@media (max-width: 760px) {
  .upcoming-row {
    grid-template-columns: auto auto 76px minmax(0, 1fr);
    gap: 0.6rem;
  }
  .upcoming-row .upcoming-num {
    display: none;
  }
  .upcoming-thumb {
    width: 76px;
    height: 51px;
  }
  .upcoming-row .row-actions {
    grid-column: 3 / -1;
    flex-wrap: wrap;
  }
  .upcoming-row.is-trashed {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .upcoming-row.is-trashed .row-actions {
    grid-column: 1 / -1;
  }
  .upcoming-media {
    padding-left: 0;
    border-left: 0;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.upcoming-notice {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.upcoming-notice:empty {
  display: none;
}
.upcoming-undo {
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
}
.upcoming-trash-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  background: #e2e9dc;
  font-weight: bold;
}
.upcoming-bulk {
  position: sticky;
  top: 0.5rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--sheet);
  box-shadow: 0 10px 30px #092e3122;
}
.upcoming-bulk[hidden] {
  display: none;
}
.upcoming-bulk strong {
  margin-right: 0.5rem;
}
.upcoming-bulk .spacer {
  flex: 1;
}
.upcoming-bulk button {
  font-size: 0.85rem;
  padding: 0.45rem 0.8rem;
}
.upcoming-check {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--accent);
}
.upcoming-handle {
  border: 0;
  background: transparent;
  padding: 0.4rem 0.35rem;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--muted);
  cursor: grab;
  touch-action: none;
}
.upcoming-handle:hover:not(:disabled) {
  color: var(--ink);
  background: #e7e0cc;
}
.upcoming-handle:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}
.upcoming-handle:focus-visible,
.upcoming-title:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.upcoming-list.is-sorting {
  user-select: none;
  cursor: grabbing;
}
.upcoming-list.is-sorting .upcoming-handle {
  cursor: grabbing;
}
.upcoming-row.is-dragging {
  position: relative;
  z-index: 2;
  background: var(--sheet);
  box-shadow: 0 14px 40px #092e3140;
  outline: 2px solid var(--accent);
}
.upcoming-row.is-selected {
  background: #e7ecdf;
}
.upcoming-row.is-hidden.is-selected {
  background: repeating-linear-gradient(135deg, #e7ecdf 0 10px, #dfe5d6 10px 20px);
}
button.upcoming-title {
  display: block;
  margin-top: 0.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1.08rem;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
button.upcoming-title:hover {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.upcoming-stamp {
  margin: 0.25rem 0 0;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  color: var(--muted);
}
.upcoming-row .row-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.upcoming-row.is-trashed {
  grid-template-columns: 2.6rem 112px minmax(0, 1fr) auto;
  opacity: 0.92;
}
.upcoming-media-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.upcoming-dialog .dialog-head .field-note {
  margin-top: 0.3rem;
}
.upcoming-dialog .form-message button {
  margin-left: 0.4rem;
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
}
/* Aperçu de la carte publique (reprend la page Prochainement : nuit, or, accent du thème). */
.upcoming-card-preview {
  --c: #e0b35c;
  border: 1px solid rgba(244, 236, 216, 0.12);
  border-top: 2px solid var(--c);
  border-radius: 3px;
  overflow: hidden;
  background: linear-gradient(160deg, #0e1a2e, #070c1a);
  color: #f4ecd8;
  box-shadow: 0 16px 40px #05081155;
}
.upcoming-card-preview.theme-cosmos { --c: #7eb6ff; }
.upcoming-card-preview.theme-terre { --c: #d9895b; }
.upcoming-card-preview.theme-vivant { --c: #7dbe8a; }
.upcoming-card-preview.is-hidden {
  opacity: 0.6;
}
.ucp-media {
  position: relative;
  aspect-ratio: 640 / 430;
  background: #050811;
}
.ucp-media img,
.ucp-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ucp-num {
  position: absolute;
  left: 0.7rem;
  bottom: 0.4rem;
  font-size: 2.4rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px #f3d98a;
  text-shadow: 0 2px 16px #000a;
}
.ucp-soon {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid #d6ac5580;
  border-radius: 2px;
  background: #050811c0;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f3d98a;
}
.ucp-body {
  padding: 0.8rem 1rem 1rem;
}
.ucp-kicker {
  margin: 0;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--c);
}
.upcoming-card-preview h3 {
  margin: 0.35rem 0 0;
  font-size: 1.15rem;
  font-weight: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.upcoming-card-preview h3.is-placeholder {
  color: #8f8c78;
  font-style: italic;
}
.ucp-hook {
  margin: 0.35rem 0 0;
  font-style: italic;
  font-size: 0.9rem;
  color: #f3d98a;
  overflow-wrap: anywhere;
}
.ucp-hook[hidden],
.ucp-teaser[hidden] {
  display: none;
}
.ucp-teaser {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: #c0b59a;
}
.ucp-teaser summary {
  cursor: pointer;
  color: #d6ac55;
}
.ucp-teaser ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  max-height: 180px;
  overflow: auto;
}
.upcoming-history {
  width: min(640px, calc(100% - 24px));
}
.upcoming-history-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  max-height: 60vh;
  overflow: auto;
}
.upcoming-history-list li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.upcoming-history-list p {
  margin: 0;
}
.upcoming-history-list button {
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
}
