/* Tableau de bord — administration globale du site (PRÉFAC FASI) */
.admin-body {
  margin: 0;
  min-height: 100vh;
  background: hsl(240 20% 97%);
  color: var(--foreground);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 17.5rem) 1fr;
  min-height: 100vh;
}

/* Grand écran : seule la colonne principale défile ; la sidebar reste fixe dans la fenêtre */
@media (min-width: 1281px) {
  .admin-layout {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
  }

  .admin-sidebar {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .admin-main {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* Zone scrollable entre en-tête et pied de page (footer fixe en bas) */
  .admin-main > .admin-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .admin-main > footer {
    flex-shrink: 0;
  }
}

@media (max-width: 1280px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-layout.is-sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .admin-layout.is-sidebar-collapsed .admin-sidebar {
    width: min(17.5rem, 88vw);
    min-width: 0;
    padding: 1.25rem 0;
    opacity: 1;
    pointer-events: none;
    border-right: 1px solid hsl(0 0% 100% / 0.08);
  }

  .admin-layout.is-sidebar-collapsed .admin-sidebar.is-open {
    pointer-events: auto;
  }

  .admin-layout.is-sidebar-collapsed .admin-sidebar-reopen {
    display: none !important;
  }

  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(17.5rem, 88vw);
    max-height: 100dvh;
    height: 100dvh;
    z-index: 910;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 8px 0 32px hsl(0 0% 0% / 0.2);
    pointer-events: auto;
    visibility: visible;
  }

  .admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 900;
    background: hsl(0 0% 0% / 0.45);
    touch-action: manipulation;
  }

  .admin-sidebar-backdrop.is-visible {
    display: block;
  }

  .admin-topbar {
    z-index: 915;
  }

  .admin-sidebar-reopen {
    display: none !important;
  }

  body.admin-nav-open {
    overflow: hidden;
  }
}

.admin-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 2.75rem;
  min-width: 2.75rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 1;
}

.admin-menu-toggle__icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  width: 1.125rem;
  height: 0.875rem;
}

.admin-menu-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.admin-menu-toggle[aria-expanded="true"] .admin-menu-toggle__bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.admin-menu-toggle[aria-expanded="true"] .admin-menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.admin-menu-toggle[aria-expanded="true"] .admin-menu-toggle__bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 1280px) {
  .admin-topbar {
    padding-top: max(1.25rem, env(safe-area-inset-top, 0px));
  }

  .admin-topbar .admin-sidebar-toggle {
    display: none !important;
  }
}

.admin-topbar__row .admin-menu-toggle--topbar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--card, #fff);
  color: var(--foreground, #0f172a);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 2.75rem;
  min-width: 2.75rem;
}

