/* =====================================================================
   COMPONENTS

     1. Mark and chips
     2. Buttons
     3. Page header
     4. Cards and statistics
     5. Tables
     6. Notes and empty states
     7. Skeletons
     8. Toasts
     9. Login
   ===================================================================== */

/* ------------------------------------------------------ 1. mark, chips */
.mark {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  background: linear-gradient(145deg, var(--ochre-light), var(--ochre) 55%, var(--ochre-deep));
  box-shadow: 0 4px 12px rgba(125, 71, 21, 0.28);
}
.mark--lg {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  font-size: 27px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  color: var(--ink-3);
  white-space: nowrap;
}
.chip--variety {
  color: var(--indigo);
  border-color: color-mix(in srgb, var(--indigo) 40%, transparent);
  background: var(--indigo-tint);
}
.chip--ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
  background: var(--ok-tint);
}
.chip--pending {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 40%, transparent);
  background: var(--warn-tint);
}
.chip--danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
  background: var(--danger-tint);
}
.chip--accent {
  color: var(--ochre);
  border-color: color-mix(in srgb, var(--ochre) 40%, transparent);
  background: var(--ochre-tint);
}

/* The small "à venir" marker in the navigation. */
.soon {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 1px 6px;
}

/* ----------------------------------------------------------- 2. buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 9px 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover {
  background: var(--surface-2);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}
.btn svg {
  width: 15px;
  height: 15px;
}
.btn--primary {
  background: linear-gradient(160deg, var(--ochre), var(--ochre-deep));
  border-color: var(--ochre-deep);
  color: #fff;
}
.btn--primary:hover {
  filter: brightness(1.06);
  background: linear-gradient(160deg, var(--ochre), var(--ochre-deep));
}
.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.btn--block {
  width: 100%;
}
.btn--icon {
  padding: 8px;
  border-radius: var(--r-sm);
}

/* ------------------------------------------------------ 3. page header */
.pagehead {
  margin-bottom: var(--s6);
}
.pagehead__eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ochre);
}
.pagehead h2 {
  font-size: var(--text-2xl);
  margin: var(--s2) 0 var(--s3);
}
.pagehead__rule {
  width: 46px;
  height: 3px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--ochre-light), var(--ochre-deep));
}
.pagehead__lead {
  margin-top: var(--s4);
  color: var(--ink-2);
  max-width: 62ch;
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s7) 0 var(--s3);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ------------------------------------------------- 4. cards and stats */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s5);
}
.card--flush {
  padding: 0;
  overflow: hidden;
}

.stats {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.stat {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--s4) var(--s4) var(--s4) calc(var(--s4) + 3px);
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: var(--line-strong);
}
.stat--accent::before {
  background: linear-gradient(180deg, var(--ochre-light), var(--ochre-deep));
}
.stat--warn::before {
  background: var(--warn);
}
.stat--ok::before {
  background: var(--ok);
}
.stat__key {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stat__value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.1;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.stat__note {
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin-top: 3px;
}

/* ----------------------------------------------------------- 5. tables */
.tablewrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: auto;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: start;
  padding: 10px var(--s4);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td {
  padding: 11px var(--s4);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: var(--surface-2);
}
.cell-form {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  white-space: nowrap;
}
.cell-sub {
  display: block;
  font-size: var(--text-xs);
  color: var(--ink-3);
}

/* ------------------------------------------- 6. notes and empty states */
.note {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  background: var(--ochre-tint);
  border: 1px solid color-mix(in srgb, var(--ochre) 25%, transparent);
  border-radius: var(--r-md);
  padding: var(--s4);
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.note svg {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 2px;
  color: var(--ochre);
}
.note--warn {
  background: var(--warn-tint);
  border-color: color-mix(in srgb, var(--warn) 25%, transparent);
}
.note--warn svg {
  color: var(--warn);
}
.note strong {
  font-weight: 700;
}

.empty {
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: var(--s7) var(--s5);
}
.empty__icon {
  width: 62px;
  height: 62px;
  margin: 0 auto var(--s4);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ochre-tint);
  border: 1px solid color-mix(in srgb, var(--ochre) 22%, transparent);
  color: var(--ochre);
}
.empty__icon svg {
  width: 26px;
  height: 26px;
}
.empty h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--s2);
}
.empty p {
  color: var(--ink-2);
  max-width: 54ch;
  margin: 0 auto var(--s2);
  font-size: var(--text-sm);
  line-height: 1.7;
}

/* -------------------------------------------------------- 7. skeletons */
.skel {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  height: 14px;
}
.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--line-strong) 70%, transparent),
    transparent
  );
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}
.skel-stack > * + * {
  margin-top: var(--s3);
}

/* ----------------------------------------------------------- 8. toasts */
.toasts {
  position: fixed;
  inset-block-end: var(--s5);
  inset-inline-end: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  z-index: 60;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  max-width: 380px;
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--danger);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  animation: toast-in var(--dur) var(--ease);
}
.toast--ok {
  border-inline-start-color: var(--ok);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ------------------------------------------------------------ 9. login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--s5);
}
.login {
  width: min(100%, 420px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--s6);
  animation: rise var(--dur-slow) var(--ease);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.login h1 {
  font-size: var(--text-xl);
  margin: var(--s4) 0 2px;
}
.login__sub {
  color: var(--ink-3);
  font-size: var(--text-sm);
  margin-bottom: var(--s5);
}
.field {
  margin-bottom: var(--s3);
}
.field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 5px;
}
.field input {
  width: 100%;
  padding: 11px var(--s3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
  transition: border-color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}
.field input:focus {
  outline: none;
  border-color: var(--ochre);
  box-shadow: var(--ring);
}
.alert {
  display: flex;
  gap: var(--s2);
  align-items: flex-start;
  background: var(--danger-tint);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--danger);
  border-radius: var(--r-sm);
  padding: 9px var(--s3);
  font-size: var(--text-sm);
  margin-bottom: var(--s4);
}
.login__foot {
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--ink-3);
  line-height: 1.6;
}

/* Content appears rather than snapping in. */
.reveal {
  animation: reveal var(--dur-slow) var(--ease) both;
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}


/* --------------------------------------------- 10. moderation workspace */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s4);
}
.field-inline {
  padding: 8px var(--s3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--text-sm);
  min-width: 220px;
}
.field-inline:focus {
  outline: none;
  border-color: var(--ochre);
  box-shadow: var(--ring);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s4) 0 var(--s5);
}

.detail-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 2px solid var(--line-strong);
}
.detail-head h3 {
  font-size: var(--text-xl);
}

.media-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: center;
  margin-bottom: var(--s3);
}
.media-body audio,
.media-body video {
  display: block;
  width: 100%;
}
.media-transcription {
  border-top: 1px solid var(--line);
  margin-top: var(--s3);
  padding-top: var(--s2);
}