.admin-topbar__row .admin-menu-toggle--topbar .admin-menu-toggle__icon {
  color: var(--foreground, #0f172a);
}

.admin-sidebar {
  background: var(--fasi-dark);
  color: hsl(0 0% 100% / 0.88);
  padding: 1.25rem 0 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  align-content: start;
  min-height: 0;
  max-height: 100dvh;
  overflow: hidden;
  border-right: 1px solid hsl(0 0% 100% / 0.08);
  box-sizing: border-box;
}

.admin-sidebar__brand {
  flex-shrink: 0;
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid hsl(0 0% 100% / 0.1);
  margin-bottom: 0.5rem;
}

.admin-sidebar__brand strong {
  display: block;
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.admin-sidebar__brand span {
  font-size: 0.75rem;
  color: var(--fasi-cyan);
  font-weight: 500;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.65rem 0.5rem;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.admin-sidebar__logout {
  flex-shrink: 0;
  margin: 0.5rem 0 0;
  padding: 0 1rem 0.5rem;
  box-sizing: border-box;
}

.admin-nav button,
.admin-nav a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.85rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  box-sizing: border-box;
}

.admin-nav a {
  cursor: pointer;
}

.admin-nav button:hover,
.admin-nav a:hover {
  background: hsl(0 0% 100% / 0.08);
  color: #fff;
}

.admin-nav button.is-active,
.admin-nav a.is-active {
  background: hsl(195 100% 40% / 0.25);
  color: #fff;
  font-weight: 600;
}

.admin-sidebar__exit {
  flex-shrink: 0;
  margin: 0.35rem 0.65rem max(1.25rem, env(safe-area-inset-bottom, 0px));
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: hsl(0 0% 100% / 0.65);
  text-decoration: none;
  border: 1px solid hsl(0 0% 100% / 0.15);
  text-align: center;
  transition: background 0.15s, color 0.15s;
}

.admin-sidebar__exit:hover {
  background: hsl(0 0% 100% / 0.08);
  color: #fff;
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-topbar__row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.admin-topbar__titles {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-sidebar-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--card, #fff);
  color: var(--foreground, #0f172a);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-sidebar-toggle:hover {
  background: hsl(240 20% 96%);
  border-color: hsl(220 14% 80%);
}

.admin-sidebar-toggle__icon {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.admin-layout.is-sidebar-collapsed .admin-sidebar-toggle__icon {
  transform: rotate(-135deg);
}

.admin-sidebar-reopen {
  display: none;
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  padding: 0.65rem 0.45rem 0.65rem 0.35rem;
  border: 1px solid var(--border, #e5e7eb);
  border-left: none;
  border-radius: 0 0.5rem 0.5rem 0;
  background: #fff;
  color: var(--foreground, #0f172a);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 4px 0 16px hsl(0 0% 0% / 0.08);
}

.admin-sidebar-reopen:hover {
  background: hsl(240 20% 96%);
}

@media (min-width: 1281px) {
  .admin-topbar__row .admin-menu-toggle--topbar {
    display: none !important;
  }

  .admin-sidebar-toggle {
    display: inline-flex;
  }

  .admin-layout.is-sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
  }

  .admin-layout.is-sidebar-collapsed .admin-sidebar {
    width: 0;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    border-right: none;
  }

  .admin-layout.is-sidebar-collapsed .admin-sidebar-reopen {
    display: block;
  }
}

.admin-topbar h1 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--foreground);
}

.admin-topbar p {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.admin-content {
  padding: 1.5rem;
  flex: 1;
}

/* Console live : même logique que l’ancienne page publique, dans la colonne admin */
.live-admin-shell.page-live {
  padding-bottom: 1rem;
}

.admin-panel {
  display: none;
  max-width: 56rem;
}

.admin-panel.is-active {
  display: block;
}

.admin-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px hsl(240 100% 17% / 0.06);
}

.admin-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
}

.admin-card p,
.admin-card li {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted-foreground);
}

.admin-card p + p,
.admin-card ul {
  margin-top: 0.65rem;
}

.admin-card ul {
  padding-left: 1.25rem;
}

.admin-card code {
  font-size: 0.78rem;
  padding: 0.12rem 0.35rem;
  border-radius: 0.25rem;
  background: hsl(195 100% 40% / 0.1);
  color: var(--fasi-cyan);
  font-family: ui-monospace, monospace;
}

/* Tableau de bord admin */
.admin-dashboard {
  max-width: 72rem;
}

.admin-dashboard__hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.admin-dashboard__hero-text {
  flex: 1 1 18rem;
  min-width: 0;
}

.admin-dashboard__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--foreground);
}

.admin-dashboard__hero-text p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted-foreground);
}

.admin-dashboard__hero-actions {
  flex: 0 1 auto;
}

.admin-dashboard__alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.admin-dashboard__alert {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  text-decoration: none;
  border: 1px solid transparent;
}

.admin-dashboard__alert--warn {
  background: hsl(38 92% 95%);
  border-color: hsl(38 80% 75%);
  color: hsl(32 80% 28%);
}

.admin-dashboard__alert--info {
  background: hsl(210 100% 97%);
  border-color: hsl(210 70% 82%);
  color: hsl(215 60% 30%);
}

.admin-dashboard__section-title {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}

.admin-dashboard__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.admin-dashboard__grid--live {
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
}

.admin-dashboard__tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.admin-dashboard__tile:hover {
  border-color: hsl(215 80% 75%);
  box-shadow: 0 4px 14px hsl(240 100% 17% / 0.08);
  transform: translateY(-1px);
}

.admin-dashboard__tile--primary {
  border-color: hsl(215 80% 72%);
  background: linear-gradient(180deg, hsl(210 100% 98%) 0%, #fff 100%);
}

.admin-dashboard__tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-dashboard__tile-label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.3;
}

.admin-dashboard__count {
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary, #2563eb);
}

.admin-dashboard__badge {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: hsl(38 92% 90%);
  color: hsl(32 80% 28%);
  white-space: nowrap;
}

.admin-dashboard__tile-desc {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted-foreground);
}

.admin-dashboard__tile-meta {
  font-size: 0.75rem;
}

.admin-dashboard__tile-cta {
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary, #2563eb);
}

.admin-dashboard__notice {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.admin-dashboard__activity {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-dashboard__activity-block h4 {
  margin: 0 0 0.65rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.admin-dashboard__activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-dashboard__activity-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.admin-dashboard__activity-list li:last-child {
  border-bottom: none;
}

.admin-dashboard__activity-list a {
  color: var(--foreground);
  text-decoration: none;
}

.admin-dashboard__activity-list a:hover {
  text-decoration: underline;
}

.admin-dashboard__activity-kind {
  display: inline-block;
  margin-right: 0.35rem;
  font-weight: 600;
  color: var(--primary, #2563eb);
}

.admin-dashboard__activity-list time {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.admin-dashboard__activity-block p {
  margin: 0.65rem 0 0;
  font-size: 0.8125rem;
}

/* Hub live (/admin/live) */
.admin-live-hub {
  max-width: 72rem;
}

.admin-live-hub__alert-meta {
  font-weight: 400;
  opacity: 0.9;
}

.admin-live-hub__workflow {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.admin-live-hub__workflow-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0;
  padding: 1rem 1.1rem;
}

.admin-live-hub__workflow-step p {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted-foreground);
}

.admin-live-hub__workflow-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: hsl(215 80% 94%);
  color: var(--primary, #2563eb);
  font-size: 0.875rem;
  font-weight: 700;
}

.admin-live-hub__columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-live-hub__panel h3 {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.admin-live-hub__panel-foot {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
}

.admin-live-hub__tags {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-live-hub__tags li {
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: hsl(210 100% 97%);
  border: 1px solid hsl(210 70% 88%);
  color: hsl(215 50% 32%);
}

.admin-live-hub__tips {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.admin-live-hub__tips li + li {
  margin-top: 0.45rem;
}

.admin-live-hub__tips code {
  font-size: 0.72rem;
  word-break: break-all;
}

.admin-table--compact th,
.admin-table--compact td {
  padding: 0.45rem 0.6rem;
  font-size: 0.8125rem;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.admin-live-results-filters {
  margin-bottom: 1.5rem;
}

.admin-live-results-filters .admin-form-grid {
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  align-items: end;
}

.admin-live-results-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

.admin-live-results-filters__actions .admin-btn {
  margin: 0;
}

.admin-live-results-pres-summary {
  margin-bottom: 1.5rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.admin-actions a,
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.admin-actions a:hover,
.admin-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.admin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.admin-btn-primary {
  background: var(--fasi-cyan);
  color: var(--primary-foreground);
}

.admin-btn-secondary {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.admin-table th,
.admin-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: hsl(240 20% 96%);
  font-weight: 700;
  color: var(--foreground);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table a {
  color: var(--fasi-cyan);
  font-weight: 600;
}

.admin-breadcrumb {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin: 0 0 1rem;
}

.admin-breadcrumb a {
  color: var(--fasi-cyan);
  font-weight: 600;
  text-decoration: none;
}

.admin-breadcrumb a:hover {
  text-decoration: underline;
}

.admin-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
  background: hsl(195 100% 40% / 0.15);
  color: var(--fasi-cyan);
  margin-left: 0.35rem;
}

.admin-badge--ok {
  background: hsl(142 76% 36% / 0.15);
  color: hsl(142 76% 28%);
}

.admin-badge--draft {
  background: hsl(40 90% 50% / 0.2);
  color: hsl(30 50% 28%);
}

.admin-image-field__preview-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0.5rem 0 0.75rem;
}

.admin-image-field__preview {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0.35rem;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--muted, #f8fafc);
}

.admin-image-field__file-input {
  display: none !important;
}

.admin-image-field__upload {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.admin-table-title {
  display: block;
  font-weight: 700;
  color: var(--foreground);
}

.admin-table-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.2rem;
}

.admin-table-empty {
  text-align: center;
  color: var(--muted-foreground);
  padding: 1.5rem !important;
}

.admin-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.admin-btn--danger {
  background: transparent;
  border: 1px solid var(--destructive);
  color: var(--destructive);
}

.admin-examens-form .admin-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.admin-examens-form .admin-form-grid .form-group--full {
  grid-column: 1 / -1;
}

.admin-examens-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.admin-examens-form .form-input,
.admin-examens-form .form-textarea,
.admin-examens-form select.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: #fff;
  font: inherit;
  font-size: 0.875rem;
}

.admin-examens-form .form-textarea {
  resize: vertical;
  min-height: 5rem;
}

.admin-checkbox-label input {
  width: auto;
  margin: 0;
}

.admin-alert {
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  background: hsl(40 100% 95%);
  border: 1px solid hsl(40 80% 80%);
  font-size: 0.8125rem;
  color: hsl(30 30% 25%);
  margin-bottom: 1rem;
}

.admin-alert strong {
  color: var(--foreground);
}

.admin-grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .admin-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-hub-card {
  display: block;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px hsl(240 100% 17% / 0.06);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.admin-hub-card:hover {
  border-color: hsl(195 100% 40% / 0.45);
  box-shadow: 0 8px 28px hsl(195 100% 40% / 0.12);
  transform: translateY(-2px);
}

.admin-hub-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
}

.admin-hub-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

/* Indicateurs tableau de bord (alignés sur l’accueil public) */
.admin-dash-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.admin-dash-metric {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 3px hsl(240 100% 17% / 0.06);
}

.admin-dash-metric strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--fasi-cyan);
  line-height: 1.2;
}

.admin-dash-metric span {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  margin-top: 0.35rem;
}

.admin-muted-caption {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin: 0 0 0.75rem;
}

.admin-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: hsl(195 100% 40% / 0.12);
  color: var(--fasi-cyan);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.live-results-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(0, 180, 216, 0.12);
  color: var(--fasi-cyan, #00b4d8);
}

.admin-live-results-session-head__title {
  margin: 0;
  font-size: 1.05rem;
}

.admin-live-results-session-head__meta .admin-muted-caption {
  margin: 0.35rem 0 0;
}

.live-results-history-polls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.live-results-history-card {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  background: #fff;
}

.live-results-history-card__header {
  margin-bottom: 0.75rem;
}

.live-results-history-card__header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.live-results-history-card .live-results-region {
  min-height: 2rem;
}

/* F12.2 — Impression : colonne « résultats » console live */
@media print {
  body.admin-body .admin-sidebar,
  body.admin-body .admin-sidebar-backdrop,
  body.admin-body .admin-topbar,
  body.admin-body .admin-breadcrumb,
  body.admin-body .live-host-banner,
  body.admin-body .live-grid > .live-panel:first-of-type,
  body.admin-body .live-results-export,
  body.admin-body .live-quiz-podium,
  body.admin-body #live-present-overlay,
  body.admin-body .admin-main > footer {
    display: none !important;
  }

  body.admin-body .admin-layout {
    display: block !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  body.admin-body .admin-main {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body.admin-body .admin-main > .admin-content {
    overflow: visible !important;
    padding: 0 !important;
  }

  body.admin-body #live-admin-workspace {
    display: block !important;
  }

  body.admin-body .live-grid {
    display: block !important;
  }

  body.admin-body .live-grid > .live-panel:last-of-type {
    break-inside: avoid;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  body.admin-body,
  body.admin-body .admin-main {
    background: #fff !important;
    color: #000 !important;
  }
}

/* Boîte à suggestions — tableau type back-office (sobre) */
.admin-table-wrap--suggestions {
  background: hsl(0 0% 100%);
  border-radius: 0.5rem;
  border: 1px solid hsl(220 14% 88%);
  box-shadow: 0 1px 2px hsl(220 20% 12% / 0.04);
}

.admin-table--suggestions {
  font-size: 0.8125rem;
}

.admin-table--suggestions thead th {
  background: hsl(220 14% 97%);
  color: hsl(220 10% 38%);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  text-transform: none;
  border-bottom: 1px solid hsl(220 14% 88%);
  padding: 0.65rem 0.85rem;
  white-space: nowrap;
}

.admin-table--suggestions tbody td {
  vertical-align: top;
  border-bottom: 1px solid hsl(220 14% 93%);
  padding: 0.8rem 0.85rem;
  color: hsl(220 15% 18%);
}

.admin-table--suggestions tbody tr:last-child td {
  border-bottom: none;
}

.admin-table--suggestions tbody tr:hover td {
  background: hsl(220 20% 99%);
}

.admin-suggestion-id {
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  color: hsl(220 10% 46%);
  white-space: nowrap;
  width: 2.75rem;
}

.admin-suggestion-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: hsl(220 12% 28%);
}

.admin-suggestion-type {
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(220 15% 18%);
}

.admin-suggestion-author strong {
  font-weight: 600;
}

.admin-suggestion-author-meta {
  font-size: 0.75rem;
  color: hsl(220 8% 42%);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.admin-suggestion-author-meta a {
  word-break: break-all;
  color: hsl(195 100% 34%);
  font-weight: 500;
}

.admin-suggestion-message {
  max-width: 22rem;
  max-height: 13rem;
  overflow-y: auto;
  margin: 0;
  padding: 0 0 0 0.75rem;
  border: none;
  border-left: 2px solid hsl(220 14% 86%);
  background: transparent;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.5;
  font-size: 0.8125rem;
  color: hsl(220 15% 20%);
}

/* Panneaux actions / réponse */
.admin-suggestion-panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  max-width: 17rem;
}

.admin-suggestion-panel__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(220 8% 40%);
  line-height: 1.35;
}

.admin-suggestion-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
}

.admin-suggestion-toolbar__field {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-suggestion-toolbar__field .input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.65rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  border-color: hsl(220 14% 85%);
}

.admin-suggestion-btn-apply {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 0.375rem;
}

.admin-suggestion-reply-cell {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  max-width: 12.5rem;
}

.admin-suggestion-reply-snippet {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: hsl(220 15% 22%);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-suggestion-reply-none {
  margin: 0;
  font-size: 0.75rem;
  color: hsl(220 8% 46%);
}

.admin-suggestion-reply-at {
  margin: 0;
  font-size: 0.72rem;
  color: hsl(220 8% 46%);
}

.admin-suggestion-reply-open {
  justify-content: center;
}

/* Page « Répondre » */
.admin-suggestion-reply-page-msg,
.admin-suggestion-reply-page-published {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: hsl(220 22% 97%);
  border: 1px solid hsl(220 14% 90%);
  border-radius: 0.375rem;
}

.admin-suggestion-reply-page-published {
  border-left: 3px solid hsl(220 14% 78%);
  background: hsl(220 18% 98%);
}

@media (max-width: 1280px) {
  .admin-table--suggestions thead {
    display: none;
  }

  .admin-table--suggestions tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid hsl(220 14% 88%);
    border-radius: 0.5rem;
    background: hsl(0 0% 100%);
    box-shadow: none;
    overflow: hidden;
  }

  .admin-table--suggestions tbody tr:hover td {
    background: transparent;
  }

  .admin-table--suggestions tbody td {
    display: block;
    border-bottom: 1px solid hsl(220 14% 93%);
    padding: 0.85rem 1rem !important;
  }

  .admin-table--suggestions tbody td:last-child {
    border-bottom: none;
  }

  .admin-table--suggestions tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: hsl(220 10% 42%);
    margin-bottom: 0.4rem;
  }

  .admin-table--suggestions tbody td:not([data-label])::before {
    display: none;
  }

  .admin-table--suggestions tbody td[colspan]::before {
    display: none !important;
  }

  .admin-suggestion-message {
    max-width: none;
    max-height: none;
    padding-left: 0.65rem;
  }

  .admin-suggestion-panel {
    max-width: none;
  }

  .admin-suggestion-toolbar {
    flex-wrap: wrap;
  }

  .admin-suggestion-toolbar__field {
    flex: 1 1 100%;
  }

  .admin-suggestion-btn-apply {
    flex: 1 1 auto;
    width: 100%;
    min-height: 2.5rem;
  }

  .admin-suggestion-reply-cell {
    max-width: none;
  }

  .admin-suggestion-reply-open {
    width: 100%;
  }
}

/* —— Éditeur présentations live (phase B) —— */
.live-pres-editor {
  max-width: 100%;
  min-width: 0;
}

.live-pres-editor .admin-examens-form .form-group {
  margin-bottom: 0.75rem;
}

.live-pres-editor .admin-examens-form .form-group--full {
  grid-column: 1 / -1;
}

.live-pres-editor .admin-examens-form label:not(.admin-checkbox-label) {
  display: block;
}

.live-pres-editor .admin-examens-form label.admin-checkbox-label,
.live-pres-editor .admin-examens-form .form-group > label:has(input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.live-pres-editor .admin-examens-form input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 0.8125rem;
}

.live-pres-editor .admin-examens-form .form-input,
.live-pres-editor .admin-examens-form .form-textarea,
.live-pres-editor .admin-examens-form select.form-input {
  box-sizing: border-box;
  max-width: 100%;
}

.live-pres-editor__poll-extra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.75rem;
}

.live-pres-editor__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.live-pres-editor__header-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1 1 16rem;
}

.live-pres-editor__title-input {
  flex: 1 1 12rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.live-pres-editor__guest-name-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  max-width: 22rem;
}

.live-pres-editor__status-select {
  flex: 0 0 auto;
  min-width: 8rem;
}

.live-pres-editor__header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.live-pres-editor__header-actions .admin-btn-secondary {
  color: var(--foreground, #0f172a);
  border-color: var(--border, #e5e7eb);
}

.live-pres-editor__header-actions a.admin-btn-secondary:hover {
  color: var(--foreground, #0f172a);
}

.live-pres-editor__grid {
  display: grid;
  grid-template-columns: minmax(11rem, 14rem) minmax(0, 1fr) minmax(17rem, 26rem);
  gap: 1rem;
  align-items: start;
  min-height: 28rem;
  width: 100%;
  max-width: 100%;
}

.live-pres-editor.is-rail-collapsed .live-pres-editor__grid {
  grid-template-columns: 0 minmax(0, 1fr) minmax(17rem, 26rem);
}

.live-pres-editor.is-panel-collapsed .live-pres-editor__grid {
  grid-template-columns: minmax(11rem, 14rem) minmax(0, 1fr) 0;
}

.live-pres-editor.is-rail-collapsed.is-panel-collapsed .live-pres-editor__grid {
  grid-template-columns: 0 minmax(0, 1fr) 0;
}

.live-pres-editor__rail,
.live-pres-editor__panel {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  padding: 0.75rem;
  min-width: 0;
  max-width: 100%;
  transition: opacity 0.2s ease, padding 0.2s ease, border-color 0.2s ease;
}

.live-pres-editor__panel,
.live-pres-editor__rail {
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 42rem);
  min-height: 0;
  overflow: hidden;
}

.live-pres-editor__rail-head {
  flex-shrink: 0;
}

.live-pres-editor.is-rail-collapsed .live-pres-editor__rail {
  padding: 0;
  opacity: 0;
  pointer-events: none;
  border-color: transparent;
  overflow: hidden;
}

.live-pres-editor.is-panel-collapsed .live-pres-editor__panel {
  padding: 0;
  opacity: 0;
  pointer-events: none;
  border-color: transparent;
  overflow: hidden;
}

.live-pres-editor__panel-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.live-pres-editor__panel-form {
  width: 100%;
  min-width: 0;
}

.live-pres-editor__panel .live-pres-editor__poll-extra {
  grid-template-columns: 1fr;
}

.live-pres-editor__rail-head,
.live-pres-editor__panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.live-pres-editor__panel-head {
  flex-shrink: 0;
  margin-bottom: 0.65rem;
}

.live-pres-editor__panel-head .live-pres-editor__panel-title {
  margin: 0;
  flex: 1 1 auto;
}

.live-pres-collapse-btn {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border-radius: 0.35rem;
  border: 1px solid var(--border, #e5e7eb);
  background: hsl(240 20% 98%);
  color: var(--foreground, #0f172a);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.live-pres-collapse-btn:hover {
  background: hsl(240 20% 94%);
}

.live-pres-collapse-btn--ghost {
  width: auto;
  height: auto;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.live-pres-editor__preview-toolbar {
  display: none;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.live-pres-editor.is-rail-collapsed #live-pres-toggle-rail,
.live-pres-editor.is-panel-collapsed #live-pres-toggle-panel {
  opacity: 0;
  pointer-events: none;
}

.live-pres-editor__preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 20rem;
}

.live-pres-editor__preview-canvas {
  flex: 1 1 auto;
  min-height: 18rem;
}

@media (max-width: 1100px) {
  .live-pres-editor__preview-toolbar {
    display: flex;
  }

  #live-pres-toggle-rail,
  #live-pres-toggle-panel {
    display: none;
  }
}

@media (min-width: 1101px) {
  .live-pres-editor__preview-toolbar {
    display: none;
  }
}

.live-pres-editor__slide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.live-pres-editor__slide-item {
  display: flex;
  align-items: stretch;
  gap: 0.2rem;
  margin-bottom: 0.2rem;
  border-radius: 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  border: 1px solid transparent;
}

.live-pres-editor__slide-item.is-active {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
}

.live-pres-editor__slide-grip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  padding: 0.35rem 0.1rem;
  color: var(--muted-foreground, #64748b);
  font-size: 0.75rem;
  cursor: grab;
  user-select: none;
  border-radius: 0.25rem;
}

.live-pres-editor__slide-grip:active {
  cursor: grabbing;
}

.live-pres-editor__slide-select {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0.45rem 0.4rem;
  border: none;
  border-radius: 0.3rem;
  background: transparent;
  font: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.live-pres-editor__slide-select:hover {
  background: rgba(0, 0, 0, 0.04);
}

.live-pres-editor__slide-item.is-active .live-pres-editor__slide-select {
  font-weight: 600;
}

.live-pres-editor__slide-num {
  flex: 0 0 1.25rem;
  font-weight: 700;
  opacity: 0.6;
}

.live-pres-editor__slide-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-pres-editor__preview-canvas {
  padding: 1.75rem 2.25rem;
  border-radius: 0.5rem;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid var(--border, #e5e7eb);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  box-sizing: border-box;
}

.live-pres-editor__preview-canvas > .admin-muted-caption {
  color: hsl(0 0% 100% / 0.65);
  text-align: center;
}

.live-pres-editor__preview-canvas .live-content-slide {
  max-width: none;
  width: 100%;
}

.live-pres-editor__preview-canvas .live-content-slide__title,
.live-pres-editor__preview-canvas .live-present-slide__title {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  margin: 0 0 1rem;
  color: #f8fafc;
}

.live-pres-editor__preview-canvas .live-content-slide__body,
.live-pres-editor__preview-canvas .live-content-slide__bullets,
.live-pres-editor__preview-canvas .live-present-slide__bullets {
  color: hsl(0 0% 100% / 0.88);
}

.live-pres-editor__preview-canvas .live-content-slide__bullets,
.live-pres-editor__preview-canvas .live-present-slide__bullets {
  list-style-type: disc;
}

.live-pres-editor__preview-canvas .live-content-slide__bullets li,
.live-pres-editor__preview-canvas .live-present-slide__bullets li {
  margin-bottom: 0.45rem;
}

.live-pres-editor__preview-canvas .live-content-slide--split .live-content-slide__img {
  max-height: 14rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.live-pres-editor__preview-canvas .live-content-slide__poll-type {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(195 100% 70%);
}

.live-pres-editor__preview-canvas .live-content-slide--poll ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  font-size: 1.05rem;
}

.live-pres-editor__preview-canvas .live-content-slide__img {
  border: 1px solid hsl(0 0% 100% / 0.15);
}

.live-pres-editor__media-fields {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0 0;
  border: none;
  border-top: 1px dashed var(--border, #e5e7eb);
}

.live-pres-editor__media-fields legend {
  font-weight: 600;
  padding: 0 0.25rem;
}

.live-pres-media-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  max-width: 100%;
}

.live-pres-editor__panel .admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.live-pres-editor__panel .admin-toolbar-actions .admin-btn {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
}

.live-pres-editor__form-actions {
  margin-top: 0.75rem;
}

.live-pres-slide-save-status {
  margin: 0.75rem 0 0;
  min-height: 1.25rem;
  font-size: 0.8125rem;
}

.live-pres-slide-save-status.is-error {
  color: #b91c1c;
  font-weight: 600;
}

.live-pres-editor__btn-delete {
  color: #b91c1c !important;
}

.admin-btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.admin-btn.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid hsl(0 0% 100% / 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: admin-btn-spin 0.65s linear infinite;
}

.admin-btn-secondary.is-loading::after {
  border-color: hsl(220 14% 75%);
  border-top-color: var(--fasi-cyan, #00b4d8);
}

@keyframes admin-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.live-pres-media-preview {
  object-fit: cover;
  border-radius: 0.35rem;
  border: 1px solid var(--border, #e5e7eb);
  background: #f1f5f9;
}

.live-slide-row.is-live {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.06);
}

.live-pres-editor__preview-poll {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.live-pres-editor__panel-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.live-pres-editor__poll-fields {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0 0;
  border: none;
  border-top: 1px dashed var(--border, #e5e7eb);
}

.live-pres-editor__poll-fields legend {
  font-weight: 600;
  padding: 0 0.25rem;
}

.live-pres-deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.live-pres-deck-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  padding: 1rem;
  background: var(--card, #fff);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.live-pres-deck-card__meta {
  font-size: 0.8125rem;
  color: var(--muted-foreground, #64748b);
}

.live-pres-access-code {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  background: hsl(215 80% 94%);
  color: hsl(215 60% 32%);
}

.live-pres-deck-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

@media (max-width: 1100px) {
  .live-pres-editor__grid,
  .live-pres-editor.is-rail-collapsed .live-pres-editor__grid,
  .live-pres-editor.is-panel-collapsed .live-pres-editor__grid,
  .live-pres-editor.is-rail-collapsed.is-panel-collapsed .live-pres-editor__grid {
    grid-template-columns: 1fr;
  }

  .live-pres-editor.is-rail-collapsed .live-pres-editor__rail {
    display: none;
  }

  .live-pres-editor.is-panel-collapsed .live-pres-editor__panel {
    display: none;
  }

  .live-pres-editor__panel,
  .live-pres-editor__rail {
    max-height: none;
  }
}

/* Prévisualisation plein écran (projection) depuis l’éditeur */
.live-pres-projection-preview {
  z-index: 500;
}

.live-pres-projection-preview .live-present__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 0.65rem;
  position: relative;
  z-index: 2;
}

.live-pres-projection-preview #live-pres-projection-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.live-pres-projection-preview .live-present__question {
  flex-shrink: 0;
  margin-top: min(3vh, 1.5rem);
}

.live-pres-projection-preview .live-results-region {
  max-width: 52rem;
}

.live-pres-projection-preview .live-present__nav-status {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(0 0% 100% / 0.85);
  min-width: 6rem;
  text-align: center;
}

.live-pres-projection-preview .live-present__badge {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: hsl(0 0% 100% / 0.15);
  color: hsl(0 0% 100% / 0.9);
  border: 1px solid hsl(0 0% 100% / 0.25);
}

body.live-pres-preview-open {
  overflow: hidden;
}

/* —— Toasts & dialogues admin (FasiAdminUi) —— */
.admin-ui-toast-host {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.admin-ui-toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 8px 28px hsl(0 0% 0% / 0.18);
  opacity: 0;
  transform: translateX(0.75rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.admin-ui-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.admin-ui-toast--ok {
  background: hsl(142 76% 94%);
  color: hsl(142 72% 22%);
  border: 1px solid hsl(142 50% 75%);
}

.admin-ui-toast--err {
  background: hsl(0 84% 96%);
  color: hsl(0 72% 32%);
  border: 1px solid hsl(0 70% 82%);
}

.admin-ui-toast--info {
  background: hsl(210 100% 96%);
  color: hsl(210 80% 28%);
  border: 1px solid hsl(210 70% 82%);
}

.admin-ui-dialog {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.admin-ui-dialog.quiz-hidden {
  display: none !important;
}

.admin-ui-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: hsl(0 0% 0% / 0.45);
}

.admin-ui-dialog__card {
  position: relative;
  width: min(28rem, 100%);
  max-height: min(80vh, 32rem);
  overflow: auto;
  padding: 1.25rem 1.35rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  box-shadow: 0 16px 48px hsl(0 0% 0% / 0.22);
}

.admin-ui-dialog__title {
  margin: 0 0 0.65rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--foreground, #0f172a);
}

.admin-ui-dialog__body {
  margin: 0 0 1.15rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted-foreground, #64748b);
}

.admin-ui-dialog__body p {
  margin: 0 0 0.5rem;
}

.admin-ui-dialog__body p:last-child {
  margin-bottom: 0;
}

.admin-ui-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.admin-ui-dialog__btn--danger {
  background: hsl(0 72% 46%) !important;
  border-color: hsl(0 72% 40%) !important;
  color: #fff !important;
}

body.admin-ui-dialog-open {
  overflow: hidden;
}
